## 2 Flexible Aircraft with Sloshing Integrated Modeling
Thus, the generalised sloshing forces vector \(\mathsf{g}\) is constructed as a sum of contributions \(\mathsf{g}^{(i)}\) of individual tanks:  
\[\mathsf{g}\,=\,\sum_{i=1}^{N_{T}}\mathsf{g}^{(i)}=\sum_{i=1}^{N_{T}}\left( \mathsf{g}_{l}^{(i)}+\mathsf{g}_{nl}^{(i)}\right) \tag{14}\]  
with \(N_{T}\) denoting the number of tanks. The linear contribution arises from the presence of lateral standing waves and is modelled using equivalent mechanical models that allow exertion of the force and moment by the liquid, following the application of a small lateral displacement or rotation. The lateral sloshing forces for each tank in the Laplace domain are expressed by means of a generalised sloshing forces matrix \(\mathsf{G}(s)^{(i)}\) as  
\[\breve{\mathsf{g}}_{l}^{(i)}=\bar{\mathsf{G}}(s)^{(i)}\Delta\bar{\eta} \tag{15}\]  
Reference [5] provides a formulation of the linear lateral sloshing forces based on the analytical model (Ref. [6]), and accordingly, the generalized sloshing forces can be recast as follows:  
\[\breve{\mathsf{g}}_{l}^{(i)}\,=\,s^{2}\,\bar{\mathsf{A}}_{s}^{(i)}\,\,\Delta \bar{\eta}+\left(s^{2}\bar{\mathsf{B}}_{s}^{(i)}+\bar{\mathsf{C}}_{s}^{(i)} \right)\bar{\tau}^{(i)} \tag{16}\]  
where the linear sloshing modal coordinates \(\bar{\tau}^{(i)}\) are introduced as  
\[\bar{\tau}^{(i)}=\bigg{[}\left(s^{2}\mathsf{I}+s\mathsf{D}_{s}^{(i)}+\Omega _{s}^{2(i)}\right)^{-1}\left(s^{2}\,\bar{\mathsf{B}}_{s}^{(i)}+\bar{\mathsf{ C}}_{s}^{(i)}\right)^{\top}\bigg{]}\Delta\bar{\eta} \tag{17}\]  
and \(\bar{\mathsf{A}}_{s}^{(i)},\bar{\mathsf{B}}_{s}^{(i)},\bar{\mathsf{C}}_{s}^{( i)},\mathsf{D}_{s}^{(i)}\) and \(\Omega_{s}^{2(i)}\) are the coefficient matrices of the lateral sloshing operator. It is worth mentioning that \(\Omega_{s}^{2(i)}\) and \(\bar{\mathsf{D}}_{s}^{(i)}\) are, respectively, the natural frequency and damping modal coefficient matrices of the considered linear sloshing modes. The same representation of the sloshing force can be achieved by a linear frequency-domain approach as in Ref. [4,32]. The inverse Laplace transform of Equations (15) and (17) leads to  
\[\mathsf{g}^{(i)}\,=\,\bar{\mathsf{A}}_{s}^{(i)}\Delta\bar{\eta}+ \bar{\mathsf{B}}_{s}^{(i)}\bar{\tau}+\bar{\mathsf{C}}_{s}^{(i)}\bar{\tau}^{(i)} \tag{18}\] \[\bar{\rm e}=q_{D}\,{\rm Q}(k,M_{\infty})\,\Delta\bar{\eta} \tag{10}\]0  
in which the second-order dynamics of the sloshing modal coordinates are highlighted. The nonlinear force contribution is instead related to the so-called _dynamic sloshing force_\(\Delta f_{S_{z}}^{(i)}\) given by the relative acceleration of the liquid particles with respect to the \(i\)-\(th\) tank non-inertial frame (see Ref. [25]). The _n-th_ component of \(\mathfrak{g}_{nl}^{(i)}\) is the projection (following the approximation previously discussed after Equation (9)) of the sloshing dynamic force on each _n-th_ rigid and elastic modal shape \(\mathbf{\psi}_{n}\) as:  
\[\bar{\rm e}=q_{D}\,{\rm Q}(k,M_{\infty})\,\Delta\bar{\eta} \tag{10}\]1  
where \(\mathbf{x}_{T_{i}}\) is the geometrical center of the _i-th_ tank, \(\mathbf{i}_{3}\) is the vertical unit vector of the inertial frame of reference and \(\mathbf{\psi}_{n}(\mathbf{x}_{T_{i}})\) is the _n-th_ mode shape evaluated in the _i-th_ tank center. The formulation is implemented in Simulink(r), as illustrated in Figure 1, creating a numerical model combining a purely differential linear problem describing flight dynamics, aeroelasticity and linear sloshing, and a data-driven model representing nonlinear vertical sloshing dynamics. Concerning the nonlinear sloshing block, Refs. [25; 33] provide further details about nonlinear reduced-order modeling based on a neural network driven by experimental data obtained with a suitable scaled tank. The neural network receives the tank's vertical velocity expressed in the inertial frame of reference and provides an estimate of the already defined dynamic sloshing force \(\Delta f_{S_{z}}\).