39 Foam::atmTurbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType
41 Foam::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
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()),
138 fixedGradientFvPatchScalarField(atmpsf, iF),
139 heatSource_(atmpsf.heatSource_),
140 alphaEffName_(atmpsf.alphaEffName_),
141 Cp0_(atmpsf.Cp0_.clone()),
164 fixedGradientFvPatchScalarField::rmap(ptf, addr);
167 refCast<const atmTurbulentHeatFluxTemperatureFvPatchScalarField>(ptf);
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
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual void write(Ostream &) const
Write.
constexpr char nl
The newline '\n' character (0x0a)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
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.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
Macros for easy insertion into run-time selection tables.
This boundary condition provides a fixed heat constraint on temperature (i.e. T) to specify temperatu...
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual void write(Ostream &) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Type gSum(const FieldField< Field, Type > &f)
fvPatchField< scalar > fvPatchScalarField
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A FieldMapper for finite-volume patch fields.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
const Time & time() const noexcept
Return Time associated with the objectRegistry.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
OBJstream os(runTime.globalPath()/outputName)
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Map from self.
scalar timeOutputValue() const
Return the current user-time value. (ie, after applying any timeToUserTime() conversion) ...
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
atmTurbulentHeatFluxTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
const std::string patch
OpenFOAM patch number as a std::string.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
static constexpr const zero Zero
Global zero (0)