You are on page 1of 7

Proceedings of the ASME 2017 Fluids Engineering Division Summer Meeting

FEDSM2017
July 31-August 3, 2017, Waikoloa, Hawaii, USA

FEDSM2017-69174

VERIFICATION AND VALIDATION OF THE CAELUS LIBRARY - INCOMPRESSIBLE


FLOW SOLVERS

Aleksandar Jemcov Darrin W. Stephens∗ Chris Sideroff


Aerospace and Mechanical Engineering Applied CCM Pty Ltd Applied CCM Inc
University of Notre Dame Melbourne, Victoria, 3175 Ottawa, Ontario, K1J 6K3
Notre Dame, Indiana 46556 Australia Canada
ajemcov@nd.edu d.stephens@appliedccm.com.au c.sideroff@appliedccm.ca

ABSTRACT n Index taking values in the set N(p), [-].


Emphasis of this paper is on the validation and verification N(p) Local neighbourhood of the cell with index, p, [-].
of the open source numerical library, Caelus, suitable for the p Index of the discretisation cell, [-].
simulation of problems in continuum physics. The focus of Re Reynolds number, [-].
this work is the verification and validation of problems in fluid ui Cartesian component of the velocity field, [m s−1 ].
mechanics. Several test cases including Couette and Kovasznay uL Lid velocity, [m s−1 ].
flows are used in verification of the steady state solver for W Width, [m].
incompressible flows. In addition, flat plate boundary layer, δi Cartesian discrete derivative component, [m−1 ].
flow through a tee-junction and triangular lid-driven cavity are ν Kinematic viscosity, [m2 s−1 ].
used in the validation part of the work. In all cases excellent ∂i Cartesian derivative component, [m−1 ].
agreement was found between the numerical, analytical and p̂ Pressure field normalised by the density, [m2 s−2 ].
experimental results. ∗ Superscript denoting predicted values, [-].

ˆ Symbol denoting normalisation by the density, [-].

NOMENCLATURE
a Channel height in Couette flow problem, [m]. INTRODUCTION
an Off-diagonal coefficients in momentum equation, [s−1 ]. Recent years have witnessed a significant proliferation of
a p Diagonal coefficients in momentum equation, [s−1 ]. numerical libraries being used in computational continuum me-
D Cavity depth, [m]. chanics [1–3]. While the appearance of open source codes in
i Cartesian index, i ∈ (x, y, z), [-]. general, is a positive development, the question of correct im-
x Distance in Cartesian x-direction, [m]. plementation of the various methods and solvers remains to be
y Distance in Cartesian y-direction, [m]. addressed. This question can be only answered by performing
K Spatial dimension, K ∈ (1, 2, 3), [-]. validation and verification exercises. In this work we focus on
λ Parameter in Kovasznay analytical solution, [-]. the verification and validation of Caelus [4], an open source li-
c f Skin friction coefficient, [-]. brary for computational continuum mechanics.
Rex Local Reynolds number, [-]. The Caelus library is a general purpose framework for the
L Length, [m]. solution of the continuum mechanics problems. The framework
is a derivative of the OpenFOAM R library with an emphasis
on improved accuracy and robustness. As such, Caelus is an
∗ Address all correspondence to this author.
1 Copyright c 2017 by ASME
open source library developed and distributed under the GPL li- which is substituted into the discrete continuity equation
cense agreement. One of the goals is to provide a framework
that is both verified and validated. This work concentrates on the
δi ui = 0, (5)
verification and validation of incompressible flow solvers. Both
analytical methods and experimental data were used in the veri-
fication and validation process. and yields the following modified continuity equation
A few known analytical solutions, such as Couette [5] and
Kovasznay flow [6], are used for verification of the incompress- !!
1
ible flow solver. The Kovasznay class of flow solutions are of δi uip = δi − ∑ ani uni − (δi p̂) p . (6)
particular interest as they represent viscous flow solutions behind ap n∈N(p)
an array of bluff bodies at a non-trivial Reynolds number.
Validation of Caelus’ incompressible solvers consists of Since the incompressibility constraint requires the resultant
computing solutions for a flat plate laminar boundary layer, flow velocity field to be divergence free, the same constraint is applied
through a tee-junction, and a triangular lid driven cavity and to the discrete form of the continuity equation resulting in the
comparing to known values for each case. following pressure equation

 
PREDICTOR-CORRECTOR ALGORITHM FOR STEADY- 1
δi (δi p̂) p = δi ũip , (7)
STEATE FLUID FLOW ap
The Navier-Stokes equations in steady-state form along with
the continuity equation in the divergence-free form: where ũi is defined as

∂ j (ui u j ) − ∂ j (ν∂ j ui ) = −∂i p̂,


!
(1) 1
ũip = p − ∑ ani uni . (8)
a n∈N(p)

∂i ui = 0, (2) Eq. (3) and Eq. (7) together with the corresponding boundary
conditions represent the system of linear algebraic equations that
where p̂ = p/ρ is the modified pressure normalised by the fluid can be solved using the predictor-corrector algorithm shown in
density. Both density and kinematic viscosity are taken to be Alg. (1)
constant and the time derivative term is omitted from Eq. (1) per
the steady assumption.
In order to define a well posed problem, Eq. (1) and Eq. (2) initialise p and ui fields;
are supplemented by an appropriate set of boundary conditions. set the boundary conditions;
Cell-centered finite volume scheme is used for the discretisation while convergence criterion is not satisfied do
of the momentum equation [7] resulting in the following discrete predictor step;
equation solve aip (uip )∗ = − ∑n∈N(p) ani uni − (δi p̂) p for the
predicted velocity field (uip )∗ ;
aip uip + ∑ ani uni = −(δi p̂) p , (3) use the predicted velocity to obtain the pressure field
δi a1p (δi p̂) p = δi (ũip )∗ ;

n∈N(p)
update fluxes;
where symbol δi represents the discrete form of the gradi- corrector step;
ent operator and N(p) denotes the neighbourhood of the point update the velocity uip = (ũip )∗ − a1p (δi p) p ;
“p”. Cell-centred finite volume discretisation practice leading to check the convergence criterion;
Eq. (3) is known to produce M-matrices [7]. By introducing the end
appropriate average of central coefficients a p = ∑Ki aip /K we can Algorithm 1: PREDICTOR-CORRECTOR ALGORITHM
formally solve Eq. (3) for the discrete velocity uip

! The predictor-corrector algorithm is called


1
uip = p − ∑ ani uni − (δi p̂) p , (4) simpleSolver in Caelus and was used for the verifica-
a n∈N(p) tion and validation in this paper. The simpleSolver is well

2 Copyright c 2017 by ASME


TABLE 1. PARAMETER VALUES IN ANALYTICAL EXPRES-
SION FOR THE SOLUTION OF COUETTE FLOW IN Eq. (8).

a ν ∂x p̂
1.0 1.0 3.0

suited for steady-state incompressible flow problems since the


pressure equation, Eq. (7), satisfies the divergence free con- FIGURE 1. COMPUTATIONAL DOMAIN FOR COUETTE FLOW
straint through the solution of an elliptic equation. This equation
requires only Dirichlet or Neumann boundary conditions. The
resulting matrix is symmetric making it suitable for conjugate
gradient solution methods [7].

SOLVER VERIFICATION
The simpleSolver in Caelus is verified by utilising an-
alytical solutions for viscous flows. We consider two types of
viscous flows, namely Couette [5] and Kovaznay [6] flow. In
both cases analytical solution are available thus enabling the ver-
ification of the solver implementation.

Couette Flow
Couette flow [5] represents laminar fluid flow between two
plates driven by a pressure gradient or by the motion of one of
the plates. Due to its simplicity, Couette flow has an analytical
solution. A special case of stationary plates and non-zero pres- FIGURE 2. COMPARISON OF ANALYTICAL AND COMPUTA-
sure gradient has the following analytical solution for the veloc- TIONAL X-VELOCITY PROFILES COUETTE FLOW PROBLEM
ity field:
λ λx
a2 uy = e sin(2πy), (11)
   
y 2 y
ux = ∂x p̂ − . (9) 2π
2ν a a

As illustrated in Fig. 1, the parameter a is the channel height. r


Values of the other parameters are listed in Tab. 1. The aspect ra- Re Re2
λ= − + 4π 2 . (12)
tio of the computational domain is 5 and the computational mesh 2 4
that was used in computations has 500 cells in x-direction and
100 cells in y-direction. Second order schemes utilising linear The computational domain used was rectangular with 50
interpolation was used for all terms in the Navier-Stokes equa- cells in x-direction and 75 cells in y-direction. The overall height
tions. Results are shown in Fig. 2. Excellent agreement between of the domain is 2 m and the length is 1 m. A non-trivial value
computed and analytical results was observed for Couette flow. of Reynolds number of 40 was selected in the verification simu-
lations. Comparison of the computed and analytical solutions is
shown in Fig. 3 for ux and in Fig. 4 for uy component of the ve-
Kovasznay Flow locity. Both velocity profiles show excellent agreement between
An analytical solution for a non-trivial Reynolds number is computations and analytical solutions.
available the Kovaszany flow [6]. Kovasznay flow is a prototype
laminar flow behind a periodic array of cylinders. The analytical
expressions of the velocity is as follows: SOLVER VALIDATION
Pressure-velocity coupling is achieved in simpleSolver
ux = 1 − eλ x cos(2πy), (10) using the predictor-corrector algorithm described in Alg. (1).

3 Copyright c 2017 by ASME


FIGURE 5. FLAT PLATE COMPUTATIONAL DOMAIN.

pared with the Blasius solution [9]. Blasius obtained a solu-


tion to the boundary layer equations using a transformation tech-
nique where the equations of continuity and momentum in two-
FIGURE 3. COMPARISON OF ANALYTICAL AND COMPUTA- dimensional form are converted into a single ordinary differen-
TIONAL X-VELOCITY PROFILES KOVASZNAY FLOW PROB- tial equation (ODE). The solution to the ODE can be determined
LEM numerically and is regarded as an exact solution to the bound-
ary layer equations. This leads to an analytical expression for
the skin friction coefficient (c f ) distribution along the flat-plate
given by

0.644
cf ≈ √ , (13)
Rex

where Rex is the local Reynolds number defined as

ux
Rex = , (14)
ν

and u is the freestream velocity, x is the distance from the leading


edge, and ν is the kinematic viscosity.
This case was based on the validation case from [10] using
the same conditions in the incompressible limit. A schematic
of the geometric configuration is shown in Fig. 5. A freestream
FIGURE 4. COMPARISON OF ANALYTICAL AND COMPU-
velocity of 10.4306 ms−1 was computed from the Mach number
TATIONAL Y-VELOCITY PROFILES FOR KOVASZNAY FLOW
(0.1) and temperature (300K). The plate length was L = 2.0 m,
PROBLEM
wherein, x = 0 is at the leading edge. The Reynolds number
based on the plate length was 200,000. The kinematic viscosity
Pressure and velocity gradients were calculated using a cell- (ν) was determined using U∞ and Re.
based Green-Gauss method. A 2nd order linear upwind discreti- Fig. 5 illustrates the domain boundaries used in two-
sation with multidimensional interpolation utilising the Barth- dimensions (x − z plane). The region of interest, highlighted
Jespersen limiter [8] was used for the convective terms. in blue, extends between 0 ≤ x ≤ 0.3048 m and is a no-slip
boundary. Upstream of the leading edge, a slip boundary is
used to model freestream flow approaching the flat-plate. The
Blasius Solution for Flat Plates inlet boundary is placed at the beginning of the slip boundary at
In this case, steady, incompressible, laminar flow over a x = −0.06 m while the outlet is at end the no-slip boundary at
two-dimensional sharp-leading edge flat-plate with zero pres- x = 1.2192 m. A slip condition is used for the entire top bound-
sure gradient was investigated. Computational results were com- ary. At the inlet a fixed uniform velocity u = 10.4306 ms−1 in

4 Copyright c 2017 by ASME


FIGURE 6. SKIN-FRICTION COMPARISON BETWEEN FIGURE 7. NON-DIMENSIONAL VELOCITY PROFILE COM-
CAELUS AND BLASIUS SOLUTIONS. PARISON BETWEEN CAELUS AND BLASIUS SOLUTIONS.

Flow Through Tee-Junction


x-direction and zero gradient for pressure is applied. At the outlet In this validation case, laminar, incompressible flow through
a fixed uniform pressure p̂ = 0 m2 s−2 and zero gradient for ve- a two-dimensional 90◦ tee junction was investigated. Due to the
locity is applied. The simulation was initialised with a constant presence of the side branch, the flow separates and forms a re-
velocity u = 10.4306 ms−1 in the x-direction and uniform zero circulation region. The recirculating region influences the mass
pressure field. flow through the main and side branches. The numerically com-
puted mass flow ratio was calculated and compared with exper-
A 3D hexahedral mesh was generated using Pointwise [11] iment. A comprehensive study of flow through planar branches
by extruding the 2D quadrilteral mesh one cell in the x − y has been carried out by [12] due to its prevalence in the bio-
plane. The grid was refined perpendicular to the wall in order mechanical industry.
to resolve the near wall velocity gradients. To ensure that the Figure 8 shows the schematic of the tee-junction. Here, L =
gradients in boundary layer were well resolved, about 50 grid 3.0 m and W = 1.0 m respectively, the Reynolds number based on
nodes are placed between the wall and the boundary layer edge. the width is 300, and v is the velocity in the y-direction. For sim-
Grid refinement is also added at the leading edge so that the plicity, we have assumed the velocity, v = 1 ms−1 . Using these
growth of the boundary layer is also well resolved. In this par- values the resulting kinematic viscosity was 0.00333 m2 s−1 .
ticular case, 399 cells were used in the streamwise x-direction Since this is an internal flow problem, the computational domain
(x ≤ 0 ≤ 0.3048 m) and 297 in the wall normal y-direction. is contained within tee-junction geometry. All tee-junction walls
For the no-slip wall beyond x > 0.3048, a similar distribution is have a no-slip boundary condition. At the inlet, a fully devel-
used, resulting in a total cell count of 217,998. oped laminar flow parabolic profile is applied with a mean ve-
In Fig. 6, the skin-friction distribution along the flat-plate locity v = 1.0 ms−1 , otherwise a much longer main branch would
obtained from Caelus is compared with that of the Blasius analyt- be required for the flow to develop. The domain has two outlets,
ical solution. The distance x along the plate is normalised to the one at the end of the main channel and the other at the end of side
total plate length (L). Excellent agreement is observed along the branch. Exit pressures at the two outlets are equal ( p̂ = 0 m2 s−2 )
entire length of the flat-plate. At the exit plane of the flat-plate, and a zero gradient condition is applied to the velocity. The simu-
velocity data was extracted through the boundary layer and com- lation is initialised with uniform zero velocity and pressure fields.
pared to the Blasius analytical solution. These results are shown The two x − y planes obtained as a result of grid extrusion
in Fig. 7, where the velocity profile is plotted using similarity have empty boundary conditions applied to achieve 2D flow.
variables from the Blasius solution. η is the non-dimensional A total of 2,025 hexahedral cells comprise the tee-junction of
vertical distance to the boundary layer edge and Ue is the veloc- which, 90 cells are distributed along the height of the main chan-
ity at the boundary layer edge. Similar to skin-friction profile, nel, and 45 along the length of the side branch. The distribution
the velocity profile also exhibits excellent agreement with the is such that a dimensional length of L = 1 m has a total of 45
Blasius solution. cells, giving a distribution of 30 cells for the (2/3)L segment of

5 Copyright c 2017 by ASME


FIGURE 9. COMPUTATIONAL DOMAIN OF THE TRIANGU-
LAR CAVITY (NOT TO SCALE).

FIGURE 8. COMPUTATIONAL DOMAIN REPRESENTING TEE-


JUNCTION.

TABLE 2. COMPARISON OF MASS FLOW RATE SPLIT FOR


CAELUS AND EXPERIMENT.

Experimental Caelus Percentage Difference


0.887 0.8869 5.1 × 10−3 %

the main channel. The width, W , consists of 15 cells.


The mass flow rate was calculated at the inlet and at the main
outlet (outlet-1) and the ratio was subsequently calculated. Ta-
ble 2 compares the Caelus result with the experimental value. As
can be noted, the agreement between the two is excellent.
FIGURE 10. HYBRID GRID FOR THE TRIANGULAR CAVITY.

Triangular Cavity
This validation study concerns the laminar, incompressible simulation is initialised with zero velocity and pressure fields.
flow inside a lid driven triangular cavity. Here, the top wall of The mesh in x − y plane is shown in Fig. 10. A hybrid mesh
the cavity moves at a constant velocity initiating a recirculating is employed for this case with a total of 5,538 cells. Up to a depth
motion within the cavity. Experiments on this configuration have of D = 1.35 m hexahedral elements are used while below that
been reported in [13] for a Reynolds number of 800. The main value triangular prisms are used. The triangular prisms are used
objective of this validation case was to compare the x velocity in the bottom portion because they resulted in better cell qual-
distribution against experimental data. ity. For the hexahedral region, 39 cells are distributed across the
A schematic of the triangular cavity is presented in Fig. 9 width of the cavity and 39 along the depth. The cavity walls in
where the depth of the cavity is D = 4 m and the width W = the prism region have 100 cells along each. The interface of the
2 m. The Reynolds number based on the cavity depth is 800 and two regions is node matched and has 39 cells across the width.
the wall velocity is u = 2 ms−1 . Using the Reynolds number, The mesh close to the cavity lid was refined to better capture the
u, and D, kinematic viscosity was calculated to be 0.01 m2 s−1 . shear layer. The flow characteristics in the cavity can be assumed
The side walls of the cavity have a no-slip boundary condition to be 2D and here it has been solved with the same assumption.
while the top wall, has a uniform velocity in the x-direction. The In Fig. 11, the x velocity distribution along the cavity centre-

6 Copyright c 2017 by ASME


ACKNOWLEDGMENTS
The open source library Caelus version 6.10 was used to per-
form validation and verification in this work. The Caelus library
is a free and open source library licensed under the GNU Public
License (GPL). Caelus can be downloaded from the following
URL:http://www.caelus-cml.com/download/.

REFERENCES
[1] Jasak, H., Jemcov, A., and Tuković, Ž., 2007. “Open-
FOAM: A C++ library for complex physics simulations”.
In International Workshop on Coupled Method in Numeri-
cal Dynamics, IUC Dubrovnik, Croatia.
[2] Popinet, A., 2017. Gerris Flow Solver [Software]. In-
stitut Jean le Rond d’Alambert. Available at URL
http://gfs.sourceforge.net.
[3] Palacois, F., Economon, T. D., Wendroff, A. D., and
FIGURE 11. COMPARISON OF EXPERIMENTAL AND COM-
Alonso, J. J., 2015. “Large-scale aircraft design using
PUTATIONAL X VELOCITY DISTRIBUTION ALONG THE CAV-
SU2”. In 53rd AIAA aerospace Sciences Meeting, AIAA.
ITY’S CENTRE-LINE.
AIAA Scitech.
[4] Applied CCM, 2016. Caelus: Computational Mechanics
line is compared with that of the experimental data [13]. The Library (Version 6.10) [Software]. Applied CCM. Avail-
y distance is normalised with the cavity depth (D) which gives able at URL http://www.caelus-cml.com.
y/d = 0 at the cavity lid and y/d = −1 at the bottom vertex. Sim- [5] Munson, B. R., Young, D. F., and Okiishi, T. H., 2002. Fun-
ilarly, the u velocity is normalised with the velocity of the cavity damentals of Fluid Mechanics. John Wiley and Sons.
lid (uL ). As seen in Fig. 11 the comparison with the experiment [6] Kovasznay, L. I. G., 1947. “Laminar flow behind a two-
is excellent. dimensional grid”. Proceeding of the Cambridge Philo-
sophical Society, 19(5), pp. 369–375.
[7] Ferziger, J. H., and Perić, M., 2002. Computational meth-
ods in fluid dynamics. Springer, Springer-Verlag Berlin
CONCLUSIONS Heidelberg.
A predictor-corrector based steady, incompressible solver in [8] Berger, M., Aftosmis, M. J., and Murman, S. M., 2005.
the open source Caelus library was verified and validated. The “Analysis of slope limiter on irregular grids”. In 43rd AIAA
focus of this work was on laminar flows. Analytical, experimen- Aerospace Sciences Meeting, AIAA. AIAA Paper-2005-
tal and numerical data were used in the verification and valida- 0490.
tion process. Analytical solutions for Couette and Kovaznay flow [9] Blasius, H., 1908. “Grenzschichten in Flüssigkeiten mit
problems were used to verify that the solver was implemented kleiner Reibung”. Z. Math. Phys, 56, pp. 1–37.
correctly. Agreement between computed and analytical solutions [10] http://www.grc.nasa.gov/WWW/wind/valid/fplam/fplam.html,
was excellent for both Couette and Kovaznay flows. In the vali- 2014.
dation part of the paper, Blasius laminar boundary, flow through [11] Pointwise Inc., 2014. Pointwise, Mesh Generation Software
a tee-junction, and the flow in the triangular cavity were used for CFD, Version 17.2R2. Pointwise Inc., Fort Worth, TX.
to confirm that physically correct solutions were obtained. Ex- See also URL http://www.pointwise.com/.
cellent agreement was obtained in all cases indicating that the [12] Hayes, R. E., Nandkumar, K., and Nasr-El-Din, H., 1989.
steady-state solver computed accurate solutions. “Steady Laminar Flow in a 90 Degree Planar Branch”.
Validation and verification performed in this work suggests Computers and Fluids, 17(4), pp. 537–553.
that the predictor-corrector solver implemented in Caelus under [13] Jyotsna, R., and Vanka, P., 1995. “Multigrid Calculation
the name simpleSolver was implemented correctly. While of Steady, Viscous Flow in a Triangular Cavity”. J. Comp.
this work does not concentrate on verification and validation of Phys., 122, pp. 107–117.
the components of the solver such as boundary conditions, con-
vective and diffusive terms discretisation, gradient computations
to name just a few, results however indicate that the core compo-
nents of the solver perform as expected.

7 Copyright c 2017 by ASME

You might also like