diff --git a/applications/solvers/multiphase/lesInterFoam/createFields.H b/applications/solvers/multiphase/lesInterFoam/createFields.H index 666e655871..c24f8bda35 100644 --- a/applications/solvers/multiphase/lesInterFoam/createFields.H +++ b/applications/solvers/multiphase/lesInterFoam/createFields.H @@ -44,7 +44,7 @@ Info<< "Reading transportProperties\n" << endl; twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); - + const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); @@ -87,9 +87,24 @@ Info<< "Calculating field g.h\n" << endl; + volScalarField gh("gh", g & mesh.C()); surfaceScalarField ghf("gh", g & mesh.Cf()); + volScalarField p + ( + IOobject + ( + "p", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + pd + rho*gh + ); + + // Construct interface from gamma distribution interfaceProperties interface(gamma, U, twoPhaseProperties); diff --git a/applications/solvers/multiphase/lesInterFoam/lesInterFoam.C b/applications/solvers/multiphase/lesInterFoam/lesInterFoam.C index c006fc6dd6..acb11e1b29 100644 --- a/applications/solvers/multiphase/lesInterFoam/lesInterFoam.C +++ b/applications/solvers/multiphase/lesInterFoam/lesInterFoam.C @@ -26,8 +26,11 @@ Application lesInterFoam Description - Solver for 2 incompressible fluids capturing the interface. Turbulence is - modelled using a runtime selectable incompressible LES model. + Solver for 2 incompressible, isothermal immiscible fluids using a VOF + (volume of fluid) phase-fraction based interface capturing approach. + The momentum and other fluid properties are of the "mixture" and a single + momentum equation is solved. Turbulence is modelled using a run-time + selectable incompressible LES model. \*---------------------------------------------------------------------------*/ @@ -38,28 +41,21 @@ Description #include "twoPhaseMixture.H" #include "incompressible/LESmodel/LESmodel.H" -#include "IFstream.H" -#include "OFstream.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { - -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readEnvironmentalProperties.H" -# include "readPISOControls.H" -# include "initContinuityErrs.H" - -# include "createFields.H" -//# include "createAverages.H" - -# include "readTimeControls.H" -# include "correctPhi.H" -# include "CourantNo.H" -# include "setInitialDeltaT.H" + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readEnvironmentalProperties.H" + #include "readPISOControls.H" + #include "initContinuityErrs.H" + #include "createFields.H" + #include "readTimeControls.H" + #include "correctPhi.H" + #include "CourantNo.H" + #include "setInitialDeltaT.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -67,31 +63,29 @@ int main(int argc, char *argv[]) while (runTime.run()) { -# include "readPISOControls.H" -# include "readTimeControls.H" -# include "CourantNo.H" -# include "setDeltaT.H" + #include "readPISOControls.H" + #include "readTimeControls.H" + #include "CourantNo.H" + #include "setDeltaT.H" runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; -# include "gammaEqnSubCycle.H" + #include "gammaEqnSubCycle.H" turbulence->correct(); -# include "UEqn.H" + #include "UEqn.H" // --- PISO loop for (int corr=0; corr < nCorr; corr++) { -# include "pEqn.H" + #include "pEqn.H" } -# include "continuityErrs.H" -//# include "calculateAverages.H" + #include "continuityErrs.H" runTime.write(); -//# include "writeNaveragingSteps.H" Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" diff --git a/applications/solvers/multiphase/rasInterFoam/createFields.H b/applications/solvers/multiphase/rasInterFoam/createFields.H index 1aef6db579..988e8b3f74 100644 --- a/applications/solvers/multiphase/rasInterFoam/createFields.H +++ b/applications/solvers/multiphase/rasInterFoam/createFields.H @@ -44,7 +44,7 @@ Info<< "Reading transportProperties\n" << endl; twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); - + const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); @@ -88,9 +88,24 @@ Info<< "Calculating field g.h\n" << endl; + volScalarField gh("gh", g & mesh.C()); surfaceScalarField ghf("gh", g & mesh.Cf()); + volScalarField p + ( + IOobject + ( + "p", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + pd + rho*gh + ); + + // Construct interface from gamma distribution interfaceProperties interface(gamma, U, twoPhaseProperties); diff --git a/applications/solvers/multiphase/rasInterFoam/rasInterFoam.C b/applications/solvers/multiphase/rasInterFoam/rasInterFoam.C index 9cf47c5f32..1c78f70bd8 100644 --- a/applications/solvers/multiphase/rasInterFoam/rasInterFoam.C +++ b/applications/solvers/multiphase/rasInterFoam/rasInterFoam.C @@ -23,11 +23,14 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application - lesInterFoam + rasInterFoam Description - Solver for 2 incompressible fluids capturing the interface. Turbulence is - modelled using a runtime selectable incompressible RAS model. + Solver for 2 incompressible, isothermal immiscible fluids using a VOF + (volume of fluid) phase-fraction based interface capturing approach. + The momentum and other fluid properties are of the "mixture" and a single + momentum equation is solved. Turbulence is modelled using a run-time + selectable incompressible RAS model. \*---------------------------------------------------------------------------*/ @@ -42,18 +45,17 @@ Description int main(int argc, char *argv[]) { - -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readEnvironmentalProperties.H" -# include "readPISOControls.H" -# include "initContinuityErrs.H" -# include "createFields.H" -# include "readTimeControls.H" -# include "correctPhi.H" -# include "CourantNo.H" -# include "setInitialDeltaT.H" + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readEnvironmentalProperties.H" + #include "readPISOControls.H" + #include "initContinuityErrs.H" + #include "createFields.H" + #include "readTimeControls.H" + #include "correctPhi.H" + #include "CourantNo.H" + #include "setInitialDeltaT.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,26 +63,28 @@ int main(int argc, char *argv[]) while (runTime.run()) { -# include "readPISOControls.H" -# include "readTimeControls.H" -# include "CourantNo.H" -# include "setDeltaT.H" + #include "readPISOControls.H" + #include "readTimeControls.H" + #include "CourantNo.H" + #include "setDeltaT.H" runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; -# include "gammaEqnSubCycle.H" + #include "gammaEqnSubCycle.H" -# include "UEqn.H" + #include "UEqn.H" // --- PISO loop for (int corr=0; corr < nCorr; corr++) { -# include "pEqn.H" + #include "pEqn.H" } -# include "continuityErrs.H" + #include "continuityErrs.H" + + p = pd + rho*gh; turbulence->correct();