diff --git a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H index 13e1feb546e1e9d9efdf2965b99b5f8ff5d8b193..7bd4ca356881adab06717520b272781bbde03d61 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H @@ -12,12 +12,17 @@ alpha1/mixture.thermo1().Cv() + alpha2/mixture.thermo2().Cv() ) + == + fvOptions(rho, T) ); TEqn.relax(); + + fvOptions.constrain(TEqn); + TEqn.solve(); - mixture.correct(); + fvOptions.correct(T); - Info<< "min(T) " << min(T).value() << endl; + mixture.correct(); } diff --git a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H index 44be32aac22f201585518420fd22577ad48bd76a..18e947c8a7a540d2222b6583d19b718a72e9288a 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H @@ -3,10 +3,14 @@ fvm::ddt(rho, U) + fvm::div(rhoPhi, U) + turbulence->divDevRhoReff(U) + == + fvOptions(rho, U) ); UEqn.relax(); + fvOptions.constrain(UEqn); + if (pimple.momentumPredictor()) { solve @@ -23,5 +27,7 @@ ) ); + fvOptions.correct(U); + K = 0.5*magSqr(U); } diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C index 6f7ee7ffceaaaf1770391b205898aa6163dbcbad..157830ae6bb9b1896e0f8386eabef72f966f506e 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,6 +46,7 @@ Description #include "twoPhaseMixtureThermo.H" #include "turbulentFluidThermoModel.H" #include "pimpleControl.H" +#include "fvOptions.H" #include "CorrectPhi.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -60,6 +61,7 @@ int main(int argc, char *argv[]) #include "initContinuityErrs.H" #include "createControl.H" #include "createFields.H" + #include "createFvOptions.H" #include "createUf.H" #include "createControls.H" #include "CourantNo.H" diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H index fef73aa36593d93ce1270cf1a1ce5a9b9cb95297..661cb3a78eb3f77ee037257c1287525562503f5f 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H @@ -101,6 +101,7 @@ U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf); U.correctBoundaryConditions(); + fvOptions.correct(U); } } @@ -121,7 +122,4 @@ p_rgh.correctBoundaryConditions(); K = 0.5*magSqr(U); - - Info<< "max(U) " << max(mag(U)).value() << endl; - Info<< "min(p_rgh) " << min(p_rgh).value() << endl; } diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C index 150cc8bdfdbb1f4d71047914203fb239a0afac77..8775d0fbd33c203eec4e12ac70dc06d73d16ebfb 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,6 +44,7 @@ Description #include "twoPhaseMixtureThermo.H" #include "turbulentFluidThermoModel.H" #include "pimpleControl.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,6 +58,7 @@ int main(int argc, char *argv[]) #include "createControl.H" #include "createTimeControls.H" #include "createFields.H" + #include "createFvOptions.H" #include "CourantNo.H" #include "setInitialDeltaT.H" diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H index 78e46f466424fbc38f54ac607cb69e016e18e8a3..1328b0abd9d7a0dd03428d73e56a38271adb4da3 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H @@ -98,6 +98,7 @@ U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf); U.correctBoundaryConditions(); + fvOptions.correct(U); } } @@ -112,7 +113,4 @@ p_rgh.correctBoundaryConditions(); K = 0.5*magSqr(U); - - Info<< "max(U) " << max(mag(U)).value() << endl; - Info<< "min(p_rgh) " << min(p_rgh).value() << endl; }