40 namespace compressible
48 turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::
49 turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
55 mixedFvPatchScalarField(p, iF),
56 neighbourFieldName_(
"undefined-neighbourFieldName"),
59 this->refValue() = 0.0;
60 this->refGrad() = 0.0;
61 this->valueFraction() = 1.0;
65 turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::
66 turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
74 mixedFvPatchScalarField(ptf, p, iF, mapper),
75 neighbourFieldName_(ptf.neighbourFieldName_),
80 turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::
81 turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
88 mixedFvPatchScalarField(p, iF),
89 neighbourFieldName_(dict.
lookup(
"neighbourFieldName")),
90 KName_(dict.
lookup(
"Kcond"))
92 if (!isA<directMappedPatchBase>(this->patch().patch()))
96 "turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::"
97 "turbulentTemperatureCoupledBaffleMixedFvPatchScalarField\n"
99 " const fvPatch& p,\n"
100 " const DimensionedField<scalar, volMesh>& iF,\n"
101 " const dictionary& dict\n"
103 ) <<
"\n patch type '" << p.type()
104 <<
"' not type '" << directMappedPatchBase::typeName <<
"'"
105 <<
"\n for patch " << p.
name()
106 <<
" of field " << dimensionedInternalField().name()
107 <<
" in file " << dimensionedInternalField().objectPath()
113 if (dict.
found(
"refValue"))
125 valueFraction() = 1.0;
130 turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::
131 turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
137 mixedFvPatchScalarField(wtcsf, iF),
138 neighbourFieldName_(wtcsf.neighbourFieldName_),
148 const fvMesh&
mesh = patch().boundaryMesh().mesh();
150 if (KName_ ==
"none")
156 db().lookupObject<
basicThermo>(
"thermophysicalProperties");
162 else if (mesh.objectRegistry::foundObject<
volScalarField>(KName_))
173 return n & KWall & n;
179 "turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::K()"
181 ) <<
"Did not find field " << KName_
182 <<
" on mesh " << mesh.
name() <<
" patch " << patch().name()
184 <<
"Please set 'K' to 'none', a valid volScalarField"
192 void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
205 const fvPatch& nbrPatch = refCast<const fvMesh>
232 scalarField nbrIntFld = nbrField.patchInternalField();
274 this->refValue() = nbrIntFld;
276 this->refGrad() = 0.0;
278 this->valueFraction() = nbrKDelta / (nbrKDelta + myKDelta());
280 mixedFvPatchScalarField::updateCoeffs();
287 Info<< patch().boundaryMesh().mesh().name() <<
':'
288 << patch().name() <<
':'
289 << this->dimensionedInternalField().name() <<
" <- "
290 << nbrMesh.name() <<
':'
291 << nbrPatch.
name() <<
':'
292 << this->dimensionedInternalField().name() <<
" :"
294 <<
" walltemperature "
295 <<
" min:" <<
gMin(*
this)
296 <<
" max:" <<
gMax(*
this)
303 void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write
308 mixedFvPatchScalarField::write(os);
309 os.
writeKeyword(
"neighbourFieldName")<< neighbourFieldName_