From 012df9d6995667dc487dbd08f000d49be3f08cac Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 11 Jun 2021 11:31:19 +0100 Subject: [PATCH] chtMultiRegionFoam: Added optional hydrostatic initialisation of pressure Class Foam::hydrostaticInitialisation Description Optional hydrostatic initialisation of p_rgh and p by solving for and caching the hydrostatic ph_rgh and updating the density such that p = ph_rgh + rho*gh + pRef This initialisation process is applied at the beginning of the run (not on restart) if the \c hydrostaticInitialisation switch is set true in fvSolution/PIMPLE or fvSolution/SIMPLE. The calculation is iterative if the density is a function of pressure and an optional number of iterations \c nHydrostaticCorrectors may be specified which defaults to 5. --- .../heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index 042858933e..cd09007eda 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -46,6 +46,7 @@ Description #include "coordinateSystem.H" #include "pimpleMultiRegionControl.H" #include "pressureReference.H" +#include "hydrostaticInitialisation.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,9 +59,9 @@ int main(int argc, char *argv[]) #include "setRootCaseLists.H" #include "createTime.H" #include "createMeshes.H" + pimpleMultiRegionControl pimples(fluidRegions, solidRegions); #include "createFields.H" #include "initContinuityErrs.H" - pimpleMultiRegionControl pimples(fluidRegions, solidRegions); #include "createFluidPressureControls.H" #include "createTimeControls.H" #include "readSolidTimeControls.H"