OpenFOAM — TIPS 2

Hilaal Alam
2 min readJun 24, 2021

--

The sweat you shed so far, in the preprocessing is to run this step smoothly. On-the-fly changes is one of the interesting aspects in the # OpenFOAM. (However, in my opinion, “On-the-fly-changes” might be difficult to handle when you are at the initial stage of the leaning curve)

Source: http://www.wolfdynamics.com/wiki/tipsandtricks.pdf

Processing 1: On-the-fly changes

  1. The beauty of the OpenFOAM is, you can change controlDict, fvSchemes and fvSolution on-the-fly.
  2. To change parameters on-the-fly, set runTimeModifiable to yes in the controlDict dictionary.
  3. In case the initial transient is of no interest, the simulation can be started with low Reynolds numbers (high viscosity) and on the go, one can change the value slowly till arriving at the desired value.
  4. If not comfortable with the point 2 or work with high Reynolds numbers, the Euler solver with upwind is suitable for the good initial solution.
  5. One can switch from the first order scheme to the higher order scheme anytime.

6. One can change the convergence criterion in the linear solvers to accelerate iterative convergence, example, the loose convergence criterion with a robust numerical scheme can be tightened to increase the accuracy.

7. If possible, use more corrector steps initially and when the solution stabilises decrease the corrector step.

8. It is better to check the time step continuity error and if it increases in time, something is going wrong! (In order to know it type in the terminal find $FOAM_SRC –iname *continuity*, and open any of the files)

--

--

Hilaal Alam
Hilaal Alam

Written by Hilaal Alam

| Dreamer, Explorer, Innovator | Startups | Quantum-Information, Computing, Complexity, Error Correction, Gravity, Biomimicry | Design-Flexures, PBDL |

No responses yet