Go to the documentation of this file.
40 Foam::externalCoupledTemperatureMixedFvPatchScalarField::
43 Foam::externalCoupledTemperatureMixedFvPatchScalarField::outputTemperatureNames
45 { outputTemperatureType::FLUID,
"fluid" },
46 { outputTemperatureType::WALL,
"wall" },
52 Foam::externalCoupledTemperatureMixedFvPatchScalarField::
55 Foam::externalCoupledTemperatureMixedFvPatchScalarField::refTemperatureNames
57 { refTemperatureType::CELL,
"cell" },
58 { refTemperatureType::USER,
"user" },
69 if (outTempType_ == outputTemperatureType::WALL)
71 os <<
"# Values: area Twall qDot htc" <<
endl;
75 os <<
"# Values: area Tfluid qDot htc" <<
endl;
90 outTempType_(outputTemperatureType::WALL),
91 refTempType_(refTemperatureType::CELL),
106 outTempType_(ptf.outTempType_),
107 refTempType_(ptf.refTempType_),
122 outTempType_(outputTemperatureType::WALL),
125 refTemperatureNames.lookupOrDefault
129 refTemperatureType::CELL
134 if (
dict.found(
"outputTemperature"))
136 outTempType_ = outputTemperatureNames.get(
"outputTemperature",
dict);
141 <<
"outputTemperature not specified "
143 <<
"using 'wall' as compatibility default" <<
nl
147 if (refTempType_ == refTemperatureType::USER)
149 Tref_ =
dict.get<scalar>(
"Tref");
152 if (
dict.found(
"refValue"))
165 if (
dict.found(
"value"))
178 this->refValue() = *
this;
179 this->refGrad() =
Zero;
180 this->valueFraction() = 1.0;
192 outTempType_(ecmpf.outTempType_),
193 refTempType_(ecmpf.refTempType_),
206 outTempType_(ecmpf.outTempType_),
207 refTempType_(ecmpf.refTempType_),
230 turbulenceModel::propertiesName,
231 internalField().
group()
235 static word thermoName(
"thermophysicalProperties");
237 if (db().foundObject<cmpTurbModelType>(turbName))
239 const cmpTurbModelType& turbModel =
240 db().lookupObject<cmpTurbModelType>(turbName);
246 qDot = turbModel.alphaEff(patchi)*hep.
snGrad();
248 else if (db().foundObject<basicThermo>(thermoName))
254 qDot =
thermo.alpha().boundaryField()[patchi]*hep.snGrad();
259 <<
"Condition requires either compressible turbulence and/or "
270 if (refTempType_ == refTemperatureType::USER)
278 tfluid = patchInternalField();
291 outTempType_ == outputTemperatureType::FLUID
298 os << magSf[facei] << token::SPACE
299 << Tout[facei] << token::SPACE
300 << qDot[facei] << token::SPACE
323 >> this->refValue()[facei]
324 >> this->refGrad()[facei]
325 >> this->valueFraction()[facei];
339 outputTemperatureNames[outTempType_]
344 refTemperatureNames[refTempType_]
347 if (refTempType_ == refTemperatureType::USER)
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
A class for handling words, derived from Foam::string.
ISstream & getLine(std::string &str, char delim='\n')
Raw, low-level getline into a string function.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero.
virtual void writeData(Ostream &os) const
Write data.
Generic input stream using standard (STL) streams.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Abstract base-class for fluid and solid thermodynamic properties.
const char *const group
Group name for atomic constants.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
Input from string buffer, using a ISstream.
virtual void write(Ostream &os) const
Write.
errorManipArg< error, int > exit(error &err, const int errNo=1)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual void readData(Istream &is)
Read data.
FlatOutput< Container > flatOutput(const Container &obj, label len=0)
Global flatOutput function.
const std::string patch
OpenFOAM patch number as a std::string.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
externalCoupledTemperatureMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const dimensionedScalar e
Elementary charge.
virtual void writeHeader(Ostream &os) const
Write header.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
Foam::fvPatchFieldMapper.
This boundary condition provides a temperatue interface to an external application.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
#define WarningInFunction
Report a warning using Foam::Warning.
string evaluate(const std::string &s, size_t pos=0, size_t len=std::string::npos)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...