New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced linear solver #196
Conversation
Initial rework on LinearVector to improve tracking on linear variables as the state-space changes size.
Another major overhaul. Methods adjusted to check for the type of variable. Variables made properties of the SS object and checks implemented in the ss.series() method
Variables were not being deep copied, causing trouble
Since PRs require a successful test run and our workflow only runs if python files, submodules or test files are changed, it could be the case that for a PR that only changes docs (for example), the status could be left as pending. Therefore, this test runs when a PR is opened and no changes are made to these files, thus reporting a successful test that allows the merger
Update AsymptoticStability and FrequencyResponse post-processors
@@ -14,6 +14,7 @@ | |||
import sharpy.utils.cout_utils as cout | |||
import sharpy.structure.utils.modalutils as modalutils | |||
import warnings | |||
from sharpy.linear.utils.ss_interface import LinearVector, StateVariable, OutputVariable, InputVariable | |||
|
|||
|
|||
class FlexDynamic(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How well the linearisation plays with the polars corrections in the aero? It should be all right since the linearised external forcing terms are taken from the .structure.steady_app_forces which includes those...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things are missing, yes, the steady forces with the corrections are included but these only appear in the stiffening and damping terms added to the UVLM (i.e. geometric effects only). The UVLM matrices would be missing the updated-with-polar circulation at the ref state.
The other correction is done on the output of the aeroelastic system, with the polars being modified in stability axes to change the lift only at this stage. I just realised I have this elsewhere so I'll merge it in a separate PR in a second.
This is Sec 4.1.1 and Ch8 further work of my thesis :)
@@ -121,3 +121,55 @@ def span_chord(i_node_surf, zeta): | |||
dir_chord = algebra.unit_vector(dir_chord) | |||
|
|||
return dir_span, span, dir_chord, chord | |||
|
|||
|
|||
def find_aerodynamic_solver(settings): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amendable for a general solution:
solver_interface.dictionary_of_solvers -> to give you the solvers or even solver_interface.solver_from_string(solver) such that looping over the solvers in flow you can directly get the classification:
if solver_i.solver_classification == 'Aero':
... (same structure as in the code)
elif solver_i.solver_classification == 'Coupled:
...
Worthy? Only if more solvers are to be added in the equilibrium solution. But it shows off the nice possibilities of the solvers class!!
|
||
return self.data | ||
|
||
def get_freestream_velocity(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't be the same one that u_inf in settings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but a few quirks are needed in the case of restarted solutions, because the settings may have not been parsed and thus are still strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good stuff, see if some of the comments are worth a quick update and let's merge!
needed for cases where the aircraft is flying with non-zero velocity in stationary air
Numerous additions and improvements to the SHARPy linear solver. A big PR, but hopefully it will be worth it
New features
State-space variable tracker. Keeps track of state-space variables (inputs, outputs and states), showing as the system is modified by new gains or projections, how the input and output channels evolve. This is implemented in the
sharpy.linear.src.libss.StateSpace
andsharpy.linear.src.libss.Gain
classes, using the variable tracker features developed insharpy.linear.utils.ss_interface
. Recommended for all new developments using state-spaces and gains.Stability derivatives post-processor. Detail settings here
New linear gusts. Support for single, span-wise constant input (
LeadingEdge
). Spanwise varying gusts supported throughMultiLeadingEdge
gust. This is done using interpolation from gust "monitoring-stations", that keep track of the convection of the gust onto the lattice vertices.Enhanced
LinDynamicSim
solver with easier input settings. May present a few issues but in general it is working, although linear time domain simulations are not the stronghold of SHARPyCan convert linear UVLM to continuous time and assemble the aeroelastic state-space in CT as well
Other changes
libss
sharpy.linear.src.libss.ss
tosharpy.linear.src.libss.StateSpace
, this accounts for the majority of the file changesModal
solver setting fromwrite_dat
tosave_data