mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: 1) Adding self extrusion and defaulting some inputs in 3D thermal baffles
2) Changing 1D steady baffle to mixture BC and simplifying inputs
3) Reorganizing circuitBoardCooling tutorial
This commit is contained in:
@ -47,14 +47,15 @@ extrudePatchMesh::extrudePatchMesh
|
|||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const fvPatch& patch,
|
const fvPatch& patch,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const word regionName
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fvMesh
|
fvMesh
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
dict.lookup("region"),
|
regionName,
|
||||||
mesh.facesInstance(),
|
mesh.facesInstance(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,12 +25,11 @@ Class
|
|||||||
extrudePatchMesh
|
extrudePatchMesh
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Mesh at a patch created on the fly. The following entried should be used
|
Mesh at a patch created on the fly. The following entry should be used
|
||||||
on the field boundary dictionary:
|
on the field boundary dictionary:
|
||||||
|
|
||||||
// New Shell mesh data
|
// New Shell mesh data
|
||||||
|
|
||||||
region "regionMesh";
|
|
||||||
extrudeModel linearNormal;
|
extrudeModel linearNormal;
|
||||||
linearNormalCoeffs
|
linearNormalCoeffs
|
||||||
{
|
{
|
||||||
@ -120,7 +119,8 @@ public:
|
|||||||
(
|
(
|
||||||
const fvMesh&,
|
const fvMesh&,
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const dictionary&
|
const dictionary&,
|
||||||
|
const word
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,9 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
-lregionModels \
|
-lregionModels \
|
||||||
@ -16,4 +18,5 @@ LIB_LIBS = \
|
|||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lOpenFOAM \
|
-lOpenFOAM \
|
||||||
-lradiationModels
|
-lradiationModels \
|
||||||
|
-ldynamicMesh
|
||||||
|
|||||||
@ -45,7 +45,8 @@ thermalBaffleFvPatchScalarField
|
|||||||
turbulentTemperatureRadCoupledMixedFvPatchScalarField(p, iF),
|
turbulentTemperatureRadCoupledMixedFvPatchScalarField(p, iF),
|
||||||
owner_(false),
|
owner_(false),
|
||||||
baffle_(),
|
baffle_(),
|
||||||
dict_(dictionary::null)
|
dict_(dictionary::null),
|
||||||
|
extrudeMeshPtr_()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -66,8 +67,9 @@ thermalBaffleFvPatchScalarField
|
|||||||
mapper
|
mapper
|
||||||
),
|
),
|
||||||
owner_(ptf.owner_),
|
owner_(ptf.owner_),
|
||||||
baffle_(ptf.baffle_),
|
baffle_(),
|
||||||
dict_(ptf.dict_)
|
dict_(ptf.dict_),
|
||||||
|
extrudeMeshPtr_()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -82,47 +84,47 @@ thermalBaffleFvPatchScalarField
|
|||||||
turbulentTemperatureRadCoupledMixedFvPatchScalarField(p, iF, dict),
|
turbulentTemperatureRadCoupledMixedFvPatchScalarField(p, iF, dict),
|
||||||
owner_(false),
|
owner_(false),
|
||||||
baffle_(),
|
baffle_(),
|
||||||
dict_(dict)
|
dict_(dict),
|
||||||
|
extrudeMeshPtr_()
|
||||||
{
|
{
|
||||||
if (!isA<mappedPatchBase>(patch().patch()))
|
|
||||||
{
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"thermalBaffleFvPatchScalarField::"
|
|
||||||
"thermalBaffleFvPatchScalarField\n"
|
|
||||||
"(\n"
|
|
||||||
" const fvPatch& p,\n"
|
|
||||||
" const DimensionedField<scalar, volMesh>& iF,\n"
|
|
||||||
" const dictionary& dict\n"
|
|
||||||
")\n"
|
|
||||||
) << "\n patch type '" << patch().type()
|
|
||||||
<< "' not type '" << mappedPatchBase::typeName << "'"
|
|
||||||
<< "\n for patch " << patch().name()
|
|
||||||
<< " of field " << dimensionedInternalField().name()
|
|
||||||
<< " in file " << dimensionedInternalField().objectPath()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
const mappedPatchBase& mpp =
|
|
||||||
refCast<const mappedPatchBase>(patch().patch());
|
|
||||||
|
|
||||||
const word nbrMesh = mpp.sampleRegion();
|
|
||||||
|
|
||||||
const fvMesh& thisMesh = patch().boundaryMesh().mesh();
|
const fvMesh& thisMesh = patch().boundaryMesh().mesh();
|
||||||
|
|
||||||
typedef regionModels::thermalBaffleModels::thermalBaffleModel baffle;
|
typedef regionModels::thermalBaffleModels::thermalBaffleModel baffle;
|
||||||
|
|
||||||
|
if (thisMesh.name() == polyMesh::defaultRegion)
|
||||||
|
{
|
||||||
|
const word regionName =
|
||||||
|
dict_.lookupOrDefault<word>("regionName", "none");
|
||||||
|
|
||||||
|
const word baffleName("3DBaffle" + regionName);
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
thisMesh.name() == polyMesh::defaultRegion
|
!thisMesh.time().foundObject<fvMesh>(regionName)
|
||||||
&& !thisMesh.foundObject<baffle>(nbrMesh)
|
&& regionName != "none"
|
||||||
&& !owner_
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Info << "Creating thermal baffle" << nbrMesh << endl;
|
if (extrudeMeshPtr_.empty())
|
||||||
|
{
|
||||||
|
createPatchMesh();
|
||||||
|
}
|
||||||
|
|
||||||
baffle_.reset(baffle::New(thisMesh, dict).ptr());
|
baffle_.reset(baffle::New(thisMesh, dict).ptr());
|
||||||
owner_ = true;
|
owner_ = true;
|
||||||
baffle_->rename(nbrMesh);
|
baffle_->rename(baffleName);
|
||||||
|
}
|
||||||
|
else if //Backwards compatibility (if region exists)
|
||||||
|
(
|
||||||
|
thisMesh.time().foundObject<fvMesh>(regionName)
|
||||||
|
&& baffle_.empty()
|
||||||
|
&& regionName != "none"
|
||||||
|
)
|
||||||
|
{
|
||||||
|
baffle_.reset(baffle::New(thisMesh, dict).ptr());
|
||||||
|
owner_ = true;
|
||||||
|
baffle_->rename(baffleName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,8 +138,9 @@ thermalBaffleFvPatchScalarField
|
|||||||
:
|
:
|
||||||
turbulentTemperatureRadCoupledMixedFvPatchScalarField(ptf, iF),
|
turbulentTemperatureRadCoupledMixedFvPatchScalarField(ptf, iF),
|
||||||
owner_(ptf.owner_),
|
owner_(ptf.owner_),
|
||||||
baffle_(ptf.baffle_),
|
baffle_(),
|
||||||
dict_(ptf.dict_)
|
dict_(ptf.dict_),
|
||||||
|
extrudeMeshPtr_()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -163,6 +166,36 @@ void thermalBaffleFvPatchScalarField::rmap
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void thermalBaffleFvPatchScalarField::createPatchMesh()
|
||||||
|
{
|
||||||
|
const fvMesh& defaultRegion =
|
||||||
|
db().time().lookupObject<fvMesh>(fvMesh::defaultRegion);
|
||||||
|
|
||||||
|
word regionName = dict_.lookup("regionName");
|
||||||
|
|
||||||
|
extrudeMeshPtr_.reset
|
||||||
|
(
|
||||||
|
new extrudePatchMesh
|
||||||
|
(
|
||||||
|
defaultRegion,
|
||||||
|
patch(),
|
||||||
|
dict_,
|
||||||
|
regionName
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (extrudeMeshPtr_.empty())
|
||||||
|
{
|
||||||
|
WarningIn
|
||||||
|
(
|
||||||
|
"thermalBaffleFvPatchScalarField::createPatchMesh()\n"
|
||||||
|
) << "Specified IOobject::MUST_READ_IF_MODIFIED but class"
|
||||||
|
<< " patchMeshPtr not set."
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void thermalBaffleFvPatchScalarField::updateCoeffs()
|
void thermalBaffleFvPatchScalarField::updateCoeffs()
|
||||||
{
|
{
|
||||||
if (this->updated())
|
if (this->updated())
|
||||||
@ -189,27 +222,35 @@ void thermalBaffleFvPatchScalarField::write(Ostream& os) const
|
|||||||
|
|
||||||
if (thisMesh.name() == polyMesh::defaultRegion && owner_)
|
if (thisMesh.name() == polyMesh::defaultRegion && owner_)
|
||||||
{
|
{
|
||||||
word thermoModel = dict_.lookup("thermalBaffleModel");
|
|
||||||
|
|
||||||
os.writeKeyword("thermalBaffleModel")
|
os.writeKeyword("extrudeModel");
|
||||||
<< thermoModel
|
os << word(dict_.lookup("extrudeModel"))
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
|
|
||||||
|
os.writeKeyword("nLayers");
|
||||||
|
os << readLabel(dict_.lookup("nLayers"))
|
||||||
|
<< token::END_STATEMENT << nl;
|
||||||
|
|
||||||
|
os.writeKeyword("expansionRatio");
|
||||||
|
os << readScalar(dict_.lookup("expansionRatio"))
|
||||||
|
<< token::END_STATEMENT << nl;
|
||||||
|
|
||||||
|
os.writeKeyword("columnCells");
|
||||||
|
os << readBool(dict_.lookup("columnCells"))
|
||||||
|
<< token::END_STATEMENT << nl;
|
||||||
|
|
||||||
|
word extrudeModel(word(dict_.lookup("extrudeModel")) + "Coeffs");
|
||||||
|
os.writeKeyword(extrudeModel);
|
||||||
|
os << dict_.subDict(extrudeModel) << nl;
|
||||||
|
|
||||||
word regionName = dict_.lookup("regionName");
|
word regionName = dict_.lookup("regionName");
|
||||||
os.writeKeyword("regionName") << regionName
|
os.writeKeyword("regionName") << regionName
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
|
|
||||||
bool infoOutput = readBool(dict_.lookup("infoOutput"));
|
|
||||||
os.writeKeyword("infoOutput") << infoOutput
|
|
||||||
<< token::END_STATEMENT << nl;
|
|
||||||
|
|
||||||
bool active = readBool(dict_.lookup("active"));
|
bool active = readBool(dict_.lookup("active"));
|
||||||
os.writeKeyword("active") << active
|
os.writeKeyword("active") << active
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
|
|
||||||
os.writeKeyword(word(thermoModel + "Coeffs"));
|
|
||||||
os << dict_.subDict(thermoModel + "Coeffs") << nl;
|
|
||||||
|
|
||||||
os.writeKeyword("thermoType");
|
os.writeKeyword("thermoType");
|
||||||
os << dict_.subDict("thermoType") << nl;
|
os << dict_.subDict("thermoType") << nl;
|
||||||
|
|
||||||
|
|||||||
@ -42,32 +42,26 @@ Description
|
|||||||
dictionary entries.
|
dictionary entries.
|
||||||
|
|
||||||
\heading Patch usage
|
\heading Patch usage
|
||||||
|
|
||||||
Example of the boundary condition specification:
|
Example of the boundary condition specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
myPatch
|
myPatch
|
||||||
{
|
{
|
||||||
type compressible::temperatureThermoBaffle;
|
type compressible::temperatureThermoBaffle;
|
||||||
|
|
||||||
// Coupled boundary condition
|
// Underlaying coupled boundary condition
|
||||||
Tnbr T;
|
Tnbr T;
|
||||||
kappa fluidThermo; // or solidThermo
|
kappa fluidThermo; // or solidThermo
|
||||||
KappaName none;
|
KappaName none;
|
||||||
QrNbr Qr; // or none.Name of Qr field on neighbour region
|
QrNbr Qr;//or none.Name of Qr field on neighbourregion
|
||||||
Qr Qr; // or none.Name of Qr field on local region
|
Qr none;// or none.Name of Qr field on localregion
|
||||||
|
value uniform 300;
|
||||||
|
|
||||||
// Thermo baffle model
|
// Thermo baffle model
|
||||||
thermalBaffleModel thermalBaffle;
|
regionName baffleRegion; // solid region name
|
||||||
regionName baffleRegion;
|
|
||||||
infoOutput yes;
|
infoOutput yes;
|
||||||
active yes;
|
active yes;
|
||||||
thermalBaffleCoeffs
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Solid thermo in solid region
|
||||||
// Solid thermo
|
|
||||||
thermoType
|
thermoType
|
||||||
{
|
{
|
||||||
type heSolidThermo;
|
type heSolidThermo;
|
||||||
@ -108,12 +102,51 @@ Description
|
|||||||
scatterModel none;
|
scatterModel none;
|
||||||
}
|
}
|
||||||
|
|
||||||
value uniform 300;
|
|
||||||
|
// Extrude model for new region
|
||||||
|
|
||||||
|
extrudeModel linearNormal;
|
||||||
|
nLayers 50;
|
||||||
|
expansionRatio 1;
|
||||||
|
columnCells false; //3D or 1D
|
||||||
|
linearNormalCoeffs
|
||||||
|
{
|
||||||
|
thickness 0.02;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// New mesh polyPatch information
|
||||||
|
|
||||||
|
bottomCoeffs
|
||||||
|
{
|
||||||
|
name "bottom";
|
||||||
|
type mappedWall;
|
||||||
|
sampleMode nearestPatchFace;
|
||||||
|
samplePatch baffle3DWall_master;
|
||||||
|
offsetMode uniform;
|
||||||
|
offset (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
topCoeffs
|
||||||
|
{
|
||||||
|
name "top";
|
||||||
|
type mappedWall;
|
||||||
|
sampleMode nearestPatchFace;
|
||||||
|
samplePatch baffle3DWall_slave;
|
||||||
|
offsetMode uniform;
|
||||||
|
offset (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
sideCoeffs
|
||||||
|
{
|
||||||
|
name "side";
|
||||||
|
type patch;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
SeeAlso
|
SeeAlso
|
||||||
Foam::turbulentTemperatureRadCoupledMixedFvPatchScalarField
|
Foam::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
|
||||||
Foam::regionModels::thermalBaffleModels::thermalBaffleModel
|
Foam::regionModels::thermalBaffleModels::thermalBaffleModel
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
@ -128,6 +161,7 @@ SourceFiles
|
|||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "regionModel.H"
|
#include "regionModel.H"
|
||||||
#include "thermalBaffleModel.H"
|
#include "thermalBaffleModel.H"
|
||||||
|
#include "extrudePatchMesh.H"
|
||||||
#include "turbulentTemperatureRadCoupledMixedFvPatchScalarField.H"
|
#include "turbulentTemperatureRadCoupledMixedFvPatchScalarField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -157,6 +191,14 @@ class thermalBaffleFvPatchScalarField
|
|||||||
//- Dictionary
|
//- Dictionary
|
||||||
dictionary dict_;
|
dictionary dict_;
|
||||||
|
|
||||||
|
//- Auto pointer to extrapolated mesh from patch
|
||||||
|
autoPtr<extrudePatchMesh> extrudeMeshPtr_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private member functions
|
||||||
|
|
||||||
|
//- Extrude mesh
|
||||||
|
void createPatchMesh();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@ -53,11 +53,14 @@ autoPtr<thermalBaffleModel> thermalBaffleModel::New(const fvMesh& mesh)
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
thermalBafflePropertiesDict.lookup("thermalBaffleModel") >> modelType;
|
word modelType =
|
||||||
|
thermalBafflePropertiesDict.lookupOrDefault<word>
|
||||||
|
(
|
||||||
|
"thermalBaffleModel",
|
||||||
|
"thermalBaffle"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Selecting baffle model " << modelType << endl;
|
|
||||||
|
|
||||||
meshConstructorTable::iterator cstrIter =
|
meshConstructorTable::iterator cstrIter =
|
||||||
meshConstructorTablePtr_->find(modelType);
|
meshConstructorTablePtr_->find(modelType);
|
||||||
|
|
||||||
@ -82,9 +85,8 @@ autoPtr<thermalBaffleModel> thermalBaffleModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word modelType = dict.lookup("thermalBaffleModel");
|
word modelType =
|
||||||
|
dict.lookupOrDefault<word>("thermalBaffleModel", "thermalBaffle");
|
||||||
Info<< "Selecting baffle model " << modelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
dictionaryConstructorTable::iterator cstrIter =
|
||||||
dictionaryConstructorTablePtr_->find(modelType);
|
dictionaryConstructorTablePtr_->find(modelType);
|
||||||
|
|||||||
@ -46,13 +46,17 @@ thermalBaffle1DFvPatchScalarField
|
|||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
mappedPatchBase(p.patch()),
|
||||||
mixedFvPatchScalarField(p, iF),
|
mixedFvPatchScalarField(p, iF),
|
||||||
TName_("T"),
|
TName_("T"),
|
||||||
baffleActivated_(true),
|
baffleActivated_(true),
|
||||||
thickness_(p.size()),
|
thickness_(p.size()),
|
||||||
Qs_(p.size()),
|
Qs_(p.size()),
|
||||||
solidDict_(),
|
solidDict_(),
|
||||||
solidPtr_(NULL)
|
solidPtr_(NULL),
|
||||||
|
QrPrevious_(p.size()),
|
||||||
|
QrRelaxation_(0),
|
||||||
|
QrName_("undefined-Qr")
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -66,13 +70,17 @@ thermalBaffle1DFvPatchScalarField
|
|||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
mappedPatchBase(p.patch(), ptf),
|
||||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
TName_(ptf.TName_),
|
TName_(ptf.TName_),
|
||||||
baffleActivated_(ptf.baffleActivated_),
|
baffleActivated_(ptf.baffleActivated_),
|
||||||
thickness_(ptf.thickness_),
|
thickness_(ptf.thickness_),
|
||||||
Qs_(ptf.Qs_),
|
Qs_(ptf.Qs_),
|
||||||
solidDict_(ptf.solidDict_),
|
solidDict_(ptf.solidDict_),
|
||||||
solidPtr_(ptf.solidPtr_)
|
solidPtr_(ptf.solidPtr_),
|
||||||
|
QrPrevious_(ptf.QrPrevious_),
|
||||||
|
QrRelaxation_(ptf.QrRelaxation_),
|
||||||
|
QrName_(ptf.QrName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -85,33 +93,25 @@ thermalBaffle1DFvPatchScalarField
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
mappedPatchBase
|
||||||
|
(
|
||||||
|
p.patch(),
|
||||||
|
p.boundaryMesh().mesh().name(),
|
||||||
|
NEARESTPATCHFACE,
|
||||||
|
dict.lookup("samplePatch"),
|
||||||
|
0.0
|
||||||
|
),
|
||||||
mixedFvPatchScalarField(p, iF),
|
mixedFvPatchScalarField(p, iF),
|
||||||
TName_("T"),
|
TName_("T"),
|
||||||
baffleActivated_(readBool(dict.lookup("baffleActivated"))),
|
baffleActivated_(dict.lookupOrDefault<bool>("baffleActivated", true)),
|
||||||
thickness_(scalarField("thickness", dict, p.size())),
|
thickness_(),
|
||||||
Qs_(scalarField("Qs", dict, p.size())),
|
Qs_(),
|
||||||
solidDict_(dict),
|
solidDict_(dict),
|
||||||
solidPtr_(new solidType(dict))
|
solidPtr_(),
|
||||||
|
QrPrevious_(p.size(), 0.0),
|
||||||
|
QrRelaxation_(dict.lookupOrDefault<scalar>("relaxation", 0)),
|
||||||
|
QrName_(dict.lookupOrDefault<word>("Qr", "none"))
|
||||||
{
|
{
|
||||||
if (!isA<mappedPatchBase>(this->patch().patch()))
|
|
||||||
{
|
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"thermalBaffle1DFvPatchScalarField::"
|
|
||||||
"thermalBaffle1DFvPatchScalarField"
|
|
||||||
"("
|
|
||||||
"const fvPatch&,\n"
|
|
||||||
"const DimensionedField<scalar, volMesh>&, "
|
|
||||||
"const dictionary&"
|
|
||||||
")"
|
|
||||||
) << "\n patch type '" << patch().type()
|
|
||||||
<< "' not type '" << mappedPatchBase::typeName << "'"
|
|
||||||
<< "\n for patch " << patch().name()
|
|
||||||
<< " of field " << dimensionedInternalField().name()
|
|
||||||
<< " in file " << dimensionedInternalField().objectPath()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||||
|
|
||||||
if (dict.found("refValue") && baffleActivated_)
|
if (dict.found("refValue") && baffleActivated_)
|
||||||
@ -139,13 +139,17 @@ thermalBaffle1DFvPatchScalarField
|
|||||||
const thermalBaffle1DFvPatchScalarField& ptf
|
const thermalBaffle1DFvPatchScalarField& ptf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
mappedPatchBase(ptf.patch().patch(), ptf),
|
||||||
mixedFvPatchScalarField(ptf),
|
mixedFvPatchScalarField(ptf),
|
||||||
TName_(ptf.TName_),
|
TName_(ptf.TName_),
|
||||||
baffleActivated_(ptf.baffleActivated_),
|
baffleActivated_(ptf.baffleActivated_),
|
||||||
thickness_(ptf.thickness_),
|
thickness_(ptf.thickness_),
|
||||||
Qs_(ptf.Qs_),
|
Qs_(ptf.Qs_),
|
||||||
solidDict_(ptf.solidDict_),
|
solidDict_(ptf.solidDict_),
|
||||||
solidPtr_(ptf.solidPtr_)
|
solidPtr_(ptf.solidPtr_),
|
||||||
|
QrPrevious_(ptf.QrPrevious_),
|
||||||
|
QrRelaxation_(ptf.QrRelaxation_),
|
||||||
|
QrName_(ptf.QrName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -157,29 +161,118 @@ thermalBaffle1DFvPatchScalarField
|
|||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
mappedPatchBase(ptf.patch().patch(), ptf),
|
||||||
mixedFvPatchScalarField(ptf, iF),
|
mixedFvPatchScalarField(ptf, iF),
|
||||||
TName_(ptf.TName_),
|
TName_(ptf.TName_),
|
||||||
baffleActivated_(ptf.baffleActivated_),
|
baffleActivated_(ptf.baffleActivated_),
|
||||||
thickness_(ptf.thickness_),
|
thickness_(ptf.thickness_),
|
||||||
Qs_(ptf.Qs_),
|
Qs_(ptf.Qs_),
|
||||||
solidDict_(ptf.solidDict_),
|
solidDict_(ptf.solidDict_),
|
||||||
solidPtr_(ptf.solidPtr_)
|
solidPtr_(ptf.solidPtr_),
|
||||||
|
QrPrevious_(ptf.QrPrevious_),
|
||||||
|
QrRelaxation_(ptf.QrRelaxation_),
|
||||||
|
QrName_(ptf.QrName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class solidType>
|
template<class solidType>
|
||||||
const solidType& thermalBaffle1DFvPatchScalarField<solidType>::solidPtr() const
|
bool thermalBaffle1DFvPatchScalarField<solidType>::owner() const
|
||||||
{
|
{
|
||||||
if (!solidPtr_.empty())
|
const label patchi = patch().index();
|
||||||
|
|
||||||
|
const label nbrPatchi = samplePolyPatch().index();
|
||||||
|
|
||||||
|
return (patchi < nbrPatchi);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class solidType>
|
||||||
|
const solidType& thermalBaffle1DFvPatchScalarField<solidType>::solid() const
|
||||||
|
{
|
||||||
|
if (this->owner())
|
||||||
{
|
{
|
||||||
|
if (solidPtr_.empty())
|
||||||
|
{
|
||||||
|
solidPtr_.reset(new solidType(solidDict_));
|
||||||
|
}
|
||||||
return solidPtr_();
|
return solidPtr_();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
solidPtr_.reset(new solidType(solidDict_));
|
const fvPatch& nbrPatch =
|
||||||
return solidPtr_();
|
patch().boundaryMesh()[samplePolyPatch().index()];
|
||||||
|
|
||||||
|
const thermalBaffle1DFvPatchScalarField& nbrField =
|
||||||
|
refCast<const thermalBaffle1DFvPatchScalarField>
|
||||||
|
(
|
||||||
|
nbrPatch.template lookupPatchField<volScalarField, scalar>(TName_)
|
||||||
|
);
|
||||||
|
|
||||||
|
return nbrField.solid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class solidType>
|
||||||
|
const scalarField& thermalBaffle1DFvPatchScalarField<solidType>::
|
||||||
|
baffleThickness() const
|
||||||
|
{
|
||||||
|
if (this->owner())
|
||||||
|
{
|
||||||
|
if (thickness_.size() > 0)
|
||||||
|
{
|
||||||
|
return thickness_;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
thickness_ = scalarField("thickness", solidDict_, patch().size());
|
||||||
|
return thickness_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const fvPatch& nbrPatch =
|
||||||
|
patch().boundaryMesh()[samplePolyPatch().index()];
|
||||||
|
const thermalBaffle1DFvPatchScalarField& nbrField =
|
||||||
|
refCast<const thermalBaffle1DFvPatchScalarField>
|
||||||
|
(
|
||||||
|
nbrPatch.template lookupPatchField<volScalarField, scalar>(TName_)
|
||||||
|
);
|
||||||
|
|
||||||
|
return nbrField.thickness_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class solidType>
|
||||||
|
const scalarField& thermalBaffle1DFvPatchScalarField<solidType>::Qs() const
|
||||||
|
{
|
||||||
|
if (this->owner())
|
||||||
|
{
|
||||||
|
if (Qs_.size() > 0)
|
||||||
|
{
|
||||||
|
return Qs_;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Qs_ = scalarField("Qs", solidDict_, patch().size());
|
||||||
|
return Qs_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const fvPatch& nbrPatch =
|
||||||
|
patch().boundaryMesh()[samplePolyPatch().index()];
|
||||||
|
|
||||||
|
const thermalBaffle1DFvPatchScalarField& nbrField =
|
||||||
|
refCast<const thermalBaffle1DFvPatchScalarField>
|
||||||
|
(
|
||||||
|
nbrPatch.template lookupPatchField<volScalarField, scalar>(TName_)
|
||||||
|
);
|
||||||
|
|
||||||
|
return nbrField.Qs_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,18 +312,14 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since we're inside initEvaluate/evaluate there might be processor
|
// Since we're inside initEvaluate/evaluate there might be processor
|
||||||
// comms underway. Change the tag we use.
|
// comms underway. Change the tag we use.
|
||||||
int oldTag = UPstream::msgType();
|
int oldTag = UPstream::msgType();
|
||||||
UPstream::msgType() = oldTag+1;
|
UPstream::msgType() = oldTag+1;
|
||||||
|
|
||||||
const mappedPatchBase& mpp =
|
|
||||||
refCast<const mappedPatchBase>(patch().patch());
|
|
||||||
|
|
||||||
const label patchi = patch().index();
|
const label patchi = patch().index();
|
||||||
|
|
||||||
const label nbrPatchi = mpp.samplePolyPatch().index();
|
const label nbrPatchi = samplePolyPatch().index();
|
||||||
|
|
||||||
if (baffleActivated_)
|
if (baffleActivated_)
|
||||||
{
|
{
|
||||||
@ -243,108 +332,49 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
|||||||
);
|
);
|
||||||
|
|
||||||
// local properties
|
// local properties
|
||||||
|
|
||||||
const scalarField kappaw(turbModel.kappaEff(patchi));
|
const scalarField kappaw(turbModel.kappaEff(patchi));
|
||||||
|
|
||||||
const fvPatchScalarField& Tp =
|
const fvPatchScalarField& Tp =
|
||||||
patch().template lookupPatchField<volScalarField, scalar>(TName_);
|
patch().template lookupPatchField<volScalarField, scalar>(TName_);
|
||||||
|
|
||||||
const scalarField qDot(kappaw*Tp.snGrad());
|
|
||||||
|
scalarField Qr(Tp.size(), 0.0);
|
||||||
|
|
||||||
|
if (QrName_ != "none")
|
||||||
|
{
|
||||||
|
Qr = patch().template lookupPatchField<volScalarField, scalar>
|
||||||
|
(QrName_);
|
||||||
|
|
||||||
|
Qr = QrRelaxation_*Qr + (1.0 - QrRelaxation_)*QrPrevious_;
|
||||||
|
QrPrevious_ = Qr;
|
||||||
|
}
|
||||||
|
|
||||||
tmp<scalarField> Ti = patchInternalField();
|
tmp<scalarField> Ti = patchInternalField();
|
||||||
|
|
||||||
scalarField myh(patch().deltaCoeffs()*kappaw);
|
scalarField myKDelta(patch().deltaCoeffs()*kappaw);
|
||||||
|
|
||||||
// nbr properties
|
// nrb properties
|
||||||
|
const fvPatchScalarField& nbrTp =
|
||||||
const scalarField nbrKappaw(turbModel.kappaEff(nbrPatchi));
|
|
||||||
|
|
||||||
const fvPatchScalarField& nbrTw =
|
|
||||||
turbModel.thermo().T().boundaryField()[nbrPatchi];
|
turbModel.thermo().T().boundaryField()[nbrPatchi];
|
||||||
|
|
||||||
scalarField nbrQDot(nbrKappaw*nbrTw.snGrad());
|
// solid properties
|
||||||
mpp.map().distribute(nbrQDot);
|
scalarField kappas(patch().size(), 0.0);
|
||||||
|
forAll(kappas, i)
|
||||||
const thermalBaffle1DFvPatchScalarField& nbrField =
|
|
||||||
refCast<const thermalBaffle1DFvPatchScalarField>
|
|
||||||
(
|
|
||||||
nbrPatch.template lookupPatchField<volScalarField, scalar>(TName_)
|
|
||||||
);
|
|
||||||
|
|
||||||
scalarField nbrTi(nbrField.patchInternalField());
|
|
||||||
mpp.map().distribute(nbrTi);
|
|
||||||
|
|
||||||
scalarField nbrTp =
|
|
||||||
nbrPatch.template lookupPatchField<volScalarField, scalar>(TName_);
|
|
||||||
mpp.map().distribute(nbrTp);
|
|
||||||
|
|
||||||
scalarField nbrh(nbrPatch.deltaCoeffs()*nbrKappaw);
|
|
||||||
mpp.map().distribute(nbrh);
|
|
||||||
|
|
||||||
|
|
||||||
// heat source
|
|
||||||
const scalarField Q(Qs_/thickness_);
|
|
||||||
|
|
||||||
tmp<scalarField> tKDeltaw(new scalarField(patch().size()));
|
|
||||||
scalarField KDeltaw = tKDeltaw();
|
|
||||||
|
|
||||||
// Create fields for solid properties (p paramater not used)
|
|
||||||
forAll(KDeltaw, i)
|
|
||||||
{
|
{
|
||||||
KDeltaw[i] =
|
kappas[i] = solid().kappa(0.0, (Tp[i] + nbrTp[i])/2.0);
|
||||||
solidPtr().kappa(0.0, (Tp[i] + nbrTw[i])/2.0)/thickness_[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const scalarField q
|
scalarField KDeltaSolid(kappas/baffleThickness());
|
||||||
(
|
|
||||||
(Ti() - nbrTi)/(1.0/KDeltaw + 1.0/nbrh + 1.0/myh)
|
|
||||||
);
|
|
||||||
|
|
||||||
forAll(qDot, i)
|
scalarField alpha(KDeltaSolid - Qr/Tp);
|
||||||
{
|
|
||||||
if (Qs_[i] == 0)
|
|
||||||
{
|
|
||||||
this->refValue()[i] = Ti()[i] - q[i]/myh[i];
|
|
||||||
this->refGrad()[i] = 0.0;
|
|
||||||
this->valueFraction()[i] = 1.0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (q[i] > 0)
|
|
||||||
{
|
|
||||||
this->refValue()[i] =
|
|
||||||
nbrTp[i]
|
|
||||||
- Q[i]*thickness_[i]/(2*KDeltaw[i]);
|
|
||||||
|
|
||||||
this->refGrad()[i] = 0.0;
|
valueFraction() = alpha/(alpha + myKDelta);
|
||||||
this->valueFraction()[i] =
|
|
||||||
1.0
|
refValue() = (KDeltaSolid*nbrTp + Qs()/2.0)/alpha;
|
||||||
/
|
|
||||||
(
|
|
||||||
1.0
|
|
||||||
+ patch().deltaCoeffs()[i]*kappaw[i]/KDeltaw[i]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else if (q[i] < 0)
|
|
||||||
{
|
|
||||||
this->refValue()[i] = 0.0;
|
|
||||||
this->refGrad()[i] =
|
|
||||||
(-nbrQDot[i] + Q[i]*thickness_[i])/kappaw[i];
|
|
||||||
this->valueFraction()[i] = 0.0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
scalar Qt = Q[i]*thickness_[i];
|
|
||||||
this->refValue()[i] = 0.0;
|
|
||||||
this->refGrad()[i] = Qt/2/kappaw[i];
|
|
||||||
this->valueFraction()[i] = 0.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
scalar Q = gSum(patch().magSf()*qDot);
|
scalar Q = gAverage(kappaw*snGrad());
|
||||||
Info<< patch().boundaryMesh().mesh().name() << ':'
|
Info<< patch().boundaryMesh().mesh().name() << ':'
|
||||||
<< patch().name() << ':'
|
<< patch().name() << ':'
|
||||||
<< this->dimensionedInternalField().name() << " <- "
|
<< this->dimensionedInternalField().name() << " <- "
|
||||||
@ -366,16 +396,21 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class solidType>
|
template<class solidType>
|
||||||
void thermalBaffle1DFvPatchScalarField<solidType>:: write(Ostream& os) const
|
void thermalBaffle1DFvPatchScalarField<solidType>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::write(os);
|
mixedFvPatchScalarField::write(os);
|
||||||
os.writeKeyword("TName")
|
mappedPatchBase::write(os);
|
||||||
<< TName_ << token::END_STATEMENT << nl;
|
|
||||||
thickness_.writeEntry("thickness", os);
|
if (this->owner())
|
||||||
os.writeKeyword("baffleActivated")
|
{
|
||||||
<< baffleActivated_ << token::END_STATEMENT << nl;
|
baffleThickness().writeEntry("thickness", os);
|
||||||
Qs_.writeEntry("Qs", os);
|
Qs().writeEntry("Qs", os);
|
||||||
solidPtr().write(os);
|
solid().write(os);
|
||||||
|
}
|
||||||
|
|
||||||
|
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl;
|
||||||
|
os.writeKeyword("QrRelaxation")<< QrRelaxation_
|
||||||
|
<< token::END_STATEMENT << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -24,9 +24,68 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::thermalBaffle1DFvPatchScalarField
|
Foam::thermalBaffle1DFvPatchScalarField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpThermoBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Boundary which solves the 1D steady state heat transfer equation
|
|
||||||
through a baffle.
|
This BC solves a steady 1D thermal baffle. The solid properties are
|
||||||
|
specify as dictionary. Optionaly radiative heat flux (Qr) can be
|
||||||
|
incorporated into the balance. Some under-relaxation might be needed on
|
||||||
|
Qr.
|
||||||
|
Baffle and solid properties need to be specified on the master side
|
||||||
|
of the baffle.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
Example of the boundary condition specification using constant
|
||||||
|
solid thermo :
|
||||||
|
|
||||||
|
\verbatim
|
||||||
|
myPatch_master
|
||||||
|
{
|
||||||
|
type compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
|
||||||
|
samplePatch myPatch_slave;
|
||||||
|
|
||||||
|
thickness uniform 0.005; // thickness [m]
|
||||||
|
Qs uniform 100; // heat flux [W/m2]
|
||||||
|
|
||||||
|
Qr none;
|
||||||
|
relaxation 0;
|
||||||
|
|
||||||
|
// Solid thermo
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
nMoles 1;
|
||||||
|
molWeight 20;
|
||||||
|
}
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
kappa 1;
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Hf 0;
|
||||||
|
Cp 10;
|
||||||
|
}
|
||||||
|
equationOfState
|
||||||
|
{
|
||||||
|
rho 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
myPatch_slave
|
||||||
|
{
|
||||||
|
type compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
|
||||||
|
samplePatch myPatch_master_master;
|
||||||
|
|
||||||
|
Qr none;
|
||||||
|
relaxation 0;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
thermalBaffle1DFvPatchScalarField.C
|
thermalBaffle1DFvPatchScalarField.C
|
||||||
@ -38,7 +97,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "mixedFvPatchFields.H"
|
#include "mixedFvPatchFields.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
|
#include "mappedPatchBase.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -54,6 +113,7 @@ namespace compressible
|
|||||||
template<class solidType>
|
template<class solidType>
|
||||||
class thermalBaffle1DFvPatchScalarField
|
class thermalBaffle1DFvPatchScalarField
|
||||||
:
|
:
|
||||||
|
public mappedPatchBase,
|
||||||
public mixedFvPatchScalarField
|
public mixedFvPatchScalarField
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
@ -65,10 +125,10 @@ class thermalBaffle1DFvPatchScalarField
|
|||||||
bool baffleActivated_;
|
bool baffleActivated_;
|
||||||
|
|
||||||
//- Baffle thickness [m]
|
//- Baffle thickness [m]
|
||||||
scalarField thickness_;
|
mutable scalarField thickness_;
|
||||||
|
|
||||||
//- Superficial heat source [W/m2]
|
//- Superficial heat source [W/m2]
|
||||||
scalarField Qs_;
|
mutable scalarField Qs_;
|
||||||
|
|
||||||
//- Solid dictionary
|
//- Solid dictionary
|
||||||
dictionary solidDict_;
|
dictionary solidDict_;
|
||||||
@ -76,11 +136,29 @@ class thermalBaffle1DFvPatchScalarField
|
|||||||
//- Solid thermo
|
//- Solid thermo
|
||||||
mutable autoPtr<solidType> solidPtr_;
|
mutable autoPtr<solidType> solidPtr_;
|
||||||
|
|
||||||
|
//- Chache Qr for relaxation
|
||||||
|
scalarField QrPrevious_;
|
||||||
|
|
||||||
|
//- Relaxation for Qr
|
||||||
|
scalar QrRelaxation_;
|
||||||
|
|
||||||
|
//- Name of the radiative heat flux in local region
|
||||||
|
const word QrName_;
|
||||||
|
|
||||||
|
|
||||||
// Private members
|
// Private members
|
||||||
|
|
||||||
//- Return non const solid thermo autoMap
|
//- Return const solid thermo
|
||||||
const solidType& solidPtr() const;
|
const solidType& solid() const;
|
||||||
|
|
||||||
|
//- Return Qs from master
|
||||||
|
const scalarField& Qs() const;
|
||||||
|
|
||||||
|
//- Return thickness from master
|
||||||
|
const scalarField& baffleThickness() const;
|
||||||
|
|
||||||
|
//- Is Owner
|
||||||
|
bool owner() const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -153,7 +231,6 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map (and resize as needed) from self given a mapping object
|
||||||
@ -170,8 +247,6 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
virtual void updateCoeffs();
|
virtual void updateCoeffs();
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
dimensions [ 0 0 0 1 0 0 0 ];
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
internalField uniform 300;
|
internalField uniform 300;
|
||||||
|
|
||||||
|
|||||||
@ -46,6 +46,7 @@ boundaryField
|
|||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
dimensions [ 1 -1 -1 0 0 0 0 ];
|
dimensions [1 -1 -1 0 0 0 0];
|
||||||
|
|
||||||
internalField uniform 0;
|
internalField uniform 0;
|
||||||
|
|
||||||
@ -24,11 +24,13 @@ boundaryField
|
|||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type compressible::alphatWallFunction;
|
type compressible::alphatWallFunction;
|
||||||
|
Prt 0.85;
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
ceiling
|
ceiling
|
||||||
{
|
{
|
||||||
type compressible::alphatWallFunction;
|
type compressible::alphatWallFunction;
|
||||||
|
Prt 0.85;
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
inlet
|
inlet
|
||||||
|
|||||||
@ -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 volScalarField;
|
||||||
|
location "0";
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 0 0 1 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
bottom
|
||||||
|
{
|
||||||
|
type compressible::thermalBaffle;
|
||||||
|
Tnbr T;
|
||||||
|
kappa solidThermo;
|
||||||
|
kappaName none;
|
||||||
|
QrNbr none;
|
||||||
|
Qr none;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
side
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
top
|
||||||
|
{
|
||||||
|
type compressible::thermalBaffle;
|
||||||
|
Tnbr T;
|
||||||
|
kappa solidThermo;
|
||||||
|
kappaName none;
|
||||||
|
QrNbr none;
|
||||||
|
Qr none;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
dimensions [ 0 2 -3 0 0 0 0 ];
|
dimensions [0 2 -3 0 0 0 0];
|
||||||
|
|
||||||
internalField uniform 0.01;
|
internalField uniform 0.01;
|
||||||
|
|
||||||
@ -24,11 +24,17 @@ boundaryField
|
|||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type compressible::epsilonWallFunction;
|
type compressible::epsilonWallFunction;
|
||||||
|
Cmu 0.09;
|
||||||
|
kappa 0.41;
|
||||||
|
E 9.8;
|
||||||
value uniform 0.01;
|
value uniform 0.01;
|
||||||
}
|
}
|
||||||
ceiling
|
ceiling
|
||||||
{
|
{
|
||||||
type compressible::epsilonWallFunction;
|
type compressible::epsilonWallFunction;
|
||||||
|
Cmu 0.09;
|
||||||
|
kappa 0.41;
|
||||||
|
E 9.8;
|
||||||
value uniform 0.01;
|
value uniform 0.01;
|
||||||
}
|
}
|
||||||
inlet
|
inlet
|
||||||
|
|||||||
@ -5,27 +5,18 @@
|
|||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
|
||||||
|
T
|
||||||
{
|
{
|
||||||
version 2.0;
|
type compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
|
||||||
format ascii;
|
samplePatch baffle1DWall_slave;
|
||||||
class dictionary;
|
|
||||||
location "constant";
|
|
||||||
object thermalBaffleProperties;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
thermalBaffleModel none;
|
thickness uniform 0.005; // thickness [m]
|
||||||
|
Qs uniform 100; // heat flux [W/m2]
|
||||||
|
|
||||||
active no;
|
# include "1DbaffleSolidThermo"
|
||||||
|
|
||||||
regionName none;
|
value uniform 300;
|
||||||
|
|
||||||
thermalBaffleCoeffs
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
noThermoCoeffs
|
|
||||||
{
|
|
||||||
}
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
T
|
||||||
|
{
|
||||||
|
type compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
|
||||||
|
samplePatch baffle1DWall_master;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -5,23 +5,24 @@
|
|||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
|
||||||
|
specie
|
||||||
{
|
{
|
||||||
version 2.0;
|
nMoles 1;
|
||||||
format ascii;
|
molWeight 20;
|
||||||
class volScalarField;
|
|
||||||
location "0";
|
|
||||||
object T;
|
|
||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
transport
|
||||||
|
|
||||||
dimensions [ 0 0 0 1 0 0 0 ];
|
|
||||||
|
|
||||||
internalField uniform 300;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
{
|
||||||
|
kappa 1;
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Hf 0;
|
||||||
|
Cp 10;
|
||||||
|
}
|
||||||
|
equationOfState
|
||||||
|
{
|
||||||
|
rho 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -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 | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
T
|
||||||
|
{
|
||||||
|
type compressible::thermalBaffle;
|
||||||
|
Tnbr T;
|
||||||
|
kappa fluidThermo;
|
||||||
|
kappaName none;
|
||||||
|
QrNbr none;
|
||||||
|
Qr none;
|
||||||
|
value uniform 300;
|
||||||
|
|
||||||
|
// Thermo baffle model
|
||||||
|
//thermalBaffleModel thermalBaffle;
|
||||||
|
regionName ${baffleRegionName};
|
||||||
|
active yes;
|
||||||
|
|
||||||
|
# include "3DbaffleSolidThermo"
|
||||||
|
|
||||||
|
// New fvMesh (region) information
|
||||||
|
# include "extrudeModel"
|
||||||
|
|
||||||
|
|
||||||
|
// New mesh polyPatch information
|
||||||
|
bottomCoeffs
|
||||||
|
{
|
||||||
|
name "bottom";
|
||||||
|
type mappedWall;
|
||||||
|
sampleMode nearestPatchFace;
|
||||||
|
samplePatch ${masterPatchName};
|
||||||
|
offsetMode uniform;
|
||||||
|
offset (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
topCoeffs
|
||||||
|
{
|
||||||
|
name "top";
|
||||||
|
type mappedWall;
|
||||||
|
sampleMode nearestPatchFace;
|
||||||
|
samplePatch ${slavePatchName};
|
||||||
|
offsetMode uniform;
|
||||||
|
offset (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
sideCoeffs
|
||||||
|
{
|
||||||
|
name "side";
|
||||||
|
type patch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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 | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
T
|
||||||
|
{
|
||||||
|
type compressible::thermalBaffle;
|
||||||
|
Tnbr T;
|
||||||
|
kappa fluidThermo;
|
||||||
|
kappaName none;
|
||||||
|
QrNbr none;
|
||||||
|
Qr none;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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 | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// Solid thermo
|
||||||
|
thermoType
|
||||||
|
{
|
||||||
|
type heSolidThermo;
|
||||||
|
mixture pureMixture;
|
||||||
|
transport constIso;
|
||||||
|
thermo hConst;
|
||||||
|
equationOfState rhoConst;
|
||||||
|
specie specie;
|
||||||
|
energy sensibleEnthalpy;
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
nMoles 1;
|
||||||
|
molWeight 20;
|
||||||
|
}
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
kappa ${Kappa};
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Hf 0;
|
||||||
|
Cp ${Cp};
|
||||||
|
}
|
||||||
|
equationOfState
|
||||||
|
{
|
||||||
|
rho ${rho};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
radiation
|
||||||
|
{
|
||||||
|
radiationModel opaqueSolid;
|
||||||
|
absorptionEmissionModel none;
|
||||||
|
scatterModel none;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -5,34 +5,14 @@
|
|||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object extrudeToRegionMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
region baffleRegion;
|
|
||||||
|
|
||||||
faceZones (baffleFaces2);
|
|
||||||
|
|
||||||
oneD false;
|
|
||||||
|
|
||||||
extrudeModel linearNormal;
|
extrudeModel linearNormal;
|
||||||
|
nLayers ${nLayers};
|
||||||
nLayers 10;
|
|
||||||
|
|
||||||
expansionRatio 1;
|
expansionRatio 1;
|
||||||
|
columnCells ${oneD}; //3D
|
||||||
adaptMesh yes; // apply directMapped to both regions
|
|
||||||
|
|
||||||
sampleMode nearestPatchFace;
|
|
||||||
|
|
||||||
linearNormalCoeffs
|
linearNormalCoeffs
|
||||||
{
|
{
|
||||||
thickness 0.02;
|
thickness ${thickness};
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
baffleRegionName baffle3DRegion;
|
||||||
|
|
||||||
|
masterPatchName baffle3DRegionMaster;
|
||||||
|
|
||||||
|
slavePatchName baffle3DRegionSlave;
|
||||||
|
|
||||||
|
oneD false;
|
||||||
|
|
||||||
|
nLayers 50;
|
||||||
|
|
||||||
|
thickness 0.02;
|
||||||
|
|
||||||
|
Kappa 0.01;
|
||||||
|
|
||||||
|
Cp 15;
|
||||||
|
|
||||||
|
rho 80;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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 | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
alphat
|
||||||
|
{
|
||||||
|
type compressible::alphatWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
epsilon
|
||||||
|
{
|
||||||
|
type compressible::epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
|
k
|
||||||
|
{
|
||||||
|
type compressible::kqRWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
|
mut
|
||||||
|
{
|
||||||
|
type mutkWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 101325;
|
||||||
|
}
|
||||||
|
|
||||||
|
p_rgh
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
}
|
||||||
|
|
||||||
|
U
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
dimensions [ 0 2 -2 0 0 0 0 ];
|
dimensions [0 2 -2 0 0 0 0];
|
||||||
|
|
||||||
internalField uniform 0.1;
|
internalField uniform 0.1;
|
||||||
|
|
||||||
@ -44,6 +44,7 @@ boundaryField
|
|||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
dimensions [ 1 -1 -1 0 0 0 0 ];
|
dimensions [1 -1 -1 0 0 0 0];
|
||||||
|
|
||||||
internalField uniform 0;
|
internalField uniform 0;
|
||||||
|
|
||||||
@ -24,11 +24,17 @@ boundaryField
|
|||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type mutkWallFunction;
|
type mutkWallFunction;
|
||||||
|
Cmu 0.09;
|
||||||
|
kappa 0.41;
|
||||||
|
E 9.8;
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
ceiling
|
ceiling
|
||||||
{
|
{
|
||||||
type mutkWallFunction;
|
type mutkWallFunction;
|
||||||
|
Cmu 0.09;
|
||||||
|
kappa 0.41;
|
||||||
|
E 9.8;
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
inlet
|
inlet
|
||||||
@ -45,6 +51,7 @@ boundaryField
|
|||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
dimensions [ 1 -1 -2 0 0 0 0 ];
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
internalField uniform 101325;
|
internalField uniform 101325;
|
||||||
|
|
||||||
@ -24,27 +24,28 @@ boundaryField
|
|||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type calculated;
|
type calculated;
|
||||||
value $internalField;
|
value uniform 101325;
|
||||||
}
|
}
|
||||||
ceiling
|
ceiling
|
||||||
{
|
{
|
||||||
type calculated;
|
type calculated;
|
||||||
value $internalField;
|
value uniform 101325;
|
||||||
}
|
}
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type calculated;
|
type calculated;
|
||||||
value $internalField;
|
value uniform 101325;
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type calculated;
|
type calculated;
|
||||||
value $internalField;
|
value uniform 101325;
|
||||||
}
|
}
|
||||||
fixedWalls
|
fixedWalls
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
dimensions [ 1 -1 -2 0 0 0 0 ];
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
internalField uniform 101325;
|
internalField uniform 101325;
|
||||||
|
|
||||||
@ -24,27 +24,31 @@ boundaryField
|
|||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type fixedFluxPressure;
|
type fixedFluxPressure;
|
||||||
value $internalField;
|
gradient uniform 0;
|
||||||
|
value uniform 101325;
|
||||||
}
|
}
|
||||||
ceiling
|
ceiling
|
||||||
{
|
{
|
||||||
type fixedFluxPressure;
|
type fixedFluxPressure;
|
||||||
value $internalField;
|
gradient uniform 0;
|
||||||
|
value uniform 101325;
|
||||||
}
|
}
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type fixedFluxPressure;
|
type fixedFluxPressure;
|
||||||
value $internalField;
|
gradient uniform 0;
|
||||||
|
value uniform 101325;
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
value $internalField;
|
value uniform 101325;
|
||||||
}
|
}
|
||||||
fixedWalls
|
fixedWalls
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,8 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
rm -rf constant/baffleRegion/polyMesh
|
rm -rf constant/baffle3DRegion
|
||||||
rm -rf sets 0
|
rm -rf constant/polyMesh/boundary
|
||||||
|
rm -rf 0
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -4,25 +4,11 @@
|
|||||||
# Get application name
|
# Get application name
|
||||||
application=`getApplication`
|
application=`getApplication`
|
||||||
|
|
||||||
cp -r 0.org 0
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
|
|
||||||
runApplication topoSet
|
cp -r 0.org 0
|
||||||
|
|
||||||
unset FOAM_SETNAN
|
# Create 1D and 3D baffles
|
||||||
unset FOAM_SIGFPE
|
|
||||||
|
|
||||||
# Create first baffle
|
|
||||||
runApplication createBaffles -overwrite
|
runApplication createBaffles -overwrite
|
||||||
|
|
||||||
# Create region
|
|
||||||
runApplication extrudeToRegionMesh -overwrite
|
|
||||||
|
|
||||||
# Set Bc's for the region baffle
|
|
||||||
runApplication changeDictionary -dict system/changeDictionaryDict.baffleRegion -literalRE
|
|
||||||
rm log.changeDictionary
|
|
||||||
|
|
||||||
# Reset proper values at the region
|
|
||||||
runApplication changeDictionary -region baffleRegion -literalRE
|
|
||||||
|
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|||||||
@ -22,10 +22,10 @@ vertices
|
|||||||
(10 0 0)
|
(10 0 0)
|
||||||
(10 5 0)
|
(10 5 0)
|
||||||
(0 5 0)
|
(0 5 0)
|
||||||
(0 0 10)
|
(0 0 1)
|
||||||
(10 0 10)
|
(10 0 1)
|
||||||
(10 5 10)
|
(10 5 1)
|
||||||
(0 5 10)
|
(0 5 1)
|
||||||
);
|
);
|
||||||
|
|
||||||
blocks
|
blocks
|
||||||
|
|||||||
@ -0,0 +1,16 @@
|
|||||||
|
solid ascii
|
||||||
|
facet normal -1 0 0
|
||||||
|
outer loop
|
||||||
|
vertex 0.3 0 0
|
||||||
|
vertex 0.3 0 0.1
|
||||||
|
vertex 0.3 0.2 0
|
||||||
|
endloop
|
||||||
|
endfacet
|
||||||
|
facet normal -1 0 0
|
||||||
|
outer loop
|
||||||
|
vertex 0.3 0.2 0.1
|
||||||
|
vertex 0.3 0.2 0
|
||||||
|
vertex 0.3 0 0.1
|
||||||
|
endloop
|
||||||
|
endfacet
|
||||||
|
endsolid
|
||||||
@ -0,0 +1,58 @@
|
|||||||
|
solid ascii
|
||||||
|
facet normal -1 0 0
|
||||||
|
outer loop
|
||||||
|
vertex 0.59 0 0
|
||||||
|
vertex 0.59 0 0.05
|
||||||
|
vertex 0.59 0.1 0
|
||||||
|
endloop
|
||||||
|
endfacet
|
||||||
|
facet normal -1 0 0
|
||||||
|
outer loop
|
||||||
|
vertex 0.59 0.1 0.05
|
||||||
|
vertex 0.59 0.1 0
|
||||||
|
vertex 0.59 0 0.05
|
||||||
|
endloop
|
||||||
|
endfacet
|
||||||
|
facet normal -1 0 0
|
||||||
|
outer loop
|
||||||
|
vertex 0.59 0 0.05
|
||||||
|
vertex 0.59 0 0.1
|
||||||
|
vertex 0.59 0.1 0.05
|
||||||
|
endloop
|
||||||
|
endfacet
|
||||||
|
facet normal -1 0 0
|
||||||
|
outer loop
|
||||||
|
vertex 0.59 0.1 0.1
|
||||||
|
vertex 0.59 0.1 0.05
|
||||||
|
vertex 0.59 0 0.1
|
||||||
|
endloop
|
||||||
|
endfacet
|
||||||
|
facet normal -1 0 0
|
||||||
|
outer loop
|
||||||
|
vertex 0.59 0.1 0
|
||||||
|
vertex 0.59 0.1 0.05
|
||||||
|
vertex 0.59 0.2 0
|
||||||
|
endloop
|
||||||
|
endfacet
|
||||||
|
facet normal -1 0 0
|
||||||
|
outer loop
|
||||||
|
vertex 0.59 0.2 0.05
|
||||||
|
vertex 0.59 0.2 0
|
||||||
|
vertex 0.59 0.1 0.05
|
||||||
|
endloop
|
||||||
|
endfacet
|
||||||
|
facet normal -1 0 0
|
||||||
|
outer loop
|
||||||
|
vertex 0.59 0.1 0.05
|
||||||
|
vertex 0.59 0.1 0.1
|
||||||
|
vertex 0.59 0.2 0.05
|
||||||
|
endloop
|
||||||
|
endfacet
|
||||||
|
facet normal -1 0 0
|
||||||
|
outer loop
|
||||||
|
vertex 0.59 0.2 0.1
|
||||||
|
vertex 0.59 0.2 0.05
|
||||||
|
vertex 0.59 0.1 0.1
|
||||||
|
endloop
|
||||||
|
endfacet
|
||||||
|
endsolid
|
||||||
@ -1,58 +0,0 @@
|
|||||||
/*--------------------------------*- 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 changeDictionaryDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dictionaryReplacement
|
|
||||||
{
|
|
||||||
T
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"region0_to.*"
|
|
||||||
{
|
|
||||||
type compressible::thermalBaffle;
|
|
||||||
Tnbr T;
|
|
||||||
kappa solidThermo;
|
|
||||||
kappaName none;
|
|
||||||
QrNbr none;
|
|
||||||
Qr none;
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
baffleFaces2_side
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
floor
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
fixedWalls
|
|
||||||
{
|
|
||||||
type empty;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
boundary
|
|
||||||
{
|
|
||||||
floor
|
|
||||||
{
|
|
||||||
type patch;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,125 +0,0 @@
|
|||||||
/*--------------------------------*- 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 changeDictionaryDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dictionaryReplacement
|
|
||||||
{
|
|
||||||
alphat
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle.*"
|
|
||||||
{
|
|
||||||
type compressible::alphatWallFunction;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
epsilon
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle.*"
|
|
||||||
{
|
|
||||||
type compressible::epsilonWallFunction;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
k
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle.*"
|
|
||||||
{
|
|
||||||
type compressible::kqRWallFunction;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mut
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle.*"
|
|
||||||
{
|
|
||||||
type mutkWallFunction;
|
|
||||||
value uniform 0.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
p
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle.*"
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value uniform 101325;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
p_rgh
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle.*"
|
|
||||||
{
|
|
||||||
type fixedFluxPressure;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
T
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle.*"
|
|
||||||
{
|
|
||||||
type compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
|
|
||||||
baffleActivated yes;
|
|
||||||
thickness uniform 0.005; // thickness [m]
|
|
||||||
Qs uniform 100; // heat flux [W/m2]
|
|
||||||
transport
|
|
||||||
{
|
|
||||||
kappa 1.0;
|
|
||||||
}
|
|
||||||
thermodynamics
|
|
||||||
{
|
|
||||||
Hf 0;
|
|
||||||
Cp 0;
|
|
||||||
}
|
|
||||||
equationOfState
|
|
||||||
{
|
|
||||||
rho 0;
|
|
||||||
}
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
U
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle.*"
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,130 +0,0 @@
|
|||||||
/*--------------------------------*- 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 changeDictionaryDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dictionaryReplacement
|
|
||||||
{
|
|
||||||
alphat
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle1.*"
|
|
||||||
{
|
|
||||||
type compressible::alphatWallFunction;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
epsilon
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle1.*"
|
|
||||||
{
|
|
||||||
type compressible::epsilonWallFunction;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
k
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle1.*"
|
|
||||||
{
|
|
||||||
type compressible::kqRWallFunction;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mut
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle1.*"
|
|
||||||
{
|
|
||||||
type mutkWallFunction;
|
|
||||||
value uniform 0.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
p
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle1.*"
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value $internalField;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
p_rgh
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle1.*"
|
|
||||||
{
|
|
||||||
type fixedFluxPressure;
|
|
||||||
value $internalField;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
T
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle1Wall.*"
|
|
||||||
{
|
|
||||||
type compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
|
|
||||||
baffleActivated yes;
|
|
||||||
thickness uniform 0.005; // thickness [m]
|
|
||||||
Qs uniform 100; // heat flux [W/m2]
|
|
||||||
specie
|
|
||||||
{
|
|
||||||
nMoles 1;
|
|
||||||
molWeight 20;
|
|
||||||
}
|
|
||||||
transport
|
|
||||||
{
|
|
||||||
kappa 1;
|
|
||||||
}
|
|
||||||
thermodynamics
|
|
||||||
{
|
|
||||||
Hf 0;
|
|
||||||
Cp 10;
|
|
||||||
}
|
|
||||||
equationOfState
|
|
||||||
{
|
|
||||||
rho 10;
|
|
||||||
}
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
U
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"baffle1.*"
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,171 +0,0 @@
|
|||||||
/*--------------------------------*- 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 changeDictionaryDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dictionaryReplacement
|
|
||||||
{
|
|
||||||
alphat
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"region0_to_.*"
|
|
||||||
{
|
|
||||||
type compressible::alphatWallFunction;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
epsilon
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"region0_to_.*"
|
|
||||||
{
|
|
||||||
type compressible::epsilonWallFunction;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
k
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"region0_to_.*"
|
|
||||||
{
|
|
||||||
type compressible::kqRWallFunction;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mut
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"region0_to_.*"
|
|
||||||
{
|
|
||||||
type mutkWallFunction;
|
|
||||||
value uniform 0.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
p
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"region0_to_.*"
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value $internalField;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
p_rgh
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"region0_to_.*"
|
|
||||||
{
|
|
||||||
type fixedFluxPressure;
|
|
||||||
value $internalField;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
T
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
|
|
||||||
"region0_to.*"
|
|
||||||
{
|
|
||||||
type compressible::thermalBaffle;
|
|
||||||
|
|
||||||
// Coupled BC.
|
|
||||||
Tnbr T;
|
|
||||||
kappa fluidThermo;
|
|
||||||
kappaName none;
|
|
||||||
QrNbr none;
|
|
||||||
Qr none;
|
|
||||||
|
|
||||||
// Thermo baffle model
|
|
||||||
thermalBaffleModel thermalBaffle;
|
|
||||||
regionName baffleRegion;
|
|
||||||
infoOutput no;
|
|
||||||
active yes;
|
|
||||||
thermalBaffleCoeffs
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// Solid thermo
|
|
||||||
thermoType
|
|
||||||
{
|
|
||||||
type heSolidThermo;
|
|
||||||
mixture pureMixture;
|
|
||||||
transport constIso;
|
|
||||||
thermo hConst;
|
|
||||||
equationOfState rhoConst;
|
|
||||||
specie specie;
|
|
||||||
energy sensibleEnthalpy;
|
|
||||||
}
|
|
||||||
|
|
||||||
mixture
|
|
||||||
{
|
|
||||||
specie
|
|
||||||
{
|
|
||||||
nMoles 1;
|
|
||||||
molWeight 20;
|
|
||||||
}
|
|
||||||
transport
|
|
||||||
{
|
|
||||||
kappa 0.01;
|
|
||||||
}
|
|
||||||
thermodynamics
|
|
||||||
{
|
|
||||||
Hf 0;
|
|
||||||
Cp 15;
|
|
||||||
}
|
|
||||||
equationOfState
|
|
||||||
{
|
|
||||||
rho 80;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
radiation
|
|
||||||
{
|
|
||||||
radiationModel opaqueSolid;
|
|
||||||
absorptionEmissionModel none;
|
|
||||||
scatterModel none;
|
|
||||||
}
|
|
||||||
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
U
|
|
||||||
{
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
"region0_to_.*"
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -19,109 +19,100 @@ FoamFile
|
|||||||
// faces.
|
// faces.
|
||||||
internalFacesOnly true;
|
internalFacesOnly true;
|
||||||
|
|
||||||
|
|
||||||
// Baffles to create.
|
// Baffles to create.
|
||||||
baffles
|
baffles
|
||||||
{
|
{
|
||||||
baffleFacesThermoBaffle1D
|
baffleFacesThermoBaffle1D
|
||||||
{
|
{
|
||||||
//- Use predefined faceZone to select faces and orientation.
|
//- Use predefined faceZone to select faces and orientation.
|
||||||
type faceZone;
|
type searchableSurface;
|
||||||
zoneName baffleFaces;
|
surface triSurfaceMesh;
|
||||||
|
name baffle1D.stl;
|
||||||
|
|
||||||
patches
|
patches
|
||||||
{
|
{
|
||||||
master
|
master
|
||||||
{
|
{
|
||||||
//- Master side patch
|
//- Master side patch
|
||||||
name baffle1Wall_0;
|
name baffle1DWall_master;
|
||||||
|
|
||||||
type mappedWall;
|
|
||||||
sampleMode nearestPatchFace;
|
|
||||||
samplePatch baffle1Wall_1;
|
|
||||||
offset (0 0 0);
|
|
||||||
|
|
||||||
|
type wall;
|
||||||
|
inGroups (baffleWallGroup);
|
||||||
|
|
||||||
patchFields
|
patchFields
|
||||||
{
|
{
|
||||||
T
|
#include "./0/include/wallBafflePatches"
|
||||||
{
|
#include "./0/include/1DBaffle/1DTemperatureMasterBafflePatches"
|
||||||
type compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
|
|
||||||
baffleActivated yes;
|
|
||||||
thickness uniform 0.005; // thickness [m]
|
|
||||||
Qs uniform 100; // heat flux [W/m2]
|
|
||||||
specie
|
|
||||||
{
|
|
||||||
nMoles 1;
|
|
||||||
molWeight 20;
|
|
||||||
}
|
|
||||||
transport
|
|
||||||
{
|
|
||||||
kappa 1;
|
|
||||||
}
|
|
||||||
thermodynamics
|
|
||||||
{
|
|
||||||
Hf 0;
|
|
||||||
Cp 10;
|
|
||||||
}
|
|
||||||
equationOfState
|
|
||||||
{
|
|
||||||
rho 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
|
|
||||||
alphat
|
|
||||||
{
|
|
||||||
type compressible::alphatWallFunction;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
epsilon
|
|
||||||
{
|
|
||||||
type compressible::epsilonWallFunction;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
k
|
|
||||||
{
|
|
||||||
type compressible::kqRWallFunction;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
mut
|
|
||||||
{
|
|
||||||
type mutkWallFunction;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
p
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value uniform 101325;
|
|
||||||
}
|
|
||||||
p_rgh
|
|
||||||
{
|
|
||||||
type fixedFluxPressure;
|
|
||||||
}
|
|
||||||
U
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
slave
|
slave
|
||||||
{
|
{
|
||||||
//- Slave side patch
|
//- Slave side patch
|
||||||
name baffle1Wall_1;
|
name baffle1DWall_slave;
|
||||||
|
|
||||||
|
type wall;
|
||||||
|
inGroups (baffleWallGroup);
|
||||||
|
|
||||||
|
patchFields
|
||||||
|
{
|
||||||
|
#include "./0/include/wallBafflePatches"
|
||||||
|
#include "./0/include/1DBaffle/1DTemperatureSlaveBafflePatches"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "./0/include/baffle3DSetup"
|
||||||
|
|
||||||
|
baffleFacesThermoBaffle3D
|
||||||
|
{
|
||||||
|
type searchableSurface;
|
||||||
|
surface triSurfaceMesh;
|
||||||
|
name baffle3D.stl;
|
||||||
|
|
||||||
|
patches
|
||||||
|
{
|
||||||
|
master
|
||||||
|
{
|
||||||
|
//- Master side patch
|
||||||
|
name ${masterPatchName};
|
||||||
|
|
||||||
type mappedWall;
|
type mappedWall;
|
||||||
|
|
||||||
|
|
||||||
|
type interRegionMappedWallGenerator;
|
||||||
|
inGroups (baffleWallGroup);
|
||||||
|
|
||||||
sampleMode nearestPatchFace;
|
sampleMode nearestPatchFace;
|
||||||
samplePatch baffle1Wall_0;
|
sampleRegion ${baffleRegionName};
|
||||||
|
samplePatch bottom;
|
||||||
|
offsetMode uniform;
|
||||||
offset (0 0 0);
|
offset (0 0 0);
|
||||||
|
|
||||||
patchFields
|
patchFields
|
||||||
{
|
{
|
||||||
${...master.patchFields}
|
#include "./0/include/wallBafflePatches"
|
||||||
|
#include "./0/include/3DBaffle/3DTemperatureMasterBafflePatches"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
slave
|
||||||
|
{
|
||||||
|
//- Slave side patch
|
||||||
|
name ${slavePatchName};
|
||||||
|
|
||||||
|
type mappedWall;
|
||||||
|
inGroups (baffleWallGroup);
|
||||||
|
|
||||||
|
sampleMode nearestPatchFace;
|
||||||
|
sampleRegion ${baffleRegionName};
|
||||||
|
samplePatch top;
|
||||||
|
offsetMode uniform;
|
||||||
|
offset (0 0 0);
|
||||||
|
|
||||||
|
patchFields
|
||||||
|
{
|
||||||
|
#include "./0/include/wallBafflePatches"
|
||||||
|
#include "./0/include/3DBaffle/3DTemperatureSlaveBafflePatches"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,6 @@ gradSchemes
|
|||||||
divSchemes
|
divSchemes
|
||||||
{
|
{
|
||||||
default none;
|
default none;
|
||||||
|
|
||||||
div(phi,U) bounded Gauss limitedLinear 0.2;
|
div(phi,U) bounded Gauss limitedLinear 0.2;
|
||||||
div(phi,K) bounded Gauss limitedLinear 0.2;
|
div(phi,K) bounded Gauss limitedLinear 0.2;
|
||||||
div(phi,h) bounded Gauss limitedLinear 0.2;
|
div(phi,h) bounded Gauss limitedLinear 0.2;
|
||||||
@ -39,7 +38,13 @@ divSchemes
|
|||||||
|
|
||||||
laplacianSchemes
|
laplacianSchemes
|
||||||
{
|
{
|
||||||
default Gauss linear uncorrected;
|
default none;
|
||||||
|
laplacian(muEff,U) Gauss linear uncorrected;
|
||||||
|
laplacian(rhorAUf,p_rgh) Gauss linear uncorrected;
|
||||||
|
laplacian(alphaEff,h) Gauss linear uncorrected;
|
||||||
|
laplacian(DkEff,k) Gauss linear uncorrected;
|
||||||
|
laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;
|
||||||
|
laplacian(DomegaEff,omega) Gauss linear uncorrected;
|
||||||
}
|
}
|
||||||
|
|
||||||
interpolationSchemes
|
interpolationSchemes
|
||||||
|
|||||||
@ -49,9 +49,9 @@ SIMPLE
|
|||||||
|
|
||||||
residualControl
|
residualControl
|
||||||
{
|
{
|
||||||
p_rgh 5e-3;
|
p_rgh 1e-3;
|
||||||
U 3e-4;
|
U 1e-4;
|
||||||
h 3e-4;
|
h 1e-4;
|
||||||
|
|
||||||
// possibly check turbulence fields
|
// possibly check turbulence fields
|
||||||
"(k|epsilon|omega)" 5e-3;
|
"(k|epsilon|omega)" 5e-3;
|
||||||
@ -62,8 +62,8 @@ relaxationFactors
|
|||||||
{
|
{
|
||||||
rho 1.0;
|
rho 1.0;
|
||||||
p_rgh 0.7;
|
p_rgh 0.7;
|
||||||
U 0.7;
|
U 0.3;
|
||||||
h 0.3;
|
h 0.7;
|
||||||
"(k|epsilon|omega)" 0.3;
|
"(k|epsilon|omega)" 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,89 +0,0 @@
|
|||||||
/*--------------------------------*- 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 topoSetDict;
|
|
||||||
}
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
actions
|
|
||||||
(
|
|
||||||
{
|
|
||||||
name baffleFaces;
|
|
||||||
type faceSet;
|
|
||||||
action new;
|
|
||||||
source boxToFace;
|
|
||||||
sourceInfo
|
|
||||||
{
|
|
||||||
box (0.296 0 0) (0.306 0.18 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name baffleFacesSlaveCells;
|
|
||||||
type cellSet;
|
|
||||||
action new;
|
|
||||||
source boxToCell;
|
|
||||||
sourceInfo
|
|
||||||
{
|
|
||||||
box (0 0 0) (0.295 0.2 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name baffleFaces;
|
|
||||||
type faceZoneSet;
|
|
||||||
action new;
|
|
||||||
source setsToFaceZone;
|
|
||||||
sourceInfo
|
|
||||||
{
|
|
||||||
faceSet baffleFaces;
|
|
||||||
cellSet baffleFacesSlaveCells;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name baffleFaces2;
|
|
||||||
type faceSet;
|
|
||||||
action new;
|
|
||||||
source boxToFace;
|
|
||||||
sourceInfo
|
|
||||||
{
|
|
||||||
box (0.5944 0 0) (0.605 0.18 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name baffleFacesSlaveCells2;
|
|
||||||
type cellSet;
|
|
||||||
action new;
|
|
||||||
source boxToCell;
|
|
||||||
sourceInfo
|
|
||||||
{
|
|
||||||
box (0 0 0) (0.594 0.2 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name baffleFaces2;
|
|
||||||
type faceZoneSet;
|
|
||||||
action new;
|
|
||||||
source setsToFaceZone;
|
|
||||||
sourceInfo
|
|
||||||
{
|
|
||||||
faceSet baffleFaces2;
|
|
||||||
cellSet baffleFacesSlaveCells2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
Reference in New Issue
Block a user