diff --git a/tutorials/modules/CHT/rivuletBox/0/box/T b/tutorials/modules/CHT/rivuletBox/0/box/T new file mode 100644 index 0000000000..9b62ed53fc --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/0/box/T @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 300; + +boundaryField +{ + inlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + sides + { + type zeroGradient; + } + + film + { + type coupledTemperature; + value $internalField; + } + + window + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/0/box/U b/tutorials/modules/CHT/rivuletBox/0/box/U new file mode 100644 index 0000000000..bec70578ac --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/0/box/U @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type pressureInletOutletVelocity; + value $internalField; + } + + outlet + { + type pressureInletOutletVelocity; + value $internalField; + } + + sides + { + type noSlip; + } + + film + { + type mappedValue; + value $internalField; + } + + window + { + type noSlip; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/0/box/p b/tutorials/modules/CHT/rivuletBox/0/box/p new file mode 100644 index 0000000000..fed155cf07 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/0/box/p @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 100000; + +boundaryField +{ + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + sides + { + type calculated; + value $internalField; + } + + film + { + type calculated; + value $internalField; + } + + window + { + type calculated; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/0/box/p_rgh b/tutorials/modules/CHT/rivuletBox/0/box/p_rgh new file mode 100644 index 0000000000..61addc523b --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/0/box/p_rgh @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type prghTotalHydrostaticPressure; + p0 $internalField; + value $internalField; + } + + outlet + { + type prghTotalHydrostaticPressure; + p0 $internalField; + value $internalField; + } + + sides + { + type fixedFluxPressure; + } + + film + { + type fixedFluxPressure; + } + + window + { + type fixedFluxPressure; + } +} + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/0/box/ph_rgh.orig b/tutorials/modules/CHT/rivuletBox/0/box/ph_rgh.orig new file mode 100644 index 0000000000..ce7da4f7aa --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/0/box/ph_rgh.orig @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object ph_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type fixedFluxPressure; + value $internalField; + } + + outlet + { + type fixedValue; + value $internalField; + } + + sides + { + type fixedFluxPressure; + } + + film + { + type fixedFluxPressure; + } + + window + { + type fixedFluxPressure; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/0/film/T b/tutorials/modules/CHT/rivuletBox/0/film/T new file mode 100644 index 0000000000..62f5d897da --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/0/film/T @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 300; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 300; + } + + outlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } + + wall + { + type coupledTemperature; + value $internalField; + } + + surface + { + type coupledTemperature; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/0/film/U b/tutorials/modules/CHT/rivuletBox/0/film/U new file mode 100644 index 0000000000..d7e4c9ada3 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/0/film/U @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type fixedValue; + value uniform (0 -0.075 0); + } + + outlet + { + type zeroGradient; + } + + sides + { + type noSlip; + } + + wall + { + type noSlip; + } + + surface + { + type filmSurfaceVelocity; + Cs 0.005; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/0/film/delta b/tutorials/modules/CHT/rivuletBox/0/film/delta new file mode 100644 index 0000000000..117ba3f995 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/0/film/delta @@ -0,0 +1,64 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object delta; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type turbulentInlet; + fluctuationScale 0.05; + referenceField uniform 1e-3; + alpha 0.1; + value uniform 1e-3; + } + + outlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } + + wall + { + type filmContactAngle; + + contactAngle + { + type gravitational; + theta0 70; + thetaAdv 90; + thetaRec 50; + gTheta 0.1; + } + + value $internalField; + } + + surface + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/0/film/p b/tutorials/modules/CHT/rivuletBox/0/film/p new file mode 100644 index 0000000000..1ed6600223 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/0/film/p @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + inlet + { + type zeroGradient; + } + + outlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } + + wall + { + type zeroGradient; + } + + surface + { + type mappedFilmPressure; + + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/0/panel/T b/tutorials/modules/CHT/rivuletBox/0/panel/T new file mode 100644 index 0000000000..afca7b4980 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/0/panel/T @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 0 0 1 0 0 0 ]; + +internalField uniform 330; + +boundaryField +{ + "(inlet|outlet|sides)" + { + type zeroGradient; + } + + wall + { + type coupledTemperature; + value $internalField; + } + + insulatedWall + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/Allclean b/tutorials/modules/CHT/rivuletBox/Allclean new file mode 100755 index 0000000000..2a71c1e034 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/Allclean @@ -0,0 +1,12 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase + +rm -rf constant/panel/polyMesh +rm -rf constant/film/polyMesh + +#------------------------------------------------------------------------------ diff --git a/tutorials/modules/CHT/rivuletBox/Allrun b/tutorials/modules/CHT/rivuletBox/Allrun new file mode 100755 index 0000000000..93929e235d --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/Allrun @@ -0,0 +1,47 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh -region box + +runApplication -s panel extrudeToRegionMesh \ + -dict system/extrudeToRegionMeshDict.panel \ + -region box -overwrite + +runApplication -s film extrudeToRegionMesh \ + -dict system/extrudeToRegionMeshDict.film \ + -region panel -overwrite + +# Add the coupling between box and film +# Third-region coupling is not currently supported by extrudeToRegionMesh + +runApplication -s box foamDictionary -set \ + "entry0/film/type=mappedExtrudedWall, \ + entry0/film/neighbourRegion=film, \ + entry0/film/neighbourPatch=surface, \ + entry0/film/transformType=none" \ + constant/box/polyMesh/boundary + +runApplication -s film foamDictionary -set \ + "entry0/surface/type=mappedFilmSurface, \ + entry0/surface/neighbourRegion=box, \ + entry0/surface/neighbourPatch=film, \ + entry0/surface/oppositePatch=wall, \ + entry0/surface/transformType=none" \ + constant/film/polyMesh/boundary + +printf "\n%s\n" "Creating files for paraview post-processing" +paraFoam -touchAll +echo + +# Serial run +#runApplication $(getApplication) + +# Parallel run +runApplication decomposePar -allRegions +runParallel $(getApplication) +runApplication reconstructPar -allRegions + +#------------------------------------------------------------------------------ diff --git a/tutorials/modules/CHT/rivuletBox/constant/box/g b/tutorials/modules/CHT/rivuletBox/constant/box/g new file mode 100644 index 0000000000..770a56192e --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/constant/box/g @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/constant/box/hRef b/tutorials/modules/CHT/rivuletBox/constant/box/hRef new file mode 100644 index 0000000000..1ae4bf31cf --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/constant/box/hRef @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object hRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; +value 0; + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/constant/box/momentumTransport b/tutorials/modules/CHT/rivuletBox/constant/box/momentumTransport new file mode 100644 index 0000000000..8278c989ec --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/constant/box/momentumTransport @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object momentumTransport; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/constant/box/pRef b/tutorials/modules/CHT/rivuletBox/constant/box/pRef new file mode 100644 index 0000000000..30a604c272 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/constant/box/pRef @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class uniformDimensionedScalarField; + location "constant"; + object pRef; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; +value 101325; + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/constant/box/physicalProperties b/tutorials/modules/CHT/rivuletBox/constant/box/physicalProperties new file mode 100644 index 0000000000..0554f2dc27 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/constant/box/physicalProperties @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object physicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +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/modules/CHT/rivuletBox/constant/film/g b/tutorials/modules/CHT/rivuletBox/constant/film/g new file mode 100644 index 0000000000..770a56192e --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/constant/film/g @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/constant/film/momentumTransport b/tutorials/modules/CHT/rivuletBox/constant/film/momentumTransport new file mode 100644 index 0000000000..8278c989ec --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/constant/film/momentumTransport @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object momentumTransport; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/constant/film/physicalProperties b/tutorials/modules/CHT/rivuletBox/constant/film/physicalProperties new file mode 100644 index 0000000000..e131771292 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/constant/film/physicalProperties @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object physicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + properties liquid; + energy sensibleInternalEnergy; +} + +mixture +{ + H2O; +} + +sigma +{ + type constant; + sigma 0.07; +} + +deltaWet 1e-8; + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/constant/panel/physicalProperties b/tutorials/modules/CHT/rivuletBox/constant/panel/physicalProperties new file mode 100644 index 0000000000..d1f1bdeacf --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/constant/panel/physicalProperties @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant/metal"; + object physicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heSolidThermo; + mixture pureMixture; + transport constIsoSolid; + thermo eConst; + equationOfState rhoConst; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + // Aluminium + + specie + { + molWeight 27; + } + equationOfState + { + rho 2700; + } + transport + { + kappa 200; + } + thermodynamics + { + Hf 0; + Cv 900; + } +} + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/system/box/blockMeshDict b/tutorials/modules/CHT/rivuletBox/system/box/blockMeshDict new file mode 100644 index 0000000000..940f2aa9ac --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/system/box/blockMeshDict @@ -0,0 +1,106 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + // front + ( 0 0 0.02) + ( 0.125 0 0.02) + ( 0.625 0 0.02) + ( 0.750 0 0.02) + ( 0 1 0.02) + ( 0.125 1 0.02) + ( 0.625 1 0.02) + ( 0.750 1 0.02) + + // back + ( 0 0 0) + ( 0.125 0 0) + ( 0.625 0 0) + ( 0.750 0 0) + ( 0 1 0) + ( 0.125 1 0) + ( 0.625 1 0) + ( 0.750 1 0) +); + +blocks +( + hex (0 1 9 8 4 5 13 12) (30 10 240) simpleGrading (1 1 1) + hex (1 2 10 9 5 6 14 13) (120 10 240) simpleGrading (1 1 1) + hex (2 3 11 10 6 7 15 14) (30 10 240) simpleGrading (1 1 1) +); + +boundary +( + inlet + { + type patch; + faces + ( + (5 6 14 13) + ); + } + + outlet + { + type patch; + faces + ( + (0 1 9 8) + (1 2 10 9) + (2 3 11 10) + ); + } + + sides + { + type patch; + faces + ( + (8 0 4 12) + (15 7 3 11) + (13 5 4 12) + (15 7 6 14) + ); + } + + film + { + type wall; + faces + ( + (0 1 5 4) + (1 2 6 5) + (2 3 7 6) + ); + } + + window + { + type wall; + faces + ( + (8 12 13 9) + (9 13 14 10) + (10 14 15 11) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/system/box/fvSchemes b/tutorials/modules/CHT/rivuletBox/system/box/fvSchemes new file mode 100644 index 0000000000..b9a344c5b6 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/system/box/fvSchemes @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss upwind; + div(phi,K) Gauss upwind; + div(phi,h) Gauss upwind; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(U) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; + div(phi,Yi_h) Gauss upwind; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/system/box/fvSolution b/tutorials/modules/CHT/rivuletBox/system/box/fvSolution new file mode 100644 index 0000000000..8b0253ccb6 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/system/box/fvSolution @@ -0,0 +1,83 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "rho.*" + { + solver diagonal; + } + + p_rgh + { + solver GAMG; + smoother GaussSeidel; + + tolerance 1e-6; + relTol 0.01; + } + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + ph_rgh + { + $p_rgh; + } + + "(U|h)" + { + solver PBiCGStab; + preconditioner DILU; + + tolerance 1e-5; + relTol 0.1; + } + + "(U|h)Final" + { + $U; + relTol 0; + } + + "(k|epsilon)" + { + $UFinal; + } +} + +PIMPLE +{ + momentumPredictor yes; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + + hydrostaticInitialisation yes; +} + +relaxationFactors +{ + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/system/controlDict b/tutorials/modules/CHT/rivuletBox/system/controlDict new file mode 100644 index 0000000000..93b848af11 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/system/controlDict @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application foamMultiRun; + +regionSolvers +{ + film film; + panel solid; + box fluid; +} + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 5; + +deltaT 1e-4; + +writeControl adjustableRunTime; + +writeInterval 0.1; + +purgeWrite 0; + +writeFormat binary; + +writePrecision 10; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.2; + +maxDeltaT 5e-3; + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/system/decomposeParDict b/tutorials/modules/CHT/rivuletBox/system/decomposeParDict new file mode 100644 index 0000000000..da037ee222 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/system/decomposeParDict @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +method scotch; + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/system/extrudeToRegionMeshDict.film b/tutorials/modules/CHT/rivuletBox/system/extrudeToRegionMeshDict.film new file mode 100644 index 0000000000..6a848cfb61 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/system/extrudeToRegionMeshDict.film @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object extrudeToRegionMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +region film; + +patches (filmWall); + +adaptMesh yes; + +patchTypes (mappedWall); +patchNames (wall); + +regionPatchTypes (mappedFilmWall); +regionPatchNames (wall); + +regionOppositePatchTypes (patch); +regionOppositePatchNames (surface); + +extrudeModel linearNormal; + +nLayers 1; + +expansionRatio 1; + +linearNormalCoeffs +{ + thickness 0.01; +} + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/system/extrudeToRegionMeshDict.panel b/tutorials/modules/CHT/rivuletBox/system/extrudeToRegionMeshDict.panel new file mode 100644 index 0000000000..74380e3436 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/system/extrudeToRegionMeshDict.panel @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object extrudeToRegionMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +region panel; + +patches (film); + +adaptMesh no; + +regionPatchTypes (wall); +regionPatchNames (filmWall); + +regionOppositePatchTypes (wall); +regionOppositePatchNames (insulatedWall); + +extrudeModel linearNormal; + +nLayers 1; + +expansionRatio 1; + +linearNormalCoeffs +{ + thickness 0.002; +} + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/system/film/fvSchemes b/tutorials/modules/CHT/rivuletBox/system/film/fvSchemes new file mode 100644 index 0000000000..10a28677c0 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/system/film/fvSchemes @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default filmGauss linear; +} + +divSchemes +{ + default none; + + div(phid,alpha) Gauss upwind; // vanLeer; + div(alphaRhoPhi,U) Gauss upwind; + div(alphaRhoPhi,e) Gauss upwind; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/system/film/fvSolution b/tutorials/modules/CHT/rivuletBox/system/film/fvSolution new file mode 100644 index 0000000000..2b66db28a9 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/system/film/fvSolution @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.*" + { + solver PBiCGStab; + preconditioner DILU; + + tolerance 1e-10; + relTol 0; + } + + "(U|e).*" + { + solver PBiCGStab; + preconditioner DILU; + + tolerance 1e-10; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor yes; + nOuterCorrectors 2; + nCorrectors 1; + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/system/fvSolution b/tutorials/modules/CHT/rivuletBox/system/fvSolution new file mode 100644 index 0000000000..f1497eb3b5 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/system/fvSolution @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +PIMPLE +{ + nOuterCorrectors 1; +} + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/system/panel/fvSchemes b/tutorials/modules/CHT/rivuletBox/system/panel/fvSchemes new file mode 100644 index 0000000000..f56d5a0eaf --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/system/panel/fvSchemes @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system/metal"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +// ************************************************************************* // diff --git a/tutorials/modules/CHT/rivuletBox/system/panel/fvSolution b/tutorials/modules/CHT/rivuletBox/system/panel/fvSolution new file mode 100644 index 0000000000..745712db67 --- /dev/null +++ b/tutorials/modules/CHT/rivuletBox/system/panel/fvSolution @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system/metal"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + e + { + solver GAMG; + smoother symGaussSeidel; + tolerance 1e-6; + relTol 0.1; + maxIter 10; + } + + eFinal + { + $e; + relTol 0; + } +} + +PIMPLE +{ + nNonOrthogonalCorrectors 0; +} + +// ************************************************************************* //