40 Foam::externalCoupledTemperatureMixedFvPatchScalarField::
43Foam::externalCoupledTemperatureMixedFvPatchScalarField::outputTemperatureNames
45 { outputTemperatureType::FLUID,
"fluid" },
46 { outputTemperatureType::WALL,
"wall" },
52 Foam::externalCoupledTemperatureMixedFvPatchScalarField::
55Foam::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;
82Foam::externalCoupledTemperatureMixedFvPatchScalarField::
83externalCoupledTemperatureMixedFvPatchScalarField
90 outTempType_(outputTemperatureType::WALL),
91 refTempType_(refTemperatureType::CELL),
96Foam::externalCoupledTemperatureMixedFvPatchScalarField::
97externalCoupledTemperatureMixedFvPatchScalarField
106 outTempType_(rhs.outTempType_),
107 refTempType_(rhs.refTempType_),
108 Tref_(rhs.Tref_.clone())
112Foam::externalCoupledTemperatureMixedFvPatchScalarField::
113externalCoupledTemperatureMixedFvPatchScalarField
122 outTempType_(outputTemperatureType::WALL),
125 refTemperatureNames.getOrDefault
129 refTemperatureType::CELL
136 outTempType_ = outputTemperatureNames.
get(
"outputTemperature",
dict);
141 <<
"outputTemperature not specified "
143 <<
"using 'wall' as compatibility default" <<
nl
147 if (refTempType_ == refTemperatureType::USER)
185Foam::externalCoupledTemperatureMixedFvPatchScalarField::
186externalCoupledTemperatureMixedFvPatchScalarField
192 outTempType_(rhs.outTempType_),
193 refTempType_(rhs.refTempType_),
194 Tref_(rhs.Tref_.clone())
198Foam::externalCoupledTemperatureMixedFvPatchScalarField::
199externalCoupledTemperatureMixedFvPatchScalarField
206 outTempType_(rhs.outTempType_),
207 refTempType_(rhs.refTempType_),
208 Tref_(rhs.Tref_.clone())
219 const label patchi = patch().index();
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)
273 const scalar currTref =
274 Tref_->value(this->db().time().timeOutputValue());
281 tfluid = patchInternalField();
292 const scalar deltaT =
mag(Twall[i] - Tfluid[i]);
295 htc[i] =
sign(qDot[i])*qDot[i]/deltaT;
303 outTempType_ == outputTemperatureType::FLUID
335 >> this->refValue()[facei]
336 >> this->refGrad()[facei]
337 >> this->valueFraction()[facei];
351 outputTemperatureNames[outTempType_]
356 refTemperatureNames[refTempType_]
361 Tref_->writeData(
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...
EnumType get(const word &enumName) const
The enumeration corresponding to the given name.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
Generic input stream using a standard (STL) stream.
ISstream & getLine(std::string &str, char delim='\n')
Raw, low-level getline (until delimiter) into a string.
Input from string buffer, using a ISstream. Always UNCOMPRESSED.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
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.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void size(const label n)
Older name for setAddressableSize.
Abstract base-class for fluid and solid thermodynamic properties.
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.
Extends the mixed boundary condition with serialisation functions.
This boundary condition provides a temperatue interface to an external application.
virtual void readData(Istream &is)
Read data.
virtual void writeHeader(Ostream &os) const
Write header.
virtual void writeData(Ostream &os) const
Write data.
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 tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
const objectRegistry & db() const
Return local objectRegistry.
virtual void operator=(const UList< Type > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
virtual Field< Type > & refGrad()
virtual Field< Type > & refValue()
virtual scalarField & valueFraction()
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for managing temporary objects.
static const word propertiesName
Default name of the turbulence properties dictionary.
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 WarningInFunction
Report a warning using Foam::Warning.
dimensionedScalar sign(const dimensionedScalar &ds)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
static constexpr const zero Zero
Global zero (0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.