From 6bb7cd9e16be092b27cce46b9ea5b2e90f239272 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Tue, 27 Nov 2018 11:41:34 +0000 Subject: [PATCH 1/3] TUT: Added files missed during commit cab7820fb3 --- .../laminar/waveMakerPiston/0.orig/U | 59 +++++++++++++++++ .../waveMakerPiston/0.orig/alpha.water | 55 ++++++++++++++++ .../laminar/waveMakerPiston/0.orig/p_rgh | 65 ++++++++++++++++++ .../waveMakerPiston/0.orig/pointDisplacement | 66 +++++++++++++++++++ .../laminar/waveMakerPiston/Allclean | 7 ++ .../interFoam/laminar/waveMakerPiston/Allrun | 15 +++++ .../waveMakerPiston/system/decomposeParDict | 28 ++++++++ 7 files changed, 295 insertions(+) create mode 100644 tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/U create mode 100644 tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/alpha.water create mode 100644 tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/p_rgh create mode 100644 tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/pointDisplacement create mode 100755 tutorials/multiphase/interFoam/laminar/waveMakerPiston/Allclean create mode 100755 tutorials/multiphase/interFoam/laminar/waveMakerPiston/Allrun create mode 100644 tutorials/multiphase/interFoam/laminar/waveMakerPiston/system/decomposeParDict diff --git a/tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/U b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/U new file mode 100644 index 0000000000..ba525ee1ab --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/U @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + bottom1 + { + type fixedValue; + value uniform (0 0 0); + } + bottom2 + { + type fixedValue; + value uniform (0 0 0); + } + leftwall + { + type movingWallVelocity; + value uniform (0 0 0); + } + back + { + type empty; + } + front + { + type empty; + } + rightwall + { + type waveVelocity; + value uniform (0 0 0); + } + top + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/alpha.water b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/alpha.water new file mode 100644 index 0000000000..48bc762997 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/alpha.water @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + bottom1 + { + type zeroGradient; + } + bottom2 + { + type zeroGradient; + } + front + { + type empty; + } + back + { + type empty; + } + leftwall + { + type zeroGradient; + } + rightwall + { + type zeroGradient; + } + top + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/p_rgh b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/p_rgh new file mode 100644 index 0000000000..da2c9ccfbd --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/p_rgh @@ -0,0 +1,65 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + bottom1 + { + type fixedFluxPressure; + value uniform 0; + } + bottom2 + { + type fixedFluxPressure; + value uniform 0; + } + front + { + type empty; + } + back + { + type empty; + } + leftwall + { + type fixedFluxPressure; + value uniform 0; + } + rightwall + { + type fixedFluxPressure; + value uniform 0; + } + top + { + type totalPressure; + U U; + phi phi; + rho rho; + psi none; + gamma 1; + p0 uniform 0; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/pointDisplacement b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/pointDisplacement new file mode 100644 index 0000000000..4c69e395fb --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/0.orig/pointDisplacement @@ -0,0 +1,66 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class pointVectorField; + object pointDisplacement; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + bottom1 + { + type zeroGradient; + } + bottom2 + { + type fixedValue; + value uniform (0 0 0); + } + leftwall + { + type waveMaker; + value uniform (0 0 0); + + motionType piston; + x0 (0 0 0); + n (1 0 0); + waveHeight 0.06; + initialDepth 0.25; + wavePeriod 2.0; + rampTime 2.0; + wavePhase 0; + } + back + { + type empty; + } + front + { + type empty; + } + rightwall + { + type fixedValue; + value uniform (0 0 0); + } + top + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/waveMakerPiston/Allclean b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/Allclean new file mode 100755 index 0000000000..e2f275d9fd --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/Allclean @@ -0,0 +1,7 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions + +cleanCase0 + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/laminar/waveMakerPiston/Allrun b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/Allrun new file mode 100755 index 0000000000..28bf991e62 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/Allrun @@ -0,0 +1,15 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +restore0Dir + +runApplication blockMesh + +runApplication decomposePar + +runParallel setFields + +runParallel $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/laminar/waveMakerPiston/system/decomposeParDict b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/system/decomposeParDict new file mode 100644 index 0000000000..16511601e1 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/waveMakerPiston/system/decomposeParDict @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n ( 4 1 1 ); + order xyz; +} + +// ************************************************************************* // From 32c174f34915997898f3e494710c434d3edfa112 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Tue, 27 Nov 2018 11:46:49 +0000 Subject: [PATCH 2/3] TUT: Moved g files - see 9abe97bb7b --- .../constant/{bottomWater => }/g | 0 .../externalCoupledHeater/constant/topAir/g | 1 - .../heatExchanger/constant/{air => }/g | 0 .../heatExchanger/constant/porous/g | 23 ------------------- .../constant/{bottomAir => }/g | 0 .../constant/topAir/g | 1 - 6 files changed, 25 deletions(-) rename tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/{bottomWater => }/g (100%) delete mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/g rename tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/{air => }/g (100%) delete mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/porous/g rename tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/{bottomAir => }/g (100%) delete mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/g diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/g b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/g similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/g rename to tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/g diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/g b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/g deleted file mode 120000 index fea3757006..0000000000 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/g +++ /dev/null @@ -1 +0,0 @@ -../bottomWater/g \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/g b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/g similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/g rename to tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/g diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/porous/g b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/porous/g deleted file mode 100644 index 35a92d79e0..0000000000 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/porous/g +++ /dev/null @@ -1,23 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v1806 | -| \\ / A nd | Web: www.OpenFOAM.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class uniformDimensionedVectorField; - location "constant"; - object g; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 1 -2 0 0 0 0]; -//value ( 0 0 9.81); -value ( 0 0 0); - - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/g b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/g similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/g rename to tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/g diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/g b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/g deleted file mode 120000 index fe0384ff08..0000000000 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/g +++ /dev/null @@ -1 +0,0 @@ -../bottomAir/g \ No newline at end of file From 8f858af6c8326996c5e0bc530893dc6bb08c86f0 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Tue, 27 Nov 2018 11:47:16 +0000 Subject: [PATCH 3/3] ENH: chtMultiRegionFoam - updated construction of g field --- .../fluid/createFluidFields.H | 31 +++++-------------- .../fluid/setRegionFluidFields.H | 1 - 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H index 1e51b9e1b8..42d399c53d 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H @@ -3,7 +3,6 @@ PtrList thermoFluid(fluidRegions.size()); PtrList rhoFluid(fluidRegions.size()); PtrList UFluid(fluidRegions.size()); PtrList phiFluid(fluidRegions.size()); -PtrList gFluid(fluidRegions.size()); PtrList hRefFluid(fluidRegions.size()); PtrList ghFluid(fluidRegions.size()); PtrList ghfFluid(fluidRegions.size()); @@ -26,6 +25,8 @@ PtrList fluidFvOptions(fluidRegions.size()); List