- In file blockMeshDict we can change computational mesh to 50×50 cells3.1.
# mcedit system/blockMeshDict
blocks ( hex (0 1 2 3 4 5 6 7) (50 50 1) simpleGrading (1 1 1) );
- Run blockMesh:
- For transient simulations the Courant number should by always checked.
- Let us change time step to 0.0005s and computation time to 1.5s. Solution will be saved in times 0.1, 0.2, 0.3, …, 1.5s
- Let us modify controlDict, e.g.:
# gedit system/controlDict
stopAt endTime; endTime 1.5; deltaT 0.0005; writeControl runTime; writeInterval 0.1;
- Run icoFoam on background and forward output into the text file log:
# icoFoam > log &
- It is useful to watch the log file how the computation goes:
# tail -f log
- Pressing ctrl+c one can jump back to the console
- Results can be viewed during computation in paraview (button Refresh Times always rereads the time layers):
Figure: OpenFOAM cavity tutorial. Velocity vector field.
Figure: OpenFOAM cavity tutorial. Velocity magnitude.