PimpleDyMFoam

From OpenFOAMWiki

pimpleDyMFoam is an implementation of the pimpleFoam solver that allows for dynamic meshes. Like pimpleFoam, the solver is transient, allowing for relatively large time steps thanks to the hybrid PISO-SIMPLE (PIMPLE) algorithm.

Solver main function

 
int main(int argc, char *argv[])
{
    #include "setRootCase.H"
    #include "createTime.H"
    #include "createDynamicFvMesh.H"
    #include "initContinuityErrs.H"
 
    pimpleControl pimple(mesh);
 
    #include "createFields.H"
    #include "createUf.H"
    #include "createFvOptions.H"
    #include "readTimeControls.H"
    #include "createPcorrTypes.H"
    #include "CourantNo.H"
    #include "setInitialDeltaT.H"
 
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
    Info<< "\nStarting time loop\n" << endl;
 
    while (runTime.run())
    {
        #include "readControls.H"
        #include "CourantNo.H"
 
        #include "setDeltaT.H"
 
        runTime++;
 
        Info<< "Time = " << runTime.timeName() << nl << endl;
 
        mesh.update();
 
        // Calculate absolute flux from the mapped surface velocity
        phi = mesh.Sf() & Uf;
 
        if (mesh.changing() && correctPhi)
        {
            #include "correctPhi.H"
        }
 
        // Make the flux relative to the mesh motion
        fvc::makeRelative(phi, U);
 
        if (mesh.changing() && checkMeshCourantNo)
        {
            #include "meshCourantNo.H"
        }
 
        // --- Pressure-velocity PIMPLE corrector loop
        while (pimple.loop())
        {
            #include "UEqn.H"
 
            // --- Pressure corrector loop
            while (pimple.correct())
            {
                #include "pEqn.H"
            }
 
            if (pimple.turbCorr())
            {
                turbulence->correct();
            }
        }
 
        runTime.write();
 
        Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
            << "  ClockTime = " << runTime.elapsedClockTime() << " s"
            << nl << endl;
    }
 
    Info<< "End\n" << endl;
 
    return 0;
}