Difference between revisions of "InterFoam"

From OpenFOAMWiki
(Removed superfluous ending bracket and marked broken link by striking it through)
(saw the previous commit and updated the old links and tagged the one that isn't working...)
Line 4: Line 4:
  
 
===Online discussion===
 
===Online discussion===
*[http://openfoam.cfd-online.com/forum/messages/1/225.html?1110402036|VOF method]
+
*[http://www.cfd-online.com/Forums/openfoam-solving/58063-vof-method.html VOF method]
*[http://openfoam.cfd-online.com/forum/messages/1/751.html?1125677842|About interFoam solver]
+
*[http://www.cfd-online.com/Forums/openfoam-solving/57912-about-interfoam-solver.html About interFoam solver]
*[http://openfoam.cfd-online.com/forum/messages/1/610.html?1117794787|How to set the two parameters of solver 'interFoam'?]
+
*[http://www.cfd-online.com/Forums/openfoam-solving/60584-how-set-two-parameters-solver-binterfoamb.html How to set the two parameters of solver 'interFoam'?]
*[http://openfoam.cfd-online.com/forum/messages/1/135.html?1106532619|Inlet in interFoam]
+
*<del>[http://openfoam.cfd-online.com/forum/messages/1/135.html?1106532619 Inlet in interFoam]</del>
*<del>[http://openfoam.cfd-online.com/forum/messages/1/135.html?1106532619|Question about interface flow and adaptive mesh]</del> In this thread Henry Weller explains how interFoam is different from the CICSAM method.
+
*[http://www.cfd-online.com/Forums/openfoam-solving/59643-question-about-interface-flow-adaptive-mesh.html Question about interface flow and adaptive mesh] - In this thread Henry Weller explains how interFoam is different from the CICSAM method.
  
 
// Version Openfoam 1.5
 
// Version Openfoam 1.5

Revision as of 21:42, 19 May 2012

InterFoam is a solver for 2 incompressible fluids, which tracks the interface and includes the option of mesh motion.

1 Related information in the web

1.1 Online discussion

// Version Openfoam 1.5

 
#include "fvCFD.H"
#include "MULES.H"
#include "subCycle.H"
#include "interfaceProperties.H"
#include "twoPhaseMixture.H"
 
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
int main(int argc, char *argv[])
{
// these header files contain source code for common tasks that are used in numerous applications.
    #include "setRootCase.H"// set the run directory 
    #include "createTime.H" // rootPath, caseName
    #include "createMesh.H" // timeName
    #include "readEnvironmentalProperties.H"
    #include "readPISOControls.H"
    #include "initContinuityErrs.H"
    #include "createFields.H"
// Reading nGammaCorr, nGammaSubCycles
// Creates pd, gamma, U, rho, rhoPhi(Mass flux)
// Creates and initialises the face-flux field phi.
// Reading transportProperties
// Construct interface from gamma distribution
 
    #include "readTimeControls.H"
    #include "correctPhi.H"
    #include "CourantNo.H"
    #include "setInitialDeltaT.H"
 
 
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
    Info<< "\nStarting time loop\n" << endl;
 
// use the runTime object to control time stepping
    while (runTime.run())
    {
        #include "readPISOControls.H"
        // Read nCorrectors, nNonOrthogonalCorrectors, momentumPredictor,
        //  fluxGradp, transSonic, nOuterCorrectors
        #include "readTimeControls.H"
        // Read adjustTimeStep, maxCo, maxDeltaT
        #include "CourantNo.H"
        // Get the Mean and max Courant Numbers 
        #include "setDeltaT.H"
        // Get the deltaT
 
        runTime++;
 
        Info<< "Time = " << runTime.timeName() << nl << endl;
 
        // Re-calculate the interface curvature by calculateK()
        twoPhaseProperties.correct();
 
        #include "gammaEqnSubCycle.H"
        // Read nGammaCorr, nGammaSubCycles
 
        #include "UEqn.H"
 
        // --- PISO loop
        for (int corr=0; corr<nCorr; corr++)
        {
            #include "pEqn.H"
        }
 
        #include "continuityErrs.H"
 
        p = pd + rho*gh;
 
        runTime.write();
 
        Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
            << "  ClockTime = " << runTime.elapsedClockTime() << " s"
            << nl << endl;
    }
 
    Info<< "End\n" << endl;
 
    return(0);
}
 
 
// ************************************************************************* //