CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Dam break (https://www.cfd-online.com/Forums/openfoam-pre-processing/167818-dam-break.html)

Jack_Landis March 9, 2016 12:21

Dam break
 
Hi everyone,

I'm quite new at using openFoam and in general CFD. I can't understand a part of he fvSolution file.

Code:

solvers
{
    "alpha.water.*"
    {
        nAlphaCorr      2;
        nAlphaSubCycles 1;
        cAlpha          1;

        MULESCorr      yes;
        nLimiterIter    3;

        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance      1e-8;
        relTol          0;
    }

    pcorr
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-5;
        relTol          0;
    }

    p_rgh
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-07;
        relTol          0.05;
    }

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    U
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance      1e-06;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor  no;
    nOuterCorrectors    1;
    nCorrectors        3;
    nNonOrthogonalCorrectors 0;
}

relaxationFactors
{
    equations
    {
        ".*" 1;
    }
}

1) Why alpha.water is posed between apices?
2) Why is it needed to use p_rgh instead of p?
3) Why is it needed to specify p_rghFinal and how is it defined here?
4) What is pcorr?
5) Does ".*" in relaxation factors mean that 1 is applied to each field?

I know these are probably trivial questions, but I really don't know where to find information about that...

Can someone help me?
Can you also suggest me a way to get a deeper understanding than that given by the guide?

Thank you very much!

Artur March 12, 2016 13:20

Hi,

1. It needs the "" because otherwise the dot in the line would make the reader cough
2. Multiphase solvers in OpenFOAM tend to solve for pressure less the hydrostatic component rho*g*z, i.e. the p_rgz, or dynamic pressure. This makes some tricks with setting the BCs easier. Note that the solver still computes total pressure and saves it as p based on the gravity field you specify in constant/g
3. p_rghFinal describes settings used for the final iteration within the time step. Whether it's needed depends on whether you're using pimple or piso and on other things. If you look at the PIMPLE tutorials all of the cases have *Final defined for all the fields because the solver needs those.
4. pcorr is the pressure correction, see e.g. here: https://en.wikipedia.org/wiki/Pressu...rection_method ; in short, it's a standard way of coupling pressure and velocity for incompressible flows, or from fvSolution perspective yet another field that needs to be solved for.
5. you are correct, the ".*" is an OpenFOAM wildcard

I suggest having a look here for some basic background on CFD, will explain what pressure corrections are, what do the schemes and solvers actually do and more; totally recommend to anyone new to CFD:
https://engineering.purdue.edu/ME608/webpage/main.pdf

All the best,

A

Jack_Landis March 16, 2016 05:56

Hi Artur!

Thank you very much for the explanation and the suggestions! I think that book is very well explained!


All times are GMT -4. The time now is 15:06.