38 namespace regionModels
40 namespace thermalBaffleModels
66 void thermalBaffleModel::init()
73 label nTotalEdges = 0;
75 nTotalEdges = 2*
nLayers_*rbm[patchi].nInternalEdges();
77 nLayers_*(rbm[patchi].nEdges() - rbm[patchi].nInternalEdges());
79 label nTotalFaces = 0;
86 isA<wedgePolyPatch>(rbm[patchi])
87 || isA<emptyPolyPatch>(rbm[patchi])
91 nTotalFaces += rbm[patchi].
size();
103 Info <<
"\nThe thermal baffle is 1D\n" <<
endl;
107 Info <<
"\nThe thermal baffle is 3D\n" <<
endl;
113 const polyPatch&
pp = rbm[patchi];
117 !isA<mappedVariableThicknessWallPolyPatch>(
pp)
124 << mappedVariableThicknessWallPolyPatch::typeName
125 <<
"'. This is necessary for 1D solution " 126 <<
" and variable thickness" 127 <<
"\n for patch. " <<
pp.name()
130 else if (!isA<mappedWallPolyPatch>(
pp))
134 << mappedWallPolyPatch::typeName
135 <<
"'. This is necessary for 3D solution" 136 <<
"\n for patch. " <<
pp.name()
144 const polyPatch&
pp = rbm[patchi];
145 const mappedVariableThicknessWallPolyPatch& ppCoupled =
148 const mappedVariableThicknessWallPolyPatch
157 <<
" coupled patches in thermalBaffle are " <<
nl 158 <<
" different sizes from list thickness" <<
nl 165 forAll(ppCoupled, localFacei)
167 label facei = ppCoupled.start() + localFacei;
187 thermalBaffleModel::thermalBaffleModel(
const fvMesh&
mesh)
189 regionModel1D(
mesh,
"thermalBaffle"),
193 constantThickness_(true)
197 thermalBaffleModel::thermalBaffleModel
199 const word& modelType,
209 constantThickness_(
dict.getOrDefault(
"constantThickness", true))
215 thermalBaffleModel::thermalBaffleModel
217 const word& modelType,
225 constantThickness_(getOrDefault(
"constantThickness", true))
const Type & value() const noexcept
Return const reference to value.
void size(const label n)
Older name for setAddressableSize.
dimensionedScalar delta_
Baffle mesh thickness.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Base class for 1-D region models.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool oneD_
Is it one dimension.
constexpr char nl
The newline '\n' character (0x0a)
bool constantThickness_
Is thickness constant.
Type & refCast(U &obj)
A dynamic_cast (for references). Generates a FatalError on failed casts and uses the virtual type() m...
scalarField thickness_
Baffle physical thickness.
Ostream & endl(Ostream &os)
Add newline and flush stream.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
#define forAll(list, i)
Loop across all elements in list.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
label size() const noexcept
The number of entries in the list.
const fvMesh & regionMesh() const
Return the region mesh database.
virtual ~thermalBaffleModel()
Destructor.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
Switch active_
Active flag.
virtual void preEvolveRegion()
Pre-evolve region.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
virtual bool read()
Read control parameters from dictionary.
defineTypeNameAndDebug(noThermo, 0)
Mesh data needed to do the Finite Volume discretisation.
virtual bool read()
Read control parameters from IO dictionary.
messageStream Info
Information stream (stdout output on master, null elsewhere)
label nLayers_
Number of layers in the region.
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
defineRunTimeSelectionTable(thermalBaffleModel, mesh)
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
labelList boundaryFaceOppositeFace_
Global boundary face IDs oppositte coupled patch.
static constexpr const zero Zero
Global zero (0)