Numerical Methods in Energy Engineering
Numerical Methods in Energy Engineering
Periodic boundary conditions are a set of boundary conditions which are often
chosen for approximating a large system by using a small part called a unit cell.
PBCs are often used in computer simulations and mathematical models 9
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 reaction model)
1
0
Modeling (Turbulence and free surface models)
• Turbulent 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
• DES: RANS inside BL, LES in separated regions.
• Free-surface models:
• Surface-tracking method: mesh moving to capture free surface, limited to
small and medium wave slopes
• Single/two phase level-set and volume-of-fluid (VOF) methods:
mesh fixed and level-set/VOF functions used to capture the gas/liquid interface,
capable of studying steep or breaking waves.
1
1
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 postprocessing
1
2
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)
• 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. 1
3
• 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.
1
4
Important variables
• Pressure and fluid velocities are always calculated in conjunction. Pressure
can be used to calculate forces on objects, e.g., for the prediction of drag of a
car. Fluid velocities can be visualized to show flow structures.
• From the flow field we can derive other variables such as shear and vorticity.
Shear stresses may relate to erosion of solid surfaces. Deformation of fluid
elements is important in mixing processes. Vorticity describes the rotation of
fluid elements.
• In turbulent flows, turbulent kinetic energy and dissipation rate are important
for such processes as heat transfer and mass transfer in boundary layers.
• For non-isothermal flows, the temperature field is important. This may govern
evaporation, combustion, and other processes.
• In some processes, radiation is important.
1
5
Post-processing
• Results are usually reviewed in one of two ways:
graphically or alphanumerically.
• Graphically:
– Vector plots.
– Contours.
– Iso-surfaces.
– Flowlines.
– Animation.
• Alphanumerics:
– Integral values.
– Drag, lift, torque calculations.
– Averages, standard deviations.
– Minima, maxima.
– Compare with experimental data.
1
6
Streamlines
• Streamlines are curves that are everywhere tangent to the velocity vector U.
• The animation shows streamlines for a steady state 3-D flow.
• For 3-D flow fields, instead of streamlines one usually visualizes streaklines or
pathlines, which for steady flow are the same.
Pathlines
• A pathline is the trajectory followed by an individual particle.
• The pathline depends on the location where the particle was injected in the
flow field and, in unsteady flows, also on the time when it was injected.
• In unsteady flows, pathlines may be difficult to follow and not easy to create
experimentally.
1
7
1
8
The Governing Equations
In this section, we discuss fundamental principles in fluid dynamics and derive
their governing equations, their physical meaning, and their mathematical
forms
particularly appropriate in CFD.
The fundamental equations of fluid dynamics
In modeling fluid motion, there are always following philosophy we need to
consider. First is to choose the appropriate fundamental physical principles
from
the law of physics that are:
(a) Mass is conserved,
(b) F = ma (Newton’s second law), and
(c) energy is conserved.