39 Foam::atmTurbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType
41Foam::atmTurbulentHeatFluxTemperatureFvPatchScalarField::heatSourceTypeNames
43 { heatSourceType::POWER ,
"power" },
44 { heatSourceType::FLUX ,
"flux" }
55atmTurbulentHeatFluxTemperatureFvPatchScalarField::
56atmTurbulentHeatFluxTemperatureFvPatchScalarField
62 fixedGradientFvPatchScalarField(
p, iF),
63 heatSource_(heatSourceType::POWER),
64 alphaEffName_(
"undefinedAlphaEff"),
70atmTurbulentHeatFluxTemperatureFvPatchScalarField::
71atmTurbulentHeatFluxTemperatureFvPatchScalarField
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()))
87atmTurbulentHeatFluxTemperatureFvPatchScalarField::
88atmTurbulentHeatFluxTemperatureFvPatchScalarField
95 fixedGradientFvPatchScalarField(
p, iF),
98 heatSourceTypeNames.getOrDefault
102 heatSourceType::POWER
105 alphaEffName_(
dict.get<
word>(
"alphaEff")),
125atmTurbulentHeatFluxTemperatureFvPatchScalarField::
126atmTurbulentHeatFluxTemperatureFvPatchScalarField
131 fixedGradientFvPatchScalarField(atmpsf),
132 heatSource_(atmpsf.heatSource_),
133 alphaEffName_(atmpsf.alphaEffName_),
134 Cp0_(atmpsf.Cp0_.clone()),
135 q_(atmpsf.q_.clone(this->patch().patch()))
139atmTurbulentHeatFluxTemperatureFvPatchScalarField::
140atmTurbulentHeatFluxTemperatureFvPatchScalarField
146 fixedGradientFvPatchScalarField(atmpsf, iF),
147 heatSource_(atmpsf.heatSource_),
148 alphaEffName_(atmpsf.alphaEffName_),
149 Cp0_(atmpsf.Cp0_.clone()),
150 q_(atmpsf.q_.clone(this->patch().patch()))
172 fixedGradientFvPatchScalarField::rmap(ptf, addr);
175 refCast<const atmTurbulentHeatFluxTemperatureFvPatchScalarField>(ptf);
177 q_->rmap(atmptf.q_(), addr);
192 const scalar Cp0 = Cp0_->value(t);
197 <<
"Cp0 = " << Cp0 <<
" must be positive."
205 case heatSourceType::POWER:
207 const scalar Ap =
gSum(patch().magSf());
208 gradient() = q/(Ap*Cp0*alphaEffp + SMALL);
212 case heatSourceType::FLUX:
214 gradient() = q/(Cp0*alphaEffp + SMALL);
221 <<
"Unknown heat source type. Valid types are: "
222 << heatSourceTypeNames <<
nl
227 fixedGradientFvPatchScalarField::updateCoeffs();
233 fixedGradientFvPatchScalarField::write(
os);
234 os.
writeEntry(
"heatSource", heatSourceTypeNames[heatSource_]);
238 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...
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Generic templated field type.
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Map from self.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
const Time & time() const
Return Time associated with the objectRegistry.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
scalar timeOutputValue() const
Return current time value.
void size(const label n)
Older name for setAddressableSize.
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.
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,...
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
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...
virtual void operator=(const UList< Type > &)
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)
Type gSum(const FieldField< Field, Type > &f)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)