38 bool Foam::turbulentTemperatureCoupledBaffleFvPatchScalarField::interfaceOwner
40 const polyMesh& nbrRegion,
41 const polyPatch& nbrPatch
44 const fvMesh& myRegion = patch().boundaryMesh().mesh();
46 if (nbrRegion.name() == myRegion.name())
48 return patch().index() < nbrPatch.index();
58 label myIndex =
findIndex(props.fluidRegionNames(), myRegion.name());
61 label i =
findIndex(props.solidRegionNames(), myRegion.name());
67 "turbulentTemperatureCoupledBaffleFvPatchScalarField"
68 "::interfaceOwner(const polyMesh&"
69 ", const polyPatch&)const"
70 ) <<
"Cannot find region " << myRegion.name()
71 <<
" neither in fluids " << props.fluidRegionNames()
72 <<
" nor in solids " << props.solidRegionNames()
75 myIndex = props.fluidRegionNames().size() + i;
79 props.fluidRegionNames(),
84 label i =
findIndex(props.solidRegionNames(), nbrRegion.name());
90 "coupleManager::interfaceOwner"
91 "(const polyMesh&, const polyPatch&) const"
92 ) <<
"Cannot find region " << nbrRegion.name()
93 <<
" neither in fluids " << props.fluidRegionNames()
94 <<
" nor in solids " << props.solidRegionNames()
97 nbrIndex = props.fluidRegionNames().size() + i;
100 return myIndex < nbrIndex;
114 fixedValueFvPatchScalarField(p, iF),
115 neighbourFieldName_(
"undefined-neighbourFieldName"),
116 KName_(
"undefined-K")
129 fixedValueFvPatchScalarField(ptf, p, iF, mapper),
130 neighbourFieldName_(ptf.neighbourFieldName_),
143 fixedValueFvPatchScalarField(p, iF, dict),
144 neighbourFieldName_(dict.
lookup(
"neighbourFieldName")),
145 KName_(dict.
lookup(
"Kcond"))
147 if (!isA<directMappedPatchBase>(this->patch().patch()))
151 "turbulentTemperatureCoupledBaffleFvPatchScalarField::"
152 "turbulentTemperatureCoupledBaffleFvPatchScalarField\n"
154 " const fvPatch& p,\n"
155 " const DimensionedField<scalar, volMesh>& iF,\n"
156 " const dictionary& dict\n"
158 ) <<
"\n patch type '" << p.type()
159 <<
"' not type '" << directMappedPatchBase::typeName <<
"'"
160 <<
"\n for patch " << p.
name()
161 <<
" of field " << dimensionedInternalField().name()
162 <<
" in file " << dimensionedInternalField().objectPath()
175 fixedValueFvPatchScalarField(wtcsf, iF),
176 neighbourFieldName_(wtcsf.neighbourFieldName_),
188 if (KName_ ==
"none")
196 db().lookupObject<
basicThermo>(
"thermophysicalProperties");
199 talpha().boundaryField()[patch().index()]
202 else if (mesh.objectRegistry::foundObject<
volScalarField>(KName_))
213 return n & KWall & n;
219 "turbulentTemperatureCoupledBaffleFvPatchScalarField::K() const"
220 ) <<
"Did not find field " << KName_
221 <<
" on mesh " << mesh.
name() <<
" patch " << patch().name()
223 <<
"Please set 'K' to 'none', a valid volScalarField"
244 const fvPatch& nbrPatch = refCast<const fvMesh>
255 if (interfaceOwner(nbrMesh, nbrPatch.
patch()))
266 refCast<const turbulentTemperatureCoupledBaffleFvPatchScalarField>
275 scalarField nbrIntFld = nbrField.patchInternalField();
303 (myKDelta()*intFld() + nbrKDelta*nbrIntFld)
304 / (myKDelta() + nbrKDelta)
332 Info<< patch().boundaryMesh().mesh().name() <<
':'
333 << patch().name() <<
':'
334 << this->dimensionedInternalField().name() <<
" <- "
335 << nbrMesh.name() <<
':'
336 << nbrPatch.
name() <<
':'
337 << this->dimensionedInternalField().name() <<
" :"
339 <<
" walltemperature "
340 <<
" min:" <<
gMin(*
this)
341 <<
" max:" <<
gMax(*
this)
346 fixedValueFvPatchScalarField::updateCoeffs();
355 fixedValueFvPatchScalarField::write(os);
356 os.
writeKeyword(
"neighbourFieldName")<< neighbourFieldName_