diff --git a/applications/modules/multiphaseEuler/multiphaseEuler/cellPressureCorrector.C b/applications/modules/multiphaseEuler/multiphaseEuler/cellPressureCorrector.C index 13d95ceba0..ac12ba5f77 100644 --- a/applications/modules/multiphaseEuler/multiphaseEuler/cellPressureCorrector.C +++ b/applications/modules/multiphaseEuler/multiphaseEuler/cellPressureCorrector.C @@ -469,7 +469,7 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector() } // Update and limit the static pressure - p_ = p_rgh + rho*buoyancy.gh; + p_ = p_rgh + rho*buoyancy.gh + buoyancy.pRef; fvConstraints().constrain(p_); // Account for static pressure reference @@ -485,7 +485,7 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector() } // Limit p_rgh - p_rgh = p - rho*buoyancy.gh; + p_rgh = p - rho*buoyancy.gh - buoyancy.pRef; // Update densities from change in p_rgh forAll(phases, phasei) @@ -505,7 +505,7 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector() // Correct p_rgh for consistency with p and the updated densities rho = fluid.rho(); - p_rgh = p - rho*buoyancy.gh; + p_rgh = p - rho*buoyancy.gh - buoyancy.pRef; p_rgh.correctBoundaryConditions(); } diff --git a/applications/modules/multiphaseEuler/multiphaseEuler/facePressureCorrector.C b/applications/modules/multiphaseEuler/multiphaseEuler/facePressureCorrector.C index b10d5dd223..92960da404 100644 --- a/applications/modules/multiphaseEuler/multiphaseEuler/facePressureCorrector.C +++ b/applications/modules/multiphaseEuler/multiphaseEuler/facePressureCorrector.C @@ -370,7 +370,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() } // Update and limit the static pressure - p = p_rgh + rho*buoyancy.gh; + p = p_rgh + rho*buoyancy.gh + buoyancy.pRef; fvConstraints().constrain(p); // Account for static pressure reference @@ -386,7 +386,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() } // Limit p_rgh - p_rgh = p - rho*buoyancy.gh; + p_rgh = p - rho*buoyancy.gh - buoyancy.pRef; // Update densities from change in p_rgh forAll(phases, phasei) @@ -406,7 +406,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() // Correct p_rgh for consistency with p and the updated densities rho = fluid.rho(); - p_rgh = p - rho*buoyancy.gh; + p_rgh = p - rho*buoyancy.gh - buoyancy.pRef; p_rgh.correctBoundaryConditions(); } diff --git a/tutorials/multiphaseEuler/mixerVessel2D/constant/pRef b/tutorials/multiphaseEuler/mixerVessel2D/constant/pRef new file mode 100644 index 0000000000..165e31d6fe --- /dev/null +++ b/tutorials/multiphaseEuler/mixerVessel2D/constant/pRef @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object pRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; +value 1e5; + +// ************************************************************************* //