# Study on Oscillatory and Undulatory Motion of Robotic Fish
## 2 Methodology
### Mathematical Modeling  
To study single-phase flow around robotic fish, three-dimensional, steady-state, incompressible, isothermal, and turbulent flow is considered. The mass conservation equation is as follows:  
\[\frac{\partial\rho}{\partial t}+\
abla\cdot(\rho U)=0 \tag{6}\]  
The momentum conservation equation is as follows:  
\[\frac{\partial(\rho U)}{\partial t}+\
abla\cdot(\rho U\cdot U)-\
abla\cdot \left(v_{eff}\
abla U\right)=-\
abla p^{\prime}+\
abla\cdot\left(v_{eff} \
abla U\right)^{T}+\rho g \tag{7}\]  
where \(p^{\prime}\) is the corrected pressure, \(g\) is the local gravity acceleration vector (adopted value 9.81 m/s\({}^{2}\)), and \(v_{eff}\) is the effective viscosity, calculated as follows:  
\[v_{eff}=v+v_{t} \tag{8}\]  
where  
Figure 4: Lift-based thrust generation. \(v_{eff}\) is the effective viscosity;  
\(v\) is the kinematic viscosity;  
\(v_{t}\) is the turbulence viscosity. Incorporating turbulence model equations is essential for capturing the turbulent phenomenon within the flow. Turbulence encompasses dynamic fluctuations in both time and space within the velocity and pressure fields. This intricate process can profoundly influence the flow's behavior. Turbulence arises when the inertial forces exerted on the fluid outweigh the viscous forces, typically manifesting in flows with high Reynolds numbers. Additionally, turbulence can be induced by surface roughness, giving rise to secondary flow patterns [18]. Mesh for mathematical modeling is shown in Figure 5.  
The exact \(k-\varepsilon\) equations contain many unknown and unmeasurable terms. For a much more practical approach, the standard \(k-\varepsilon\) turbulence model is used, which is based on our best understanding of the relevant processes, thus minimizing unknowns and presenting a set of equations which can be applied to a large number of turbulent applications. For turbulent kinetic energy, \(k\),  
\[\frac{\partial(\rho k)}{\partial t}+\frac{\partial(\rho ku_{i})}{\partial x_{ i}}=\frac{\partial}{\partial x_{i}}\left[\frac{u_{i}}{\sigma_{k}}\frac{ \partial k}{\partial x_{j}}\right]+2\mu_{i}E_{ij}E_{ij}-\rho\varepsilon \tag{9}\]  
For dissipation, \(\varepsilon\),  
\[\frac{\partial(\rho\varepsilon)}{\partial t}+\frac{\partial(\rho\varepsilon u _{i})}{\partial x_{i}}=\frac{\partial}{\partial x_{j}}\left[\frac{u_{i}}{ \sigma_{\varepsilon}}\frac{\partial\varepsilon}{\partial x_{j}}\right]+C_{1 \varepsilon}\frac{\varepsilon}{\chi}2\mu_{i}E_{ij}E_{ij}-C_{2\varepsilon 0}\frac{ \varepsilon^{2}}{k} \tag{10}\]  
The rate of change in \(k\) or \(\varepsilon\) in time + the transport of \(k\) or \(\varepsilon\) by advection = the transport of \(k\) or \(\varepsilon\) by diffusion + the rate of production of \(k\) or \(\varepsilon\)--the rate of destruction of \(k\) or \(\varepsilon\)[19], where  
\(u_{i}\) is the velocity component in corresponding direction;  
\(E_{ij}\) is the component of rate of deformation;  
\(\mu_{i}=\rho C_{\mu}\frac{k^{2}}{\varepsilon}\) is the Eddy viscosity. The equations also consist of some adjustable constants, \(\sigma_{k}=1.00,\ \sigma_{\varepsilon}=1.30\), \(C_{1\varepsilon}=1.44,\ C_{2\varepsilon}=1.92,\ \text{and}\ C_{\mu}=0.09\). The values of these constants have been arrived at by numerous iterations of data fitting for a wide range of turbulent flows. Viscosity affects fluid flow near surfaces, reducing momentum within the boundary layer and influencing overall behavior. This interaction requires analyzing viscosity's retarding effect and the associated pressure distribution to determine the drag coefficient. Drag on a submerged body combines frictional drag, from surface shear stress, and pressure drag, related to flow pressure variations and wake formation. A dimensionless drag coefficient quantifies these interactions.