From 7bbad5324031a5b4cd52f704f6b02cdb0a4fc0db Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Sun, 8 May 2016 17:23:36 +0100 Subject: [PATCH] interPhaseChangeFoam, multiphaseInterFoam, potentialFreeSurfaceFoam: Added -postProcess option See also commit cc455173ffc914470a830c46ae51fabbba8dfdb0 --- .../multiphase/interPhaseChangeFoam/createControls.H | 1 + .../multiphase/interPhaseChangeFoam/createFields.H | 1 - .../interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C | 9 +++++---- .../interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H | 3 ++- .../interPhaseChangeFoam/interPhaseChangeFoam.C | 6 +++--- .../solvers/multiphase/interPhaseChangeFoam/pEqn.H | 3 ++- .../solvers/multiphase/multiphaseInterFoam/Make/options | 1 + .../multiphase/multiphaseInterFoam/createFields.H | 2 -- .../multiphaseInterDyMFoam/multiphaseInterDyMFoam.C | 9 ++++++--- .../multiphase/multiphaseInterFoam/multiphaseInterFoam.C | 8 +++++--- .../multiphase/potentialFreeSurfaceFoam/createControls.H | 1 + .../potentialFreeSurfaceDyMFoam.C | 7 ++++--- .../potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C | 7 +++---- 13 files changed, 33 insertions(+), 25 deletions(-) create mode 100644 applications/solvers/multiphase/interPhaseChangeFoam/createControls.H create mode 100644 applications/solvers/multiphase/potentialFreeSurfaceFoam/createControls.H diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/createControls.H b/applications/solvers/multiphase/interPhaseChangeFoam/createControls.H new file mode 100644 index 00000000000..cf82a59b358 --- /dev/null +++ b/applications/solvers/multiphase/interPhaseChangeFoam/createControls.H @@ -0,0 +1 @@ +pimpleControl pimple(mesh); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H index bb336f16c01..da76766cc1d 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H @@ -38,7 +38,6 @@ volScalarField& alpha2(mixture->alpha2()); const dimensionedScalar& rho1 = mixture->rho1(); const dimensionedScalar& rho2 = mixture->rho2(); -const dimensionedScalar& pSat = mixture->pSat(); // Need to store rho for ddt(rho, U) diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C index 2524965b289..d12aaad2639 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C @@ -56,13 +56,14 @@ Description int main(int argc, char *argv[]) { + #include "postProcess.H" + #include "setRootCase.H" #include "createTime.H" #include "createDynamicFvMesh.H" - - pimpleControl pimple(mesh); - - #include "../interFoam/interDyMFoam/createControls.H" + #include "createControls.H" + #include "createTimeControls.H" + #include "../interFoam/interDyMFoam/createDyMControls.H" #include "initContinuityErrs.H" #include "createFields.H" #include "createFvOptions.H" diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H index 7501f580628..8d992e80b0e 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H @@ -38,7 +38,8 @@ fvScalarMatrix p_rghEqn ( fvc::div(phiHbyA) - fvm::laplacian(rAUf, p_rgh) - - (vDotvP - vDotcP)*(pSat - rho*gh) + fvm::Sp(vDotvP - vDotcP, p_rgh) + - (vDotvP - vDotcP)*(mixture->pSat() - rho*gh) + + fvm::Sp(vDotvP - vDotcP, p_rgh) ); p_rghEqn.setReference(pRefCell, pRefValue); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C index 1e805bf785c..2a2d5cbc387 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C @@ -53,12 +53,12 @@ Description int main(int argc, char *argv[]) { + #include "postProcess.H" + #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" - - pimpleControl pimple(mesh); - + #include "createControls.H" #include "createFields.H" #include "createFvOptions.H" #include "createTimeControls.H" diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H index 0b0a31c669c..c08deda4038 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H @@ -32,7 +32,8 @@ fvScalarMatrix p_rghEqn ( fvc::div(phiHbyA) - fvm::laplacian(rAUf, p_rgh) - - (vDotvP - vDotcP)*(pSat - rho*gh) + fvm::Sp(vDotvP - vDotcP, p_rgh) + - (vDotvP - vDotcP)*(mixture->pSat() - rho*gh) + + fvm::Sp(vDotvP - vDotcP, p_rgh) ); p_rghEqn.setReference(pRefCell, pRefValue); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/Make/options index 0cd432b02ca..99850d69be7 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseInterFoam/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I. \ -I../interFoam \ -ImultiphaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels \ diff --git a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H index 2aca07af74b..1f50b72050d 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H @@ -44,8 +44,6 @@ volScalarField rho ); rho.oldTime(); -const surfaceScalarField& rhoPhi(mixture.rhoPhi()); - // Construct incompressible turbulence model autoPtr<incompressible::turbulenceModel> turbulence ( diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C index a247985a39c..fa3969d8553 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C @@ -44,14 +44,15 @@ Description int main(int argc, char *argv[]) { + #include "postProcess.H" + #include "setRootCase.H" #include "createTime.H" #include "createDynamicFvMesh.H" #include "initContinuityErrs.H" - - pimpleControl pimple(mesh); - #include "createControls.H" + #include "createTimeControls.H" + #include "createDyMControls.H" #include "createFields.H" #include "createMRF.H" #include "createFvOptions.H" @@ -75,6 +76,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + const surfaceScalarField& rhoPhi(mixture.rhoPhi()); + turbulence->validate(); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C index 1e68b5f614c..933a396fe13 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C @@ -43,12 +43,12 @@ Description int main(int argc, char *argv[]) { + #include "postProcess.H" + #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" - - pimpleControl pimple(mesh); - + #include "createControls.H" #include "initContinuityErrs.H" #include "createFields.H" #include "createMRF.H" @@ -60,6 +60,8 @@ int main(int argc, char *argv[]) turbulence->validate(); + const surfaceScalarField& rhoPhi(mixture.rhoPhi()); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/createControls.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/createControls.H new file mode 100644 index 00000000000..cf82a59b358 --- /dev/null +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/createControls.H @@ -0,0 +1 @@ +pimpleControl pimple(mesh); diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C index 0499a9c9d6c..dea10839190 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C @@ -49,14 +49,15 @@ Description int main(int argc, char *argv[]) { + #include "postProcess.H" + #include "setRootCase.H" #include "createTime.H" #include "createDynamicFvMesh.H" #include "initContinuityErrs.H" - - pimpleControl pimple(mesh); - #include "createControls.H" + #include "createTimeControls.H" + #include "createDyMControls.H" #include "createFields.H" #include "createMRF.H" #include "createFvOptions.H" diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C index 8371a30800c..b23fb73cf05 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C @@ -44,13 +44,12 @@ Description int main(int argc, char *argv[]) { - #include "setRootCase.H" + #include "postProcess.H" + #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" - - pimpleControl pimple(mesh); - + #include "createControls.H" #include "createTimeControls.H" #include "createFields.H" #include "createMRF.H" -- GitLab