LinearUVLM¶
Linear UVLM System Assembler
Produces state-space model of the form
\[\begin{split}\mathbf{x}_{n+1} &= \mathbf{A}\,\mathbf{x}_n + \mathbf{B} \mathbf{u}_{n+1} \\ \mathbf{y}_n &= \mathbf{C}\,\mathbf{x}_n + \mathbf{D} \mathbf{u}_n\end{split}\]where the state, inputs and outputs are:
\[\mathbf{x}_n = \{ \delta \mathbf{\Gamma}_n,\, \delta \mathbf{\Gamma_{w_n}},\, \Delta t\,\delta\mathbf{\Gamma}'_n,\, \delta\mathbf{\Gamma}_{n-1} \}\]\[\mathbf{u}_n = \{ \delta\mathbf{\zeta}_n,\, \delta\mathbf{\zeta}'_n,\, \delta\mathbf{u}_{ext,n} \}\]\[\mathbf{y} = \{\delta\mathbf{f}\}\]with \(\mathbf{\Gamma}\in\mathbb{R}^{MN}\) being the vector of vortex circulations, \(\mathbf{\zeta}\in\mathbb{R}^{3(M+1)(N+1)}\) the vector of vortex lattice coordinates and \(\mathbf{f}\in\mathbb{R}^{3(M+1)(N+1)}\) the vector of aerodynamic forces and moments. Note that \((\bullet)'\) denotes a derivative with respect to time.
Note that the input is atypically defined at time
n+1. If the settingremove_predictor = Truethe predictor termu_{n+1}is eliminated through the change of state[1]:\[\begin{split}\mathbf{h}_n &= \mathbf{x}_n - \mathbf{B}\,\mathbf{u}_n \\\end{split}\]such that:
\[\begin{split}\mathbf{h}_{n+1} &= \mathbf{A}\,\mathbf{h}_n + \mathbf{A\,B}\,\mathbf{u}_n \\ \mathbf{y}_n &= \mathbf{C\,h}_n + (\mathbf{C\,B}+\mathbf{D})\,\mathbf{u}_n\end{split}\]which only modifies the equivalent \(\mathbf{B}\) and \(\mathbf{D}\) matrices.
The
integr_ordersetting refers to the finite differencing scheme used to calculate the bound circulation derivative with respect to time \(\dot{\mathbf{\Gamma}}\). A first order scheme is used whenintegr_order == 1\[\dot{\mathbf{\Gamma}}^{n+1} = \frac{\mathbf{\Gamma}^{n+1}-\mathbf{\Gamma}^n}{\Delta t}\]If
integr_order == 2a higher order scheme is used (but it isn’t exactly second order accurate [1]).\[\dot{\mathbf{\Gamma}}^{n+1} = \frac{3\mathbf{\Gamma}^{n+1}-4\mathbf{\Gamma}^n + \mathbf{\Gamma}^{n-1}} {2\Delta t}\]References
[1] Franklin, GF and Powell, JD. Digital Control of Dynamic Systems, Addison-Wesley Publishing Company, 1980
[2] Maraniello, S., & Palacios, R.. State-Space Realizations and Internal Balancing in Potential-Flow Aerodynamics with Arbitrary Kinematics. AIAA Journal, 57(6), 1–14. 2019. https://doi.org/10.2514/1.J058153
The settings that this solver accepts are given by a dictionary, with the following key-value pairs:
Name
Type
Description
Default
Options
dtfloatTime step
0.1integr_orderintIntegration order of the circulation derivative.
21,2ScalingDictdictDictionary of scaling factors to achieve normalised UVLM realisation.
{}remove_predictorboolRemove the predictor term from the UVLM equations
Trueuse_sparseboolAssemble UVLM plant matrix in sparse format
TruedensityfloatAir density
1.225remove_inputslist(str)List of inputs to remove.
u_gustto remove external velocity input.[]u_gustgust_assemblerstrSelected linear gust assembler.
leading_edgerom_methodlist(str)List of model reduction methods to reduce UVLM.
[]rom_method_settingsdictDictionary with settings for the desired ROM methods, where the name of the ROM method is the key to the dictionary
{}vortex_radiusfloatDistance below which inductions are not computed
sharpy.utils.constants.vortex_radius_defcfl1boolIf it is
True, it assumes that the discretisation complies with CFL=1TrueThe settings that this solver accepts are given by a dictionary, with the following key-value pairs:
Name
Type
Description
Default
Options
lengthfloatReference length to be used for UVLM scaling
1.0speedfloatReference speed to be used for UVLM scaling
1.0densityfloatReference density to be used for UVLM scaling
1.0Assembles the linearised UVLM system, removes the desired inputs and adds linearised control surfaces (if present).
With all possible inputs present, these are ordered as
\[\mathbf{u} = [\boldsymbol{\zeta},\,\dot{\boldsymbol{\zeta}},\,\mathbf{w},\,\delta]\]Control surface inputs are ordered last as:
\[[\delta_1, \delta_2, \dots, \dot{\delta}_1, \dot{\delta_2}]\]
Remove certain inputs from the input vector
- To do:
Support for block UVLM
- Parameters
remove_list (list) – Inputs to remove
Unpacks the input vector into the corresponding grid coordinates, velocities and external velocities.
- Parameters
u_n (np.ndarray) – UVLM input vector. May contain control surface deflections and external velocities.
- Returns
Tuple containing
zeta,zeta_dotandu_ext, accounting for the effect of control surfaces.- Return type
tuple
Transform column vectors used in the state space formulation into SHARPy format
The column vectors are transformed into lists with one entry per aerodynamic surface. Each entry contains a matrix with the quantities at each grid vertex.
\[\mathbf{y}_n \longrightarrow \mathbf{f}_{aero}\]\[\mathbf{x}_n \longrightarrow \mathbf{\Gamma}_n,\, \mathbf{\Gamma_w}_n,\, \mathbf{\dot{\Gamma}}_n\]If the
track_bodyoption is on, the output forces are projected from the linearization frame, to the G frame. Note that the linearisation frame is:equal to the FoR G at time 0 (linearisation point)
rotates as the body frame specified in the
track_body_number
- Parameters
y_n (np.ndarray) – Column output vector of linear UVLM system
x_n (np.ndarray) – Column state vector of linear UVLM system
u_n (np.ndarray) – Column input vector of linear UVLM system
aero_tstep (AeroTimeStepInfo) – aerodynamic timestep information class instance
- Returns
Tuple containing:
- forces (list):
Aerodynamic forces in a list with
n_surfentries. Each entry is a(6, M+1, N+1)matrix, where the first 3 indices correspond to the components inx,yandz. The latter 3 are zero.- gamma (list):
Bound circulation list with
n_surfentries. Circulation is stored in an(M+1, N+1)matrix, corresponding to the panel vertices.- gamma_dot (list):
Bound circulation derivative list with
n_surfentries. Circulation derivative is stored in an(M+1, N+1)matrix, corresponding to the panel vertices.- gamma_star (list):
Wake (free) circulation list with
n_surfentries. Wake circulation is stored in an(M_star+1, N+1)matrix, corresponding to the panel vertices of the wake.
- Return type
tuple