Difference between revisions of "PimpleDyMFoam"

From OpenFOAMWiki
(pimpleDyMFoam: Add links to new pages for PISO, SIMPLE, and PIMPLE)
(Fix heading levels)
 
Line 1: Line 1:
= pimpleDyMFoam =
 
  
 
<code>pimpleDyMFoam</code> is an implementation of the [[pimpleFoam]] solver that allows for dynamic meshes. Like <code>pimpleFoam</code>, the solver is transient, allowing for relatively large time steps thanks to the hybrid [[PISO]]-[[SIMPLE]] ([[PIMPLE]]) algorithm.  
 
<code>pimpleDyMFoam</code> is an implementation of the [[pimpleFoam]] solver that allows for dynamic meshes. Like <code>pimpleFoam</code>, the solver is transient, allowing for relatively large time steps thanks to the hybrid [[PISO]]-[[SIMPLE]] ([[PIMPLE]]) algorithm.  
  
== Solver main function ==
+
= Solver main function =
 
<cpp>
 
<cpp>
 
int main(int argc, char *argv[])
 
int main(int argc, char *argv[])

Latest revision as of 17:08, 15 May 2014

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;
}