39 Foam::atmTurbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType
41Foam::atmTurbulentHeatFluxTemperatureFvPatchScalarField::heatSourceTypeNames
43 { heatSourceType::POWER ,
"power" },
44 { heatSourceType::FLUX ,
"flux" }
62 fixedGradientFvPatchScalarField(
p, iF),
63 heatSource_(heatSourceType::POWER),
64 alphaEffName_(
"undefinedAlphaEff"),
79 fixedGradientFvPatchScalarField(ptf,
p, iF, mapper),
80 heatSource_(ptf.heatSource_),
81 alphaEffName_(ptf.alphaEffName_),
82 Cp0_(ptf.Cp0_.
clone()),
83 q_(ptf.q_.
clone(
p.patch()))
95 fixedGradientFvPatchScalarField(
p, iF),
98 heatSourceTypeNames.getOrDefault
102 heatSourceType::POWER
105 alphaEffName_(
dict.get<
word>(
"alphaEff")),
109 if (!this->readGradientEntry(
dict) || !this->readValueEntry(
dict))
111 extrapolateInternal();
120 const atmTurbulentHeatFluxTemperatureFvPatchScalarField& atmpsf
123 fixedGradientFvPatchScalarField(atmpsf),
124 heatSource_(atmpsf.heatSource_),
125 alphaEffName_(atmpsf.alphaEffName_),
126 Cp0_(atmpsf.Cp0_.
clone()),
127 q_(atmpsf.q_.
clone(this->patch().patch()))
138 fixedGradientFvPatchScalarField(atmpsf, iF),
139 heatSource_(atmpsf.heatSource_),
140 alphaEffName_(atmpsf.alphaEffName_),
142 q_(atmpsf.q_.
clone(this->patch().patch()))
164 fixedGradientFvPatchScalarField::rmap(ptf, addr);
169 q_->rmap(atmptf.q_(), addr);
184 const scalar Cp0 = Cp0_->value(t);
189 <<
"Cp0 = " << Cp0 <<
" must be positive."
197 case heatSourceType::POWER:
200 gradient() = q/(Ap*Cp0*alphaEffp + SMALL);
204 case heatSourceType::FLUX:
206 gradient() = q/(Cp0*alphaEffp + SMALL);
213 <<
"Unknown heat source type. Valid types are: "
214 << heatSourceTypeNames <<
nl
219 fixedGradientFvPatchScalarField::updateCoeffs();
226 os.writeEntry(
"heatSource", heatSourceTypeNames[heatSource_]);
227 os.writeEntry(
"alphaEff", alphaEffName_);
239 atmTurbulentHeatFluxTemperatureFvPatchScalarField
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...
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
scalar timeOutputValue() const
Return the current user-time value. (ie, after applying any timeToUserTime() conversion).
This boundary condition provides a fixed heat constraint on temperature (i.e. T) to specify temperatu...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
atmTurbulentHeatFluxTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual void write(Ostream &) const
Write.
A FieldMapper for finite-volume patch fields.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
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)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
const std::string patch
OpenFOAM patch number as a std::string.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Type gSum(const FieldField< Field, Type > &f)
List< label > labelList
A List of labels.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
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)
fvPatchField< scalar > fvPatchScalarField
constexpr char nl
The newline '\n' character (0x0a).