1

Previous: Evaluating mass flow at Up: Test case: Backward-Facing-Step Next: Running in parallel

This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.

Monitoring the convergence

  • Important information is the computation convergence
  • All important data are printed to standard output
  • When running the simulation the convergence data can be forwarded to the file e.g.:
    # simpleFoam > log &
  • To analyze computation convergence use OpenFOAM utility foamLog, which extract data from log file
  • You can list data from log file:
    # foamLog -l log
  • Output is following:
    clockTime
    contCumulative
    contGlobal
    contLocal
    epsAvg
    epsilon
    epsilonFinalRes
    epsilonIters
    epsMax
    epsMin
    executionTime
    k
    kFinalRes
    kIters
    p
    pFinalRes
    pIters
    Separator
    Time
    Ux
    UxFinalRes
    UxIters
    Uy
    UyFinalRes
    UyIters
    
  • Information about convergence of all quantities $ p,\ U,\ k,\ \epsilon$ are stored
  • Initial residual are epsilon, k, p, Ux, Uy
  • Final residual are *FinalRes
  • Number of iterations of linear system solver *Iters
  • Total computation time executionTime
  • Continuity error contCumulative, contGlobal, contLocal
  • Run foamLog on log file called e.g. log:
    # foamLog log
  • Output is following:

     

    Using:
      log      : log.simpleFoam
      database : /mnt/home/sevcik/OpenFOAM/CFDSupportFOAMdev/beta/OpenFOAM-dev/bin/tools/foamLog.db
      awk file : ./logs/foamLog.awk
      files to : ./logs
    
    Executing: awk -f ./logs/foamLog.awk log.simpleFoam
    
    Generated XY files for:
    clockTime
    contCumulative
    contGlobal
    contLocal
    epsAvg
    epsilon
    epsilonFinalRes
    epsilonIters
    epsMax
    epsMin
    executionTime
    k
    kFinalRes
    kIters
    p
    pFinalRes
    pIters
    Separator
    Time
    Ux
    UxFinalRes
    UxIters
    Uy
    UyFinalRes
    UyIters
    End
    
  • Now, data is in directory ./logs
  • Go to the directory logs:
    # cd logs
  • List the directory:
    # ls
    clockTime_0       epsAvg_0           epsMax_0         k_0          pFinalRes_0  Ux_0          UyFinalRes_0
    contCumulative_0  epsilon_0          epsMin_0         kFinalRes_0  pIters_0     UxFinalRes_0  UyIters_0
    contGlobal_0      epsilonFinalRes_0  executionTime_0  kIters_0     Separator_0  UxIters_0
    contLocal_0       epsilonIters_0     foamLog.awk      p_0          Time_0       Uy_0
    
  • File have format ASCII ”time layer; value“
  • To plot data use open-source program gnuplot
  • Run gnuplot (in same way as before, according to your OS).
  • In gnuplot environment write command:
    gnuplot> set logscale y # sets logarithmic scale of y axis
    gnuplot> plot './p_0' with lines, './Ux_0' with lines, './Uy_0' with lines, './epsilon_0' with lines, './k_0' with lines # plots residuals
  •  
openfoam tutorial backward facing step pitzDaily residuals

Figure: Convergence process, Velocity residuals, Backward-Facing-Step OpenFOAM Tutorial

Rotation Using MRF

  • Rotation properties are set in file system/fvOptions

     

  • MRF method is always applied on certain cellZone which is called e.g.: rotor_mrf_zone

     

  • nonRotatingPatches list defines those patches from the selected cellZone, which are not rotating

     

  • Parameter origin is a point defining position of axis of rotation

     

  • Parameter axis is directional vector of axis of rotation

     

  • Parameter omega is angle velocity in radians per second

     

File system/rotor/fvOptions for turbine rotor may be following:

 

MRF1
{
    type            MRFSource;
    active          true;
    selectionMode   cellZone;
    cellZone        rotor_mrf_zone;

    MRFSourceCoeffs
    {
        nonRotatingPatches
        (
            rotor_drafttube_interface
            rotor_guide_interface
            rotor_periodic1_ami
            rotor_periodic2_ami
        );

        origin      (0 0 0);
        axis        (0 0 1);
        omega          -62.8; // 600 RPM,   (RPM/60)*2*PI=rPs
    }
}

Previous: Finite Volume Method Up: TCFD Solvers Next: Steady-State
This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.

Three Dimensional

All the models are solved in three dimensions, even 2D-like or 1D-like models are treated as 3D using special boundary conditions. See e.g. [12].