Вы находитесь на странице: 1из 27

Modeling

Modeling is the mathematical physics


problem formulation in terms of a continuous
initial boundary value problem (IBVP)
IBVP is in the form of Partial Differential
Equations (PDEs) with appropriate boundary
conditions and initial conditions.
Modeling includes:
1. Geometry and domain
2. Coordinates
3. Governing equations
4. Flow conditions
5. Initial and boundary conditions
6. Selection of models for different
applications

1
Modeling (geometry and
domain)
Simple geometries can be easily created by few
geometric parameters (e.g. circular pipe)
Complex geometries must be created by the partial
differential equations or importing the database of
the geometry(e.g. airfoil) into commercial software
Domain: size and shape
Typical approaches
Geometry approximation
CAD/CAE integration: use of industry standards such as
Parasolid, ACIS, STEP, or IGES, etc.
The three coordinates: Cartesian system (x,y,z),
cylindrical system (r, , z), and spherical system(r, , )
should be appropriately chosen for a better resolution of
the geometry (e.g. cylindrical for circular pipe).

2
Modeling (governing
equations)
Navier-Stokes equations (3D in Cartesian coordinates)
u u u u p 2u 2 u 2u
u v w 2 2
t x y z x x
2
y z
v v v v p 2v 2v 2v
u v w 2 2
t x y z y x
2
y z
w w w w p 2w 2w 2w
u v w 2 2
t x y z z x 2
y z

Local Convection Piezometric pressure gradient Viscous terms


acceleration
u v w
0 Continuity equation
t x y z
p RT Equation of state
D 2 R 3 DR 2 pv p
R ( ) Rayleigh Equation
Dt 2 2 Dt L

3
Modeling (flow conditions)
Based on the physics of the fluids phenomena,
CFD can be distinguished into different
categories using different criteria
Viscous vs. inviscid (Re)
External flow or internal flow (wall bounded or not)
Turbulent vs. laminar (Re)
Incompressible vs. compressible (Ma)
Single- vs. multi-phase (Ca)
Thermal/density effects (Pr, , Gr, Ec)
Free-surface flow (Fr) and surface tension (We)
Chemical reactions and combustion (Pe, Da)
etc

4
Modeling (initial conditions)
Initial conditions (ICS, steady/unsteady
flows)
ICs should not affect final results and only
affect convergence path, i.e. number of
iterations (steady) or time steps
(unsteady) need to reach converged
solutions.
More reasonable guess can speed up the
convergence
For complicated unsteady flow problems,
CFD codes are usually run in the steady
mode for a few iterations for getting a
better initial conditions

5
Modeling(boundary
conditions)
Boundary conditions: No-slip or slip-free
on walls, periodic, inlet (velocity inlet, mass flow
rate, constant pressure, etc.), outlet (constant
pressure, velocity convective, numerical beach, zero-
gradient), and non-reflecting (for compressible flows,
such as acoustics), etc.

No-slip walls: u=0,v=0

Inlet ,u=c,v=0 Outlet, p=c


r Periodic boundary condition in
v=0, dp/dr=0,du/dr=0 spanwise direction of an airfoil
o x
Axisymmetric

6
Modeling (selection of
models)
CFD codes typically designed for solving
certain fluid
phenomenon by applying different models
Viscous vs. inviscid (Re)
Turbulent vs. laminar (Re, Turbulent models)
Incompressible vs. compressible (Ma, equation of
state)
Single- vs. multi-phase (Ca, cavitation model, two-
fluid
model)
Thermal/density effects and energy equation
(Pr, , Gr, Ec, conservation of energy)
Free-surface flow (Fr, level-set & surface tracking
model) and
surface tension (We, bubble dynamic model)
Chemical reactions and combustion (Chemical 7
Modeling (Turbulence and free surface
models)
Turbulent flows at high Re usually involve both large and small
scale
vortical structures and very thin turbulent boundary layer (BL) near

theTurbulent
wall models:
DNS: most accurately solve NS equations, but too expensive
for turbulent flows
RANS: predict mean flow structures, efficient inside BL but
excessive
diffusion in the separated region.
LES: accurate in separation region and unaffordable for
resolving BL
Free-surface models:
DES: RANS inside BL, LES in separated regions.
Surface-tracking method: mesh moving to capture free
surface,
limited to small and medium wave slopes
Single/two phase level-set method: mesh fixed and level-
set
function used to capture the gas/liquid interface, capable of
8
Numerical methods
The continuous Initial Boundary Value
Problems (IBVPs) are discretized into
algebraic equations using numerical methods.
Assemble the system of algebraic equations
and solve the system to get approximate
solutions
Numerical methods include:
1. Discretization methods
2. Solvers and numerical parameters
3. Grid generation and transformation
4. High Performance Computation (HPC) and post-
processing

9
Discretization methods
Finite difference methods (straightforward to apply,
usually for regular grid) and finite volumes and finite
element methods (usually for irregular meshes)
Each type of methods above yields the same
solution if the grid is fine enough. However, some
methods are more suitable to some cases than
others
Finite difference methods for spatial derivatives with
different order of accuracies can be derived using
Taylor expansions, such as 2nd order upwind scheme,
central differences schemes, etc.
Higher order numerical methods usually predict
higher order of accuracy for CFD, but more likely
unstable due to less numerical dissipation
Temporal derivatives can be integrated either by the
explicit method (Euler, Runge-Kutta, etc.) or implicit
method (e.g. Beam-Warming method)

10
Discretization methods
(Contd)
Explicit methods can be easily applied but yield
conditionally stable Finite Different Equations (FDEs),
which are restricted by the time step; Implicit
methods are unconditionally stable, but need efforts
on efficiency.
Usually, higher-order temporal discretization is used
when the spatial discretization is also of higher order.
Stability: A discretization method is said to be stable
if it does not magnify the errors that appear in the
course of numerical solution process.
Pre-conditioning method is used when the matrix of
the linear algebraic system is ill-posed, such as
multi-phase flows, flows with a broad range of Mach
numbers, etc.
Selection of discretization methods should consider
efficiency, accuracy and special requirements, such
as shock wave tracking.

11
Solvers and numerical
parameters
Solvers include: tridiagonal, pentadiagonal solvers,
PETSC solver, solution-adaptive solver, multi-grid
solvers, etc.
Solvers can be either direct (Cramers rule, Gauss
elimination, LU decomposition) or iterative (Jacobi
method, Gauss-Seidel method, SOR method)
Numerical parameters need to be specified to control
the calculation.
Under relaxation factor, convergence limit, etc.
Different numerical schemes
Monitor residuals (change of results between
iterations)
Number of iterations for steady flow or number of
time steps for unsteady flow
Single/double precisions

12
Numerical methods (grid
generation)
Grids can either be structured
(hexahedral) or unstructured structured
(tetrahedral). Depends upon type of
discretization scheme and application
Scheme
Finite differences: structured
Finite volume or finite element:
structured or unstructured
Application
Thin boundary layers best resolved
with highly-stretched structured
grids
Unstructured grids useful for
unstructured
complex geometries
Unstructured grids permit
automatic adaptive refinement
based on the pressure gradient, or
regions interested (FLUENT)

13
Post-Processing
Post-processing: 1. Visualize the CFD results (contour,
velocity vectors, streamlines, pathlines, streak lines,
and iso-surface in 3D, etc.), and 2. CFD UA: verification
and validation using EFD data (more details later)
Post-processing usually through using commercial
software

Figure: Isosurface of Q=300 colored using piezometric pressure, free=surface colored using z for fully appended Athena,
Fr=0.25, Re=2.9108. Tecplot360 is used for visualization.

14
Types of CFD codes
Commercial CFD code: FLUENT, Star-
CD, CFDRC, CFX/AEA, etc.
Research CFD code: CFDSHIP-IOWA
Public domain software (PHI3D,
HYDRO, and WinpipeD, etc.)
Other CFD software includes the Grid
generation software (e.g. Gridgen,
Gambit) and flow visualization
software (e.g. Tecplot, FieldView)

CFDSHIPIOWA
15
CFD process
Purposes of CFD codes will be different for different
applications: investigation of bubble-fluid interactions for
bubbly flows, study of wave induced massively separated
flows for free-surface, etc.
Depend on the specific purpose and flow conditions of the
problem, different CFD codes can be chosen for different
applications (aerospace, marines, combustion, multi-
phase flows, etc.)
Once purposes and CFD codes chosen, CFD process is
the steps to set up the IBVP problem and run the code:
1. Geometry
2. Physics
3. Mesh
4. Solve
5. Reports
6. Post processing

16
CFD Process
Geometry Physics Mesh Solve Reports Post-
Processing

Select Heat Transfer Unstructured Steady/ Forces Report Contours


Geometry ON/OFF (automatic/ Unsteady (lift/drag, shear
manual) stress, etc)

Compressible Structured Iterations/ XY Plot Vectors


Geometry ON/OFF (automatic/ Steps
Parameters manual)

Domain Flow Convergent Verification Streamlines


Shape and properties Limit
Size

Viscous Precisions Validation


Model (single/
double)

Boundary Numerical
Conditions Scheme

Initial
Conditions

17
Geometry
Selection of an appropriate coordinate
Determine the domain size and shape
Any simplifications needed?
What kinds of shapes needed to be used to
best resolve the geometry? (lines, circular,
ovals, etc.)
For commercial code, geometry is usually
created using commercial software (either
separated from the commercial code itself, like
Gambit, or combined together, like FlowLab)
For research code, commercial software (e.g.
Gridgen) is used.

18
Physics
Flow conditions and fluid properties
1. Flow conditions: inviscid, viscous, laminar,
or
turbulent, etc.
2. Fluid properties: density, viscosity, and
thermal conductivity, etc.
3. Flow conditions and properties usually
presented in dimensional form in industrial
commercial CFD software, whereas in non-
dimensional variables for research codes.
Selection of models: different models usually
fixed by codes, options for user to choose
Initial and Boundary Conditions: not fixed
by codes, user needs specify them for different
applications.

19
Mesh
Meshes should be well designed to resolve
important flow features which are dependent
upon flow condition parameters (e.g., Re), such as
the grid refinement inside the wall boundary layer
Mesh can be generated by either commercial
codes (Gridgen, Gambit, etc.) or research code
(using algebraic vs. PDE based, conformal
mapping, etc.)
The mesh, together with the boundary conditions
need to be exported from commercial software in
a certain format that can be recognized by the
research CFD code or other commercial CFD
software.

20
Solve
Setup appropriate numerical parameters
Choose appropriate Solvers
Solution procedure (e.g. incompressible flows)
Solve the momentum, pressure Poisson
equations and get flow field quantities, such
as velocity, turbulence intensity, pressure
and integral quantities (lift, drag forces)

21
Reports
Reports saved the time history of the
residuals of the velocity, pressure and
temperature, etc.
Report the integral quantities, such as total
pressure drop, friction factor (pipe flow),
lift and drag coefficients (airfoil flow), etc.
XY plots could present the centerline
velocity/pressure distribution, friction
factor distribution (pipe flow), pressure
coefficient distribution (airfoil flow).
AFD or EFD data can be imported and put
on top of the XY plots for validation

22
Post-processing
Analysis and visualization
Calculation of derived variables
Vorticity
Wall shear stress
Calculation of integral parameters: forces,
moments
Visualization (usually with commercial
software)
Simple 2D contours
3D contour isosurface plots
Vector plots and streamlines (streamlines
are the lines whose tangent direction is the
same as the velocity vectors)
Animations

23
Example of CFD Process (Mesh)

Grid need to be refined near the


foil surface to resolve the
boundary layer
24
Example of CFD Process (Solve)

Residuals vs. iteration

25
processing)

26
Visit class website for more information
http://css.engineering.uiowa.edu/~fluids

27

Вам также может понравиться