37Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::
38filmPyrolysisVelocityCoupledFvPatchVectorField
44 fixedValueFvPatchVectorField(
p, iF),
45 filmRegionName_(
"surfaceFilmProperties"),
46 pyrolysisRegionName_(
"pyrolysisProperties"),
52Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::
53filmPyrolysisVelocityCoupledFvPatchVectorField
61 fixedValueFvPatchVectorField(ptf,
p, iF, mapper),
62 filmRegionName_(ptf.filmRegionName_),
63 pyrolysisRegionName_(ptf.pyrolysisRegionName_),
64 phiName_(ptf.phiName_),
65 rhoName_(ptf.rhoName_)
69Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::
70filmPyrolysisVelocityCoupledFvPatchVectorField
77 fixedValueFvPatchVectorField(
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"))
91Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::
92filmPyrolysisVelocityCoupledFvPatchVectorField
97 fixedValueFvPatchVectorField(fpvpvf),
98 filmRegionName_(fpvpvf.filmRegionName_),
99 pyrolysisRegionName_(fpvpvf.pyrolysisRegionName_),
100 phiName_(fpvpvf.phiName_),
101 rhoName_(fpvpvf.rhoName_)
105Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::
106filmPyrolysisVelocityCoupledFvPatchVectorField
112 fixedValueFvPatchVectorField(fpvpvf, iF),
113 filmRegionName_(fpvpvf.filmRegionName_),
114 pyrolysisRegionName_(fpvpvf.pyrolysisRegionName_),
115 phiName_(fpvpvf.phiName_),
116 rhoName_(fpvpvf.rhoName_)
130 const auto* filmModelPtr = db().time().findObject
137 (pyrolysisRegionName_);
140 if (!filmModelPtr || !pyrModelPtr)
146 const auto& filmModel = *filmModelPtr;
147 const auto& pyrModel = *pyrModelPtr;
158 const label patchi = patch().index();
161 const label filmPatchi = filmModel.regionPatchID(patchi);
163 scalarField alphaFilm = filmModel.alpha().boundaryField()[filmPatchi];
164 filmModel.toPrimary(filmPatchi, alphaFilm);
166 vectorField UFilm = filmModel.Us().boundaryField()[filmPatchi];
167 filmModel.toPrimary(filmPatchi, UFilm);
170 const label pyrPatchi = pyrModel.regionPatchID(patchi);
172 scalarField phiPyr = pyrModel.phiGas().boundaryField()[pyrPatchi];
173 pyrModel.toPrimary(pyrPatchi, phiPyr);
190 <<
"Unable to process flux field phi with dimensions "
192 <<
" on patch " << patch().name()
193 <<
" of field " << internalField().name()
194 <<
" in file " << internalField().objectPath()
198 const scalarField UAvePyr(-phiPyr/patch().magSf());
203 Up = alphaFilm*UFilm + (1.0 - alphaFilm)*UAvePyr*nf;
208 fixedValueFvPatchVectorField::updateCoeffs();
221 "surfaceFilmProperties",
227 "pyrolysisProperties",
232 writeEntry(
"value",
os);
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...
const dimensionSet & dimensions() const
Return dimensions.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
static int & msgType() noexcept
Message tag of 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 updateCoeffs()
Update the coefficients associated with the patch field.
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
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
Return the reference to the time database.
Base class for surface film models.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimArea(sqr(dimLength))
const dimensionSet dimVelocity
const dimensionSet dimDensity
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)