diff --git a/etc/templates/singleFluidCHT/Allclean b/etc/templates/singleFluidCHT/Allclean new file mode 100755 index 000000000..c3646bf01 --- /dev/null +++ b/etc/templates/singleFluidCHT/Allclean @@ -0,0 +1,27 @@ +#!/bin/sh +cd "${0%/*}" || exit 1 # run from this directory + +# Source tutorial clean functions +. "$WM_PROJECT_DIR/bin/tools/CleanFunctions" + +removeRegionDirs () { + # HACK to get regionDirs from materialProperties + _regionDirs="$(grep -E "^[a-Z]" constant/materialProperties | tail -n +2)" + + for d in system constant + do + for r in $_regionDirs + do + dir="${d}/${r}" + [ -d "$dir" ] && rm -rf "$dir" + done + done +} + +cleanCase +removeRegionDirs +rm -rf 0 > /dev/null 2>&1 +rm -rf constant/regionProperties > /dev/null 2>&1 +rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/templates/singleFluidCHT/Allmesh b/etc/templates/singleFluidCHT/Allmesh new file mode 100755 index 000000000..e2b3956ac --- /dev/null +++ b/etc/templates/singleFluidCHT/Allmesh @@ -0,0 +1,12 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh +runApplication surfaceFeatures +runApplication snappyHexMesh -overwrite +runApplication splitMeshRegions -cellZones -defaultRegionName fluid -overwrite + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/templates/singleFluidCHT/Allrun b/etc/templates/singleFluidCHT/Allrun new file mode 100755 index 000000000..701757164 --- /dev/null +++ b/etc/templates/singleFluidCHT/Allrun @@ -0,0 +1,20 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +./Allmesh + +rm -rf 0 + +runApplication foamSetupCHT + +runApplication $(getApplication) + +echo +echo "Creating files for paraview post-processing" +echo +paraFoam -touchAll + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/templates/singleFluidCHT/README b/etc/templates/singleFluidCHT/README new file mode 100644 index 000000000..d7ca68ff5 --- /dev/null +++ b/etc/templates/singleFluidCHT/README @@ -0,0 +1,118 @@ +Overview +======== ++ This is a template case for conjugate heat transfer (CHT) ++ It is designed to work specifically with the foamSetupCHT utility ++ The template works simply for cases with a single fluid region and multiple + solid regions; it can be adapted for cases with multiple fluid regions ++ It is setup to run the chtMultiRegionFoam solver ++ The Allmesh and Allrun scripts demonstrate the commands to be run + +Meshing Strategy +================ ++ A single mesh is first created for the entire fluid/solid domain, including + relevant boundary patches, with cellZones to describe the solid regions. ++ The single mesh is then split into separate meshes for each region using + splitMeshRegions. ++ The case is designed to be meshed with snappyHexMesh ++ The overall (comined fluid/solid) domain is described by a single a surface + geometry file named (default name "CAD.obj"), that includes separate surface + regions to describe boundary patches ++ A surface geometry file is provided for each solid; the template includes + example entries for a single solid with geometry file "solid.obj". + +Surface Geometry +================ ++ Copy the overall domain geometry file ("CAD.obj") and solid geometry files + (e.g. "solid.obj") to the constant/triSurface ++ The CAD.obj should contain an inlet and outlet region to create the relevant + patches in the mesh + +Background Mesh +=============== ++ The user should establish the bounds of their "CAD.obj" file ++ The blockMeshDict file contains a backgroundMesh subditionary ++ For internal flows, where "CAD.obj" describes the external boundary, set xMin, + xMax, etc to be beyond the "CAD.obj" bounds ++ For external flows, the background mesh can define the external boundary by + uncommenting entries, e.g. left, in the boundary section of blockMeshDict ++ Set background mesh density with xCells, yCells, zCells ++ Run blockMesh + +Features +======== ++ Edit the surfaceFeatures file to include all the surface geometry files ++ Run surfaceFeatures to extract features for explicit feature capturing + +Castellated Mesh +================ ++ In the snappyHexMeshDict file, configure the "geometry" subdictionary to + include an entry for each surface geometry file, e.g. "CAD.obj", "solid.obj" ++ Replace with the name of the inlet region in the "CAD.obj" file ++ Replace with the name of the outlet region ++ In refinementSurfaces, include an entry to create a cellZone for each solid ++ run snappyHexMesh to obtain a castellatedMesh ++ Review the mesh; modify refinement levels and regenerate the mesh as required + (levels are set in refinementSurfaces and refinementRegions) + +Snapped Mesh +============ ++ In snappyHexMeshDict, set castellatedMesh off; snap on; ++ Run the snapping phase of snappyHexMesh ++ Review the mesh + +Layers +====== ++ To add layers to the mesh along wall boundary patches... ++ Switch on addLayers; switch snap off; ++ Run snappyHexMesh ++ The number of layers can be changed by modifying nSurfaceLayers + +Creating the CHT Mesh +===================== +Run splitMeshRegions with "-cellZones" to split the solid cellZones into +separate mesh regions; the remaining fluid region can be named with the +"-defaultRegionName" option. For example, to name the default region "fluid": + + splitMeshRegions -cellZones -defaultRegionName fluid -overwrite + +Initialisation +============== ++ The case initialisation is performed largely by the foamSetupCHT utility ++ foamSetupCHT requires the user to configure a materialProperties file + that includes entries for each region with + + type : fluid or solid + + material : e.g. air, aluminium, selected from configured materials in + templates/materials directory ++ The user then runs foamSetupCHT which generates the region directories + in 0, system and constant, containing the respective field, configuration and + properties files ++ The user should edit these files accordingly. The default models and + configuration (e.g. fvSchemes) for each region are generally reliable, but + the user must pay attention to field files (U, T, k, omega, etc), in + particular the boundary conditions and initial conditions. ++ Region boundaries, e.g. solid-fluid and solid-solid, use the "wall" group + boundary conditions by default. External wall boundaries are part of the + "externalWall" group, which has its own boundary condition settings ++ For convenience, some field data common to multiple regions, e.g. initial + temperature, are provided through an "initialConditions" file + +Source Terms +============ ++ An fvOptions file is included in system for the solid regions ++ It contains examples of fixed temperature and heat flux sources which can + be switched on accordingly + +Running the Solver +================== ++ The case uses chtMultiRegionFoam which can run either as a steady-state + solver, or as a transient solver. ++ The default setup is to run steady-state ++ To run transient, the user needs to modify the controlDict file, and fluid + and solid fvSchemes and fvSolutions files. The latter files are annotated + with some information to remind users of the changes required. + +Post-Processing +=============== ++ In order to post-process with ParaView, run "paraFoam -touchAll", then open + paraview and open the individual ".OpenFOAM" dummy files for individual mesh + regions. diff --git a/etc/templates/singleFluidCHT/constant/initialConditions b/etc/templates/singleFluidCHT/constant/initialConditions new file mode 100644 index 000000000..374bcfcba --- /dev/null +++ b/etc/templates/singleFluidCHT/constant/initialConditions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Tinitial 300; +pInitial 1e5; + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/constant/materialProperties b/etc/templates/singleFluidCHT/constant/materialProperties new file mode 100644 index 000000000..52bd3073d --- /dev/null +++ b/etc/templates/singleFluidCHT/constant/materialProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object materialProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +fluid +{ + type fluid; + material air; +} + +solid +{ + type solid; + material copper; +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/constant/triSurface/.keep b/etc/templates/singleFluidCHT/constant/triSurface/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/etc/templates/singleFluidCHT/system/blockMeshDict b/etc/templates/singleFluidCHT/system/blockMeshDict new file mode 100644 index 000000000..09757b92d --- /dev/null +++ b/etc/templates/singleFluidCHT/system/blockMeshDict @@ -0,0 +1,124 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +backgroundMesh +{ + xMin -1; + xMax 1; + yMin -1; + yMax 1; + zMin -1; + zMax 1; + xCells 20; + yCells 20; + zCells 20; +} + +convertToMeters 1; + +vertices +( + ($:backgroundMesh.xMin $:backgroundMesh.yMin $:backgroundMesh.zMin) + ($:backgroundMesh.xMax $:backgroundMesh.yMin $:backgroundMesh.zMin) + ($:backgroundMesh.xMax $:backgroundMesh.yMax $:backgroundMesh.zMin) + ($:backgroundMesh.xMin $:backgroundMesh.yMax $:backgroundMesh.zMin) + + ($:backgroundMesh.xMin $:backgroundMesh.yMin $:backgroundMesh.zMax) + ($:backgroundMesh.xMax $:backgroundMesh.yMin $:backgroundMesh.zMax) + ($:backgroundMesh.xMax $:backgroundMesh.yMax $:backgroundMesh.zMax) + ($:backgroundMesh.xMin $:backgroundMesh.yMax $:backgroundMesh.zMax) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) + ( + $:backgroundMesh.xCells + $:backgroundMesh.yCells + $:backgroundMesh.zCells + ) + simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( +// Uncomment below to define patches in background mesh +/* + left + { + type patch; + faces + ( + (0 3 7 4) + ); + } + + right + { + type patch; + faces + ( + (1 5 6 2) + ); + } + + bottom + { + type patch; + faces + ( + (0 1 2 3) + ); + } + + top + { + type patch; + faces + ( + (4 7 6 5) + ); + } + + back + { + type patch; + faces + ( + (0 4 5 1) + ); + } + + front + { + type patch; + faces + ( + (3 2 6 7) + ); + } +*/ +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/system/controlDict b/etc/templates/singleFluidCHT/system/controlDict new file mode 100644 index 000000000..7ee9fbd79 --- /dev/null +++ b/etc/templates/singleFluidCHT/system/controlDict @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application chtMultiRegionFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 500; + +deltaT 1; + +writeControl timeStep; + +writeInterval 50; + +purgeWrite 5; + +writeFormat ascii; + +writePrecision 8; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +functions +{ +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/system/decomposeParDict b/etc/templates/singleFluidCHT/system/decomposeParDict new file mode 100644 index 000000000..929c84b17 --- /dev/null +++ b/etc/templates/singleFluidCHT/system/decomposeParDict @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method scotch; + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (2 2 1); + delta 0.001; + order xyz; +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/system/fvSchemes b/etc/templates/singleFluidCHT/system/fvSchemes new file mode 100644 index 000000000..e7d321e95 --- /dev/null +++ b/etc/templates/singleFluidCHT/system/fvSchemes @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ +} + +gradSchemes +{ +} + +divSchemes +{ +} + +laplacianSchemes +{ +} + +interpolationSchemes +{ +} + +snGradSchemes +{ +} + +fluxRequired +{ +} + + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/system/fvSolution b/etc/templates/singleFluidCHT/system/fvSolution new file mode 100644 index 000000000..cde9e4918 --- /dev/null +++ b/etc/templates/singleFluidCHT/system/fvSolution @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +PIMPLE +{ + nOuterCorrectors 1; +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/system/meshQualityDict b/etc/templates/singleFluidCHT/system/meshQualityDict new file mode 100644 index 000000000..c38396d71 --- /dev/null +++ b/etc/templates/singleFluidCHT/system/meshQualityDict @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object meshQualityDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/mesh/generation/meshQualityDict.cfg" + +//- minFaceWeight (0 -> 0.5) +//minFaceWeight 0.02; + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/system/snappyHexMeshDict b/etc/templates/singleFluidCHT/system/snappyHexMeshDict new file mode 100644 index 000000000..33676a425 --- /dev/null +++ b/etc/templates/singleFluidCHT/system/snappyHexMeshDict @@ -0,0 +1,148 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object snappyHexMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/mesh/generation/snappyHexMeshDict.cfg" + +castellatedMesh on; +snap on; +addLayers off; + +geometry +{ + CAD + { + type triSurfaceMesh; + file "CAD.obj"; + regions + { + { name inlet; } + { name outlet; } + } + } + + solid + { + type triSurfaceMesh; + file "solid.obj"; + } +}; + +castellatedMeshControls +{ + features + ( + { file "CAD.eMesh"; level 1; } + { file "solid.eMesh"; level 1; } + ); + + refinementSurfaces + { + solid + { + level (2 2); + faceZone solid; + cellZone solid; + cellZoneInside inside; + } + + CAD + { + level (2 2); + patchInfo + { + type wall; + inGroups (externalWall); + } + + regions + { + + { + level (2 2); + patchInfo + { + type patch; + inGroups (inlet); + } + } + + + { + level (2 2); + patchInfo + { + type patch; + inGroups (outlet); + } + } + } + } + } + + refinementRegions + { + CAD + { + mode inside; + levels ((1E15 1)); + } + } + + locationInMesh (1e-5 1e-5 1e-5); // Offset from (0 0 0) to avoid + // coinciding with face or edge + nCellsBetweenLevels 3; +} + +snapControls +{ + explicitFeatureSnap true; + implicitFeatureSnap false; +} + +addLayersControls +{ + layers + { + "CAD.*" + { + nSurfaceLayers 2; + } + } + + relativeSizes true; // false, usually with firstLayerThickness + expansionRatio 1.2; + finalLayerThickness 0.5; + minThickness 1e-3; +// firstLayerThickness 0.01; + +// maxThicknessToMedialRatio 0.6; +} + +meshQualityControls +{ +// minTetQuality -1e+30; +} + +writeFlags +( +// scalarLevels + layerSets + layerFields +); + +mergeTolerance 1e-6; + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/system/surfaceFeaturesDict b/etc/templates/singleFluidCHT/system/surfaceFeaturesDict new file mode 100644 index 000000000..b0369de17 --- /dev/null +++ b/etc/templates/singleFluidCHT/system/surfaceFeaturesDict @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object surfaceFeaturesDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +surfaces +( + "CAD.obj" + "solid.obj" +); + +includedAngle 150; + +subsetFeatures +{ + nonManifoldEdges yes; + openEdges yes; +} + +trimFeatures +{ + minElem 0; + minLen 0; +} + +writeObj yes; + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/0/fluid/G b/etc/templates/singleFluidCHT/templates/0/fluid/G new file mode 100644 index 000000000..a7e8043dc --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/0/fluid/G @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object G; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 0 -3 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + "(inlet|outlet)" + { + type MarshakRadiation; + emissivityMode lookup; + emissivity uniform 1.0; + value uniform 0; + } + + wall + { + type MarshakRadiation; + emissivityMode solidRadiation; + value uniform 0; + } + + externalWall + { + type MarshakRadiation; + emissivityMode lookup; + emissivity uniform 1.0; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/0/fluid/T b/etc/templates/singleFluidCHT/templates/0/fluid/T new file mode 100644 index 000000000..a78e343b0 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/0/fluid/T @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "$FOAM_CASE/constant/initialConditions"; + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform $Tinitial; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform $Tinitial; + } + + outlet + { + type inletOutlet; + inletValue uniform $Tinitial; + value uniform $Tinitial; + } + + wall + { + type compressible::turbulentTemperatureCoupledBaffleMixed; + neighbourFieldName T; + kappaMethod fluidThermo; + kappa kappa; + Tnbr T; + value uniform $Tinitial; + } + + externalWall + { + type fixedValue; + value uniform $Tinitial; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/0/fluid/U b/etc/templates/singleFluidCHT/templates/0/fluid/U new file mode 100644 index 000000000..49f1abb95 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/0/fluid/U @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Uinlet (1 0 0); + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type fixedValue; + value uniform $Uinlet; + } + + outlet + { + type pressureInletOutletVelocity; + value uniform $Uinlet; + } + + wall + { + type noSlip; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/0/fluid/alphat b/etc/templates/singleFluidCHT/templates/0/fluid/alphat new file mode 100644 index 000000000..fdf9f6628 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/0/fluid/alphat @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type calculated; + value uniform 0; + } + + outlet + { + type calculated; + value uniform 0; + } + + wall + { + type compressible::alphatWallFunction; + value uniform 0; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/0/fluid/epsilon b/etc/templates/singleFluidCHT/templates/0/fluid/epsilon new file mode 100644 index 000000000..0253ee2ac --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/0/fluid/epsilon @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +epsilonInlet 0.001; +mixingLengthInlet 0.007; + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform $epsilonInlet; + +boundaryField +{ + inlet + { + type turbulentMixingLengthDissipationRateInlet; + mixingLength $mixingLengthInlet; + value uniform $epsilonInlet; + } + + outlet + { + type inletOutlet; + value uniform $epsilonInlet; + inletValue uniform $epsilonInlet; + } + + wall + { + type compressible::epsilonWallFunction; + value uniform $epsilonInlet; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/0/fluid/k b/etc/templates/singleFluidCHT/templates/0/fluid/k new file mode 100644 index 000000000..e8e397626 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/0/fluid/k @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +kInlet 0.001; +intensityInlet 0.05; + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform $kInlet; + +boundaryField +{ + inlet + { + type turbulentIntensityKineticEnergyInlet; + intensity $intensityInlet; + value uniform $kInlet; + } + + outlet + { + type inletOutlet; + inletValue uniform $kInlet; + value uniform $kInlet; + } + + wall + { + type kqRWallFunction; + value uniform $kInlet; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/0/fluid/nut b/etc/templates/singleFluidCHT/templates/0/fluid/nut new file mode 100644 index 000000000..54a56f319 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/0/fluid/nut @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type calculated; + value uniform 0; + } + + outlet + { + type calculated; + value uniform 0; + } + + wall + { + type nutkWallFunction; + value uniform 0; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/0/fluid/omega b/etc/templates/singleFluidCHT/templates/0/fluid/omega new file mode 100644 index 000000000..86df70eb4 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/0/fluid/omega @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object omega; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +omegaInlet 1; +mixingLengthInlet 0.007; + +dimensions [0 0 -1 0 0 0 0]; + +internalField uniform $omegaInlet; + +boundaryField +{ + inlet + { + type turbulentMixingLengthFrequencyInlet; + mixingLength $mixingLengthInlet; + value uniform $omegaInlet; + } + + outlet + { + type inletOutlet; + inletValue uniform $omegaInlet; + value uniform $omegaInlet; + } + + wall + { + type omegaWallFunction; + value uniform $omegaInlet; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/0/fluid/p b/etc/templates/singleFluidCHT/templates/0/fluid/p new file mode 100644 index 000000000..09072a3cf --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/0/fluid/p @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "$FOAM_CASE/constant/initialConditions"; + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform $pInitial; + +boundaryField +{ + outlet + { + type calculated; + value uniform $pInitial; + } + + inlet + { + type calculated; + value uniform $pInitial; + } + + wall + { + $inlet; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/0/fluid/p_rgh b/etc/templates/singleFluidCHT/templates/0/fluid/p_rgh new file mode 100644 index 000000000..1ab46279f --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/0/fluid/p_rgh @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "$FOAM_CASE/constant/initialConditions"; + +dimensions [ 1 -1 -2 0 0 0 0 ]; + +internalField uniform $pInitial; + +boundaryField +{ + outlet + { + type fixedValue; + value uniform $pInitial; + } + + inlet + { + type fixedFluxPressure; + value uniform $pInitial; + } + + wall + { + $inlet; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/0/solid/T b/etc/templates/singleFluidCHT/templates/0/solid/T new file mode 100644 index 000000000..bbc1ce49b --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/0/solid/T @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "$FOAM_CASE/constant/initialConditions"; + +dimensions [ 0 0 0 1 0 0 0 ]; + +internalField uniform $Tinitial; + +boundaryField +{ + wall + { + type compressible::turbulentTemperatureCoupledBaffleMixed; + value $internalField; + kappaMethod solidThermo; + kappa kappa; + Tnbr T; + } +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/0/solid/p b/etc/templates/singleFluidCHT/templates/0/solid/p new file mode 100644 index 000000000..5e05bd4df --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/0/solid/p @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "$FOAM_CASE/constant/initialConditions"; + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform $pInitial; + +boundaryField +{ + ".*" + { + type calculated; + value uniform $pInitial; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/constant/fluid/g b/etc/templates/singleFluidCHT/templates/constant/fluid/g new file mode 100644 index 000000000..6f32e3383 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/constant/fluid/g @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/materials/air/radiationProperties b/etc/templates/singleFluidCHT/templates/materials/air/radiationProperties new file mode 100644 index 000000000..389436c07 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/materials/air/radiationProperties @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiation off; + +radiationModel P1; + +solverFreq 1; + +absorptionEmissionModel constantAbsorptionEmission; + +constantAbsorptionEmissionCoeffs +{ + absorptivity absorptivity [0 -1 0 0 0 0 0] 0.5; + emissivity emissivity [0 -1 0 0 0 0 0] 0.5; + E E [1 -1 -3 0 0 0 0] 0; +} + +scatterModel none; + +sootModel none; + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/materials/air/thermophysicalProperties b/etc/templates/singleFluidCHT/templates/materials/air/thermophysicalProperties new file mode 100644 index 000000000..937dce5f0 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/materials/air/thermophysicalProperties @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 28.9; // [g/mol] + } + thermodynamics + { + Cp 1005; // [J/(kg K)] + Hf 0; + } + transport + { + mu 1.8e-05; // [kg/(m s)] + Pr 0.7; + } +} + + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/materials/air/turbulenceProperties b/etc/templates/singleFluidCHT/templates/materials/air/turbulenceProperties new file mode 100644 index 000000000..f0add28ce --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/materials/air/turbulenceProperties @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + printCoeffs on; +} + +LES +{ + LESModel SpalartAllmarasDDES; + delta cubeRootVol; + + turbulence on; + printCoeffs on; + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/materials/aluminium/radiationProperties b/etc/templates/singleFluidCHT/templates/materials/aluminium/radiationProperties new file mode 100644 index 000000000..133ef8942 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/materials/aluminium/radiationProperties @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiationModel opaqueSolid; + +absorptionEmissionModel constantAbsorptionEmission; + +constantAbsorptionEmissionCoeffs +{ + absorptivity absorptivity [ 0 -1 0 0 0 0 0 ] 0.0; + emissivity emissivity [ 0 -1 0 0 0 0 0 ] 0.1; + E E [ 1 -1 -3 0 0 0 0 ] 0; +} + +scatterModel none; + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/materials/aluminium/thermophysicalProperties b/etc/templates/singleFluidCHT/templates/materials/aluminium/thermophysicalProperties new file mode 100644 index 000000000..2e0722b05 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/materials/aluminium/thermophysicalProperties @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heSolidThermo; + mixture pureMixture; + transport constIso; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 27; // [g/mol] + } + + transport + { + kappa 240; // [W/(m K)] + } + + thermodynamics + { + Hf 0; + Cp 896; // [J/(kg K)] + } + + equationOfState + { + rho 2712; // [kg/m3] + } +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/materials/copper/radiationProperties b/etc/templates/singleFluidCHT/templates/materials/copper/radiationProperties new file mode 100644 index 000000000..133ef8942 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/materials/copper/radiationProperties @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiationModel opaqueSolid; + +absorptionEmissionModel constantAbsorptionEmission; + +constantAbsorptionEmissionCoeffs +{ + absorptivity absorptivity [ 0 -1 0 0 0 0 0 ] 0.0; + emissivity emissivity [ 0 -1 0 0 0 0 0 ] 0.1; + E E [ 1 -1 -3 0 0 0 0 ] 0; +} + +scatterModel none; + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/materials/copper/thermophysicalProperties b/etc/templates/singleFluidCHT/templates/materials/copper/thermophysicalProperties new file mode 100644 index 000000000..e84e90a23 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/materials/copper/thermophysicalProperties @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heSolidThermo; + mixture pureMixture; + transport constIso; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 63.5; // [g/mol] + } + + transport + { + kappa 380; // [W/(m K)] + } + + thermodynamics + { + Hf 0; + Cp 385; // [J/(kg K)] + } + + equationOfState + { + rho 8940; // [kg/m3] + } +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/materials/water/radiationProperties b/etc/templates/singleFluidCHT/templates/materials/water/radiationProperties new file mode 100644 index 000000000..389436c07 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/materials/water/radiationProperties @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiation off; + +radiationModel P1; + +solverFreq 1; + +absorptionEmissionModel constantAbsorptionEmission; + +constantAbsorptionEmissionCoeffs +{ + absorptivity absorptivity [0 -1 0 0 0 0 0] 0.5; + emissivity emissivity [0 -1 0 0 0 0 0] 0.5; + E E [1 -1 -3 0 0 0 0] 0; +} + +scatterModel none; + +sootModel none; + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/materials/water/thermophysicalProperties b/etc/templates/singleFluidCHT/templates/materials/water/thermophysicalProperties new file mode 100644 index 000000000..e3594523e --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/materials/water/thermophysicalProperties @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 18.0; // [g/mol] + } + thermodynamics + { + Cp 4181; // [J/(kg K)] at T = 293 K + Hf 0; + } + transport + { + mu 1.0e-03; // [kg/(m s)] + Pr 0.7; + } +} + + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/materials/water/turbulenceProperties b/etc/templates/singleFluidCHT/templates/materials/water/turbulenceProperties new file mode 100644 index 000000000..f0add28ce --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/materials/water/turbulenceProperties @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + printCoeffs on; +} + +LES +{ + LESModel SpalartAllmarasDDES; + delta cubeRootVol; + + turbulence on; + printCoeffs on; + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/system/fluid/fvSchemes b/etc/templates/singleFluidCHT/templates/system/fluid/fvSchemes new file mode 100644 index 000000000..7eea7b159 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/system/fluid/fvSchemes @@ -0,0 +1,86 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + // for transient, replace steadyState, e.g. with Euler + default steadyState; +} + +gradSchemes +{ + default Gauss linear; + + limited cellLimited Gauss linear 1; + grad(U) $limited; + grad(k) $limited; + grad(omega) $limited; + grad(epsilon) $limited; +} + +divSchemes +{ + default none; + + // for transient, remove "bounded" + div(phi,U) bounded Gauss linearUpwind limited; + + // for transient, remove "bounded" + turbulence bounded Gauss limitedLinear 1; + div(phi,k) $turbulence; + div(phi,omega) $turbulence; + div(phi,epsilon) $turbulence; + + div(phi,e) $turbulence; + div(phi,h) $turbulence; + div(phi,K) $turbulence; + div(phi,Ekp) $turbulence; + + div(phid,p) Gauss upwind; + + // for transient, remove "bounded" + div((phi|interpolate(rho)),p) bounded Gauss upwind; + + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p ; +} + +wallDist +{ + method meshWave; +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/system/fluid/fvSolution b/etc/templates/singleFluidCHT/templates/system/fluid/fvSolution new file mode 100644 index 000000000..dbfca8fea --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/system/fluid/fvSolution @@ -0,0 +1,105 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "(rho|rhoFinal)" + { + solver PCG + preconditioner DIC; + tolerance 1e-7; + relTol 0; + } + + p_rgh + { + solver GAMG; + tolerance 1e-7; + relTol 0.01; + + smoother GaussSeidel; + maxIter 100; + } + + "(U|h|e|k|omega|epsilon)" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-6; + relTol 0.1; + } + + G + { + $p_rgh; + tolerance 1e-5; + relTol 0.1; + } + + p_rghFinal + { + $p_rgh; +// relTol 0; // for transient cases + } + + "(U|h|e|k|omega|epsilon)Final" + { + $U; +// relTol 0; // for transient cases + } + + GFinal + { + $G; +// relTol 0; // for transient cases + } +} + +PIMPLE +{ + momentumPredictor yes; + + nCorrectors 1; // typically set to 2 for transient + nNonOrthogonalCorrectors 0; // typically set to 1 for transient + +// Reference values for closed domains +// pRefCell 0; +// pRefValue 1e5; + +// Limiting pressure for stability, typically at start up +// pMaxFactor 2; +// pMinFactor 0.1; +} + +relaxationFactors +{ + fields + { + "rho.*" 1.0; + "p_rgh.*" 0.7; + } + equations + { + "U.*" 0.3; + "h.*" 0.7; + "(k|epsilon|omega).*" 0.7; + } +} + +// For transient cases, use +// relaxationFactors { equations { ".*" 1; } } + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/system/solid/fvOptions b/etc/templates/singleFluidCHT/templates/system/solid/fvOptions new file mode 100644 index 000000000..3a238825b --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/system/solid/fvOptions @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object porousZone; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +fixedTemperature +{ + type fixedTemperatureConstraint; + active no; + selectionMode all; + + mode uniform; + + temperature constant 300; // Set temperature (K) +} + +fixedPower +{ + type scalarSemiImplicitSource; + active no; + selectionMode all; + + volumeMode absolute; + + power 100; // Set power (W) + + injectionRateSuSp + { + e ($power 0); + h ($power 0); + } +} + +//************************************************************************** // diff --git a/etc/templates/singleFluidCHT/templates/system/solid/fvSchemes b/etc/templates/singleFluidCHT/templates/system/solid/fvSchemes new file mode 100644 index 000000000..ecefad0bf --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/system/solid/fvSchemes @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + // for transient, replace steadyState, e.g. with Euler + default steadyState; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; +} + +laplacianSchemes +{ + default Gauss linear uncorrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default uncorrected; +} + +// ************************************************************************* // diff --git a/etc/templates/singleFluidCHT/templates/system/solid/fvSolution b/etc/templates/singleFluidCHT/templates/system/solid/fvSolution new file mode 100644 index 000000000..f15cb5dc2 --- /dev/null +++ b/etc/templates/singleFluidCHT/templates/system/solid/fvSolution @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "(h|e)" + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0.1; + } + + "(h|e)Final" + { + $h; +// relTol 0; // for transient cases + } +} + +PIMPLE +{ + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + equations + { + "(h|e).*" 0.7; + } +} + +// For transient cases, use +// relaxationFactors { equations { ".*" 1; } } + +// ************************************************************************* //