Standard vs Custom Battery Packs - Decoding the Power Play
WHAT IS COMPUTATIONAL FLUID DYNAMICS (CFD)
1. Cfd
Computational fluid dynamics (CFD) is the use of applied mathematics, physics and
computational software to visualize how a gas or liquid flows -- as well as how the gas
or liquid affects objects as it flows past. Computational fluid dynamics is based on the
Navier-Stokes equations. These equations describe how the velocity, pressure,
temperature, and density of a moving fluid are related.
Computational Fluid Dynamics became a commonly applied tool for generating
solutions for fluid flows with or without solid interaction. In a CFD analysis, the
examination of fluid flow in accordance with its physical properties such as velocity,
pressure, temperature, density and viscosity is conducted. To virtually generate a
solution for a physical phenomenon associated with fluid flow, without compromise on
accuracy, those properties have to be considered simultaneously.
A mathematical model of the physical case and a numerical method are used in a
software tool to analyze the fluid flow. For instance, the Navier-Stokes equations are
specified as the mathematical model of the physical case. This describes changes on all
those physical properties for both fluid flow and heat transfer. The mathematical model
varies in accordance with the content of the problem such as heat transfer, mass
transfer, phase change, chemical reaction, etc. Moreover, the reliability of a CFD
analysis highly depends on the whole structure of the process. The verification of the
mathematical model is extremely important to create an accurate case for solving the
problem. Besides, the determination of proper numerical methods to generate a path
through the solution is as important as a mathematical model. The software, which the
analysis is conducted with is one of the key elements in generating a sustainable
product development process, as the amount of physical prototypes can be reduced
drastically.
History of Computational Fluid Dynamics
From antiquity to present, humankind has been eager to discover phenomena based on
fluid flow. So, how old is CFD? Experimental studies in the field of computational fluid
dynamics have one big disadvantage: if they need to be accurate, they consume a
significant amount of time and money. Consequently, scientists and engineers wanted
to generate a method that enabled them to pair a mathematical model and a numerical
method with a computer for faster examination.
The brief story of Computational Fluid Dynamics can be seen below:
Until 1910: Improvements on mathematical models and numerical methods.
2. 1910 - 1940: Integration of models and methods to generate numerical solutions
based on hand calculations11.
1940 - 1950: Transition to computer-based calculations with early computers
(ENIAC)33. Solution for flow around cylinder by Kawaguti with a mechanical desk
calculator in 195388.
1950 - 1960: Initial study using computers to model fluid flow based on the Navier-
Stokes equations by Los Alamos National Lab, US. Evaluation of vorticity - stream
function method44. First implementation for 2D, transient, incompressible flow in the
world66.
1960 – 1970: First scientific paper “Calculation of potential flow about arbitrary
bodies” was published about computational analysis of 3D bodies by Hess and Smith
in 196755. Generation of commercial codes. Contribution of various methods such k-
ε turbulence model, Arbitrary Lagrangian-Eulerian, SIMPLE algorithm which are all
still broadly used66.
1970 – 1980: Codes generated by Boeing, NASA and some have unveiled and
started to use several yields such as submarines, surface ships, automobiles,
helicopters and aircrafts4,64,6.
1980 – 1990: Improvement of accurate solutions of transonic flows in three-
dimensional case by Jameson et. al. Commercial codes have started to implement
through both academia and industry77.
1990 – Present: Thorough developments in Informatics: worldwide usage of CFD
virtually in every sector.
The following steps are going to explain the mathematical approach behind a CFD simulation. For
you to understand it more easily, they are categorized into 7 steps.
Applications of Computational Fluid Dynamics
Where there is fluid, there is CFD. the initial stage to conduct a CFD simulation is
specifying an appropriate mathematical model of reality. Rapprochements and
assumptions give direction through solution processes to examine the case in the
computational domain. For instance, fluid flow over a sphere / cylinder is a repetitive
issue that has been taught by the lecturer as an example in fluid courses. The same
phenomenon is virtually available in the movement of clouds in the atmosphere which is
indeed tremendous
3. Incompressible and Compressibleflow
If compressibility becomes a non-negligible factor, this type of analysis helps you to find
solutions in a very robust and accurate way. One example would be a Large Eddy
Simulation of flow around a cylinder.
Laminar and Turbulentflow
Different turbulence models play a role in this type of analysis. A lot of computing power
is required to solve turbulence simulations and its complex numerical models. The
difficulty of turbulence is the simulation of changes over time. The entire domain where
the simulation takes place needs to be recalculated after every time step.
The analysis of a ball valve is one possible application of a turbulent flow analysis.
Mass and Thermal transport
Mass transport simulations include smoke propagation, passive scalar transport or gas
distributions. To solve these kinds of simulations, OpenFOAM solvers are used.
Heat exchanger simulations are one possible application.
Different Types of CFD Applications
Computational Fluid Dynamics tools diversify in accordance with mathematical models,
numerical methods, computational equipment and post-processing facilities. As a
physical phenomenon could be modeled with completely different mathematical
approaches, it would also be integrated with unlike numerical methods simultaneously.
Thus, a conscious rapprochement is the essential factor on the path to developing CFD
tools. There are several license-required commercial software solutions, though there
are also open source projects available. One of the most used open-source solvers for
CFD is OpenFOAM1818.
4. CFD ANALYSIS PROCESS
First step:
Problem Statement:
The first step of the simulation is to gather information about the simulation process in general.
What is the most convenient way of solving this problem in an economic way:
o Cheap solution: No high computational costs
o Fast solution: Fast solution possible without giving up much information of the solution
o Uncomplicated solution: Simplify the problem as much as possible without restating a new problem
Modelling:
o Laminar or Turbulent - if turbulent → +turbulence model + near-wall treatment
o Combustion
o Other Physical Models
o Is the flow steady or unsteady?
o Are there any problems about the flow simulation that others have dealt with in the past?
o Will physical phenomena influence the simulation?
o What is the goal of the CFD simulation?
Second step:
Mathematical Fundamental:
The Initial Boundary Value Problem consists of the Partial Differential Equation the Initial Conditions
as well as the Boundary Conditions:
IBVP = PDE + IC + BC
Choose flow model that fits your simulation:
o Spalart-Allmaras
o k-epsilon
o k-omega
o L-VEL & yPlus
Identify the forces which cause and influence the motion of the fluid.
Define the Computational Domain of the problem.
Formulate conservation laws for mass, momentum and energy.
If possible, simplify the equations:
o Check for Symmetry
o Check for dominant flow directions (1D/2D).
o Terms that have no influence on the solution can be neglected.
5. o Incorporate knowledge that you’ve had beforehand (CFD results, measurement data).
Add constitutive relations:
o Shear Stress
o Viscosity
Dynamic Viscosity
Kinematic Viscosity
Add Boundary Conditions and Initial Conditions.
Third step:
Discretization:
The system of Partial Differential Equations is transformed into algebraic equations.
The discretion process is divided into three parts.
1. Mesh generation - Nodes and Cells
Structured Mesh / Unstructured Mesh / Hybrid Mesh.
Mesh adaption in “critical” regions and set size:
o r-Refinement
o h-Refinement
o p-Refinement
2. Space discretization - Coupled Ordinary Differential Equation/ Differential algebraic equation
systems
Finite-Difference-Method / Finite-Volume-Method / Finite-Element-Method.
High-Order-Approximation / Low-Order-Approximation.
3. Time discretization - Algebraic System (Ax=b).
Explicit Schemes / Implicit Schemes
Fourth step:
Iterative solution of the algebraic equation:
Solving systems of linear equations:
o Direct Methods: Gaussian elimination, LU decomposition.
o Iterative Methods: Strongly Implicit Procedure (SIP) , Alternating Direction Implicit (ADI) ,
Tridiagonal Matrix Algorithm (TDMA), Runge-Kutta method, Multigrid method.
Coupled systems of equations.
Nonlinear Equations
Methods for transient problems: Linear multistep method etc.
6. Convergence: Check if the iterations converge.
Residuals (Decrease by three orders of magnitude indicate at least qualitative convergence).
Mass, Momentum, Energy, and Scalar balances are achieved.
Fifth step:
Simulation Run:
Once the problem is well defined with the boundary conditions, and if necessary with initial
conditions, the problem is solved with a software. Open∇FOAM is a popular option for a solver
which is used by several companies that provide CFD software. SimScale is among them.
Sixth step:
Post-Processing:
Looking at the solutions from the the computed flow.
Post-Processing of integral parameters (Drag, Lift etc.)
Visualization in different dimensions:
o 1-D: Straight lines
o 2-D: Contour plots, Streamlines
o 3-D: Isosurfaces, Isovolumes, Streamtracer
o Animation of the flow
Statistical analysis
Seventh step:
According to AIAA (1998) & Oberkampf and Trucano (2002) the following terminology is widely used
and accepted:
Verification (“Are we solving the equations right?”) :
→ Quantification of errors
Compare results with analytical solutions if possible.
If we ignore the fact that there might be coding errors and user errors, we can examine the
following:
Roundoff Error
7. Iterative Convergence Error
Discretization Error
Validation (“Are we solving the right equations?”) :
→ Quantification of input & physical model uncertainty
Input uncertainty
Physical uncertainty
General tips
Influencing parameters for computation times in CFD
Code used in order to solve the flow (→ MPI, Vectorization)
Hardware (CPU, RAM, etc.)
Mesh size / Mesh Quality
Algorithms
Solvers
REFRENCES
Literature References:
Laurien & Oertel: Numerische Strömungsmechanik - Grundgleichungen und Modelle -
Lösungsmethoden - Qualität und Genauigkeit
Versteeg & Malalasekera: An Introduction to Computational Fluid Dynamics - The Finite
Volume Method - 2nd Edition
http://www.mathematik.uni-dortmund.de/~kuzmin/Transport.pdf 12
http://www.mathematik.uni-dortmund.de/~kuzmin/cfdintro/lecture1.pdf