44 fixedValueFvPatchScalarField(
p, iF),
45 filmRegionName_(
"surfaceFilmProperties"),
46 pyrolysisRegionName_(
"pyrolysisProperties"),
61 fixedValueFvPatchScalarField(ptf,
p, iF, mapper),
62 filmRegionName_(ptf.filmRegionName_),
63 pyrolysisRegionName_(ptf.pyrolysisRegionName_),
64 phiName_(ptf.phiName_),
65 rhoName_(ptf.rhoName_)
77 fixedValueFvPatchScalarField(
p, iF,
dict),
80 dict.getOrDefault<
word>(
"filmRegion",
"surfaceFilmProperties")
84 dict.getOrDefault<
word>(
"pyrolysisRegion",
"pyrolysisProperties")
86 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi")),
87 rhoName_(
dict.getOrDefault<
word>(
"rho",
"rho"))
97 fixedValueFvPatchScalarField(fptpsf),
98 filmRegionName_(fptpsf.filmRegionName_),
99 pyrolysisRegionName_(fptpsf.pyrolysisRegionName_),
100 phiName_(fptpsf.phiName_),
101 rhoName_(fptpsf.rhoName_)
112 fixedValueFvPatchScalarField(fptpsf, iF),
113 filmRegionName_(fptpsf.filmRegionName_),
114 pyrolysisRegionName_(fptpsf.pyrolysisRegionName_),
115 phiName_(fptpsf.phiName_),
116 rhoName_(fptpsf.rhoName_)
130 const auto* filmModelPtr = db().time().findObject
131 <regionModels::surfaceFilmModels::surfaceFilmRegionModel>
135 const auto* pyrModelPtr = db().time().findObject
136 <regionModels::pyrolysisModels::pyrolysisModel>
137 (pyrolysisRegionName_);
139 if (!filmModelPtr || !pyrModelPtr)
145 const auto& filmModel = *filmModelPtr;
146 const auto& pyrModel = *pyrModelPtr;
155 const label patchi =
patch().index();
158 const label filmPatchi = filmModel.regionPatchID(patchi);
160 scalarField alphaFilm = filmModel.alpha().boundaryField()[filmPatchi];
161 filmModel.toPrimary(filmPatchi, alphaFilm);
163 scalarField TFilm = filmModel.Ts().boundaryField()[filmPatchi];
164 filmModel.toPrimary(filmPatchi, TFilm);
167 const label pyrPatchi = pyrModel.regionPatchID(patchi);
169 scalarField TPyr = pyrModel.T().boundaryField()[pyrPatchi];
170 pyrModel.toPrimary(pyrPatchi, TPyr);
174 Tp = alphaFilm*TFilm + (1.0 - alphaFilm)*TPyr;
178 fixedValueFvPatchScalarField::updateCoeffs();
188 os.writeEntryIfDifferent<
word>
191 "surfaceFilmProperties",
194 os.writeEntryIfDifferent<
word>
197 "pyrolysisProperties",
200 os.writeEntryIfDifferent<
word>(
"phi",
"phi", phiName_);
201 os.writeEntryIfDifferent<
word>(
"rho",
"rho", rhoName_);
213 filmPyrolysisTemperatureCoupledFvPatchScalarField
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static int & msgType() noexcept
Message tag of standard messages.
static int incrMsgType(int val=1) noexcept
Increment the message tag for standard messages.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
This boundary condition is designed to be used in conjunction with surface film and pyrolysis modelli...
virtual void write(Ostream &) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
filmPyrolysisTemperatureCoupledFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A FieldMapper for finite-volume patch fields.
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const Type * findObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
Base class for pyrolysis models.
const Time & time() const noexcept
Return the reference to the time database.
Base class for surface film models.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
const std::string patch
OpenFOAM patch number as a std::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
fvPatchField< scalar > fvPatchScalarField