# The Effect of Porous Media on Wave-Induced Sloshing in a Floating Tank
## 2 Methodology
### Floating Body Dynamics and FSI Coupling  
In this paper, the floating body motion has three degrees of freedom, namely it is free to surge (horizontal movement along the \(x\) direction), have (vertical movement along the \(z\) direction), and pitch (angular movement about the \(y\)-axis), as shown in Figure 1b. Therefore, the equations of translational and angular motions can be expressed as:  
\[M_{\mathrm{g}}\ddot{\mathbf{x}}_{\mathrm{G}}=\mathbf{F}+M_{\mathrm{b}}\mathbf{g} \tag{20}\]  
\[I_{\mathrm{G}}\ddot{\mathbf{\theta}}_{\mathrm{G}}=\mathbf{M} \tag{21}\]  
where \(\ddot{\mathbf{x}}_{\mathrm{G}}\) and \(\ddot{\mathbf{\theta}}_{\mathrm{G}}\) are the translational and angular acceleration of the body center, respectively, while \(M_{\mathrm{b}}\) and \(I_{\mathrm{G}}\) are the mass and moment of inertia of the body, respectively. The resultant force \(\mathbf{F}\) and overturning moment \(\mathbf{M}\) arising from the sloshing fluid and waves can be expressed as:  
\[\mathbf{F}=\int_{S_{\mathrm{w1}}+S_{\mathrm{w2}}}p\mathbf{n}\;dS \tag{22}\]  
\[\mathbf{M}=\int_{S_{\mathrm{w1}}+S_{\mathrm{w2}}}p(\mathbf{r}\times\mathbf{n})\;dS \tag{23}\]  
where \(S_{\mathrm{w1}}\) and \(S_{\mathrm{w2}}\) are the wetted boundaries of the floating body's contact with the sloshing water and waves, respectively, and \(\mathbf{r}\) is the position vector of a fluid particle with respect to the body center. The pressure can be obtained by the Bernoulli equation as:  
\[p=-\rho\bigg{(}\frac{\partial\phi}{\partial t}+\frac{1}{2}|\
abla\phi|^{2}+g \eta\bigg{)} \tag{24}\]  
To solve the motion equations, the Newmark method based on the constant average acceleration assumption is employed as:  
\[\ddot{\mathbf{x}}_{\mathrm{G},k+1}=\frac{\mathbf{F}_{k+1}}{M_{\mathrm{b}}} \tag{25}\]  
\[\dot{\mathbf{x}}_{\mathrm{G},k+1}=\dot{\mathbf{x}}_{\mathrm{G},k}+0.5\Delta t\big{(} \ddot{\mathbf{x}}_{\mathrm{G},k}+\ddot{\mathbf{x}}_{\mathrm{G},k+1}\big{)} \tag{26}\]  
\[\mathbf{x}_{\mathrm{G},k+1}=\mathbf{x}_{\mathrm{G},k}+\Delta t\dot{\mathbf{x}}_{\mathrm{G },k}+0.25\Delta t^{2}\big{(}\ddot{\mathbf{x}}_{\mathrm{G},k}+\ddot{\mathbf{x}}_{ \mathrm{G},k+1}\big{)} \tag{27}\]  
where \(k\) is the time step. Note that the above equations are available for solving the translational motion, while the angular motion can be solved by switching the force and mass in Equation (25) to the overturning moment and moment of inertia, respectively. This scheme is unconditionally stable and it does not need a sub-step. However, the resultant force is not known a priori because, to solve the fluid field, the body kinematics used in Equations (9) and (18) should be given but they depend on the body motion as:  
\[\dot{\mathbf{x}}=\Big{(}\dot{\mathbf{x}}_{\mathrm{G}}+\dot{\mathbf{\theta}}_{\mathrm{G}} \times\mathbf{r}\Big{)}\cdot\mathbf{n} \tag{28}\]  
\[\ddot{\mathbf{x}}=\Big{[}\ddot{\mathbf{x}}_{\mathrm{G}}+\ddot{\mathbf{\theta}}_{\mathrm{G}} \times\mathbf{r}+\dot{\mathbf{\theta}}_{\mathrm{G}}\times\Big{(}\dot{\mathbf{\theta}}_{ \mathrm{G}}\times\mathbf{r}\Big{)}\Big{]}\cdot\mathbf{n} \tag{29}\]  
Therefore, an iterative algorithm, illustrated in Algorithm 1, is used to ensure equilibrium between the body motion and fluid reaction.