CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Why does LaplacianFoam use a SIMPLE algorithm? (https://www.cfd-online.com/Forums/openfoam-solving/236544-why-does-laplacianfoam-use-simple-algorithm.html)

Reptider June 4, 2021 03:51

Why does LaplacianFoam use a SIMPLE algorithm?
 
Hello!
At present, I study discretisation schemes introduced in openFOAM. I know there are emplicit and implicit schemes. Intruduced code below solves the thermal equasion using Euler implicit implementation for a treatment of temporal discretisation (fmv).
Code:

    while (simple.loop())
    {
        Info<< "Time = " << runTime.timeName() << nl << endl;

        while (simple.correctNonOrthogonal())
        {
            fvScalarMatrix TEqn
            (
                fvm::ddt(T) - fvm::laplacian(DT, T)
            ==
                fvOptions(T)
            );

            fvOptions.constrain(TEqn);
            TEqn.solve();
            fvOptions.correct(T);
        }

        #include "write.H"

        runTime.printExecutionTime(Info);
    }

Euler implicit implementation gives us a first order accurate in time, guarantees boundedness and is unconditionally stable, so Courant number is unneccesary.
I have the question about SIMPLE algorithm which is used in laplacianFOAM.
SIMPLE algorithm is used for solving steady-state modes where Courant number isn't used, but time derivative is presented. So why is this algorithm presented in solver?
In fvSolution nonOrhogonalCorrector is included in SIMPLE.
Code:

SIMPLE
{
    nNonOrthogonalCorrectors 2;
}

Does it mean that SIMPLE is used only for inner loop to solve laplacian disctirisation?
Tnx!

dlahaye June 4, 2021 05:59

The simple.loop() is used to iterate until residual is small.

Giving that laplacianFoam solves only one field (T), no segregated solves are applied (most obviously).

Simple changes to the code might be insightful to make.

A first suggested simple modification is to remove the while loop and verify that only one iteration is performed.

A second suggested simple modification is to remove the fvm:ddt term and verify that a steady state solver is obtained.

Possibly this helps.


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