66void 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;
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];
124 << mappedVariableThicknessWallPolyPatch::typeName
125 <<
"'. This is necessary for 1D solution "
126 <<
" and variable thickness"
127 <<
"\n for patch. " <<
pp.name()
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
163 if (
delta_.value() == 0.0)
165 forAll(ppCoupled, localFacei)
167 label facei = ppCoupled.start() + localFacei;
187thermalBaffleModel::thermalBaffleModel(
const fvMesh&
mesh)
189 regionModel1D(
mesh,
"thermalBaffle"),
197thermalBaffleModel::thermalBaffleModel
199 const word& modelType,
215thermalBaffleModel::thermalBaffleModel
217 const word& modelType,
225 constantThickness_(getOrDefault(
"constantThickness", true))
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
label size() const noexcept
The number of elements in list.
label size() const noexcept
The number of entries in the list.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dictionary()
Default construct, a top-level empty dictionary.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
Mesh data needed to do the Finite Volume discretisation.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
Base class for 1-D region models.
labelList boundaryFaceOppositeFace_
Global boundary face IDs oppositte coupled patch.
label nLayers_
Number of layers in the region.
virtual bool read()
Read control parameters from dictionary.
Switch active_
Active flag.
const fvMesh & regionMesh() const
Return the region mesh database.
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
bool constantThickness_
Is thickness constant.
scalarField thickness_
Baffle physical thickness.
virtual void preEvolveRegion()
Pre-evolve region.
bool oneD_
Is it one dimension.
dimensionedScalar delta_
Baffle mesh thickness.
virtual bool read()
Read control parameters from IO dictionary.
virtual ~thermalBaffleModel()
Destructor.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere).
T returnReduce(const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
#define forAll(list, i)
Loop across all elements in list.