nonConformalCHT: new template case for CHT using NCC interface

The nonConformalCHT template case is designed to help create a conjugate
heat transfer (CHT) simulation in which fluid and solid regions are
coupled with non-conformal coupled (NCC) interfaces.  It includes an
Allmesh script which provides example commands to generate the meshes
for the fluid and solid regions using the 'snappyHexMeshConfig' utility,
and to generate NCC interfaces using 'createNonConformalCouples'.  The
remaining workflow to configure and run the CHT simulation is similar to
the 'singleFluidCHT' template case.
This commit is contained in:
Chris Greenshields
2025-01-31 12:27:12 +00:00
parent f05ff64c91
commit c25313dc14
50 changed files with 1941 additions and 0 deletions

View File

@ -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 ()
{
_regionDirs="$(foamDictionary -keywords constant/materialProperties)"
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 system/regionSolvers > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,33 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. "$WM_PROJECT_DIR/bin/tools/RunFunctions"
# !! Example !! meshing workflow for one solid and one fluid region
# !! Requires customization !!
region=solid
runApplication -suffix $region snappyHexMeshConfig \
-surface "constant/geometry/$region.obj" \
-region $region \
-defaultPatch "($region wall)"
# Other common options
# -minDimCells <n>
# -insidePoint '<(0 0 0)>'
region=fluid
runApplication -suffix $region snappyHexMeshConfig \
-region $region \
-layers '((solid 2))'
for region in solid fluid
do
runApplication -suffix $region blockMesh -region $region
runApplication -suffix $region snappyHexMesh -region $region -overwrite
done
runApplication createNonConformalCouples -overwrite
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,18 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. "$WM_PROJECT_DIR/bin/tools/RunFunctions"
./Allmesh
runApplication foamSetupCHT
runApplication "$(getApplication)"
echo
echo "Creating files for paraview post-processing"
echo
paraFoam -touchAll
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,84 @@
Overview
========
+ This is a template case for conjugate heat transfer (CHT), where mesh
regions are connected with non-conformal coupled (NCC) interfaces
+ The case is setup for a single solid region and a single fluid region; it
can be extended to include multiple solid and fluid regions
+ The Allmesh script demonstrates an example workflow for meshing the solid
and fluid regions
+ The foamSetupCHT utility is used to setup the field and material property
files, by copying them from the templates directory
+ The Allrun script demonstrates the commands to be run
Meshing Strategy
================
+ snappyHexMeshConfig is used to create blockMeshDict and snappyHexMeshDict
files for each of the solid and fluid regions
+ blockMesh and snappyHexMesh are used to create meshes for the individual
regions separately
+ snappyHexMeshConfig requires a surface geometry file for each of the mesh
regions. In the example provided in the 'Allmesh' script, 'solid.obj' is the
geometry file for the solid region
+ The .obj files should be saved in the 'constant/geometry' directory
+ The blockMeshDict and snappyHexMeshDict files are created by
snappyHexMeshConfig in sub-directories of the system directory
e.g. system/solid/blockMeshDict for the solid region
+ The regions are meshed separately by providing the '-region' flag to
blockMesh and snappyHexMesh e.g 'blockMesh -region solid'
+ The solid and fluid meshes are created in sub-directories of the constant
directory e.g. constant/solid/polyMesh
+ The Allmesh script can be extended to add more regions, or modified to
change the meshing strategy for individual regions
+ After the region meshes have been created, createNonConformalCouples is used
to connect the region meshes together
Initialisation
==============
+ The majority of the case initialisation is performed by the foamSetupCHT
utility, after the region meshes have been created
+ foamSetupCHT requires the user to configure a 'materialProperties' file
that includes a dictionary entry for each region
+ The dictionary entry for each region should contain:
+ name of solver: e.g. fluid or solid
+ name of material: e.g. air or aluminium
+ The material for each region can be selected from the configured materials
in the templates/materials directory
+ After configuring the materialProperties file, run the foamSetupCHT utility
+ foamSetupCHT generates region sub-directories in the 0, system and constant
directories
+ The default models and configuration (e.g. fvSchemes) for each region are
generally reliable
+ However, the user must pay attention to field files (U, T, k, omega, etc),
as the boundary conditions and initial conditions in these files are common
causes of numerical problems
+ The NCC patches (e.g. NCC1) are added to the "mapped" group when they are
created
+ The patches which aren't coupled are added to the "wall" group when they are
created
+ External wall boundaries are added to the "externalWall" group when they are
created
+ The patch groups are used to simplify the boundary conditions in the field
files (e.g. 0/fluid/T), and clearly distinguish between NCC patches and
other patches
Source Terms
============
+ Example fvModels files are included:
+ solid region: 'heatSourceTotal' and 'heatSourceDensity' heat sources
+ fluid region: 'thermalRadiation' radiative heat transfer
+ The example fvModels are switched off by default
Running the Solver
==================
+ The case uses foamMultiRun, 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:
+ fvSchemes: select a suitable ddtScheme (e.g. Euler)
+ controlDict: select a suitable deltaT and endTime
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.

View File

@ -0,0 +1,23 @@
/*--------------------------------*- 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 heatSource;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type heatSource;
select all;
// Power per unit volume [W/m^3]
q <10>;
//************************************************************************** //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- 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 heatSource;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type heatSource;
select all;
// Total power [W]
Q <100>;
//************************************************************************** //

View File

@ -0,0 +1,19 @@
/*--------------------------------*- 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 initialConditions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Tinitial 300;
pInitial 1e5;
// ************************************************************************* //

View File

@ -0,0 +1,28 @@
/*--------------------------------*- 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 materialProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
fluid
{
solver fluid;
material air;
}
solid
{
solver solid;
material copper;
}
// ************************************************************************* //

View File

@ -0,0 +1,19 @@
/*--------------------------------*- 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 heatSource;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type radiation;
libs ("libradiationModels.so");
//************************************************************************** //

View File

@ -0,0 +1,49 @@
/*--------------------------------*- 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 controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application foamMultiRun;
#includeIfPresent "regionSolvers"
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 500;
deltaT 1;
writeControl timeStep;
writeInterval 50;
purgeWrite 5;
writeFormat ascii;
writePrecision 8;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -0,0 +1,28 @@
/*--------------------------------*- 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 createNonConformalCouplesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
fields no;
nonConformalCouples
{
NCC1
{
regions (solid fluid);
patches (solid solid);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,32 @@
/*--------------------------------*- 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 decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method scotch;
simpleCoeffs
{
n (2 2 1);
}
hierarchicalCoeffs
{
n (2 2 1);
order xyz;
}
// ************************************************************************* //

View File

@ -0,0 +1,16 @@
/*--------------------------------*- 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 functions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
}
gradSchemes
{
}
divSchemes
{
}
laplacianSchemes
{
}
interpolationSchemes
{
}
snGradSchemes
{
}
fluxRequired
{
}
// ************************************************************************* //

View File

@ -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;
}
// ************************************************************************* //

View File

@ -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 meshQualityDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#includeEtc "caseDicts/mesh/generation/meshQualityDict.cfg"
//- minFaceWeight (0 -> 0.5)
//minFaceWeight 0.02;
// ************************************************************************* //

View File

@ -0,0 +1,49 @@
/*--------------------------------*- 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 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 lookup;
emissivity uniform 1.0;
value uniform 0;
}
externalWall
{
type MarshakRadiation;
emissivityMode lookup;
emissivity uniform 1.0;
value uniform 0;
}
#includeEtc "caseDicts/setConstraintTypes"
}
// ************************************************************************* //

View File

@ -0,0 +1,49 @@
/*--------------------------------*- 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 IDefault;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 0 -3 0 0 0 0];
internalField uniform 0;
boundaryField
{
"(inlet|outlet)"
{
type greyDiffusiveRadiation;
emissivityMode lookup;
emissivity uniform 1.0;
value uniform 0;
}
wall
{
type greyDiffusiveRadiation;
emissivityMode lookup;
emissivity uniform 1.0;
value uniform 0;
}
externalWall
{
type greyDiffusiveRadiation;
emissivityMode lookup;
emissivity uniform 1.0;
value uniform 0;
}
#includeEtc "caseDicts/setConstraintTypes"
}
// ************************************************************************* //

View File

@ -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 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 zeroGradient;
}
mapped
{
type coupledTemperature;
value uniform $Tinitial;
}
externalWall
{
type fixedValue;
value uniform $Tinitial;
}
#includeEtc "caseDicts/setConstraintTypes"
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Uinlet 1;
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
inlet
{
type flowRateInletVelocity;
meanVelocity constant $Uinlet;
value uniform (0 0 0);
}
outlet
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
wall
{
type noSlip;
}
#includeEtc "caseDicts/setConstraintTypes"
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- 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 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"
}
// ************************************************************************* //

View File

@ -0,0 +1,49 @@
/*--------------------------------*- 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 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"
}
// ************************************************************************* //

View File

@ -0,0 +1,49 @@
/*--------------------------------*- 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 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"
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- 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 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"
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 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"
}
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*--------------------------------*- 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "$FOAM_CASE/constant/initialConditions"
dimensions [1 -1 -2 0 0 0 0];
internalField uniform $pInitial;
boundaryField
{
outlet
{
type calculated;
value $internalField;
}
inlet
{
type calculated;
value $internalField;
}
wall
{
type calculated;
value $internalField;
}
#includeEtc "caseDicts/setConstraintTypes"
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- 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
{
outlet
{
type entrainmentPressure;
p0 $internalField;
value $internalField;
}
inlet
{
type fixedFluxPressure;
value $internalField;
}
wall
{
$inlet;
}
#includeEtc "caseDicts/setConstraintTypes"
}
// ************************************************************************* //

View File

@ -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 volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "$FOAM_CASE/constant/initialConditions"
dimensions [ 0 0 0 1 0 0 0 ];
internalField uniform $Tinitial;
boundaryField
{
wall
{
type zeroGradient;
}
mapped
{
type coupledTemperature;
value $internalField;
}
#includeEtc "caseDicts/setConstraintTypes"
}
// ************************************************************************* //

View File

@ -0,0 +1,18 @@
/*--------------------------------*- 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 fvModels;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// #includeModel thermalRadiation
//************************************************************************** //

View File

@ -0,0 +1,19 @@
/*--------------------------------*- 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;
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value (0 0 -9.81);
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "$FOAM_CASE/constant/initialConditions"
dimensions [1 -1 -2 0 0 0 0];
value $pInitial;
// ************************************************************************* //

View File

@ -0,0 +1,18 @@
/*--------------------------------*- 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 fvModels;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// #includeModel heatSourceTotal(Q=100)
//************************************************************************** //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 momentumTransport;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
model kOmegaSST;
turbulence on;
}
LES
{
model SpalartAllmarasDDES;
delta cubeRootVol;
turbulence on;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
maxDeltaRatio 1.1;
}
}
// ************************************************************************* //

View File

@ -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;
object physicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState perfectGas;
specie specie;
energy sensibleEnthalpy;
}
mixture
{
specie
{
nMoles 1;
molWeight 28.9; // [kg/kmol]
}
thermodynamics
{
Cp 1005; // [J/kg/K]
hf 0;
}
transport
{
mu 1.8e-05; // [kg/m/s]
Pr 0.7;
}
}
// ************************************************************************* //

View File

@ -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;
location "constant";
object radiationProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiationModel none; // P1, fvDOM;
solverFreq 10;
absorptionEmissionModel constant;
constantCoeffs
{
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;
}
fvDOMCoeffs
{
nPhi 3;
nTheta 3;
tolerance 1e-3;
maxIter 10;
}
scatterModel none;
sootModel none;
// ************************************************************************* //

View File

@ -0,0 +1,25 @@
/*--------------------------------*- 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 thermophysicalTransport;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RAS
{
model eddyDiffusivity;
Prt 0.85;
}
// ************************************************************************* //

View File

@ -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 dictionary;
object physicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heSolidThermo;
mixture pureMixture;
transport constIsoSolid;
thermo eConst;
equationOfState rhoConst;
specie specie;
energy sensibleInternalEnergy;
}
mixture
{
specie
{
nMoles 1;
molWeight 27; // [kg/kmol]
}
transport
{
kappa 240; // [W/m/K]
}
thermodynamics
{
hf 0;
Cv 896; // [J/kg/K]
}
equationOfState
{
rho 2712; // [kg/m^3]
}
}
// ************************************************************************* //

View File

@ -0,0 +1,29 @@
/*--------------------------------*- 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 radiationProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiationModel none; // opaqueSolid;
absorptionEmissionModel constant;
constantCoeffs
{
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;
// ************************************************************************* //

View File

@ -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 dictionary;
object physicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heSolidThermo;
mixture pureMixture;
transport constIsoSolid;
thermo eConst;
equationOfState rhoConst;
specie specie;
energy sensibleInternalEnergy;
}
mixture
{
specie
{
nMoles 1;
molWeight 63.5; // [kg/kmol]
}
transport
{
kappa 380; // [W/m/K]
}
thermodynamics
{
hf 0;
Cv 385; // [J/kg/K]
}
equationOfState
{
rho 8940; // [kg/m^3]
}
}
// ************************************************************************* //

View File

@ -0,0 +1,29 @@
/*--------------------------------*- 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 radiationProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiationModel none; // opaqueSolid;
absorptionEmissionModel constant;
constantCoeffs
{
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;
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 momentumTransport;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
model kOmegaSST;
turbulence on;
}
LES
{
model SpalartAllmarasDDES;
delta cubeRootVol;
turbulence on;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
maxDeltaRatio 1.1;
}
}
// ************************************************************************* //

View File

@ -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;
object physicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo eConst;
equationOfState rPolynomial;
specie specie;
energy sensibleInternalEnergy;
}
mixture
{
specie
{
nMoles 1;
molWeight 18.0; // [kg/kmol]
}
equationOfState
{
C (0.001278 -2.1055e-06 3.9689e-09 4.3772e-13 -2.0225e-16); // [J/kg/K]
}
thermodynamics
{
Cv 4181; // [J/kg/K] at T = 293 K
hf 0;
}
transport
{
mu 1.0e-03; // [kg/m/s]
Pr 7;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,34 @@
/*--------------------------------*- 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 radiationProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiationModel none; // P1;
solverFreq 10;
absorptionEmissionModel constant;
constantCoeffs
{
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;
// ************************************************************************* //

View File

@ -0,0 +1,25 @@
/*--------------------------------*- 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 thermophysicalTransport;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RAS
{
model eddyDiffusivity;
Prt 0.85;
}
// ************************************************************************* //

View File

@ -0,0 +1,96 @@
/*--------------------------------*- 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 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 steady-state, use the bounded form of advection schemes
#ifeq $!ddtSchemes/default steadyState
div(phi,U) bounded Gauss linearUpwind limited;
turbulence bounded Gauss limitedLinear 1;
#else
div(phi,U) Gauss linearUpwind limited;
turbulence Gauss limitedLinear 1;
#endif
// Schemes for incompressible solvers
div(phi,k) $turbulence;
div(phi,omega) $turbulence;
div(phi,epsilon) $turbulence;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
// Additional schemes for compressible solvers
div(phi,e) $turbulence;
div(phi,h) $turbulence;
div(phi,K) $turbulence;
div(phi,Ekp) $turbulence;
div(phid,p) Gauss upwind;
#ifeq $!ddtSchemes/default steadyState
div(phi,(p|rho)) bounded Gauss upwind;
div(Ji,Ii_h) bounded Gauss linearUpwind grad(Ii_h);
#else
div(phi,(p|rho)) Gauss upwind;
div(Ji,Ii_h) Gauss linearUpwind grad(Ii_h);
#endif
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;
}
// ************************************************************************* //

View File

@ -0,0 +1,116 @@
/*--------------------------------*- 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
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|Ii.*)"
{
$p_rgh;
tolerance 1e-7;
relTol 0.1;
}
p_rghFinal
{
$p_rgh;
relTol 0;
}
"(U|h|e|k|omega|epsilon)Final"
{
$U;
relTol 0;
}
GFinal
{
$G;
relTol 0;
}
}
// timeScheme = steadyState for a steady-state simulation; otherwise transient
timeScheme $fvSchemes!ddtSchemes/default;
PIMPLE
{
momentumPredictor yes;
nNonOrthogonalCorrectors 0;
// Steady-state and transient correctors
#ifeq $timeScheme steadyState
nOuterCorrectors 1;
nCorrectors 1;
#else
nOuterCorrectors 2;
nCorrectors 2;
#endif
}
// Relaxation factors for incompressible and compressible solution
#ifeq $timeScheme steadyState
relaxationFactors
{
fields
{
p 0.3;
rho 1.0;
}
equations
{
U 0.3;
"(e|h|k|epsilon|omega)" 0.7;
"G" 1.0;
"ILambda.*" 1.0;
}
}
#else
relaxationFactors
{
// Transient relaxation factors
equations
{
".*" 1;
}
}
#endif
// ************************************************************************* //

View File

@ -0,0 +1,29 @@
/*--------------------------------*- 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 fvConstraints;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
/*
fixedTemperature
{
type fixedTemperature;
select all;
mode uniform;
temperature constant 300; // Set temperature (K)
}
*/
//************************************************************************** //

View File

@ -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;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
// For transient, replace steadyState, e.g. with Euler
default steadyState;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"(h|e)"
{
solver GAMG;
tolerance 1e-6;
relTol 0.1;
smoother GaussSeidel;
}
"(h|e)Final"
{
$h;
relTol 0;
}
}
PIMPLE
{
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
equations
{
".*" 0.7;
}
}
// ************************************************************************* //