# Optimal Attitude Determination for the CR200 Underwater Walking Robot
## 2 Problem Definition and Method of Simulation
### CFD Simulation
#### 2.2.2 Computation Model Steup  
This subsection describes the statements under which the CFD simulation was conducted. Figure 2 shows the entire domain where the simulation is performed. The geometric center (CG) of the CR200 body is positioned at \((7L,5L,0.5H+\lambda)\) from the origin point of the domain. A uniform flow field is imposed as the inlet condition, while a pressure outlet condition is applied at the outlet. Slip wall conditions are applied to the bottom, top, and side domain boundaries. A no-slip wall condition, which allows for the development of a boundary layer, is applied to the CR200 surface. Treating the sea floor as a frictionless slip wall, its effect is examined in terms of blockage and no-flow penetration, commonly referred to as ground effect in many near-surface vehicles, such as WIG (Wing-In-Ground effect) ships or racing cars. If the bottom surface is treated as a no-slip wall, a more rigorous study of the boundary layer interaction with the walking robot could be performed, which would require significantly more complex simulations; this is reserved for future research. Therefore, the current simulation focuses on a frictionless seafloor as the first stage of investigating the ground effect on the walking robot. Accurate and efficient CFD simulation requires generating an appropriate mesh. In this study, polyhedral meshes were employed due to their reduced sensitivity to distortion and enhanced flexibility in handling complex geometries [26]. Additionally, a boundary layer mesh, commonly referred to as the prism layer, was adopted to model the boundary layer developing near surfaces where viscous effects are significant. Figure 2: Layout of the computational domain for flow past the CR200. To accurately resolve this region, the non-dimensional wall distance \(y^{+}\), which includes the log layer (\(30\leq y^{+}\leq 300\)), was set to 75 [27]. This setting ensures an appropriate resolution within the viscous sublayer, where the effects of viscosity are particularly pronounced. Based on this mesh configuration, four different mesh systems were created to conduct a grid convergence study. Figure 3 presents the results of four different mesh configurations with varying base sizes, all maintaining the same mesh topology, shown on a longitudinal plane. For quantifying grid errors, the magnitude of the lift coefficient \(|C_{L}|\) was calculated for different mesh densities. The lift coefficient \(C_{L}\) is calculated as \(C_{L}=F_{z}/(0.5\rho L_{\infty}^{2}A)\) where \(A\) represents the projected area of the CR200, calculated as the product of its length and width. Figure 4 displays the results of the grid convergence test, indicating that the lift coefficient converges to a specific value as the mesh density increases. The difference between the fine and finest meshes is within 0.56%, confirming monotonic convergence. Based on these results, all CFD simulations were conducted using fine mesh. Figure 5 illustrates the final mesh system for simulating flow around the CR200. Figure 4: Grid convergence study for the magnitude of lift coefficients using four different mesh densities. Figure 3: Computational mesh configurations for the grid convergence test on the longitudinal plane. Number of meshes: (**a**) 0.90 \(M\); (**b**) 1.56 \(M\); (**c**) 2.65 \(M\); (**d**) 4.74 \(M\), where \(M\) denotes million. To maintain numerical stability, the Courant-Friedrichs-Lewy (CFL) number was set to 0.5, thereby limiting the time-step size \(\Delta t\) to meet the CFL condition. The CFL number is calculated as \(\text{CFL}=(v\times\Delta t)/h\), where \(v\) represents the constant current velocity applied in this study, and \(h\) denotes the representative mesh size. Here, \(v\) is defined as \(v=U_{\infty}\) for the simulation, and \(h\) is determined from the mesh structure as \(h=\left(\sum_{i=1}^{N}V_{i}\right)^{\frac{1}{3}}/N\), with \(V_{i}\) being the volume of the \(i\)-th mesh cell.