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 (
dict.found(
"value") &&
dict.found(
"gradient"))
128 const atmTurbulentHeatFluxTemperatureFvPatchScalarField& atmpsf
131 fixedGradientFvPatchScalarField(atmpsf),
132 heatSource_(atmpsf.heatSource_),
133 alphaEffName_(atmpsf.alphaEffName_),
134 Cp0_(atmpsf.Cp0_.clone()),
146 fixedGradientFvPatchScalarField(atmpsf, iF),
147 heatSource_(atmpsf.heatSource_),
148 alphaEffName_(atmpsf.alphaEffName_),
149 Cp0_(atmpsf.Cp0_.clone()),
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:
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();
234 os.writeEntry(
"heatSource", heatSourceTypeNames[heatSource_]);
235 os.writeEntry(
"alphaEff", alphaEffName_);
238 writeEntry(
"value",
os);
247 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.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
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
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
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.
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 current time value.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
const Time & time() const
Return Time associated with the objectRegistry.
virtual void operator=(const UList< Type > &)
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)