From 4c3021ba617989859f0bbe88b585dacab9389390 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Fri, 11 Jun 2010 16:38:22 +0100 Subject: [PATCH] ENH: chtMulti* : adapted to use solidBasicThermo --- .../chtMultiRegionFoam/Make/options | 2 + .../chtMultiRegionFoam/chtMultiRegionFoam.C | 1 + .../chtMultiRegionSimpleFoam/Make/options | 2 + .../chtMultiRegionSimpleFoam.C | 1 + .../solid/createSolidFields.H | 76 +----- .../solid/setRegionSolidFields.H | 16 +- .../solid/createSolidFields.H | 76 +----- .../solid/setRegionSolidFields.H | 16 +- .../solid/solidRegionDiffusionNo.H | 10 +- src/thermophysicalModels/Allwmake | 4 + .../chtMultiRegionFoam/multiRegionHeater/0/K | 29 --- .../chtMultiRegionFoam/multiRegionHeater/0/cp | 29 --- .../multiRegionHeater/0/rho | 29 --- .../multiRegionHeater/Allrun | 16 +- .../heater/solidThermophysicalProperties | 76 ++++++ .../leftSolid/solidThermophysicalProperties | 1 + .../constant/polyMesh/boundary | 2 +- .../rightSolid/solidThermophysicalProperties | 1 + .../multiRegionHeater/makeCellSets.setSet | 5 + .../system/bottomAir/changeDictionaryDict | 5 +- .../system/heater/changeDictionaryDict | 46 +--- .../system/leftSolid/changeDictionaryDict | 47 +--- .../system/rightSolid/changeDictionaryDict | 47 +--- .../system/topAir/changeDictionaryDict | 5 +- .../snappyMultiRegionHeater/0/K | 29 --- .../snappyMultiRegionHeater/0/cp | 29 --- .../snappyMultiRegionHeater/0/rho | 29 --- .../snappyMultiRegionHeater/Allrun | 14 +- .../constant/bottomAir/RASProperties | 4 +- .../heater/solidThermophysicalProperties | 76 ++++++ .../leftSolid/solidThermophysicalProperties | 76 ++++++ .../constant/polyMesh/blockMeshDict | 12 +- .../constant/polyMesh/boundary | 2 +- .../rightSolid/solidThermophysicalProperties | 76 ++++++ .../constant/topAir/RASProperties | 6 +- .../constant/topAir/thermophysicalProperties | 2 +- .../constant/topAir/turbulenceProperties | 2 +- .../makeCellSets.setSet | 11 - .../system/bottomAir/changeDictionaryDict | 224 +++-------------- .../system/controlDict | 7 +- .../system/decomposeParDict | 4 +- .../system/heater/changeDictionaryDict | 162 ++----------- .../system/leftSolid/changeDictionaryDict | 138 ++--------- .../system/rightSolid/changeDictionaryDict | 137 ++--------- .../system/topAir/changeDictionaryDict | 225 ++++-------------- 45 files changed, 530 insertions(+), 1277 deletions(-) delete mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/K delete mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/cp delete mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/rho create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties create mode 120000 tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/leftSolid/solidThermophysicalProperties create mode 120000 tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/rightSolid/solidThermophysicalProperties delete mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/K delete mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/cp delete mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/rho create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/solidThermophysicalProperties create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/solidThermophysicalProperties delete mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/makeCellSets.setSet diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options index 4cd6539edfb..e7a1103a4fd 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options @@ -6,10 +6,12 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel EXE_LIBS = \ -lbasicThermophysicalModels \ + -lbasicSolidThermo \ -lspecie \ -lcompressibleRASModels \ -lcompressibleLESModels \ diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index 738319ec100..922b94a8d61 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -37,6 +37,7 @@ Description #include "regionProperties.H" #include "compressibleCourantNo.H" #include "solidRegionDiffNo.H" +#include "basicSolidThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options index a97ce0aae4e..16648080799 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options @@ -7,6 +7,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude @@ -14,5 +15,6 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ -lbasicThermophysicalModels \ + -lbasicSolidThermo \ -lspecie \ -lcompressibleRASModels diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C index 927bd8124d8..be93fd01dff 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C @@ -35,6 +35,7 @@ Description #include "fixedGradientFvPatchFields.H" #include "regionProperties.H" #include "compressibleCourantNo.H" +#include "basicSolidThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/createSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/createSolidFields.H index 8f109a3f829..be13e670c32 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/createSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/createSolidFields.H @@ -1,8 +1,5 @@ // Initialise solid field pointer lists - PtrList<volScalarField> rhos(solidRegions.size()); - PtrList<volScalarField> cps(solidRegions.size()); - PtrList<volScalarField> Ks(solidRegions.size()); - PtrList<volScalarField> Ts(solidRegions.size()); + PtrList<basicSolidThermo> thermos(solidRegions.size()); // Populate solid field pointer lists forAll(solidRegions, i) @@ -10,75 +7,10 @@ Info<< "*** Reading solid mesh thermophysical properties for region " << solidRegions[i].name() << nl << endl; - Info<< " Adding to rhos\n" << endl; - rhos.set + Info<< " Adding to thermos\n" << endl; + thermos.set ( i, - new volScalarField - ( - IOobject - ( - "rho", - runTime.timeName(), - solidRegions[i], - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - solidRegions[i] - ) - ); - - Info<< " Adding to cps\n" << endl; - cps.set - ( - i, - new volScalarField - ( - IOobject - ( - "cp", - runTime.timeName(), - solidRegions[i], - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - solidRegions[i] - ) - ); - - Info<< " Adding to Ks\n" << endl; - Ks.set - ( - i, - new volScalarField - ( - IOobject - ( - "K", - runTime.timeName(), - solidRegions[i], - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - solidRegions[i] - ) - ); - - Info<< " Adding to Ts\n" << endl; - Ts.set - ( - i, - new volScalarField - ( - IOobject - ( - "T", - runTime.timeName(), - solidRegions[i], - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - solidRegions[i] - ) + basicSolidThermo::New(solidRegions[i]) ); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/setRegionSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/setRegionSolidFields.H index f9e80e3d723..1e78cc297ae 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/setRegionSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/setRegionSolidFields.H @@ -1,6 +1,14 @@ fvMesh& mesh = solidRegions[i]; + basicSolidThermo& thermo = thermos[i]; - volScalarField& rho = rhos[i]; - volScalarField& cp = cps[i]; - volScalarField& K = Ks[i]; - volScalarField& T = Ts[i]; + tmp<volScalarField> trho = thermo.rho(); + const volScalarField& rho = trho(); + + tmp<volScalarField> tcp = thermo.cp(); + const volScalarField& cp = tcp(); + + tmp<volScalarField> tK = thermo.K(); + //tmp<volSymmTensorField> tK = thermo.directionalK(); + const volScalarField& K = tK(); + + volScalarField& T = thermo.T(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H index 8f109a3f829..be13e670c32 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H @@ -1,8 +1,5 @@ // Initialise solid field pointer lists - PtrList<volScalarField> rhos(solidRegions.size()); - PtrList<volScalarField> cps(solidRegions.size()); - PtrList<volScalarField> Ks(solidRegions.size()); - PtrList<volScalarField> Ts(solidRegions.size()); + PtrList<basicSolidThermo> thermos(solidRegions.size()); // Populate solid field pointer lists forAll(solidRegions, i) @@ -10,75 +7,10 @@ Info<< "*** Reading solid mesh thermophysical properties for region " << solidRegions[i].name() << nl << endl; - Info<< " Adding to rhos\n" << endl; - rhos.set + Info<< " Adding to thermos\n" << endl; + thermos.set ( i, - new volScalarField - ( - IOobject - ( - "rho", - runTime.timeName(), - solidRegions[i], - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - solidRegions[i] - ) - ); - - Info<< " Adding to cps\n" << endl; - cps.set - ( - i, - new volScalarField - ( - IOobject - ( - "cp", - runTime.timeName(), - solidRegions[i], - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - solidRegions[i] - ) - ); - - Info<< " Adding to Ks\n" << endl; - Ks.set - ( - i, - new volScalarField - ( - IOobject - ( - "K", - runTime.timeName(), - solidRegions[i], - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - solidRegions[i] - ) - ); - - Info<< " Adding to Ts\n" << endl; - Ts.set - ( - i, - new volScalarField - ( - IOobject - ( - "T", - runTime.timeName(), - solidRegions[i], - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - solidRegions[i] - ) + basicSolidThermo::New(solidRegions[i]) ); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H index f9e80e3d723..1e78cc297ae 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H @@ -1,6 +1,14 @@ fvMesh& mesh = solidRegions[i]; + basicSolidThermo& thermo = thermos[i]; - volScalarField& rho = rhos[i]; - volScalarField& cp = cps[i]; - volScalarField& K = Ks[i]; - volScalarField& T = Ts[i]; + tmp<volScalarField> trho = thermo.rho(); + const volScalarField& rho = trho(); + + tmp<volScalarField> tcp = thermo.cp(); + const volScalarField& cp = tcp(); + + tmp<volScalarField> tK = thermo.K(); + //tmp<volSymmTensorField> tK = thermo.directionalK(); + const volScalarField& K = tK(); + + volScalarField& T = thermo.T(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H index 4b09671de2e..77dc6f04bf4 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H @@ -1,15 +1,17 @@ scalar DiNum = -GREAT; - forAll(solidRegions, regionI) + forAll(solidRegions, i) { +# include "setRegionSolidFields.H" + DiNum = max ( solidRegionDiffNo ( - solidRegions[regionI], + solidRegions[i], runTime, - rhos[regionI]*cps[regionI], - Ks[regionI] + rho*cp, + K ), DiNum ); diff --git a/src/thermophysicalModels/Allwmake b/src/thermophysicalModels/Allwmake index 38f4d54b476..a12ce3ea197 100755 --- a/src/thermophysicalModels/Allwmake +++ b/src/thermophysicalModels/Allwmake @@ -18,4 +18,8 @@ wmake libso radiation wmake libso barotropicCompressibilityModel wmake libso thermalPorousZone +# Should be combined with solids&solidMixture +wmake libso basicSolidThermo + + # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/K b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/K deleted file mode 100644 index 4d9246ebcba..00000000000 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/K +++ /dev/null @@ -1,29 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - object K; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 1 -3 -1 0 0 0]; - -internalField uniform 80; - -boundaryField -{ - ".*" - { - type calculated; - } -} - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/cp b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/cp deleted file mode 100644 index 853fd78eebb..00000000000 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/cp +++ /dev/null @@ -1,29 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - object cp; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -2 -1 0 0 0]; - -internalField uniform 450; - -boundaryField -{ - ".*" - { - type calculated; - } -} - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/rho b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/rho deleted file mode 100644 index 8a0910516d8..00000000000 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/rho +++ /dev/null @@ -1,29 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - object rho; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -3 0 0 0 0 0]; - -internalField uniform 8000; - -boundaryField -{ - ".*" - { - type calculated; - } -} - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun index 8a25708db64..4a0f42fbe46 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun @@ -5,14 +5,8 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -rm -rf constant/polyMesh/sets - runApplication blockMesh runApplication setSet -batch makeCellSets.setSet - -rm -f constant/polyMesh/sets/*_old - -runApplication setsToZones -noFlipMap runApplication splitMeshRegions -cellZones -overwrite # remove fluid fields from solid regions (important for post-processing) @@ -21,11 +15,11 @@ do rm -f 0*/$i/{mut,alphat,epsilon,k,p,p,U} done -# remove solid fields from fluid regions (important for post-processing) -for i in bottomAir topAir -do - rm -f 0*/$i/{cp,K,rho} -done +## remove solid fields from fluid regions (important for post-processing) +#for i in bottomAir topAir +#do +# rm -f 0*/$i/{cp,K,rho} +#done for i in bottomAir topAir heater leftSolid rightSolid do diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties new file mode 100644 index 00000000000..c27f08c9f16 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties @@ -0,0 +1,76 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object solidThermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType constSolidThermo; +//thermoType interpolatedSolidThermo; +//thermoType directionalSolidThermo; + +constSolidThermoCoeffs +{ + //- constant properties + + rho rho [1 -3 0 0 0 0 0] 8000; + cp cp [0 2 -2 -1 0 0 0] 450; + K K [1 1 -3 -1 0 0 0] 80; + + // N/A + Hf Hf [0 2 -2 0 0 0 0] 1; + emissivity emissivity [0 0 0 0 0 0 0] 1; +} + + +interpolatedSolidThermoCoeffs +{ + //- interpolated properties + + TValues (100 1000); + rhoValues (1700 1700); + cpValues (1700 1700); + KValues (80 40); + HfValues (1 1); + emissivityValues (1 1); +} + + +directionalSolidThermoCoeffs +{ + //- does interpolation and directional K in coordinate system. + // Specify multiple values, one for each temperature. Properties are + // interpolated according to the local temperature. + + + TValues (100 1000); + rhoValues (1700 1700); + cpValues (1700 1700); + + KValues ((40 40 40) (40 40 40)); + + coordinateSystem + { + origin (-0.000062 0.000019 0.000039); + coordinateRotation + { + type axes; + e1 (1 0 0); + e3 (-3.1807824E-6 -0.99813473 0.0610505); + } + } + + HfValues (1 1); + emissivityValues (1 1); +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/leftSolid/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/leftSolid/solidThermophysicalProperties new file mode 120000 index 00000000000..1da00bc6bdb --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/leftSolid/solidThermophysicalProperties @@ -0,0 +1 @@ +../heater/solidThermophysicalProperties \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/polyMesh/boundary b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/polyMesh/boundary index 5bf895b5429..73459cea072 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/polyMesh/boundary +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/rightSolid/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/rightSolid/solidThermophysicalProperties new file mode 120000 index 00000000000..1da00bc6bdb --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/rightSolid/solidThermophysicalProperties @@ -0,0 +1 @@ +../heater/solidThermophysicalProperties \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/makeCellSets.setSet b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/makeCellSets.setSet index 84c52f85b36..7e0c2bd5227 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/makeCellSets.setSet +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/makeCellSets.setSet @@ -1,11 +1,16 @@ cellSet heater new boxToCell (-0.01 0 -100 )(0.01 0.01 100) cellSet heater add boxToCell (-0.01 -100 -0.01)(0.01 0.01 0.01) +cellZoneSet heater new setToCellZone heater cellSet leftSolid new boxToCell (-100 0 -100 )(-0.01 0.01 100) +cellZoneSet leftSolid new setToCellZone leftSolid cellSet rightSolid new boxToCell (0.01 0 -100 )(100 0.01 100) +cellZoneSet rightSolid new setToCellZone rightSolid cellSet topAir new boxToCell (-100 0.01 -100 )(100 100 100) +cellZoneSet topAir new setToCellZone topAir cellSet bottomAir clear cellSet bottomAir add cellToCell heater cellSet bottomAir add cellToCell leftSolid cellSet bottomAir add cellToCell rightSolid cellSet bottomAir add cellToCell topAir cellSet bottomAir invert +cellZoneSet bottomAir new setToCellZone bottomAir diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict index 949d7d15215..d3fa852bd9b 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict @@ -55,9 +55,10 @@ dictionaryReplacement "bottomAir_to_.*" { - type compressible::turbulentTemperatureCoupledBaffle; + type compressible::turbulentTemperatureCoupledBaffleMixed; neighbourFieldName T; - K K; + K basicThermo; + KName none; value uniform 300; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict index 20dac9a399e..ac0d8cdbd41 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict @@ -45,9 +45,10 @@ dictionaryReplacement } "heater_to_.*" { - type compressible::turbulentTemperatureCoupledBaffle; + type compressible::turbulentTemperatureCoupledBaffleMixed; neighbourFieldName T; - K K; + K solidThermo; + KName none; value uniform 300; } minY @@ -58,47 +59,6 @@ dictionaryReplacement } } - rho - { - internalField uniform 8000; - - boundaryField - { - ".*" - { - type calculated; - value uniform 8000; - } - } - } - - K - { - internalField uniform 80; - - boundaryField - { - ".*" - { - type zeroGradient; - value uniform 80; - } - } - } - - cp - { - internalField uniform 450; - - boundaryField - { - ".*" - { - type zeroGradient; - value uniform 450; - } - } - } } // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict index a9c6ea7f0bc..b3453c48f5c 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict @@ -41,55 +41,14 @@ dictionaryReplacement } "leftSolid_to_.*" { - type compressible::turbulentTemperatureCoupledBaffle; + type compressible::turbulentTemperatureCoupledBaffleMixed; neighbourFieldName T; - K K; + K solidThermo; + KName none; value uniform 300; } } } - - rho - { - internalField uniform 8000; - - boundaryField - { - ".*" - { - type calculated; - value uniform 8000; - } - } - } - - K - { - internalField uniform 80; - - boundaryField - { - ".*" - { - type zeroGradient; - value uniform 80; - } - } - } - - cp - { - internalField uniform 450; - - boundaryField - { - ".*" - { - type zeroGradient; - value uniform 450; - } - } - } } // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/changeDictionaryDict index 5fa61a7f8f9..f6822937d8e 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/changeDictionaryDict @@ -41,55 +41,14 @@ dictionaryReplacement } "rightSolid_to_.*" { - type compressible::turbulentTemperatureCoupledBaffle; + type compressible::turbulentTemperatureCoupledBaffleMixed; neighbourFieldName T; - K K; + K solidThermo; + KName none; value uniform 300; } } } - - rho - { - internalField uniform 8000; - - boundaryField - { - ".*" - { - type calculated; - value uniform 8000; - } - } - } - - K - { - internalField uniform 80; - - boundaryField - { - ".*" - { - type zeroGradient; - value uniform 80; - } - } - } - - cp - { - internalField uniform 450; - - boundaryField - { - ".*" - { - type zeroGradient; - value uniform 450; - } - } - } } // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict index 1934047abf2..5dc9ca91e63 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict @@ -66,9 +66,10 @@ dictionaryReplacement "topAir_to_.*" { - type compressible::turbulentTemperatureCoupledBaffle; + type compressible::turbulentTemperatureCoupledBaffleMixed; neighbourFieldName T; - K K; + K basicThermo; + KName none; value uniform 300; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/K b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/K deleted file mode 100644 index 4d9246ebcba..00000000000 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/K +++ /dev/null @@ -1,29 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - object K; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 1 -3 -1 0 0 0]; - -internalField uniform 80; - -boundaryField -{ - ".*" - { - type calculated; - } -} - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/cp b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/cp deleted file mode 100644 index 853fd78eebb..00000000000 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/cp +++ /dev/null @@ -1,29 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - object cp; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -2 -1 0 0 0]; - -internalField uniform 450; - -boundaryField -{ - ".*" - { - type calculated; - } -} - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/rho b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/rho deleted file mode 100644 index 8a0910516d8..00000000000 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/0/rho +++ /dev/null @@ -1,29 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - object rho; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -3 0 0 0 0 0]; - -internalField uniform 8000; - -boundaryField -{ - ".*" - { - type calculated; - } -} - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun index d5e26522226..1bb6bd8b53a 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun @@ -9,19 +9,19 @@ rm -rf constant/polyMesh/sets runApplication blockMesh runApplication snappyHexMesh -overwrite -runApplication splitMeshRegions -cellZones +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/{mut,alphat,epsilon,k,p,p,U} + rm -f 0*/$i/{mut,alphat,epsilon,k,p,U} done -# remove solid fields from fluid regions (important for post-processing) -for i in bottomAir topAir -do - rm -f 0*/$i/{cp,K,rho} -done +# No solid fields to remove from fluid regions (important for post-processing) +#for i in bottomAir topAir +#do +# rm -f 0*/$i/{cp,K,rho} +#done for i in bottomAir topAir heater leftSolid rightSolid do diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/RASProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/RASProperties index 9f5e8cf39b7..2e7d3413fc1 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/RASProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/RASProperties @@ -14,9 +14,9 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel kEpsilon; +RASModel laminar; -turbulence off; +turbulence on; printCoeffs on; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties new file mode 100644 index 00000000000..c27f08c9f16 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties @@ -0,0 +1,76 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object solidThermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType constSolidThermo; +//thermoType interpolatedSolidThermo; +//thermoType directionalSolidThermo; + +constSolidThermoCoeffs +{ + //- constant properties + + rho rho [1 -3 0 0 0 0 0] 8000; + cp cp [0 2 -2 -1 0 0 0] 450; + K K [1 1 -3 -1 0 0 0] 80; + + // N/A + Hf Hf [0 2 -2 0 0 0 0] 1; + emissivity emissivity [0 0 0 0 0 0 0] 1; +} + + +interpolatedSolidThermoCoeffs +{ + //- interpolated properties + + TValues (100 1000); + rhoValues (1700 1700); + cpValues (1700 1700); + KValues (80 40); + HfValues (1 1); + emissivityValues (1 1); +} + + +directionalSolidThermoCoeffs +{ + //- does interpolation and directional K in coordinate system. + // Specify multiple values, one for each temperature. Properties are + // interpolated according to the local temperature. + + + TValues (100 1000); + rhoValues (1700 1700); + cpValues (1700 1700); + + KValues ((40 40 40) (40 40 40)); + + coordinateSystem + { + origin (-0.000062 0.000019 0.000039); + coordinateRotation + { + type axes; + e1 (1 0 0); + e3 (-3.1807824E-6 -0.99813473 0.0610505); + } + } + + HfValues (1 1); + emissivityValues (1 1); +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/solidThermophysicalProperties new file mode 100644 index 00000000000..c27f08c9f16 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/solidThermophysicalProperties @@ -0,0 +1,76 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object solidThermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType constSolidThermo; +//thermoType interpolatedSolidThermo; +//thermoType directionalSolidThermo; + +constSolidThermoCoeffs +{ + //- constant properties + + rho rho [1 -3 0 0 0 0 0] 8000; + cp cp [0 2 -2 -1 0 0 0] 450; + K K [1 1 -3 -1 0 0 0] 80; + + // N/A + Hf Hf [0 2 -2 0 0 0 0] 1; + emissivity emissivity [0 0 0 0 0 0 0] 1; +} + + +interpolatedSolidThermoCoeffs +{ + //- interpolated properties + + TValues (100 1000); + rhoValues (1700 1700); + cpValues (1700 1700); + KValues (80 40); + HfValues (1 1); + emissivityValues (1 1); +} + + +directionalSolidThermoCoeffs +{ + //- does interpolation and directional K in coordinate system. + // Specify multiple values, one for each temperature. Properties are + // interpolated according to the local temperature. + + + TValues (100 1000); + rhoValues (1700 1700); + cpValues (1700 1700); + + KValues ((40 40 40) (40 40 40)); + + coordinateSystem + { + origin (-0.000062 0.000019 0.000039); + coordinateRotation + { + type axes; + e1 (1 0 0); + e3 (-3.1807824E-6 -0.99813473 0.0610505); + } + } + + HfValues (1 1); + emissivityValues (1 1); +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/polyMesh/blockMeshDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/polyMesh/blockMeshDict index c9a3d6ffbd8..51e6fe0e74d 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/polyMesh/blockMeshDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/polyMesh/blockMeshDict @@ -16,7 +16,7 @@ FoamFile convertToMeters 1; -vertices +vertices ( (-0.1 -0.04 -0.05) ( 0.1 -0.04 -0.05) @@ -28,18 +28,18 @@ vertices (-0.1 0.04 0.05) ); -blocks +blocks ( hex (0 1 2 3 4 5 6 7) (30 10 10) simpleGrading (1 1 1) ); -edges +edges ( ); -patches +patches ( - wall maxY + wall maxY ( (3 7 6 2) ) @@ -65,7 +65,7 @@ patches ) ); -mergePatchPairs +mergePatchPairs ( ); diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/polyMesh/boundary b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/polyMesh/boundary index 5a51a318319..591514a953a 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/polyMesh/boundary +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/solidThermophysicalProperties new file mode 100644 index 00000000000..c27f08c9f16 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/solidThermophysicalProperties @@ -0,0 +1,76 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object solidThermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType constSolidThermo; +//thermoType interpolatedSolidThermo; +//thermoType directionalSolidThermo; + +constSolidThermoCoeffs +{ + //- constant properties + + rho rho [1 -3 0 0 0 0 0] 8000; + cp cp [0 2 -2 -1 0 0 0] 450; + K K [1 1 -3 -1 0 0 0] 80; + + // N/A + Hf Hf [0 2 -2 0 0 0 0] 1; + emissivity emissivity [0 0 0 0 0 0 0] 1; +} + + +interpolatedSolidThermoCoeffs +{ + //- interpolated properties + + TValues (100 1000); + rhoValues (1700 1700); + cpValues (1700 1700); + KValues (80 40); + HfValues (1 1); + emissivityValues (1 1); +} + + +directionalSolidThermoCoeffs +{ + //- does interpolation and directional K in coordinate system. + // Specify multiple values, one for each temperature. Properties are + // interpolated according to the local temperature. + + + TValues (100 1000); + rhoValues (1700 1700); + cpValues (1700 1700); + + KValues ((40 40 40) (40 40 40)); + + coordinateSystem + { + origin (-0.000062 0.000019 0.000039); + coordinateRotation + { + type axes; + e1 (1 0 0); + e3 (-3.1807824E-6 -0.99813473 0.0610505); + } + } + + HfValues (1 1); + emissivityValues (1 1); +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/RASProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/RASProperties index 9f5e8cf39b7..09a9a55851d 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/RASProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/RASProperties @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -14,9 +14,9 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel kEpsilon; +RASModel laminar; -turbulence off; +turbulence on; printCoeffs on; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties index fcb0e7a6a93..ae93c0c12f8 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/turbulenceProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/turbulenceProperties index a8317a372fc..e63bbc50815 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/turbulenceProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/turbulenceProperties @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/makeCellSets.setSet b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/makeCellSets.setSet deleted file mode 100644 index 84c52f85b36..00000000000 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/makeCellSets.setSet +++ /dev/null @@ -1,11 +0,0 @@ -cellSet heater new boxToCell (-0.01 0 -100 )(0.01 0.01 100) -cellSet heater add boxToCell (-0.01 -100 -0.01)(0.01 0.01 0.01) -cellSet leftSolid new boxToCell (-100 0 -100 )(-0.01 0.01 100) -cellSet rightSolid new boxToCell (0.01 0 -100 )(100 0.01 100) -cellSet topAir new boxToCell (-100 0.01 -100 )(100 100 100) -cellSet bottomAir clear -cellSet bottomAir add cellToCell heater -cellSet bottomAir add cellToCell leftSolid -cellSet bottomAir add cellToCell rightSolid -cellSet bottomAir add cellToCell topAir -cellSet bottomAir invert diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict index 4420a87f360..fea74b83155 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict @@ -16,52 +16,25 @@ FoamFile dictionaryReplacement { - U + boundary { - internalField uniform (0 0 0); - boundaryField + minX { - minX - { - type fixedValue; - value uniform (0 0 0); - } - maxX - { - type fixedValue; - value uniform (0 0 0); - } - - minY - { - type fixedValue; - value uniform (0 0 0); - } - - minZ - { - type fixedValue; - value uniform (0 0 0); - } - - maxZ - { - type fixedValue; - value uniform (0 0 0); - } + type wall; + } + maxX + { + type wall; + } + } - bottomAir_to_leftSolid - { - type fixedValue; - value uniform (0 0 0); + U + { + internalField uniform (0.01 0 0); - } - bottomAir_to_heater - { - type fixedValue; - value uniform (0 0 0); - } - bottomAir_to_rightSolid + boundaryField + { + ".*" { type fixedValue; value uniform (0 0 0); @@ -71,47 +44,21 @@ dictionaryReplacement T { + internalField uniform 300; + boundaryField { - minX - { - type zeroGradient; - } - maxX - { - type zeroGradient; - } - minY - { - type zeroGradient; - } - minZ + ".*" { type zeroGradient; } - maxZ - { - type zeroGradient; - } - bottomAir_to_leftSolid - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - } - bottomAir_to_heater - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - } - bottomAir_to_rightSolid + + "bottomAir_to_.*" { - type compressible::turbulentTemperatureCoupledBaffle; + type compressible::turbulentTemperatureCoupledBaffleMixed; neighbourFieldName T; - K K; + K basicThermo; + KName none; value uniform 300; } } @@ -125,47 +72,9 @@ dictionaryReplacement boundaryField { - minX - { - type zeroGradient; - value uniform 0.01; - } - maxX + ".*" { - type zeroGradient; - value uniform 0.01; - } - - minY - { - type zeroGradient; - value uniform 0.01; - } - - minZ - { - type zeroGradient; - value uniform 0.01; - } - maxZ - { - type zeroGradient; - value uniform 0.01; - } - - bottomAir_to_leftSolid - { - type zeroGradient; - value uniform 0.01; - } - bottomAir_to_heater - { - type zeroGradient; - value uniform 0.01; - } - bottomAir_to_rightSolid - { - type zeroGradient; + type compressible::epsilonWallFunction; value uniform 0.01; } } @@ -174,49 +83,12 @@ dictionaryReplacement k { internalField uniform 0.1; + boundaryField { - minX - { - type zeroGradient; - value uniform 0.1; - } - maxX - { - type zeroGradient; - value uniform 0.1; - } - - minY - { - type zeroGradient; - value uniform 0.1; - } - - minZ - { - type zeroGradient; - value uniform 0.1; - } - maxZ - { - type zeroGradient; - value uniform 0.1; - } - - bottomAir_to_leftSolid - { - type zeroGradient; - value uniform 0.1; - } - bottomAir_to_heater + ".*" { - type zeroGradient; - value uniform 0.1; - } - bottomAir_to_rightSolid - { - type zeroGradient; + type compressible::kqRWallFunction; value uniform 0.1; } } @@ -224,53 +96,17 @@ dictionaryReplacement p { - internalField uniform 1E5; + internalField uniform 100000; boundaryField { - minX - { - type buoyantPressure; - value 1e5; - } - maxX - { - type buoyantPressure; - value 1e5; - } - minY - { - type buoyantPressure; - value 1e5; - } - minZ - { - type buoyantPressure; - value 1e5; - } - maxZ - { - type buoyantPressure; - value 1e5; - } - bottomAir_to_leftSolid - { - type buoyantPressure; - value 1e5; - } - bottomAir_to_heater - { - type buoyantPressure; - value 1e5; - } - bottomAir_to_rightSolid + ".*" { type buoyantPressure; value 1e5; } } } - } // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/controlDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/controlDict index 2f3a0001ef6..cc915cf3252 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/controlDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/controlDict @@ -17,7 +17,7 @@ FoamFile libs ("libOpenFOAM.so" "libcompressibleTurbulenceModel.so" "libcompressibleRASModels.so"); -application snappyHexMesh; +application chtMultiRegionFoam; startFrom latestTime; @@ -30,9 +30,8 @@ endTime 200; deltaT 0.001; writeControl adjustableRunTime; + writeInterval 50; -//writeControl timeStep; -//writeInterval 100; purgeWrite 0; @@ -50,6 +49,8 @@ runTimeModifiable true; maxCo 0.3; +maxDi 10.0; + adjustTimeStep yes; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/decomposeParDict index d8deb33bf49..14d2b1bfdd5 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/decomposeParDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/decomposeParDict @@ -22,8 +22,8 @@ numberOfSubdomains 4; //- Keep owner and neighbour on same processor for faces in zones: // preserveFaceZones (heater solid1 solid3); -method scotch; -// method hierarchical; +// method scotch; +method hierarchical; // method simple; // method metis; // method manual; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/heater/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/heater/changeDictionaryDict index 282c8e4ca9d..ac0d8cdbd41 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/heater/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/heater/changeDictionaryDict @@ -16,169 +16,49 @@ FoamFile dictionaryReplacement { - T + boundary { - internalField uniform 300; - - boundaryField + minY { - minY - { - type fixedValue; - value uniform 500; - } - - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - - heater_to_bottomAir - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - - } - heater_to_leftSolid - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - } - heater_to_rightSolid - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - } - heater_to_topAir - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - } + type patch; } - } - - rho - { - internalField uniform 8000; - - boundaryField + minZ { - minY - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - heater_to_bottomAir - { - type zeroGradient; - } - heater_to_leftSolid - { - type zeroGradient; - } - heater_to_rightSolid - { - type zeroGradient; - } - heater_to_topAir - { - type zeroGradient; - } + type patch; } - } - - K - { - internalField uniform 80; - - boundaryField + maxZ { - minY - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - heater_to_bottomAir - { - type zeroGradient; - } - heater_to_leftSolid - { - type zeroGradient; - } - heater_to_rightSolid - { - type zeroGradient; - } - heater_to_topAir - { - type zeroGradient; - } + type patch; } } - cp + T { - internalField uniform 450; + internalField uniform 300; boundaryField { - minY - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - heater_to_bottomAir - { - type zeroGradient; - } - heater_to_leftSolid + ".*" { type zeroGradient; + value uniform 300; } - heater_to_rightSolid + "heater_to_.*" { - type zeroGradient; + type compressible::turbulentTemperatureCoupledBaffleMixed; + neighbourFieldName T; + K solidThermo; + KName none; + value uniform 300; } - heater_to_topAir + minY { - type zeroGradient; + type fixedValue; + value uniform 500; } } } + } // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/leftSolid/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/leftSolid/changeDictionaryDict index 4fc8984feca..b3453c48f5c 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/leftSolid/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/leftSolid/changeDictionaryDict @@ -16,144 +16,36 @@ FoamFile dictionaryReplacement { - T - { - internalField uniform 300; - - boundaryField - { - minX - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - leftSolid_to_bottomAir - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - - } - leftSolid_to_heater - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - } - leftSolid_to_topAir - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - } - } - } - - rho + boundary { - internalField uniform 8000; - - boundaryField + minZ { - minX - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - leftSolid_to_bottomAir - { - type zeroGradient; - } - leftSolid_to_heater - { - type zeroGradient; - } - leftSolid_to_topAir - { - type zeroGradient; - } + type patch; } - } - - K - { - internalField uniform 80; - - boundaryField + maxZ { - minX - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - leftSolid_to_bottomAir - { - type zeroGradient; - } - leftSolid_to_heater - { - type zeroGradient; - } - leftSolid_to_topAir - { - type zeroGradient; - } + type patch; } } - cp + T { - internalField uniform 450; + internalField uniform 300; boundaryField { - minX - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - leftSolid_to_bottomAir - { - type zeroGradient; - } - leftSolid_to_heater + ".*" { type zeroGradient; + value uniform 300; } - leftSolid_to_topAir + "leftSolid_to_.*" { - type zeroGradient; + type compressible::turbulentTemperatureCoupledBaffleMixed; + neighbourFieldName T; + K solidThermo; + KName none; + value uniform 300; } } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/rightSolid/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/rightSolid/changeDictionaryDict index dc4fe7b846c..f6822937d8e 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/rightSolid/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/rightSolid/changeDictionaryDict @@ -16,143 +16,36 @@ FoamFile dictionaryReplacement { - T + boundary { - internalField uniform 300; - - boundaryField + minZ { - maxX - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - rightSolid_to_heater - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - } - rightSolid_to_bottomAir - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - } - rightSolid_to_topAir - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - } + type patch; } - } - - rho - { - internalField uniform 8000; - - boundaryField + maxZ { - maxX - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - rightSolid_to_bottomAir - { - type zeroGradient; - } - rightSolid_to_heater - { - type zeroGradient; - } - rightSolid_to_topAir - { - type zeroGradient; - } + type patch; } } - K - { - internalField uniform 80; - - boundaryField - { - maxX - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - rightSolid_to_bottomAir - { - type zeroGradient; - } - rightSolid_to_heater - { - type zeroGradient; - } - rightSolid_to_topAir - { - type zeroGradient; - } - } - } - - cp + T { - internalField uniform 450; + internalField uniform 300; boundaryField { - maxX - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - rightSolid_to_bottomAir - { - type zeroGradient; - } - rightSolid_to_heater + ".*" { type zeroGradient; + value uniform 300; } - rightSolid_to_topAir + "rightSolid_to_.*" { - type zeroGradient; + type compressible::turbulentTemperatureCoupledBaffleMixed; + neighbourFieldName T; + K solidThermo; + KName none; + value uniform 300; } } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/changeDictionaryDict index a00b3414327..5dc9ca91e63 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/changeDictionaryDict @@ -18,52 +18,25 @@ dictionaryReplacement { U { - internalField uniform ( 0.01 0 0 ); + internalField uniform (0.01 0 0); + boundaryField { - minX - { - type fixedValue; - value uniform (0.01 0 0); - } - maxX - { - type inletOutlet; - inletValue uniform (0 0 0); - } - - maxY - { - type fixedValue; - value uniform (0 0 0); - } - - minZ - { - type fixedValue; - value uniform (0 0 0); - } - maxZ + ".*" { type fixedValue; value uniform (0 0 0); } - - topAir_to_leftSolid - { - type fixedValue; - value uniform (0 0 0); - - } - topAir_to_heater + minX { type fixedValue; - value uniform (0 0 0); + value uniform ( 0.01 0 0 ); } - topAir_to_rightSolid + maxX { - type fixedValue; - value uniform (0 0 0); + type inletOutlet; + inletValue uniform ( 0 0 0 ); + value uniform ( 0 0 0 ); } } } @@ -74,11 +47,11 @@ dictionaryReplacement boundaryField { - maxY + ".*" { - type fixedValue; - value uniform 300; + type zeroGradient; } + minX { type fixedValue; @@ -86,39 +59,17 @@ dictionaryReplacement } maxX { - type fixedValue; - value uniform 300; - } - minZ - { - type fixedValue; - value uniform 300; - } - maxZ - { - type fixedValue; + type inletOutlet; + inletValue uniform 300; value uniform 300; } - topAir_to_leftSolid - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - } - topAir_to_heater - { - type compressible::turbulentTemperatureCoupledBaffle; - neighbourFieldName T; - K K; - value uniform 300; - } - topAir_to_rightSolid + "topAir_to_.*" { - type compressible::turbulentTemperatureCoupledBaffle; + type compressible::turbulentTemperatureCoupledBaffleMixed; neighbourFieldName T; - K K; + K basicThermo; + KName none; value uniform 300; } } @@ -126,55 +77,25 @@ dictionaryReplacement epsilon { - // Set the value on all bc to non-zero. Not used in simulation - // since zeroGradient; only used in initialisation. + internalField uniform 0.01; + boundaryField { - minX + ".*" { - type fixedValue; - value uniform 0.01; - } - maxX - { - type zeroGradient; - value uniform 0.01; - } - - minY - { - type zeroGradient; - value uniform 0.01; - } - maxY - { - type zeroGradient; + type compressible::epsilonWallFunction; value uniform 0.01; } - minZ - { - type zeroGradient; - value uniform 0.01; - } - maxZ - { - type zeroGradient; - value uniform 0.01; - } - topAir_to_leftSolid - { - type zeroGradient; - value uniform 0.01; - } - topAir_to_heater + minX { - type zeroGradient; + type fixedValue; value uniform 0.01; } - topAir_to_rightSolid + maxX { - type zeroGradient; + type inletOutlet; + inletValue uniform 0.01; value uniform 0.01; } } @@ -183,50 +104,24 @@ dictionaryReplacement k { internalField uniform 0.1; + boundaryField { - minX - { - type fixedValue; - value uniform 0.1; - } - - maxX - { - type zeroGradient; - value uniform 0.1; - } - - maxY + ".*" { - type zeroGradient; + type compressible::kqRWallFunction; value uniform 0.1; } - minZ - { - type zeroGradient; - value uniform 0.1; - } - maxZ - { - type zeroGradient; - value uniform 0.1; - } - - topAir_to_leftSolid - { - type zeroGradient; - value uniform 0.1; - } - topAir_to_heater + minX { - type zeroGradient; + type fixedValue; value uniform 0.1; } - topAir_to_rightSolid + maxX { - type zeroGradient; + type inletOutlet; + inletValue uniform 0.1; value uniform 0.1; } } @@ -234,59 +129,23 @@ dictionaryReplacement p { - internalField uniform 1E5; + internalField uniform 100000; boundaryField { - minX + ".*" { type buoyantPressure; value 1e5; } + maxX { type waveTransmissive; - //field p; - phi phi; - rho rho; - psi psi; - gamma 1.4; // cp/cv - fieldInf 1e5; - lInf 0.40; // double length of domain - value uniform 1e5; - } - - maxY - { - type buoyantPressure; - value 1e5; - } - - minZ - { - type buoyantPressure; - value 1e5; - } - maxZ - { - type buoyantPressure; - value 1e5; - } - - topAir_to_leftSolid - { - type buoyantPressure; - value 1e5; - } - topAir_to_heater - { - type buoyantPressure; - value 1e5; - } - topAir_to_rightSolid - { - type buoyantPressure; - value 1e5; + gamma 1.4; + fieldInf 100000; + lInf 0.4; + value uniform 100000; } } } -- GitLab