Springer Lecture Notes in Computer Science
Springer Lecture Notes in Computer Science
1 Introduction
occupied cells. The level set method, on the hand, is the signed distance which
is positive outside the body and negative when the grid point is internal. The
surface will be implicitly specified by the zero level set value. Compared to the
volume of fluid method, the level set is easier to compute from CAD file formats.
In graphic visualization, the signed distance field is generated from the .STL file
using graphics processing units (GPUs) [14, 18, 2]. For fluid-structure interac-
tion, the distributed bounding box hierarchy has been applied to compute the
level set function from the CAD file, and then inserted into the Cartesian mesh
[19, 8, 6]. Although this method can reduce the computing time for complex ge-
ometries, it is difficult to implement and requires a complicated data structure.
In this study, we will present a simple method to calculate the level set function
from the .STL file. The method can be time-consuming for bodies with huge
numbers of surface elements. However, the calculation is performed only once,
at the initial stage. Therefore, this step only slightly affects to total time of the
computation. In order to compute the fluid flows over a structure, we applied
the finite volume method combined with the cut-cell approach to discretize the
governing equations [4, 5, 11, 16]
the projected point from grid point to the edge (p2 ) and vertices (p3 ). The
distance from x2 and x3 to the edge or vertices are
d2 = |x2 − p2 |, (2)
d3 = |x3 − p3 |. (3)
Then, the minimum length is determined by
The sign value of distance In order to decide if the grid point is inside or
outside the object, we need to assign the sign value to the computed distance
from section 2.1. In our study, we used the ray casting method [17], which deter-
mines the sign by inserting a ray from the target point and counts the number
of intersections between the ray and the object. If this is an odd number the
point is inside the object. If the number of intersections is even it means that
the point is outside.
discretize the governing equations. For a cell at which both fluid and solid are
present, as in Fig.2, the velocities locates at the face centre of the fluid con-
trol volume, while the pressure locates at original cell centre. Appy FVM for
continuity and momentum equations, Eqs. 5 and 6 can be rewritten as
X
u · nf Af + uw · nF,w Aw = 0, (7)
Af
∂ X X
V (αf ρu) = −αf V (∇p+ρg)+ µ∇u · nf Af +τ w ·nf,w Aw − ρuu · nf Af ,
∂t
Af Af
(8)
where, Af is fluid surface area, Af,w is wall area, nf is the normal vector at the
fluid surface, nF,w is the normal vector pointing to fluid field at the wall, uw is
the wall velocity, V is the volume of the cell, αf is the fluid volume fraction in
the cell and τ w is the wall shear stress tensor. The wall shear stress is computed
based on the distance from velocity position to the solid wall (∆h), as follows,
u − uw
τw = µ . (9)
∆h
The details of discretization are given in the work of Dang et al. [5]
Fig. 2: The cell contains both fluid and solid. The interface between two phases
is marked with red colour.
3 Numerical results
3.1 Level set function for a ship
In this test, we focus on generating the level set function from a .STL file.
The object is a vessel which is created by Fussion 360. Figure 3a shows the
Title Suppressed Due to Excessive Length 5
ship structure with simple design. Figure 3b shows the surfaces of the ship as
being assembled from triangles. The size of the ship is 332 × 168 × 600 mm.
Computing the level set function for the whole computational domain will be
time-consuming. Therefore, we only perform the computation for local points
which are close to the surface. Firstly, we will loop through all triangles and de-
termine the cell containing a triangle. After that, we will create a box which will
contain the triangle plus buffer space. We assign the Band W idth as the number
of grid point inside the the buffer space. In our work, we set Band W idth = 4.
We will perform the computation for the level set function for all grid points
inside the box. Then, we will compare all values to chose the smallest distance.
Note that the normal vector of a triangle giving by the .STL file is not correct.
Therefore, it is important to recompute the normal based on the location of
triangles vertices. Figure 4 shows the level set contour obtained when we used
the ray casting method to determine the sign value. In general, the method can
compute the level set accurately.
(a) (b)
Fig. 3: The shape of ship (a) and the triangular wire-frame representing the
surface of the object (b).
This test is used to validate our numerical method for 3D fluid-structure inter-
action. Figure 5 shows the simulation domain and numerical mesh. In this study,
we use the simplistic structure which is a sphere. The body is placed 20D from
the inlet and 40D from the outlet, where D is spherical diameter. We create the
sphere by CAD software and export it in .STL format. Then we import the file
into our code and generate the level set function which is an implicit representa-
tion of the object surface. In order to restrict the effect of boundary condition to
our results, slip walls are placed symmetrically at all sides of the computational
domain. A non-uniform mesh of 121 × 81 × 81 points is used in our simulation.
The grid is refined in the vicinity of the sphere with 20Cells/D such that we can
6 S.T. Dang et al.
Fig. 4: The zero contour level set represents the ship surface. The sign distance
is computed based on the ray casting method
capture the physical phenomena around the object accurately. Figure 6 shows
our computed drag coefficient and compared with theoretical data [3] and other
numerical results [12, 10]. A good agreement between our method and previous
studies can be observed from this figure.
Fig. 5: The computational domain (a) and the computational mesh (b) for the
flow over sphere test.
4 Conclusion
In this study, we presented the numerical method for computing the level set
function as well as solving fluid governing equations. The ray casting method is
Title Suppressed Due to Excessive Length 7
Acknowledgement
We would like to thank the Norwegian Research Council to fund our research
through the ICELOAD project (project number 308780, “Enabling prediction
of ice loads on structures in the Arctic”), and the Russian Foundation for Basic
Research for funding through grant number 20-58-20004.
References
1. ANSYS. https://www.ansys.com/ (2018)
2. Fast distance fields for fluid dynamics mesh generation on graphics hardware. Com-
munications in Computational Physics 26(3), 654–680 (2019)
3. Clift, R., Grace, J.R., Weber, M.E.: Bubbles, Drops, and Particles. Academic Press,
New York (1978)
4. Dang, S.T., Johansen, S.T., Meese, E.A.: A Cartesian Cut-Cell Method, Based
on Formal Volume Averaging of Mass, Momentum Equations. SINTEF akademisk
forlag (2017)
5. Dang, S.T., Meese, E.A., Morud, J.C., Johansen, S.T.: Numerical Approach for
Generic Three-Phases Flow Based on Cut-cell and Ghost Fluid Methods. Interna-
tional Journal for Numerical Methods in Fluids 0(ja) (Jun 2019)
6. DesJardin, P.E., Bojko, B.T., McGurn, M.T.: Initialization of high-order accuracy
immersed interface cfd solvers using complex cad geometry. International Journal
for Numerical Methods in Engineering 109(4), 487–513 (2017)
8 S.T. Dang et al.
7. Geuzaine, C., Remacle, J.F.: Gmsh: A 3-d finite element mesh generator with built-
in pre- and post-processing facilities. International Journal for Numerical Methods
in Engineering 79(11), 1309–1331 (2009)
8. Günther, C., Meinke, M., Schröder, W.: A flexible level-set approach for track-
ing multiple interacting interfaces in embedded boundary methods. Computers &
Fluids 102, 182–202 (2014)
9. Hirt, C.W., Nichols, B.D.: Volume of fluid (VOF) method for the dynamics of free
boundaries. Journal of Computational Physics 39(1), 201 – 225 (1981)
10. Johnson, T.A., Patel, V.C.: Flow past a sphere up to a Reynolds number of 300.
Journal of Fluid Mechanics 378, 19–70 (Jan 1999)
11. Kirkpatrick, M., Armfield, S., Kent, J.: A representation of curved boundaries
for the solution of the Navier–Stokes equations on a staggered three-dimensional
Cartesian grid. Journal of Computational Physics 184(1), 1–36 (Jan 2003)
12. Mittal, R., Dong, H., Bozkurttas, M., Najjar, F.M., Vargas, A., von Loebbecke,
A.: A versatile sharp interface immersed boundary method for incompressible flows
with complex boundaries. Journal of Computational Physics 227(10), 4825–4852
(May 2008)
13. Osher, S., Sethian, J.A.: Fronts propagating with curvature-dependent speed: Algo-
rithms based on Hamilton-Jacobi formulations. Journal of Computational Physics
79(1), 12–49 (Nov 1988)
14. Park, T., Lee, S., Kim, J., Kim, C.: Cuda-based signed distance field calculation
for adaptive grids. In: 2010 10th IEEE International Conference on Computer and
Information Technology. pp. 1202–1206 (2010)
15. Pointwise: Pointwise (2020), http://www.pointwise.com/
16. Schneiders, L., Günther, C., Meinke, M., Schröder, W.: An efficient conservative
cut-cell method for rigid bodies interacting with viscous compressible flows. Journal
of Computational Physics 311, 62–86 (Apr 2016)
17. Shu, R., Liu, A.: A fast ray casting algorithm using adaptive isotriangular subdivi-
sion. In: Proceedings of the 2nd Conference on Visualization ’91. p. 232–238. VIS
’91, IEEE Computer Society Press, Washington, DC, USA (1991)
18. Sigg, C., Peikert, R., Gross, M.: Signed distance transform using graphics hardware.
In: IEEE Visualization, 2003. VIS 2003. pp. 83–90 (2003)
19. Wang, K., Grétarsson, J., Main, A., Farhat, C.: Computational algorithms for
tracking dynamic fluid–structure interfaces in embedded boundary methods. In-
ternational Journal for Numerical Methods in Fluids 70(4), 515–535 (2012)