DynamicCoupled¶
- class sharpy.solvers.dynamiccoupled.DynamicCoupled[source]¶
The
DynamicCoupledsolver couples the aerodynamic and structural solvers of choice to march forward in time the aeroelastic system’s solution.Using the
DynamicCoupledsolver requires that an instance of theStaticCoupledsolver is called in the SHARPy solutionflowwhen defining the problem case.Input data (from external controllers) can be received and data sent using the SHARPy network interface, specified through the setting
network_settingsof this solver. For more detail on how to send and receive data see theNetworkLoaderdocumentation.Changes to the structural properties or external forces that depend on the instantaneous situation of the system can be applied through
runtime_generators. These runtime generators are parsed through dictionaries, with the key being the name of the generator and the value the settings for such generator. The currently availableruntime_generatorsareExternalForcesandModifyStructure.The settings that this solver accepts are given by a dictionary, with the following key-value pairs:
Name
Type
Description
Default
Options
print_infoboolWrite status to screen
Truestructural_solverstrStructural solver to use in the coupled simulation
Nonestructural_solver_settingsdictDictionary of settings for the structural solver
Noneaero_solverstrAerodynamic solver to use in the coupled simulation
Noneaero_solver_settingsdictDictionary of settings for the aerodynamic solver
Nonen_time_stepsintNumber of time steps for the simulation
NonedtfloatTime step
Nonefsi_substepsintMax iterations in the FSI loop
70fsi_tolerancefloatConvergence threshold for the FSI loop
1e-05structural_substepsintNumber of extra structural time steps per aero time step.
0is a fully coupled simulation.0relaxation_factorfloatRelaxation parameter in the FSI iteration.
0is no relaxation and ->1is very relaxed0.2final_relaxation_factorfloatRelaxation factor reached in
relaxation_stepswithdynamic_relaxationon0.0minimum_stepsintNumber of minimum FSI iterations before convergence
3relaxation_stepsintLength of the relaxation factor ramp between
relaxation_factorandfinal_relaxation_factorwithdynamic_relaxationon100dynamic_relaxationboolControls if relaxation factor is modified during the FSI iteration process
Falsepostprocessorslist(str)List of the postprocessors to run at the end of every time step
[]postprocessors_settingsdictDictionary with the applicable settings for every
postprocessor. Everypostprocessorneeds its entry, even if empty{}controller_iddictDictionary of id of every controller (key) and its type (value)
{}controller_settingsdictDictionary with settings (value) of every controller id (key)
{}cleanup_previous_solutionboolControls if previous
timestep_infoarrays are reset before running the solverFalseinclude_unsteady_force_contributionboolIf on, added mass contribution is added to the forces. This depends on the time derivative of the bound circulation. Check
filter_gamma_dotin the aero solverFalsesteps_without_unsteady_forceintNumber of initial timesteps that don’t include unsteady forces contributions. This avoids oscillations due to no perfectly trimmed initial conditions
0pseudosteps_ramp_unsteady_forceintLength of the ramp with which unsteady force contribution is introduced every time step during the FSI iteration process
0correct_forces_methodstrFunction used to correct aerodynamic forces. See
sharpy.generators.polaraeroforcesEfficiencyCorrection,PolarCorrectioncorrect_forces_settingsdictSettings for corrected forces evaluation
{}network_settingsdictNetwork settings. See
NetworkLoaderfor supported entries{}runtime_generatorsdictThe dictionary keys are the runtime generators to be used. The dictionary values are dictionaries with the settings needed by each generator.
{}- convergence(k, tstep, previous_tstep, struct_solver, aero_solver, with_runtime_generators)[source]¶
Check convergence in the FSI loop.
Convergence is determined as:
\[\epsilon_q^k = \frac{|| q^k - q^{k - 1} ||}{q^0}\]\[\epsilon_\dot{q}^k = \frac{|| \dot{q}^k - \dot{q}^{k - 1} ||}{\dot{q}^0}\]FSI converged if \(\epsilon_q^k < \mathrm{FSI\ tolerance}\) and \(\epsilon_\dot{q}^k < \mathrm{FSI\ tolerance}\)
- initialise(data, custom_settings=None)[source]¶
Controls the initialisation process of the solver, including processing the settings and initialising the aero and structural solvers, postprocessors and controllers.
- static interpolate_timesteps(step0, step1, out_step, coeff)[source]¶
Performs a linear interpolation between step0 and step1 based on coeff in [0, 1]. 0 means info in out_step == step0 and 1 out_step == step1.
Quantities interpolated: * steady_applied_forces * unsteady_applied_forces * velocity input in Lagrange constraints
- process_controller_output(controlled_state)[source]¶
This function modified the solver properties and parameters as requested from the controller.
This keeps the main loop much cleaner, while allowing for flexibility
Please, if you add options in here, always code the possibility of that specific option not being there without the code complaining to the user.
If it possible, use the same Key for the new setting as for the setting in the solver. For example, if you want to modify the structural_substeps variable in settings, use that Key in the info dictionary.
As a convention: a value of None returns the value to the initial one specified in settings, while the key not being in the dict is ignored, so if any change was made before, it will stay there.