From 1e7b67fdcf3929b5af2390cdafaaa8aade0f5818 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Tue, 5 Dec 2017 12:00:00 +0100 Subject: [PATCH] TUT: relocate externalCoupled heater tutorial, add steady-state version --- .../0/T | 2 +- .../0/U | 2 +- .../0/epsilon | 3 +- .../0/k | 3 +- .../0/p | 2 +- .../0/p_rgh | 2 +- .../Allclean | 0 .../Allrun | 0 .../Allrun.pre | 0 .../README.txt | 0 .../constant/bottomWater/g | 0 .../constant/bottomWater/radiationProperties | 0 .../bottomWater/thermophysicalProperties | 0 .../constant/bottomWater/turbulenceProperties | 0 .../constant/heater/radiationProperties | 0 .../constant/heater/thermophysicalProperties | 0 .../constant/leftSolid/radiationProperties | 0 .../leftSolid/thermophysicalProperties | 0 .../constant/regionProperties | 0 .../constant/rightSolid/radiationProperties | 0 .../rightSolid/thermophysicalProperties | 0 .../constant/topAir/g | 0 .../constant/topAir/radiationProperties | 0 .../constant/topAir/thermophysicalProperties | 0 .../constant/topAir/turbulenceProperties | 0 .../externalSolver | 26 ++- .../system/README | 0 .../system/blockMeshDict | 0 .../system/bottomWater/changeDictionaryDict | 0 .../system/bottomWater/decomposeParDict | 0 .../system/bottomWater/fvSchemes | 0 .../system/bottomWater/fvSolution | 0 .../system/controlDict | 0 .../system/decomposeParDict | 0 .../system/externalCoupled | 0 .../system/fvSchemes | 0 .../system/fvSolution | 0 .../system/heater/changeDictionaryDict | 0 .../system/heater/decomposeParDict | 44 +++++ .../system/heater/fvSchemes | 0 .../system/heater/fvSolution | 0 .../system/leftSolid/changeDictionaryDict | 0 .../system/leftSolid}/decomposeParDict | 0 .../system/leftSolid/fvSchemes | 0 .../system/leftSolid/fvSolution | 0 .../system/rightSolid/changeDictionaryDict | 0 .../system/rightSolid}/decomposeParDict | 0 .../system/rightSolid/fvSchemes | 0 .../system/rightSolid/fvSolution | 0 .../system/topAir/changeDictionaryDict | 0 .../system/topAir}/decomposeParDict | 0 .../system/topAir/fvSchemes | 0 .../system/topAir/fvSolution | 0 .../system/topoSetDict | 0 .../externalCoupledHeater/Allclean | 24 +++ .../externalCoupledHeater/Allrun | 33 ++++ .../externalCoupledHeater/Allrun.pre | 30 +++ .../externalCoupledHeater/README.txt | 3 + .../constant/bottomWater/g | 20 ++ .../constant/bottomWater/radiationProperties | 22 +++ .../bottomWater/thermophysicalProperties | 50 +++++ .../constant/bottomWater/turbulenceProperties | 19 ++ .../constant/heater/radiationProperties | 23 +++ .../constant/heater/thermophysicalProperties | 52 +++++ .../constant/leftSolid/radiationProperties | 1 + .../leftSolid/thermophysicalProperties | 1 + .../constant/regionProperties | 24 +++ .../constant/rightSolid/radiationProperties | 1 + .../rightSolid/thermophysicalProperties | 1 + .../externalCoupledHeater/constant/topAir/g | 1 + .../constant/topAir/radiationProperties | 1 + .../constant/topAir/thermophysicalProperties | 47 +++++ .../constant/topAir/turbulenceProperties | 1 + .../externalCoupledHeater/externalSolver | 156 +++++++++++++++ .../externalCoupledHeater/system/README | 3 + .../system/blockMeshDict | 96 ++++++++++ .../system/bottomAir/fvSchemes | 58 ++++++ .../system/bottomAir/fvSolution | 81 ++++++++ .../system/bottomWater/changeDictionaryDict | 169 +++++++++++++++++ .../system/bottomWater}/decomposeParDict | 0 .../system/bottomWater/fvSchemes | 57 ++++++ .../system/bottomWater/fvSolution | 87 +++++++++ .../externalCoupledHeater/system/controlDict | 57 ++++++ .../system/decomposeParDict | 35 ++++ .../system/externalCoupled | 39 ++++ .../externalCoupledHeater/system/fvSchemes | 42 +++++ .../externalCoupledHeater/system/fvSolution | 45 +++++ .../system/heater/changeDictionaryDict | 71 +++++++ .../system/heater/decomposeParDict | 1 + .../system/heater/fvSchemes | 49 +++++ .../system/heater/fvSolution | 41 ++++ .../system/leftSolid/changeDictionaryDict | 60 ++++++ .../system/leftSolid/decomposeParDict | 1 + .../system/leftSolid/fvSchemes | 1 + .../system/leftSolid/fvSolution | 41 ++++ .../system/rightSolid/changeDictionaryDict | 50 +++++ .../system/rightSolid/decomposeParDict | 1 + .../system/rightSolid/fvSchemes | 1 + .../system/rightSolid/fvSolution | 41 ++++ .../system/topAir/changeDictionaryDict | 175 +++++++++++++++++ .../system/topAir/decomposeParDict | 1 + .../system/topAir/fvSchemes | 1 + .../system/topAir/fvSolution | 81 ++++++++ .../externalCoupledHeater/system/topoSetDict | 178 ++++++++++++++++++ 104 files changed, 2146 insertions(+), 11 deletions(-) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/0/T (96%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/0/U (95%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/0/epsilon (96%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/0/k (96%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/0/p (96%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/0/p_rgh (96%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/Allclean (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/Allrun (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/Allrun.pre (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/README.txt (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/bottomWater/g (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/bottomWater/radiationProperties (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/bottomWater/thermophysicalProperties (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/bottomWater/turbulenceProperties (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/heater/radiationProperties (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/heater/thermophysicalProperties (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/leftSolid/radiationProperties (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/leftSolid/thermophysicalProperties (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/regionProperties (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/rightSolid/radiationProperties (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/rightSolid/thermophysicalProperties (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/topAir/g (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/topAir/radiationProperties (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/topAir/thermophysicalProperties (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/constant/topAir/turbulenceProperties (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/externalSolver (83%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/README (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/blockMeshDict (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/bottomWater/changeDictionaryDict (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/bottomWater/decomposeParDict (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/bottomWater/fvSchemes (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/bottomWater/fvSolution (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/controlDict (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/decomposeParDict (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/externalCoupled (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/fvSchemes (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/fvSolution (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/heater/changeDictionaryDict (100%) create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/heater/decomposeParDict rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/heater/fvSchemes (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/heater/fvSolution (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/leftSolid/changeDictionaryDict (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater/system/heater => externalCoupledHeater/system/leftSolid}/decomposeParDict (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/leftSolid/fvSchemes (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/leftSolid/fvSolution (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/rightSolid/changeDictionaryDict (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater/system/leftSolid => externalCoupledHeater/system/rightSolid}/decomposeParDict (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/rightSolid/fvSchemes (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/rightSolid/fvSolution (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/topAir/changeDictionaryDict (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater/system/rightSolid => externalCoupledHeater/system/topAir}/decomposeParDict (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/topAir/fvSchemes (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/topAir/fvSolution (100%) rename tutorials/heatTransfer/chtMultiRegionFoam/{externalCoupledMultiRegionHeater => externalCoupledHeater}/system/topoSetDict (100%) create mode 100755 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allclean create mode 100755 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allrun create mode 100755 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allrun.pre create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/README.txt create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/g create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/radiationProperties create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/thermophysicalProperties create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/turbulenceProperties create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/heater/radiationProperties create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/heater/thermophysicalProperties create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/leftSolid/radiationProperties create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/leftSolid/thermophysicalProperties create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/regionProperties create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/rightSolid/radiationProperties create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/rightSolid/thermophysicalProperties create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/g create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/radiationProperties create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/thermophysicalProperties create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/turbulenceProperties create mode 100755 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/externalSolver create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/README create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/blockMeshDict create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomAir/fvSchemes create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomAir/fvSolution create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/changeDictionaryDict rename tutorials/heatTransfer/{chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/topAir => chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater}/decomposeParDict (100%) create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/fvSchemes create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/fvSolution create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/controlDict create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/decomposeParDict create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/externalCoupled create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/fvSchemes create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/fvSolution create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/changeDictionaryDict create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/decomposeParDict create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/fvSchemes create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/fvSolution create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/changeDictionaryDict create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/decomposeParDict create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/fvSchemes create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/fvSolution create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/changeDictionaryDict create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/decomposeParDict create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/fvSchemes create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/fvSolution create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/changeDictionaryDict create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/decomposeParDict create mode 120000 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/fvSchemes create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/fvSolution create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topoSetDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/T b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/T similarity index 96% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/T rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/T index d28373b3da5..65205f56ce7 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/T +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/T @@ -23,7 +23,7 @@ boundaryField ".*" { type calculated; - value uniform 300; + value $internalField; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/U b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/U similarity index 95% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/U rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/U index 7ec4f2907c0..049f4930b8e 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/U +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/U @@ -23,7 +23,7 @@ boundaryField ".*" { type calculated; - value uniform (0.01 0 0); + value $internalField; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/epsilon b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/epsilon similarity index 96% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/epsilon rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/epsilon index ee4ec0c64b5..ffcdd13d9d4 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/epsilon +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/epsilon @@ -23,9 +23,8 @@ boundaryField ".*" { type calculated; - value uniform 0.01; + value $internalField; } } - // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/k b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/k similarity index 96% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/k rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/k index a2aae944737..e1e1fb1a546 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/k +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/k @@ -23,9 +23,8 @@ boundaryField ".*" { type calculated; - value uniform 0.1; + value $internalField; } } - // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/p b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/p similarity index 96% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/p rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/p index e54b106a156..24b94d43e75 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/p +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/p @@ -23,7 +23,7 @@ boundaryField ".*" { type calculated; - value uniform 1e5; + value $internalField; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/p_rgh b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/p_rgh similarity index 96% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/p_rgh rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/p_rgh index a9074ce903d..2e144189ab8 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/0/p_rgh +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/0/p_rgh @@ -23,7 +23,7 @@ boundaryField ".*" { type calculated; - value uniform 1e5; + value $internalField; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/Allclean similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allclean rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/Allclean diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/Allrun similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/Allrun diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/Allrun.pre similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun.pre rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/Allrun.pre diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/README.txt b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/README.txt similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/README.txt rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/README.txt diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/bottomWater/g b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/bottomWater/g similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/bottomWater/g rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/bottomWater/g diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/bottomWater/radiationProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/bottomWater/radiationProperties similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/bottomWater/radiationProperties rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/bottomWater/radiationProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/bottomWater/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/bottomWater/thermophysicalProperties similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/bottomWater/thermophysicalProperties rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/bottomWater/thermophysicalProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/bottomWater/turbulenceProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/bottomWater/turbulenceProperties similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/bottomWater/turbulenceProperties rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/bottomWater/turbulenceProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/heater/radiationProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/heater/radiationProperties similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/heater/radiationProperties rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/heater/radiationProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/heater/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/heater/thermophysicalProperties similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/heater/thermophysicalProperties rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/heater/thermophysicalProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/leftSolid/radiationProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/leftSolid/radiationProperties similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/leftSolid/radiationProperties rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/leftSolid/radiationProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/leftSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/leftSolid/thermophysicalProperties similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/leftSolid/thermophysicalProperties rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/leftSolid/thermophysicalProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/regionProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/regionProperties similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/regionProperties rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/regionProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/rightSolid/radiationProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/rightSolid/radiationProperties similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/rightSolid/radiationProperties rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/rightSolid/radiationProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/rightSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/rightSolid/thermophysicalProperties similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/rightSolid/thermophysicalProperties rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/rightSolid/thermophysicalProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/topAir/g b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/topAir/g similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/topAir/g rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/topAir/g diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/topAir/radiationProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/topAir/radiationProperties similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/topAir/radiationProperties rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/topAir/radiationProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/topAir/thermophysicalProperties similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/topAir/thermophysicalProperties rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/topAir/thermophysicalProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/topAir/turbulenceProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/topAir/turbulenceProperties similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/constant/topAir/turbulenceProperties rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/constant/topAir/turbulenceProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/externalSolver b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/externalSolver similarity index 83% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/externalSolver rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/externalSolver index aba9a811432..3b7080915d6 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/externalSolver +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/externalSolver @@ -23,6 +23,9 @@ waitSec=5 timeOut=100 nSteps=1000 # maximum number of time steps. Note: should be more than # number of iterations on the OpenFOAM side + +stopAt=600 # external solver signals OpenFOAM to stop + refGrad=0 valueFraction=1 @@ -42,6 +45,13 @@ useMaster() echo "status=openfoam" >| ${lockFile} } +# Lock file with special content to stop OpenFOAM master +stopMasterNow() +{ + log "writeNow terminate via lock file '${lockFile}'" + echo "action=writeNow" >| ${lockFile} +} + init() { @@ -120,10 +130,20 @@ do log "updating ${dataFile}.in from ${dataFile}.out" - awk '{if( $1 != "#" ){print $1+1 " 0 1"}}' \ - ${dataFile}.out >| ${dataFile}.in + if [ -f "${dataFile}.out" ] + then + awk '{if( $1 != "#" ){print $1+1 " 0 1"}}' \ + ${dataFile}.out >| ${dataFile}.in + else + log "Warning: no such file ${dataFile}.out" + fi - useMaster + if [ "${stopAt:-0}" -eq $step ] + then + stopMasterNow + else + useMaster + fi fi done diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/README b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/README similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/README rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/README diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/blockMeshDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/blockMeshDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/blockMeshDict rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/blockMeshDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/bottomWater/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/bottomWater/changeDictionaryDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/bottomWater/changeDictionaryDict rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/bottomWater/changeDictionaryDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/bottomWater/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/bottomWater/decomposeParDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/bottomWater/decomposeParDict rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/bottomWater/decomposeParDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/bottomWater/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/bottomWater/fvSchemes similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/bottomWater/fvSchemes rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/bottomWater/fvSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/bottomWater/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/bottomWater/fvSolution similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/bottomWater/fvSolution rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/bottomWater/fvSolution diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/controlDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/controlDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/controlDict rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/controlDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/decomposeParDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/decomposeParDict rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/decomposeParDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/externalCoupled b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/externalCoupled similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/externalCoupled rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/externalCoupled diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/fvSchemes similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/fvSchemes rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/fvSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/fvSolution similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/fvSolution rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/fvSolution diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/heater/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/heater/changeDictionaryDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/heater/changeDictionaryDict rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/heater/changeDictionaryDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/heater/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/heater/decomposeParDict new file mode 100644 index 00000000000..91ef8baa9e4 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/heater/decomposeParDict @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method scotch; + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (2 2 1); + delta 0.001; + order xyz; +} + +scotchCoeffs +{ +} + +manualCoeffs +{ + dataFile "decompositionData"; +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/heater/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/heater/fvSchemes similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/heater/fvSchemes rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/heater/fvSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/heater/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/heater/fvSolution similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/heater/fvSolution rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/heater/fvSolution diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/leftSolid/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/leftSolid/changeDictionaryDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/leftSolid/changeDictionaryDict rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/leftSolid/changeDictionaryDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/heater/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/leftSolid/decomposeParDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/heater/decomposeParDict rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/leftSolid/decomposeParDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/leftSolid/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/leftSolid/fvSchemes similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/leftSolid/fvSchemes rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/leftSolid/fvSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/leftSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/leftSolid/fvSolution similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/leftSolid/fvSolution rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/leftSolid/fvSolution diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/rightSolid/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/rightSolid/changeDictionaryDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/rightSolid/changeDictionaryDict rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/rightSolid/changeDictionaryDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/leftSolid/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/rightSolid/decomposeParDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/leftSolid/decomposeParDict rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/rightSolid/decomposeParDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/rightSolid/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/rightSolid/fvSchemes similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/rightSolid/fvSchemes rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/rightSolid/fvSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/rightSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/rightSolid/fvSolution similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/rightSolid/fvSolution rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/rightSolid/fvSolution diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/topAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/topAir/changeDictionaryDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/topAir/changeDictionaryDict rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/topAir/changeDictionaryDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/rightSolid/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/topAir/decomposeParDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/rightSolid/decomposeParDict rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/topAir/decomposeParDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/topAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/topAir/fvSchemes similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/topAir/fvSchemes rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/topAir/fvSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/topAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/topAir/fvSolution similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/topAir/fvSolution rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/topAir/fvSolution diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/topoSetDict b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/topoSetDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/topoSetDict rename to tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/system/topoSetDict diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allclean b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allclean new file mode 100755 index 00000000000..3f7a0cb7a67 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allclean @@ -0,0 +1,24 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions + +cleanCase + +rm -rf comms +rm -rf VTK +rm -rf constant/cellToRegion + +rm -rf 0/bottomWater +rm -rf 0/topAir +rm -rf 0/heater +rm -rf 0/leftSolid +rm -rf 0/rightSolid +rm -f 0/cellToRegion + +rm -rf constant/bottomWater/polyMesh +rm -rf constant/topAir/polyMesh +rm -rf constant/heater/polyMesh +rm -rf constant/leftSolid/polyMesh +rm -rf constant/rightSolid/polyMesh + +#------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allrun new file mode 100755 index 00000000000..25b14f2bb7c --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allrun @@ -0,0 +1,33 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +./Allrun.pre + +# Remove lock file on interrupt +trap '\rm -f comms/OpenFOAM.lock 2>/dev/null' INT + +#-- Run on single processor +#runApplication $(getApplication) & +# Simulated external solver +#runApplication ./externalSolver + +# Decompose +runApplication decomposePar -allRegions + +## Can verify parallel operation of createExternalCoupledPatchGeometry +# \rm -f log.createExternalCoupledPatchGeometry +# runParallel createExternalCoupledPatchGeometry \ +# -regions '(topAir heater)' coupleGroup \ +# -commsDir $PWD/comms + +# Run OpenFOAM +runParallel $(getApplication) & + +# Simulated external solver +runApplication ./externalSolver + +# Reconstruct +runApplication reconstructPar -allRegions + +#------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allrun.pre new file mode 100755 index 00000000000..854fddc3856 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allrun.pre @@ -0,0 +1,30 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +runApplication blockMesh +runApplication topoSet +runApplication splitMeshRegions -cellZones -overwrite + +# remove fluid fields from solid regions (important for post-processing) +for i in heater leftSolid rightSolid +do + rm -f 0*/$i/{nut,alphat,epsilon,k,U,p_rgh} +done + + +for i in bottomWater topAir heater leftSolid rightSolid +do + changeDictionary -region $i > log.changeDictionary.$i 2>&1 +done + +# Create coupling geometry +runApplication createExternalCoupledPatchGeometry \ + -regions '(topAir heater)' coupleGroup + +# echo +# echo "creating files for paraview post-processing" +# echo +# paraFoam -touchAll 2>/dev/null + +#------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/README.txt b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/README.txt new file mode 100644 index 00000000000..b0ca34a8736 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/README.txt @@ -0,0 +1,3 @@ +Modification of the heatTransfer chtMultiRegionFoam tutorial that demonstrates +the externalCoupled functionObject in combination with the ./externalSolver +script to simulate coupling to an external code. diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/g b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/g new file mode 100644 index 00000000000..0cbbdeb5c3b --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/g @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/radiationProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/radiationProperties new file mode 100644 index 00000000000..bcd3190ac25 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/radiationProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiation off; + +radiationModel none; + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/thermophysicalProperties new file mode 100644 index 00000000000..c1602d4d09f --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/thermophysicalProperties @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + molWeight 18; + } + equationOfState + { + rho 1000; + } + thermodynamics + { + Cp 4181; + Hf 0; + } + transport + { + mu 959e-6; + Pr 6.62; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/turbulenceProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/turbulenceProperties new file mode 100644 index 00000000000..e011578c36f --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/bottomWater/turbulenceProperties @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/heater/radiationProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/heater/radiationProperties new file mode 100644 index 00000000000..1593a12a740 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/heater/radiationProperties @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiation off; + +radiationModel none; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/heater/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/heater/thermophysicalProperties new file mode 100644 index 00000000000..7be4f18cd18 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/heater/thermophysicalProperties @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heSolidThermo; + mixture pureMixture; + transport constIso; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + molWeight 50; + } + + transport + { + kappa 80; + } + + thermodynamics + { + Hf 0; + Cp 450; + } + + equationOfState + { + rho 8000; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/leftSolid/radiationProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/leftSolid/radiationProperties new file mode 120000 index 00000000000..08087c37b4d --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/leftSolid/radiationProperties @@ -0,0 +1 @@ +../heater/radiationProperties \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/leftSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/leftSolid/thermophysicalProperties new file mode 120000 index 00000000000..dc4d3a18ee4 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/leftSolid/thermophysicalProperties @@ -0,0 +1 @@ +../heater/thermophysicalProperties \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/regionProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/regionProperties new file mode 100644 index 00000000000..9540cdb9baf --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/regionProperties @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object regionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +regions +( + fluid (bottomWater topAir) + solid (heater leftSolid rightSolid) +); + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/rightSolid/radiationProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/rightSolid/radiationProperties new file mode 120000 index 00000000000..08087c37b4d --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/rightSolid/radiationProperties @@ -0,0 +1 @@ +../heater/radiationProperties \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/rightSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/rightSolid/thermophysicalProperties new file mode 120000 index 00000000000..dc4d3a18ee4 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/rightSolid/thermophysicalProperties @@ -0,0 +1 @@ +../heater/thermophysicalProperties \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/g b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/g new file mode 120000 index 00000000000..fea37570067 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/g @@ -0,0 +1 @@ +../bottomWater/g \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/radiationProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/radiationProperties new file mode 120000 index 00000000000..583b06cb0b1 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/radiationProperties @@ -0,0 +1 @@ +../bottomWater/radiationProperties \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/thermophysicalProperties new file mode 100644 index 00000000000..3f94dc8ad76 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/thermophysicalProperties @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + molWeight 28.9; + } + thermodynamics + { + Cp 1000; + Hf 0; + } + transport + { + mu 1.8e-05; + Pr 0.7; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/turbulenceProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/turbulenceProperties new file mode 120000 index 00000000000..ec52cbd5927 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/constant/topAir/turbulenceProperties @@ -0,0 +1 @@ +../bottomWater/turbulenceProperties \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/externalSolver b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/externalSolver new file mode 100755 index 00000000000..5afbca0ff4c --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/externalSolver @@ -0,0 +1,156 @@ +#!/bin/sh +# +# Dummy external solver to communicate with OpenFOAM via externalCoupled +# functionObject +# +# Functionality is hard-coded for this particular test case +# - patch temperatures increased by 1K on each step +# +cd ${0%/*} || exit 1 # Run from this directory + +# Check for unassigned variables +set -u + +echo "Executing dummy external solver" + +commsDir="comms" +patchDir="heater_topAir/coupleGroup" +fieldName="T" + +lockFile="${commsDir}/OpenFOAM.lock" +dataFile="${commsDir}/${patchDir}/${fieldName}" +waitSec=5 +timeOut=100 +nSteps=1000 # maximum number of time steps. Note: should be more than + # number of iterations on the OpenFOAM side + +stopAt=300 # external solver signals OpenFOAM to stop + +refGrad=0 +valueFraction=1 + +# Remove any old junk +\rm -f $lockFile 2>/dev/null + +log() +{ + echo "External: $@" +} + + +# Create lock file to pass control to OpenFOAM +useMaster() +{ + log "creating lock file '${lockFile}'" + echo "status=openfoam" >| ${lockFile} +} + +# Lock file with special content to stop OpenFOAM master +stopMasterNow() +{ + log "writeNow terminate via lock file '${lockFile}'" + echo "action=writeNow" >| ${lockFile} +} + + +init() +{ + log "init - creating ${dataFile}.in" + cat /dev/null >| "${dataFile}.in" + + # Hard-coded for patch of size 8 (heater/minY) + local n1=8 + local refValue1=500 + + log "init - adding $n1 data elements with refValue $refValue1" + for i in $(seq 1 $n1) + do + echo "$refValue1 $refGrad $valueFraction" + done >> "${dataFile}.in" + + # Hard-coded for patch of size 40 (topAir/minX) + local n2=40 + local refValue2=300 + log "init - adding $n2 data elements with refValue $refValue2" + for i in $(seq 1 $n2) + do + echo "$refValue2 $refGrad $valueFraction" + done >> "${dataFile}.in" + + # Verify line count? + # log "init ($(wc -l ${dataFile}.in))" + + # Give time for T.in file to flush + sleep 1 + + useMaster +} + + +# Create the comms directory +mkdir -p ${commsDir}/${patchDir} + +# Tutorial case uses 'initByExternal' option, so we must provide initial values +init + + +totalWait=0 +step=0 +while [ $step -lt $nSteps ] +do + if [ -f $lockFile ] + then + if grep -q "status=done" ${lockFile} + then + log "found lock file '${lockFile}' with 'status=done' - finished" + break + elif [ -s $lockFile ] + then + log "found lock file '${lockFile}' containing '$(< $lockFile)' - waiting" + else + log "found lock file '${lockFile}' - waiting" + fi + + totalWait=$(expr $totalWait + $waitSec) + if [ $totalWait -gt $timeOut ] + then + log "timeout" + break + else + sleep $waitSec + fi + else + totalWait=0 + step=$(expr $step + 1) + log "step $step" + log "lock not present - taking control" + + log "sleeping for $waitSec secs to simulate external process" + sleep $waitSec + + log "updating ${dataFile}.in from ${dataFile}.out" + + if [ -f "${dataFile}.out" ] + then + ##awk '{if( $1 != "#" ){print $1+0.1 " 0 1"}}' \ + awk '{if( $1 != "#" ){print $1 " 0 1"}}' \ + ${dataFile}.out >| ${dataFile}.in + else + log "Warning: no such file ${dataFile}.out" + fi + + if [ "${stopAt:-0}" -eq $step ] + then + stopMasterNow + else + useMaster + fi + fi +done + +log "done" + +# Remove the lock file too +\rm -f $lockFile 2>/dev/null + +#------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/README b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/README new file mode 100644 index 00000000000..5a81b9a5708 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/README @@ -0,0 +1,3 @@ +fvSolution is used for outer correctors specification. +fvSchemes is only so that pre-processing activities can proceed + diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/blockMeshDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/blockMeshDict new file mode 100644 index 00000000000..2ba9dce0302 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/blockMeshDict @@ -0,0 +1,96 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +vertices +( + (-0.1 -0.04 -0.05) + ( 0.1 -0.04 -0.05) + ( 0.1 0.04 -0.05) + (-0.1 0.04 -0.05) + (-0.1 -0.04 0.05) + ( 0.1 -0.04 0.05) + ( 0.1 0.04 0.05) + (-0.1 0.04 0.05) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (30 10 10) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + maxY + { + type wall; + faces + ( + (3 7 6 2) + ); + } + minX + { + type patch; + faces + ( + (0 4 7 3) + ); + } + maxX + { + type patch; + faces + ( + (2 6 5 1) + ); + } + minY + { + type wall; + faces + ( + (1 5 4 0) + ); + } + minZ + { + type wall; + faces + ( + (0 3 2 1) + ); + } + maxZ + { + type wall; + faces + ( + (4 5 6 7) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomAir/fvSchemes new file mode 100644 index 00000000000..74cc264e050 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomAir/fvSchemes @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + + div(phi,U) bounded Gauss upwind; + div(phi,K) bounded Gauss upwind; + div(phi,h) bounded Gauss upwind; + div(phi,k) bounded Gauss upwind; + div(phi,K) bounded Gauss upwind; + div(phi,epsilon) bounded Gauss upwind; + div(phi,R) bounded Gauss upwind; + div(R) Gauss linear; + div(Ji,Ii_h) Gauss linearUpwind grad(U); + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear uncorrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default uncorrected; +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomAir/fvSolution new file mode 100644 index 00000000000..8cc4a0bb1a9 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomAir/fvSolution @@ -0,0 +1,81 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + rho + { + solver PCG + preconditioner DIC; + tolerance 1e-7; + relTol 0; + } + + p_rgh + { + solver GAMG; + tolerance 1e-7; + relTol 0.01; + + smoother GaussSeidel; + + } + + "(U|h|k|epsilon|G|Ii)" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-7; + relTol 0.1; + } + + G + { + $p_rgh; + tolerance 1e-05; + relTol 0.1; + } +} + +SIMPLE +{ + momentumPredictor yes; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 100000; + rhoMin 0.2; + rhoMax 2; +} + +relaxationFactors +{ + fields + { + rho 1.0; + p_rgh 0.7; + } + equations + { + U 0.3; + h 0.7; + "(k|epsilon|omega)" 0.7; + G 0.7; + "ILambda.*" 0.7; + qr 0.7; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/changeDictionaryDict new file mode 100644 index 00000000000..3ea8a708975 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/changeDictionaryDict @@ -0,0 +1,169 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object changeDictionaryDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +U +{ + internalField uniform (0.001 0 0); + + boundaryField + { + minX + { + type fixedValue; + value uniform (0.001 0 0); + } + + maxX + { + type inletOutlet; + inletValue uniform (0 0 0); + } + + ".*" + { + type fixedValue; + value uniform (0 0 0); + } + } +} + +T +{ + internalField uniform 300; + + boundaryField + { + minX + { + type fixedValue; + value uniform 300; + } + + maxX + { + type inletOutlet; + inletValue uniform 300; + } + + ".*" + { + type zeroGradient; + value uniform 300; + } + + "bottomWater_to_.*" + { + type compressible::turbulentTemperatureCoupledBaffleMixed; + Tnbr T; + kappaMethod fluidThermo; + value uniform 300; + } + } +} + +epsilon +{ + internalField uniform 0.01; + + boundaryField + { + minX + { + type fixedValue; + value uniform 0.01; + } + + maxX + { + type inletOutlet; + inletValue uniform 0.01; + } + + ".*" + { + type epsilonWallFunction; + value uniform 0.01; + } + } +} + +k +{ + internalField uniform 0.1; + + boundaryField + { + minX + { + type inletOutlet; + inletValue uniform 0.1; + } + + maxX + { + type zeroGradient; + value uniform 0.1; + } + + ".*" + { + type kqRWallFunction; + value uniform 0.1; + } + } +} + +p_rgh +{ + internalField uniform 0; + + boundaryField + { + minX + { + type zeroGradient; + value uniform 0; + } + + maxX + { + type fixedValue; + value uniform 0; + } + + ".*" + { + type fixedFluxPressure; + value uniform 0; + } + } +} + +p +{ + internalField uniform 0; + + boundaryField + { + ".*" + { + type calculated; + value uniform 0; + } + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/topAir/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/decomposeParDict similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/system/topAir/decomposeParDict rename to tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/decomposeParDict diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/fvSchemes new file mode 100644 index 00000000000..66d505fb4cc --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/fvSchemes @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + + div(phi,U) Gauss upwind; + div(phi,K) Gauss linear; + div(phi,h) Gauss upwind; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(phi,R) Gauss upwind; + div(R) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/fvSolution b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/fvSolution new file mode 100644 index 00000000000..1505a23d229 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/bottomWater/fvSolution @@ -0,0 +1,87 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + rho + { + solver PCG; + preconditioner DIC; + tolerance 1e-7; + relTol 0.1; + } + + rhoFinal + { + $rho; + tolerance 1e-7; + relTol 0; + } + + p_rgh + { + solver GAMG; + tolerance 1e-7; + relTol 0.01; + + smoother GaussSeidel; + } + + p_rghFinal + { + $p_rgh; + tolerance 1e-7; + relTol 0; + } + + "(U|h|k|epsilon|R)" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-7; + relTol 0.1; + } + + "(U|h|k|epsilon|R)Final" + { + $U; + tolerance 1e-7; + relTol 0; + } +} + +SIMPLE +{ + momentumPredictor on; + nCorrectors 2; + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + fields + { + rho 1.0; + p_rgh 0.7; + } + equations + { + "U.*" 0.5; + "h.*" 0.5; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/controlDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/controlDict new file mode 100644 index 00000000000..d5f9881d1dc --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/controlDict @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Library defines new boundary conditions +libs ("libfieldFunctionObjects.so"); + +application chtMultiRegionSimpleFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 500; + +deltaT 1; + +writeControl timeStep; + +writeInterval 100; + +purgeWrite 10; + +writeFormat ascii; + +writePrecision 8; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +functions +{ + #include "externalCoupled" +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/decomposeParDict new file mode 100644 index 00000000000..bc03b02cb93 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/decomposeParDict @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +//- Keep owner and neighbour on same processor for faces in zones: +// preserveFaceZones (heater solid1 solid3); + +method scotch; +// method hierarchical; +// method simple; +// method manual; + +coeffs +{ + n (2 2 1); + //delta 0.001; // default=0.001 + //order xyz; // default=xzy + dataFile "decompositionData"; +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/externalCoupled b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/externalCoupled new file mode 100644 index 00000000000..806e5b8a517 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/externalCoupled @@ -0,0 +1,39 @@ +// -*- C++ -*- + +// control for external coupled simulation +externalCoupled +{ + libs ("libfieldFunctionObjects.so"); + + type externalCoupled; + + // Directory to use for communication + commsDir "${FOAM_CASE}/comms"; + + // Does external process start first + initByExternal true; + + // Additional output + log true; + + regions + { + // Region name (wildcards allowed) + "(topAir|heater)" + { + // In topAir adjust the minX patch (fixedValue) + + // Patch or patchGroup + coupleGroup + { + // Fields to output in commsDir + writeFields (T); + // Fields to read from commsDir + readFields (T); + } + } + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/fvSchemes new file mode 100644 index 00000000000..9288e0ae16b --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/fvSchemes @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ +} + +gradSchemes +{ +} + +divSchemes +{ +} + +laplacianSchemes +{ +} + +interpolationSchemes +{ +} + +snGradSchemes +{ +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/fvSolution b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/fvSolution new file mode 100644 index 00000000000..14653b73e5a --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/fvSolution @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +SIMPLE +{ + energyCoupling + { + iterations 50; + + interval 0; + + // Convergence criteria to stop looping + convergence + { + h 1e-3; + } + + // Names of function objects to fire with execute(int) when looping + onLoop ( ); + + // Names of function objects to fire with execute(int) when converged + onConverged ( externalCoupled ); + + // Names of function objects to fire with execute(int) when loop ends + // without convergence + onEnd ( ); + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/changeDictionaryDict new file mode 100644 index 00000000000..54a32080ab7 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/changeDictionaryDict @@ -0,0 +1,71 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object changeDictionaryDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +boundary +{ + minY + { + type patch; + inGroups (coupleGroup); + } + minZ + { + type patch; + } + maxZ + { + type patch; + } +} + +T +{ + internalField uniform 300; + + boundaryField + { + ".*" + { + type zeroGradient; + value uniform 300; + } + "heater_to_.*" + { + type compressible::turbulentTemperatureCoupledBaffleMixed; + Tnbr T; + kappaMethod solidThermo; + value uniform 300; + } + + heater_to_leftSolid + { + type compressible::turbulentTemperatureCoupledBaffleMixed; + Tnbr T; + kappaMethod solidThermo; + thicknessLayers (1e-3); + kappaLayers (5e-4); + value uniform 300; + } + + minY + { + type fixedValue; + value uniform 500; + } + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/decomposeParDict new file mode 120000 index 00000000000..46638e60f61 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/decomposeParDict @@ -0,0 +1 @@ +../decomposeParDict \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/fvSchemes new file mode 100644 index 00000000000..fde16caf52a --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/fvSchemes @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; +} + +laplacianSchemes +{ + default none; + laplacian(alpha,h) Gauss linear uncorrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default uncorrected; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/fvSolution b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/fvSolution new file mode 100644 index 00000000000..4fe045c7b69 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/heater/fvSolution @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + h + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0.1; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + equations + { + h 0.7; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/changeDictionaryDict new file mode 100644 index 00000000000..3d47a8640d6 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/changeDictionaryDict @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object changeDictionaryDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +boundary +{ + minZ + { + type patch; + } + maxZ + { + type patch; + } +} + +T +{ + internalField uniform 300; + + boundaryField + { + ".*" + { + type zeroGradient; + value uniform 300; + } + "leftSolid_to_.*" + { + type compressible::turbulentTemperatureCoupledBaffleMixed; + Tnbr T; + kappaMethod solidThermo; + value uniform 300; + } + + leftSolid_to_heater + { + type compressible::turbulentTemperatureCoupledBaffleMixed; + Tnbr T; + kappaMethod solidThermo; + thicknessLayers (1e-3); + kappaLayers (5e-4); + value uniform 300; + } + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/decomposeParDict new file mode 120000 index 00000000000..46638e60f61 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/decomposeParDict @@ -0,0 +1 @@ +../decomposeParDict \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/fvSchemes new file mode 120000 index 00000000000..63236f302cf --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/fvSchemes @@ -0,0 +1 @@ +../heater/fvSchemes \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/fvSolution new file mode 100644 index 00000000000..4fe045c7b69 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/leftSolid/fvSolution @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + h + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0.1; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + equations + { + h 0.7; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/changeDictionaryDict new file mode 100644 index 00000000000..184cf95c4e8 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/changeDictionaryDict @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object changeDictionaryDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +boundary +{ + minZ + { + type patch; + } + maxZ + { + type patch; + } +} + +T +{ + internalField uniform 300; + + boundaryField + { + ".*" + { + type zeroGradient; + value uniform 300; + } + "rightSolid_to_.*" + { + type compressible::turbulentTemperatureCoupledBaffleMixed; + Tnbr T; + kappaMethod solidThermo; + value uniform 300; + } + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/decomposeParDict new file mode 120000 index 00000000000..46638e60f61 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/decomposeParDict @@ -0,0 +1 @@ +../decomposeParDict \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/fvSchemes new file mode 120000 index 00000000000..63236f302cf --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/fvSchemes @@ -0,0 +1 @@ +../heater/fvSchemes \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/fvSolution new file mode 100644 index 00000000000..4fe045c7b69 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/rightSolid/fvSolution @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + h + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0.1; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + equations + { + h 0.7; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/changeDictionaryDict new file mode 100644 index 00000000000..5bd5490849d --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/changeDictionaryDict @@ -0,0 +1,175 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object changeDictionaryDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +boundary +{ + minX + { + inGroups (coupleGroup); + } +} + +U +{ + internalField uniform (0.1 0 0); + + boundaryField + { + ".*" + { + type fixedValue; + value uniform (0 0 0); + } + minX + { + type fixedValue; + value uniform ( 0.1 0 0 ); + } + maxX + { + type inletOutlet; + inletValue uniform ( 0 0 0 ); + value uniform ( 0.1 0 0 ); + } + } +} + +T +{ + internalField uniform 300; + + boundaryField + { + ".*" + { + type zeroGradient; + } + + minX + { + type fixedValue; + value uniform 300; + } + maxX + { + type inletOutlet; + inletValue uniform 300; + value uniform 300; + } + + "topAir_to_.*" + { + type compressible::turbulentTemperatureCoupledBaffleMixed; + Tnbr T; + kappaMethod fluidThermo; + value uniform 300; + } + } +} + +epsilon +{ + internalField uniform 0.01; + + boundaryField + { + ".*" + { + type epsilonWallFunction; + value uniform 0.01; + } + + minX + { + type fixedValue; + value uniform 0.01; + } + maxX + { + type inletOutlet; + inletValue uniform 0.01; + value uniform 0.01; + } + } +} + +k +{ + internalField uniform 0.1; + + boundaryField + { + ".*" + { + type kqRWallFunction; + value uniform 0.1; + } + + minX + { + type fixedValue; + value uniform 0.1; + } + maxX + { + type inletOutlet; + inletValue uniform 0.1; + value uniform 0.1; + } + } +} + +p_rgh +{ + internalField uniform 1e5; + + boundaryField + { + ".*" + { + type fixedFluxPressure; + value uniform 1e5; + } + + maxX + { + type fixedValue; + value uniform 1e5; + } + } +} + +p +{ + internalField uniform 1e5; + + boundaryField + { + ".*" + { + type calculated; + value uniform 1e5; + } + + maxX + { + type calculated; + value uniform 1e5; + } + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/decomposeParDict new file mode 120000 index 00000000000..46638e60f61 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/decomposeParDict @@ -0,0 +1 @@ +../decomposeParDict \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/fvSchemes new file mode 120000 index 00000000000..ff6aeb82d39 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/fvSchemes @@ -0,0 +1 @@ +../bottomAir/fvSchemes \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/fvSolution new file mode 100644 index 00000000000..8cc4a0bb1a9 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topAir/fvSolution @@ -0,0 +1,81 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + rho + { + solver PCG + preconditioner DIC; + tolerance 1e-7; + relTol 0; + } + + p_rgh + { + solver GAMG; + tolerance 1e-7; + relTol 0.01; + + smoother GaussSeidel; + + } + + "(U|h|k|epsilon|G|Ii)" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-7; + relTol 0.1; + } + + G + { + $p_rgh; + tolerance 1e-05; + relTol 0.1; + } +} + +SIMPLE +{ + momentumPredictor yes; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 100000; + rhoMin 0.2; + rhoMax 2; +} + +relaxationFactors +{ + fields + { + rho 1.0; + p_rgh 0.7; + } + equations + { + U 0.3; + h 0.7; + "(k|epsilon|omega)" 0.7; + G 0.7; + "ILambda.*" 0.7; + qr 0.7; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topoSetDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topoSetDict new file mode 100644 index 00000000000..4926649aada --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/system/topoSetDict @@ -0,0 +1,178 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + // Heater + { + name heaterCellSet; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box (-0.01001 0 -100 )(0.01001 0.00999 100); + } + } + { + name heaterCellSet; + type cellSet; + action add; + source boxToCell; + sourceInfo + { + box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001); + } + } + { + name heater; + type cellZoneSet; + action new; + source setToCellZone; + sourceInfo + { + set heaterCellSet; + } + } + + // leftSolid + { + name leftSolidCellSet; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box (-100 0 -100 )(-0.01001 0.00999 100); + } + } + { + name leftSolid; + type cellZoneSet; + action new; + source setToCellZone; + sourceInfo + { + set leftSolidCellSet; + } + } + + // rightSolid + { + name rightSolidCellSet; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box (0.01001 0 -100 )(100 0.00999 100); + } + } + { + name rightSolid; + type cellZoneSet; + action new; + source setToCellZone; + sourceInfo + { + set rightSolidCellSet; + } + } + + // topAir + { + name topAirCellSet; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box (-100 0.00999 -100 )(100 100 100); + } + } + { + name topAir; + type cellZoneSet; + action new; + source setToCellZone; + sourceInfo + { + set topAirCellSet; + } + } + + + // bottomWater is all the other cells + { + name bottomWaterCellSet; + type cellSet; + action new; + source cellToCell; + sourceInfo + { + set heaterCellSet; + } + } + { + name bottomWaterCellSet; + type cellSet; + action add; + source cellToCell; + sourceInfo + { + set leftSolidCellSet; + } + } + { + name bottomWaterCellSet; + type cellSet; + action add; + source cellToCell; + sourceInfo + { + set rightSolidCellSet; + } + } + { + name bottomWaterCellSet; + type cellSet; + action add; + source cellToCell; + sourceInfo + { + set topAirCellSet; + } + } + { + name bottomWaterCellSet; + type cellSet; + action invert; + } + { + name bottomWater; + type cellZoneSet; + action new; + source setToCellZone; + sourceInfo + { + set bottomWaterCellSet; + } + } +); + + +// ************************************************************************* // -- GitLab