Académique Documents
Professionnel Documents
Culture Documents
Holger Grosshans
To do
Case structure
icoFoam
Solver application
Solves the incompressible Navier-Stokes equations
icoFoam
Uses PISO (pressure-implicit splitting operator) algorithm
to solve these equations iteratively :
1.
2.
3.
4.
5.
icoFoam
How is it done in OpenFOAM?
Let's have a look at the source code (only Linux version) :
icoFoam.C
icoFoam
The time loop starts
The fvSolution PISO
dictionary is read
The CFL number is
evaluated and printed to the
screen
The momentum equations
are defined
The velocity predictor is
solved for the PISO loop
Lund University / Division of Fluid Mechanics / 25.3.2011
icoFoam
Piso loop:
- The pressure equation is
defined
- and solved
- Correct the flux
Print out the continuity error
on the screen
Evaluate the velocity field
Lund University / Division of Fluid Mechanics / 25.3.2011
icoFoam
Print out the execution
time on the screen
system/fvScheme
system/fvScheme
Create a new case from the pipe case.
Change the schemes to higher order
time terms:
gradient terms:
divergence terms:
rest:
system/fvScheme
Create a new case from the pipe case.
Change the schemes to lower order
divergence terms: first order
laplacian terms:
first order
rest:
as in original pipe case
(*) Compare the execution time for each case.
( icoFoam > terminal )
(*) Compare the results.
Lund University / Division of Fluid Mechanics / 25.3.2011
system/fvSolution
Linear-solver to solve the
system of discretized
equations
Solver stops at current
residual
system/fvSolution
Create 2 new cases from the pipe case :
Put tolerance values to 1e-3
Put tolerance values to 1e-9
(*) Discuss the sensitivity of the results:
- probe point (4.5 3 0.05), how can the difference be
explained ?
- number of iterations per time step
system/controlDict
Create one new case from the pipe case
Change the inlet velocity to 20 m/s
and the viscosity to 0.001 m^2/s
(*) If your case diverges... which parameter would you
change to obtain convergence?
Simulate 1 s and look how the velocity field evolves.
system/controlDict
Initial time
Final time
Time step
CFL = u dt / dx
How often the results are
printed into the time
directory.