coolingCylinder2D: New conjugate heat transfer example of a solid cylinder cooled by water.
This tutorial demonstrates multi-region meshing using blockMesh and solves transient heat transfer to steady-state.
This commit is contained in:
@ -0,0 +1,53 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 297;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
kappa kappa;
|
||||
Tnbr T;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Uinlet (0.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 $internalField;
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alphat;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
"(inlet|outlet)"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
kInlet 0.02;
|
||||
intensityInlet 0.01;
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0.02;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.01;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
"(inlet|outlet)"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object omega;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 10;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type turbulentMixingLengthFrequencyInlet;
|
||||
mixingLength 0.0035;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type omegaWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
"(inlet|outlet)"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
$inlet;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
$inlet;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 0 0 1 0 0 0 ];
|
||||
|
||||
internalField uniform 297;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wall
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
kappa kappa;
|
||||
Tnbr T;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
14
tutorials/heatTransfer/chtMultiRegionFoam/coolingCylinder2D/Allclean
Executable file
14
tutorials/heatTransfer/chtMultiRegionFoam/coolingCylinder2D/Allclean
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
|
||||
rm -f 0/cellToRegion
|
||||
|
||||
for region in fluid solid
|
||||
do
|
||||
rm -rf 0/${region}/cellToRegion constant/${region}/polyMesh
|
||||
done
|
||||
18
tutorials/heatTransfer/chtMultiRegionFoam/coolingCylinder2D/Allrun
Executable file
18
tutorials/heatTransfer/chtMultiRegionFoam/coolingCylinder2D/Allrun
Executable 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
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication topoSet
|
||||
|
||||
runApplication splitMeshRegions -cellZones -defaultRegionName fluid -overwrite
|
||||
|
||||
paraFoam -region fluid -touch
|
||||
paraFoam -region solid -touch
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,20 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value (0 -9.81 0);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,27 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object momentumTransport;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
{
|
||||
model kOmegaSST;
|
||||
|
||||
turbulence on;
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class uniformDimensionedScalarField;
|
||||
location "constant";
|
||||
object pRef;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
value 1e5;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo eConst;
|
||||
equationOfState rhoConst;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 18; // [g/mol]
|
||||
}
|
||||
equationOfState
|
||||
{
|
||||
rho 998.19; // [kg/m^3]
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cv 4150; // [J/kg/K]
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 1.0005e-3; // [kg/m/s]
|
||||
Pr 6.31;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,26 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalTransport;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RAS
|
||||
{
|
||||
model eddyDiffusivity;
|
||||
|
||||
Prt 0.85;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object regionProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
regions
|
||||
(
|
||||
fluid ( fluid )
|
||||
solid ( solid )
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvOptions;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
cylinderHeat
|
||||
{
|
||||
type semiImplicitSource;
|
||||
selectionMode all;
|
||||
volumeMode specific;
|
||||
power 5e7;
|
||||
|
||||
sources
|
||||
{
|
||||
e
|
||||
{
|
||||
explicit $power;
|
||||
implicit 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//************************************************************************** //
|
||||
@ -0,0 +1,53 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heSolidThermo;
|
||||
mixture pureMixture;
|
||||
transport constIso;
|
||||
thermo eConst;
|
||||
equationOfState rhoConst;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 63.5; // [g/mol]
|
||||
}
|
||||
|
||||
transport
|
||||
{
|
||||
kappa 380; // [W/m/K]
|
||||
}
|
||||
|
||||
thermodynamics
|
||||
{
|
||||
Hf 0;
|
||||
Cv 385; // [J/kg/K]
|
||||
}
|
||||
|
||||
equationOfState
|
||||
{
|
||||
rho 8940; // [kg/m^3]
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,194 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
cylinderRadius 0.005; // Radius of the cylinder
|
||||
halfWidth 0.04; // Half the width of the domain
|
||||
halfThickness 0.0025; // Half of domain thickness
|
||||
xMax 0.1; // Maximum size of outer box in streamwise direction
|
||||
cylinderBox 0.002; // Half width of box projected outwards onto the
|
||||
// cylinder
|
||||
|
||||
cylinderBoxCells 15; // Cells across cylinder
|
||||
cylinderRadialCells 12; // Cells cylinder radially
|
||||
upstreamCells 30; // Cells across width of outer box
|
||||
downstreamCells 20; // Cells downstream of the cylinder
|
||||
|
||||
radialGrading 20; // Expansion ratio in outer region, radial direction
|
||||
|
||||
negHalfWidth #neg $halfWidth;
|
||||
negHalfThickness #neg $halfThickness;
|
||||
negSphereBox #neg $cylinderBox;
|
||||
|
||||
|
||||
geometry
|
||||
{
|
||||
cylinder
|
||||
{
|
||||
type searchableCylinder;
|
||||
point1 (0 0 -100);
|
||||
point2 (0 0 100);
|
||||
radius $cylinderRadius;
|
||||
}
|
||||
}
|
||||
|
||||
vertices
|
||||
(
|
||||
project ($negSphereBox $negSphereBox $negHalfThickness) (cylinder) // 0
|
||||
project ($cylinderBox $negSphereBox $negHalfThickness) (cylinder) // 1
|
||||
project ($negSphereBox $negSphereBox $halfThickness ) (cylinder) // 2
|
||||
project ($cylinderBox $negSphereBox $halfThickness ) (cylinder) // 3
|
||||
|
||||
project ($negSphereBox $cylinderBox $negHalfThickness) (cylinder) // 4
|
||||
project ($cylinderBox $cylinderBox $negHalfThickness) (cylinder) // 5
|
||||
project ($negSphereBox $cylinderBox $halfThickness ) (cylinder) // 6
|
||||
project ($cylinderBox $cylinderBox $halfThickness ) (cylinder) // 7
|
||||
|
||||
($negHalfWidth $negHalfWidth $negHalfThickness) // 8
|
||||
($halfWidth $negHalfWidth $negHalfThickness) // 9
|
||||
($negHalfWidth $negHalfWidth $halfThickness ) // 10
|
||||
($halfWidth $negHalfWidth $halfThickness ) // 11
|
||||
|
||||
($negHalfWidth $halfWidth $negHalfThickness) // 12
|
||||
($halfWidth $halfWidth $negHalfThickness) // 13
|
||||
($negHalfWidth $halfWidth $halfThickness ) // 14
|
||||
($halfWidth $halfWidth $halfThickness ) // 15
|
||||
|
||||
($xMax $negHalfWidth $negHalfThickness) // 16
|
||||
($xMax $negHalfWidth $halfThickness ) // 17
|
||||
($xMax $halfWidth $negHalfThickness) // 18
|
||||
($xMax $halfWidth $halfThickness ) // 19
|
||||
|
||||
($negSphereBox $negSphereBox $negHalfThickness) // 20
|
||||
($cylinderBox $negSphereBox $negHalfThickness) // 21
|
||||
($cylinderBox $negSphereBox $halfThickness ) // 22
|
||||
($negSphereBox $negSphereBox $halfThickness ) // 23
|
||||
|
||||
($negSphereBox $cylinderBox $negHalfThickness) // 24
|
||||
($cylinderBox $cylinderBox $negHalfThickness) // 25
|
||||
($cylinderBox $cylinderBox $halfThickness ) // 26
|
||||
($negSphereBox $cylinderBox $halfThickness ) // 27
|
||||
);
|
||||
|
||||
expandBlock simpleGrading (1 $radialGrading 1);
|
||||
reg simpleGrading (1 1 1);
|
||||
|
||||
blocks
|
||||
(
|
||||
// Fluid region
|
||||
hex (4 6 14 12 0 2 10 8) (1 $upstreamCells $cylinderBoxCells) $expandBlock
|
||||
hex (7 5 13 15 3 1 9 11) (1 $upstreamCells $cylinderBoxCells) $expandBlock
|
||||
hex (2 3 11 10 0 1 9 8) ($cylinderBoxCells $upstreamCells 1) $expandBlock
|
||||
hex (7 6 14 15 5 4 12 13) ($cylinderBoxCells $upstreamCells 1) $expandBlock
|
||||
hex (13 18 19 15 9 16 17 11) ($downstreamCells 1 $cylinderBoxCells) $reg
|
||||
|
||||
// Solid region
|
||||
hex (24 25 26 27 20 21 22 23) ($cylinderBoxCells 1 $cylinderBoxCells) $reg
|
||||
hex (0 2 23 20 4 6 27 24) (1 $cylinderRadialCells $cylinderBoxCells) $reg
|
||||
hex (21 22 3 1 25 26 7 5) (1 $cylinderRadialCells $cylinderBoxCells) $reg
|
||||
hex (0 2 3 1 20 23 22 21) (1 $cylinderBoxCells $cylinderRadialCells) $reg
|
||||
hex (4 5 7 6 24 25 26 27) ($cylinderBoxCells 1 $cylinderRadialCells) $reg
|
||||
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
project 0 2 (cylinder)
|
||||
project 2 3 (cylinder)
|
||||
project 3 1 (cylinder)
|
||||
project 1 0 (cylinder)
|
||||
project 4 6 (cylinder)
|
||||
project 6 7 (cylinder)
|
||||
project 7 5 (cylinder)
|
||||
project 5 4 (cylinder)
|
||||
project 0 4 (cylinder)
|
||||
project 2 6 (cylinder)
|
||||
project 3 7 (cylinder)
|
||||
project 1 5 (cylinder)
|
||||
);
|
||||
|
||||
faces
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(8 10 14 12)
|
||||
);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(16 17 19 18)
|
||||
);
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(8 9 11 10)
|
||||
(12 13 15 14)
|
||||
(9 16 17 11)
|
||||
(13 18 19 15)
|
||||
);
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
// Side 1
|
||||
(10 14 6 2)
|
||||
(14 6 7 15)
|
||||
(15 7 3 11)
|
||||
(3 11 10 2)
|
||||
(15 11 17 19)
|
||||
(6 7 27 26)
|
||||
(27 6 2 23)
|
||||
(2 23 22 3)
|
||||
(3 22 26 7)
|
||||
(26 27 23 22)
|
||||
|
||||
// Side 2
|
||||
(12 13 5 4)
|
||||
(8 12 4 0)
|
||||
(9 8 0 1)
|
||||
(13 9 1 5)
|
||||
(4 5 25 24)
|
||||
(0 4 24 20)
|
||||
(1 0 20 21)
|
||||
(5 1 21 25)
|
||||
(21 20 24 25)
|
||||
(18 16 9 13)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,61 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application chtMultiRegionFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 20;
|
||||
|
||||
deltaT 0.01;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 8;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
adjustTimeStep no;
|
||||
|
||||
maxCo 5;
|
||||
|
||||
maxDi 200;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
functions
|
||||
{
|
||||
#includeFunc "patchAverage(funcName=cylinderT, region=fluid, name=fluid_to_solid, field=T)"
|
||||
#includeFunc "patchAverage(funcName=inletU, region=fluid, name=inlet, field=U)"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,74 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
|
||||
limited cellLimited Gauss linear 1;
|
||||
grad(U) $limited;
|
||||
grad(k) $limited;
|
||||
grad(omega) $limited;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(phi,U) Gauss linearUpwind limited;
|
||||
|
||||
turbulence Gauss limitedLinear 1;
|
||||
div(phi,k) $turbulence;
|
||||
div(phi,omega) $turbulence;
|
||||
div(phi,e) $turbulence;
|
||||
div(phi,K) $turbulence;
|
||||
|
||||
div(phiv,p) 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;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,76 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ 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|e|k|omega)"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-6;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
$p_rgh;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|e|k|omega)Final"
|
||||
{
|
||||
$U;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 1;
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
equations
|
||||
{
|
||||
".*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
"(PIMPLE|PISO)"
|
||||
{
|
||||
nOuterCorrectors 1;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear uncorrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default uncorrected;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
e
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-06;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
eFinal
|
||||
{
|
||||
$e;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
equations
|
||||
{
|
||||
".*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "$FOAM_CASE/system/blockMeshDict"
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name cs;
|
||||
type cellSet;
|
||||
action new;
|
||||
source cylinderToCell;
|
||||
sourceInfo
|
||||
{
|
||||
p1 (0 0 -100);
|
||||
p2 (0 0 100);
|
||||
centre (0 0 0);
|
||||
radius $cylinderRadius;
|
||||
}
|
||||
}
|
||||
{
|
||||
name solid;
|
||||
type cellZoneSet;
|
||||
action new;
|
||||
source setToCellZone;
|
||||
sourceInfo { set cs; }
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user