From 2f30c1364b2eee376004dfb437c15f698cf71d89 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 3 Jul 2020 15:41:58 +0100 Subject: [PATCH] heatTransfer solvers: Added optional pressure reference Added optional pressure reference pRef to p_rgh in buoyantPimpleFoam, buoyantSimpleFoam and chtMultiRegionFoam which handles cases in which the pressure variation is small compared to the pressure level more accurately. The pRef value is provided in the optional constant/pRef file. All tutorials and templates have been updated to use pRef as appropriate. --- .../buoyantPimpleFoam/createFields.H | 3 ++- .../heatTransfer/buoyantPimpleFoam/pEqn.H | 4 ++-- .../buoyantSimpleFoam/createFields.H | 3 ++- .../heatTransfer/buoyantSimpleFoam/pEqn.H | 4 ++-- .../fluid/createFluidFields.H | 21 ++++++++++++++++- .../fluid/setRegionFluidFields.H | 1 + .../singleFluidCHT/templates/0/fluid/p | 4 ++-- .../singleFluidCHT/templates/0/fluid/p_rgh | 8 +++---- .../templates/constant/fluid/pRef | 23 +++++++++++++++++++ .../buoyantPimpleFoam/hotRoom/0/p_rgh | 8 +++---- .../buoyantPimpleFoam/hotRoom/constant/pRef | 21 +++++++++++++++++ .../buoyantSimpleFoam/buoyantCavity/0/p_rgh | 10 ++++---- .../buoyantCavity/constant/pRef | 21 +++++++++++++++++ .../circuitBoardCooling/0.orig/p | 15 +++++++----- .../circuitBoardCooling/0.orig/p_rgh | 18 +++++++-------- .../circuitBoardCooling/constant/pRef | 21 +++++++++++++++++ .../buoyantSimpleFoam/comfortHotRoom/0/p_rgh | 2 +- .../comfortHotRoom/constant/pRef | 21 +++++++++++++++++ .../externalCoupledCavity/0/p_rgh | 10 ++++---- .../externalCoupledCavity/constant/pRef | 21 +++++++++++++++++ .../buoyantSimpleFoam/hotRadiationRoom/0/p | 2 +- .../hotRadiationRoom/0/p_rgh | 10 ++++---- .../hotRadiationRoom/constant/pRef | 21 +++++++++++++++++ .../hotRadiationRoomFvDOM/0/p | 10 ++++---- .../hotRadiationRoomFvDOM/0/p_rgh | 10 ++++---- .../hotRadiationRoomFvDOM/constant/pRef | 21 +++++++++++++++++ .../hotRoomBoussinesq/0/p_rgh | 6 ++--- .../iglooWithFridges/0/p_rgh | 2 +- .../coolingSphere/templates/0/fluid/p_rgh | 6 ++--- .../templates/constant/fluid/pRef | 23 +++++++++++++++++++ .../heatExchanger/0/air/p_rgh | 2 +- .../heatExchanger/constant/air/pRef | 21 +++++++++++++++++ .../reverseBurner/0/gas/p_rgh | 2 +- .../reverseBurner/constant/gas/pRef | 21 +++++++++++++++++ 34 files changed, 328 insertions(+), 68 deletions(-) create mode 100644 etc/templates/singleFluidCHT/templates/constant/fluid/pRef create mode 100644 tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/pRef create mode 100644 tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/pRef create mode 100644 tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/pRef create mode 100644 tutorials/heatTransfer/buoyantSimpleFoam/comfortHotRoom/constant/pRef create mode 100644 tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/constant/pRef create mode 100644 tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/pRef create mode 100644 tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/pRef create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/templates/constant/fluid/pRef create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/constant/air/pRef create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/constant/gas/pRef diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H index 53a5ba8607..5773e54c71 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H @@ -62,6 +62,7 @@ autoPtr thermophysicalTransport #include "readGravitationalAcceleration.H" #include "readhRef.H" #include "gh.H" +#include "readpRef.H" Info<< "Reading field p_rgh\n" << endl; @@ -79,7 +80,7 @@ volScalarField p_rgh ); // Force p_rgh to be consistent with p -p_rgh = p - rho*gh; +p_rgh = p - rho*gh - pRef; pressureControl pressureControl ( diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H index d29960b306..bb9edac6cf 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H @@ -103,7 +103,7 @@ else phi = phiHbyA + p_rghEqn.flux(); -p = p_rgh + rho*gh; +p = p_rgh + rho*gh + pRef; if (mesh.steady()) { @@ -146,7 +146,7 @@ if (adjustMass && !thermo.incompressible()) { p += (initialMass - fvc::domainIntegrate(thermo.rho())) /fvc::domainIntegrate(psi); - p_rgh = p - rho*gh; + p_rgh = p - rho*gh - pRef; p.correctBoundaryConditions(); } diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H index 3fa021530a..c0b4fb00bc 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H @@ -57,6 +57,7 @@ autoPtr thermophysicalTransport #include "readGravitationalAcceleration.H" #include "readhRef.H" #include "gh.H" +#include "readpRef.H" Info<< "Reading field p_rgh\n" << endl; @@ -74,7 +75,7 @@ volScalarField p_rgh ); // Force p_rgh to be consistent with p -p_rgh = p - rho*gh; +p_rgh = p - rho*gh - pRef; pressureControl pressureControl ( diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index 4a08c51ad8..82d4cedd89 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -77,7 +77,7 @@ else phi = phiHbyA + p_rghEqn.flux(); -p = p_rgh + rho*gh; +p = p_rgh + rho*gh + pRef; #include "incompressible/continuityErrs.H" @@ -98,7 +98,7 @@ if (closedVolume && !thermo.incompressible()) { p += (initialMass - fvc::domainIntegrate(thermo.rho())) /fvc::domainIntegrate(psi); - p_rgh = p - rho*gh; + p_rgh = p - rho*gh - pRef; p.correctBoundaryConditions(); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H index 24788c0da9..f8af23954d 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H @@ -5,6 +5,7 @@ PtrList UFluid(fluidRegions.size()); PtrList phiFluid(fluidRegions.size()); PtrList gFluid(fluidRegions.size()); PtrList hRefFluid(fluidRegions.size()); +PtrList pRefFluid(fluidRegions.size()); PtrList ghFluid(fluidRegions.size()); PtrList ghfFluid(fluidRegions.size()); PtrList @@ -123,6 +124,24 @@ forAll(fluidRegions, i) ) ); + Info<< " Adding to pRefFluid\n" << endl; + pRefFluid.set + ( + i, + new uniformDimensionedScalarField + ( + IOobject + ( + "pRef", + runTime.constant(), + fluidRegions[i], + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ), + dimensionedScalar(dimPressure, 0) + ) + ); + dimensionedScalar ghRef(- mag(gFluid[i])*hRefFluid[i]); Info<< " Adding to ghFluid\n" << endl; @@ -200,7 +219,7 @@ forAll(fluidRegions, i) ); // Force p_rgh to be consistent with p - p_rghFluid[i] = thermoFluid[i].p() - rhoFluid[i]*ghFluid[i]; + p_rghFluid[i] = thermoFluid[i].p() - rhoFluid[i]*ghFluid[i] - pRefFluid[i]; fluidRegions[i].setFluxRequired(p_rghFluid[i].name()); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H index b6baaaa9a4..5832cba818 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H @@ -40,6 +40,7 @@ volScalarField& p_rgh = p_rghFluid[i]; const dimensionedVector& g = gFluid[i]; + const dimensionedScalar& pRef = pRefFluid[i]; const volScalarField& gh = ghFluid[i]; const surfaceScalarField& ghf = ghfFluid[i]; diff --git a/etc/templates/singleFluidCHT/templates/0/fluid/p b/etc/templates/singleFluidCHT/templates/0/fluid/p index afd98aede4..a5818f09b4 100644 --- a/etc/templates/singleFluidCHT/templates/0/fluid/p +++ b/etc/templates/singleFluidCHT/templates/0/fluid/p @@ -25,13 +25,13 @@ boundaryField outlet { type calculated; - value uniform $pInitial; + value $internalField; } inlet { type calculated; - value uniform $pInitial; + value $internalField; } wall diff --git a/etc/templates/singleFluidCHT/templates/0/fluid/p_rgh b/etc/templates/singleFluidCHT/templates/0/fluid/p_rgh index cc9d4b9bcd..7ec627ad1b 100644 --- a/etc/templates/singleFluidCHT/templates/0/fluid/p_rgh +++ b/etc/templates/singleFluidCHT/templates/0/fluid/p_rgh @@ -16,22 +16,22 @@ FoamFile #include "$FOAM_CASE/constant/initialConditions" -dimensions [ 1 -1 -2 0 0 0 0 ]; +dimensions [1 -1 -2 0 0 0 0]; -internalField uniform $pInitial; +internalField uniform 0; boundaryField { outlet { type fixedValue; - value uniform $pInitial; + value $internalField; } inlet { type fixedFluxPressure; - value uniform $pInitial; + value $internalField; } wall diff --git a/etc/templates/singleFluidCHT/templates/constant/fluid/pRef b/etc/templates/singleFluidCHT/templates/constant/fluid/pRef new file mode 100644 index 0000000000..5e9123a2d1 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/constant/fluid/pRef @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object pRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "$FOAM_CASE/constant/initialConditions" + +dimensions [1 -1 -2 0 0 0 0]; +value $pInitial; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/p_rgh b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/p_rgh index eeadeb628b..64ccfd0f8e 100644 --- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/p_rgh +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/p_rgh @@ -16,26 +16,26 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 1e5; +internalField uniform 0; boundaryField { floor { type fixedFluxPressure; - value uniform 1e5; + value $internalField; } ceiling { type fixedFluxPressure; - value uniform 1e5; + value $internalField; } fixedWalls { type fixedFluxPressure; - value uniform 1e5; + value $internalField; } } diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/pRef b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/pRef new file mode 100644 index 0000000000..6ff4da0e04 --- /dev/null +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/pRef @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object pRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; +value 1e5; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/p_rgh b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/p_rgh index d0318ecc4b..be67a9295d 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/p_rgh +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/p_rgh @@ -17,32 +17,32 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 1e5; +internalField uniform 0; boundaryField { frontAndBack { type fixedFluxPressure; - value uniform 1e5; + value $internalField; } topAndBottom { type fixedFluxPressure; - value uniform 1e5; + value $internalField; } hot { type fixedFluxPressure; - value uniform 1e5; + value $internalField; } cold { type fixedFluxPressure; - value uniform 1e5; + value $internalField; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/pRef b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/pRef new file mode 100644 index 0000000000..6ff4da0e04 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/pRef @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object pRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; +value 1e5; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.orig/p b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.orig/p index b7a3db333b..17e3a87ace 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.orig/p +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.orig/p @@ -17,7 +17,7 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 101325; +internalField uniform 1e5; boundaryField { @@ -27,28 +27,31 @@ boundaryField floor { type calculated; - value uniform 101325; + value $internalField; } + ceiling { type calculated; - value uniform 101325; + value $internalField; } + inlet { type calculated; - value uniform 101325; + value $internalField; } + outlet { type calculated; - value uniform 101325; + value $internalField; } + fixedWalls { type empty; } - } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.orig/p_rgh b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.orig/p_rgh index 6c9b29ca79..db91948390 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.orig/p_rgh +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.orig/p_rgh @@ -17,7 +17,7 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 101325; +internalField uniform 0; boundaryField { @@ -27,31 +27,31 @@ boundaryField floor { type fixedFluxPressure; - gradient uniform 0; - value uniform 101325; + value $internalField; } + ceiling { type fixedFluxPressure; - gradient uniform 0; - value uniform 101325; + value $internalField; } + inlet { type fixedFluxPressure; - gradient uniform 0; - value uniform 101325; + value $internalField; } + outlet { type fixedValue; - value uniform 101325; + value $internalField; } + fixedWalls { type empty; } - } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/pRef b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/pRef new file mode 100644 index 0000000000..6ff4da0e04 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/pRef @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object pRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; +value 1e5; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/comfortHotRoom/0/p_rgh b/tutorials/heatTransfer/buoyantSimpleFoam/comfortHotRoom/0/p_rgh index dad2174915..9a41b113f7 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/comfortHotRoom/0/p_rgh +++ b/tutorials/heatTransfer/buoyantSimpleFoam/comfortHotRoom/0/p_rgh @@ -16,7 +16,7 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 1e5; +internalField uniform 0; boundaryField { diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/comfortHotRoom/constant/pRef b/tutorials/heatTransfer/buoyantSimpleFoam/comfortHotRoom/constant/pRef new file mode 100644 index 0000000000..6ff4da0e04 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/comfortHotRoom/constant/pRef @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object pRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; +value 1e5; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/p_rgh b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/p_rgh index d0318ecc4b..be67a9295d 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/p_rgh +++ b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/p_rgh @@ -17,32 +17,32 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 1e5; +internalField uniform 0; boundaryField { frontAndBack { type fixedFluxPressure; - value uniform 1e5; + value $internalField; } topAndBottom { type fixedFluxPressure; - value uniform 1e5; + value $internalField; } hot { type fixedFluxPressure; - value uniform 1e5; + value $internalField; } cold { type fixedFluxPressure; - value uniform 1e5; + value $internalField; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/constant/pRef b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/constant/pRef new file mode 100644 index 0000000000..6ff4da0e04 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/constant/pRef @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object pRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; +value 1e5; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/p b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/p index 90087fcc72..5fb5303092 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/p +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/p @@ -16,7 +16,7 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 100000; +internalField uniform 1e5; boundaryField { diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/p_rgh b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/p_rgh index 8df375ec38..d914f49016 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/p_rgh +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/p_rgh @@ -16,32 +16,32 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 100000; +internalField uniform 0; boundaryField { floor { type fixedFluxPressure; - value uniform 100000; + value $internalField; } ceiling { type fixedFluxPressure; - value uniform 100000; + value $internalField; } fixedWalls { type fixedFluxPressure; - value uniform 100000; + value $internalField; } box { type fixedFluxPressure; - value uniform 100000; + value $internalField; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/pRef b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/pRef new file mode 100644 index 0000000000..6ff4da0e04 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/pRef @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object pRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; +value 1e5; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/p b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/p index 8ecef35466..5fb5303092 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/p +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/p @@ -16,32 +16,32 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 100000; +internalField uniform 1e5; boundaryField { floor { type calculated; - value uniform 100000; + value $internalField; } ceiling { type calculated; - value uniform 100000; + value $internalField; } fixedWalls { type calculated; - value uniform 100000; + value $internalField; } box { type calculated; - value uniform 100000; + value $internalField; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/p_rgh b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/p_rgh index 8df375ec38..d914f49016 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/p_rgh +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/p_rgh @@ -16,32 +16,32 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 100000; +internalField uniform 0; boundaryField { floor { type fixedFluxPressure; - value uniform 100000; + value $internalField; } ceiling { type fixedFluxPressure; - value uniform 100000; + value $internalField; } fixedWalls { type fixedFluxPressure; - value uniform 100000; + value $internalField; } box { type fixedFluxPressure; - value uniform 100000; + value $internalField; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/pRef b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/pRef new file mode 100644 index 0000000000..6ff4da0e04 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/pRef @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object pRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; +value 1e5; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoomBoussinesq/0/p_rgh b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoomBoussinesq/0/p_rgh index 86e87bdda1..64ccfd0f8e 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoomBoussinesq/0/p_rgh +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoomBoussinesq/0/p_rgh @@ -23,19 +23,19 @@ boundaryField floor { type fixedFluxPressure; - value uniform 0; + value $internalField; } ceiling { type fixedFluxPressure; - value uniform 0; + value $internalField; } fixedWalls { type fixedFluxPressure; - value uniform 0; + value $internalField; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/iglooWithFridges/0/p_rgh b/tutorials/heatTransfer/buoyantSimpleFoam/iglooWithFridges/0/p_rgh index 4bc5a1b995..e4470497d2 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/iglooWithFridges/0/p_rgh +++ b/tutorials/heatTransfer/buoyantSimpleFoam/iglooWithFridges/0/p_rgh @@ -26,7 +26,7 @@ boundaryField wall { type fixedFluxPressure; - value uniform 0; + value $internalField; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/templates/0/fluid/p_rgh b/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/templates/0/fluid/p_rgh index cc9d4b9bcd..b7d2f07db4 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/templates/0/fluid/p_rgh +++ b/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/templates/0/fluid/p_rgh @@ -18,20 +18,20 @@ FoamFile dimensions [ 1 -1 -2 0 0 0 0 ]; -internalField uniform $pInitial; +internalField uniform 0; boundaryField { outlet { type fixedValue; - value uniform $pInitial; + value uniform 0; } inlet { type fixedFluxPressure; - value uniform $pInitial; + value uniform 0; } wall diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/templates/constant/fluid/pRef b/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/templates/constant/fluid/pRef new file mode 100644 index 0000000000..5e9123a2d1 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/templates/constant/fluid/pRef @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object pRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "$FOAM_CASE/constant/initialConditions" + +dimensions [1 -1 -2 0 0 0 0]; +value $pInitial; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/0/air/p_rgh b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/0/air/p_rgh index d3840424c3..272d4c80f7 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/0/air/p_rgh +++ b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/0/air/p_rgh @@ -17,7 +17,7 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 100000; +internalField uniform 0; boundaryField { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/constant/air/pRef b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/constant/air/pRef new file mode 100644 index 0000000000..6ff4da0e04 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/constant/air/pRef @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object pRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; +value 1e5; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/0/gas/p_rgh b/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/0/gas/p_rgh index bbb80ddd00..70c835912b 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/0/gas/p_rgh +++ b/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/0/gas/p_rgh @@ -17,7 +17,7 @@ FoamFile dimensions [ 1 -1 -2 0 0 0 0 ]; -internalField uniform 1e6; +internalField uniform 0; boundaryField { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/constant/gas/pRef b/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/constant/gas/pRef new file mode 100644 index 0000000000..60b8696fb8 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/constant/gas/pRef @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object pRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; +value 1e6; + +// ************************************************************************* //