74 internal_(ptf.internal_),
96 const fvMesh& thisMesh =
patch().boundaryMesh().mesh();
111 if (!extrudeMeshPtr_)
118 baffle_->rename(baffleName);
125 const thermalBaffleFvPatchScalarField& ptf,
129 turbulentTemperatureRadCoupledMixedFvPatchScalarField(ptf, iF),
131 internal_(ptf.internal_),
140 void thermalBaffleFvPatchScalarField::createPatchMesh()
142 const fvMesh& thisMesh =
patch().boundaryMesh().mesh();
147 List<dictionary> dicts(regionPatches.size());
155 patchTypes[bottomPatchID] = mappedWallPolyPatch::typeName;
159 patchTypes[topPatchID] = mappedWallPolyPatch::typeName;
166 if (dict_.
get<
bool>(
"columnCells"))
168 patchTypes[sidePatchID] = emptyPolyPatch::typeName;
172 patchTypes[sidePatchID] = polyPatch::typeName;
175 const auto& mpp = refCast<const mappedPatchBase>(
patch().patch(), dict_);
177 const word coupleGroup(mpp.coupleGroup());
180 inGroups[0] = coupleGroup;
183 dicts[bottomPatchID].add(
"coupleGroup", coupleGroup);
184 dicts[bottomPatchID].add(
"inGroups", inGroups);
185 dicts[bottomPatchID].add(
"sampleMode", mpp.sampleModeNames_[mpp.mode()]);
186 dicts[bottomPatchID].add(
"samplePatch",
patch().
name());
187 dicts[bottomPatchID].add(
"sampleRegion", thisMesh.name());
192 const word coupleGroupSlave =
193 coupleGroup.substr(0, coupleGroup.find(
'_')) +
"_slave";
195 inGroups[0] = coupleGroupSlave;
196 dicts[topPatchID].add(
"coupleGroup", coupleGroupSlave);
197 dicts[topPatchID].add(
"inGroups", inGroups);
198 dicts[topPatchID].add(
"sampleMode", mpp.sampleModeNames_[mpp.mode()]);
202 forAll(regionPatches, patchi)
205 patchDict.set(
"nFaces", 0);
206 patchDict.set(
"startFace", 0);
217 thisMesh.boundaryMesh()
222 extrudeMeshPtr_.reset
258 os.writeEntry(
"extrudeModel", dict_.
get<
word>(
"extrudeModel"));
260 os.writeEntry(
"nLayers", dict_.
get<label>(
"nLayers"));
262 os.writeEntry(
"expansionRatio", dict_.
get<scalar>(
"expansionRatio"));
264 os.writeEntry(
"columnCells", dict_.
get<
Switch>(
"columnCells"));
270 os.writeEntry(
"region", dict_.
get<
word>(
"region"));
272 os.writeEntryIfDifferent<
bool>(
"internal",
true, internal_);
274 os.writeEntry(
"active", dict_.
get<
Switch>(
"active"));
288 thermalBaffleFvPatchScalarField
void writeEntry(Ostream &os) const
Write sub-dictionary with its dictName as its header.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
wordList patchTypes(nPatches)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
Mixed boundary condition for temperature and radiation heat transfer, suitable for multiregion cases...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
const Time & time() const
Return the top-level database.
static autoPtr< thermalBaffleModel > New(const fvMesh &mesh)
Return a reference to the selected model.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
Macros for easy insertion into run-time selection tables.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
#define forAll(list, i)
Loop across all elements in list.
Top level extrusion model class.
makePatchTypeField(fvPatchScalarField, alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField)
PtrList< polyPatch > polyPatchList
Store lists of polyPatch as a PtrList.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
fvPatchField< scalar > fvPatchScalarField
A class for handling words, derived from Foam::string.
A FieldMapper for finite-volume patch fields.
wordList patchNames(nPatches)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual void write(Ostream &) const
Write.
virtual void write(Ostream &os) const
Write.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
OBJstream os(runTime.globalPath()/outputName)
thermalBaffleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
List< word > wordList
List of word.
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
Mesh data needed to do the Finite Volume discretisation.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
static autoPtr< polyPatch > New(const word &patchType, const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
Return pointer to a new patch created on freestore from components.
bool foundObject(const word &name, const bool recursive=false) const
Is the named Type found?
This boundary condition provides a coupled temperature condition between multiple mesh regions...