2 2

Next: Model setting without an Up: Alternative formulation Previous: Alternative formulation   Contents   Index

Computation Setup

  • Parameters of computational process are set in files in directory system
  • Let us look inside:
    # ls $FOAM_RUN/icoFoam/cavity/system
    controlDict  fvSchemes  fvSolution
    

     

  • File controlDict controls the computation
  • Let us view the file content:
    # cat $FOAM_RUN/icoFoam/cavity/controlDict

     

    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  2.2.1                                |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        location    "system";
        object      controlDict;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    application     icoFoam;
    
    startFrom       startTime;
    
    startTime       0;
    
    stopAt          endTime;
    
    endTime         0.5;
    
    deltaT          0.005;
    
    writeControl    timeStep;
    
    writeInterval   20;
    
    purgeWrite      0;
    
    writeFormat     ascii;
    
    writePrecision  6;
    
    writeCompression off;
    
    timeFormat      general;
    
    timePrecision   6;
    
    runTimeModifiable true;
    
    
    // ************************************************************************* //
    

     

  • Parameter application stands for a name of solver that is being used
  • Parameter startFrom says from which data the computation starts (initial conditions) Most common is startTime – starts from certain time layer e.g. from ./0 Useful alternative is latestTime, which automatically chooses the latest time layer
  • If parameter startFrom is set on startTime the parameter startTime stands for time layer to start from
  • Parameter stopAt specifies how the computation is stopped The most common is endTime. Alternatives are writeNownoWriteNow or
    nextWrite.
  • Parameter endTime is time when the computation stops
  • Parameter deltaT is the time step
  • Parameter writeControl says how often the solution is saved. Commonly used is timeStep saving after certain number of iterations It is useful to save in certain clock time clockTime, the solution can be saved in regular physical times runTime the solution can be also saved in regular computational times cpuTime.
  • Parameter writeInterval is corresponding value for writeControl
  • Parameter purgeWrite can handle keeping only last $ \color{white} n$ time layers, to avoid overfilling hard-disks. If purgeWrite set to zero nothing happens.
  • Parameter writeFormat stands for data format (ascii/binary)
  • Parameter writePrecision says how many decimal places are stored (ascii only)
  • Parameter writeCompression says if data compression is on/off (compressed/uncompressed)
  • Parameter timeFormat stands for format of time layers (name of directories)
  • Parameter timePrecision stands for the number of decimal places in time layer directory name
  • Parameter runTimeModifiable allows changes during computation (yes/no)