Merge branch 'master' of /home/noisy2/OpenFOAM/OpenFOAM-dev/

This commit is contained in:
mattijs
2008-05-08 15:10:29 +01:00
9 changed files with 166 additions and 122 deletions

View File

@ -26,8 +26,9 @@ Application
interDyMFoam interDyMFoam
Description Description
Solver for 2 incompressible fluids, which tracks the interface and includes Solver for 2 incompressible, isothermal immiscible fluids using a VOF
the option of mesh motion and mesh topology changes including adaptive (volume of fluid) phase-fraction based interface capturing approach,
with optional mesh motion and mesh topology changes including adaptive
re-meshing. re-meshing.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -45,18 +46,17 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H"
# include "setRootCase.H" #include "createTime.H"
# include "createTime.H" #include "createDynamicFvMesh.H"
# include "createDynamicFvMesh.H" #include "readEnvironmentalProperties.H"
# include "readEnvironmentalProperties.H" #include "readPISOControls.H"
# include "readPISOControls.H" #include "initContinuityErrs.H"
# include "initContinuityErrs.H" #include "createFields.H"
# include "createFields.H" #include "readTimeControls.H"
# include "readTimeControls.H" #include "correctPhi.H"
# include "correctPhi.H" #include "CourantNo.H"
# include "CourantNo.H" #include "setInitialDeltaT.H"
# include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -64,10 +64,10 @@ int main(int argc, char *argv[])
while (runTime.run()) while (runTime.run())
{ {
# include "readControls.H" #include "readControls.H"
# include "CourantNo.H" #include "CourantNo.H"
# include "setDeltaT.H" #include "setDeltaT.H"
runTime++; runTime++;
@ -96,7 +96,7 @@ int main(int argc, char *argv[])
if (mesh.changing() && correctPhi) if (mesh.changing() && correctPhi)
{ {
# include "correctPhi.H" #include "correctPhi.H"
} }
// Make the fluxes relative to the mesh motion // Make the fluxes relative to the mesh motion
@ -107,22 +107,22 @@ int main(int argc, char *argv[])
if (mesh.changing() && checkMeshCourantNo) if (mesh.changing() && checkMeshCourantNo)
{ {
# include "meshCourantNo.H" #include "meshCourantNo.H"
} }
twoPhaseProperties.correct(); twoPhaseProperties.correct();
# include "gammaEqnSubCycle.H" #include "gammaEqnSubCycle.H"
# include "UEqn.H" #include "UEqn.H"
// --- PISO loop // --- PISO loop
for (int corr=0; corr<nCorr; corr++) for (int corr=0; corr<nCorr; corr++)
{ {
# include "pEqn.H" #include "pEqn.H"
} }
# include "continuityErrs.H" #include "continuityErrs.H"
p = pd + rho*gh; p = pd + rho*gh;

View File

@ -45,7 +45,7 @@
Info<< "Reading transportProperties\n" << endl; Info<< "Reading transportProperties\n" << endl;
twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); twoPhaseMixture twoPhaseProperties(U, phi, "gamma");
const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
@ -83,14 +83,29 @@
); );
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
);
label pdRefCell = 0; label pdRefCell = 0;
scalar pdRefValue = 0.0; scalar pdRefValue = 0.0;
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue);
Info<< "Calculating field g.h\n" << endl;
surfaceScalarField ghf("gh", g & mesh.Cf());
// Construct interface from gamma distribution // Construct interface from gamma distribution
interfaceProperties interface(gamma, U, twoPhaseProperties); interfaceProperties interface(gamma, U, twoPhaseProperties);

View File

@ -45,18 +45,17 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H"
# include "setRootCase.H" #include "createTime.H"
# include "createTime.H" #include "createMesh.H"
# include "createMesh.H" #include "readEnvironmentalProperties.H"
# include "readEnvironmentalProperties.H" #include "readPISOControls.H"
# include "readPISOControls.H" #include "initContinuityErrs.H"
# include "initContinuityErrs.H" #include "createFields.H"
# include "createFields.H" #include "readTimeControls.H"
# include "readTimeControls.H" #include "correctPhi.H"
# include "correctPhi.H" #include "CourantNo.H"
# include "CourantNo.H" #include "setInitialDeltaT.H"
# include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -64,10 +63,10 @@ int main(int argc, char *argv[])
while (runTime.run()) while (runTime.run())
{ {
# include "readPISOControls.H" #include "readPISOControls.H"
# include "readTimeControls.H" #include "readTimeControls.H"
# include "CourantNo.H" #include "CourantNo.H"
# include "setDeltaT.H" #include "setDeltaT.H"
runTime++; runTime++;
@ -75,17 +74,19 @@ int main(int argc, char *argv[])
twoPhaseProperties.correct(); twoPhaseProperties.correct();
# include "gammaEqnSubCycle.H" #include "gammaEqnSubCycle.H"
# include "UEqn.H" #include "UEqn.H"
// --- PISO loop // --- PISO loop
for (int corr=0; corr<nCorr; corr++) for (int corr=0; corr<nCorr; corr++)
{ {
# include "pEqn.H" #include "pEqn.H"
} }
# include "continuityErrs.H" #include "continuityErrs.H"
p = pd + rho*gh;
runTime.write(); runTime.write();

View File

@ -48,18 +48,17 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H"
# include "setRootCase.H" #include "createTime.H"
# include "createTime.H" #include "createMesh.H"
# include "createMesh.H" #include "readEnvironmentalProperties.H"
# include "readEnvironmentalProperties.H" #include "readPISOControls.H"
# include "readPISOControls.H" #include "initContinuityErrs.H"
# include "initContinuityErrs.H" #include "createFields.H"
# include "createFields.H" #include "readTimeControls.H"
# include "readTimeControls.H" #include "correctPhi.H"
# include "correctPhi.H" #include "CourantNo.H"
# include "CourantNo.H" #include "setInitialDeltaT.H"
# include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -67,10 +66,10 @@ int main(int argc, char *argv[])
while (runTime.run()) while (runTime.run())
{ {
# include "readPISOControls.H" #include "readPISOControls.H"
# include "readTimeControls.H" #include "readTimeControls.H"
# include "CourantNo.H" #include "CourantNo.H"
# include "setDeltaT.H" #include "setDeltaT.H"
runTime++; runTime++;
@ -78,10 +77,11 @@ int main(int argc, char *argv[])
twoPhaseProperties->correct(); twoPhaseProperties->correct();
# include "gammaEqnSubCycle.H" #include "gammaEqnSubCycle.H"
turbulence->correct(); turbulence->correct();
// --- Outer-corrector loop
for (int oCorr=0; oCorr<nOuterCorr; oCorr++) for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
{ {
#include "UEqn.H" #include "UEqn.H"

View File

@ -44,7 +44,7 @@
Info<< "Reading transportProperties\n" << endl; Info<< "Reading transportProperties\n" << endl;
twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); twoPhaseMixture twoPhaseProperties(U, phi, "gamma");
const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
@ -87,9 +87,24 @@
Info<< "Calculating field g.h\n" << endl; Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("gh", g & mesh.Cf()); 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 // Construct interface from gamma distribution
interfaceProperties interface(gamma, U, twoPhaseProperties); interfaceProperties interface(gamma, U, twoPhaseProperties);

View File

@ -26,8 +26,11 @@ Application
lesInterFoam lesInterFoam
Description Description
Solver for 2 incompressible fluids capturing the interface. Turbulence is Solver for 2 incompressible, isothermal immiscible fluids using a VOF
modelled using a runtime selectable incompressible LES model. (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 "twoPhaseMixture.H"
#include "incompressible/LESmodel/LESmodel.H" #include "incompressible/LESmodel/LESmodel.H"
#include "IFstream.H"
#include "OFstream.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H"
# include "setRootCase.H" #include "createTime.H"
# include "createTime.H" #include "createMesh.H"
# include "createMesh.H" #include "readEnvironmentalProperties.H"
# include "readEnvironmentalProperties.H" #include "readPISOControls.H"
# include "readPISOControls.H" #include "initContinuityErrs.H"
# include "initContinuityErrs.H" #include "createFields.H"
#include "readTimeControls.H"
# include "createFields.H" #include "correctPhi.H"
//# include "createAverages.H" #include "CourantNo.H"
#include "setInitialDeltaT.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()) while (runTime.run())
{ {
# include "readPISOControls.H" #include "readPISOControls.H"
# include "readTimeControls.H" #include "readTimeControls.H"
# include "CourantNo.H" #include "CourantNo.H"
# include "setDeltaT.H" #include "setDeltaT.H"
runTime++; runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
# include "gammaEqnSubCycle.H" #include "gammaEqnSubCycle.H"
turbulence->correct(); turbulence->correct();
# include "UEqn.H" #include "UEqn.H"
// --- PISO loop // --- PISO loop
for (int corr=0; corr < nCorr; corr++) for (int corr=0; corr < nCorr; corr++)
{ {
# include "pEqn.H" #include "pEqn.H"
} }
# include "continuityErrs.H" #include "continuityErrs.H"
//# include "calculateAverages.H"
runTime.write(); runTime.write();
//# include "writeNaveragingSteps.H"
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s"

View File

@ -44,7 +44,7 @@
Info<< "Reading transportProperties\n" << endl; Info<< "Reading transportProperties\n" << endl;
twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); twoPhaseMixture twoPhaseProperties(U, phi, "gamma");
const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
@ -88,9 +88,24 @@
Info<< "Calculating field g.h\n" << endl; Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("gh", g & mesh.Cf()); 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 // Construct interface from gamma distribution
interfaceProperties interface(gamma, U, twoPhaseProperties); interfaceProperties interface(gamma, U, twoPhaseProperties);

View File

@ -23,11 +23,14 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application Application
lesInterFoam rasInterFoam
Description Description
Solver for 2 incompressible fluids capturing the interface. Turbulence is Solver for 2 incompressible, isothermal immiscible fluids using a VOF
modelled using a runtime selectable incompressible RAS model. (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[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H"
# include "setRootCase.H" #include "createTime.H"
# include "createTime.H" #include "createMesh.H"
# include "createMesh.H" #include "readEnvironmentalProperties.H"
# include "readEnvironmentalProperties.H" #include "readPISOControls.H"
# include "readPISOControls.H" #include "initContinuityErrs.H"
# include "initContinuityErrs.H" #include "createFields.H"
# include "createFields.H" #include "readTimeControls.H"
# include "readTimeControls.H" #include "correctPhi.H"
# include "correctPhi.H" #include "CourantNo.H"
# include "CourantNo.H" #include "setInitialDeltaT.H"
# include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -61,26 +63,28 @@ int main(int argc, char *argv[])
while (runTime.run()) while (runTime.run())
{ {
# include "readPISOControls.H" #include "readPISOControls.H"
# include "readTimeControls.H" #include "readTimeControls.H"
# include "CourantNo.H" #include "CourantNo.H"
# include "setDeltaT.H" #include "setDeltaT.H"
runTime++; runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
# include "gammaEqnSubCycle.H" #include "gammaEqnSubCycle.H"
# include "UEqn.H" #include "UEqn.H"
// --- PISO loop // --- PISO loop
for (int corr=0; corr < nCorr; corr++) 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(); turbulence->correct();

View File

@ -434,7 +434,7 @@ DebugSwitches
featureEdgeMesh 0; featureEdgeMesh 0;
fieldToCell 0; fieldToCell 0;
file 0; file 0;
fileName 0; fileName 2;
filteredLinear 0; filteredLinear 0;
filteredLinear2 0; filteredLinear2 0;
filteredLinear2V 0; filteredLinear2V 0;
@ -840,7 +840,7 @@ DebugSwitches
waveTransmissive 0; waveTransmissive 0;
wedge 0; wedge 0;
weighted 0; weighted 0;
word 0; word 2;
writer 0; writer 0;
xmgr 0; xmgr 0;
zeroGradient 0; zeroGradient 0;