40 const DimensionedField<scalar, volMesh>& iF
43 mixedFvPatchScalarField(p, iF),
44 neighbourFieldName_(
"undefined-neighbourFieldName"),
47 this->refValue() = 0.0;
48 this->refGrad() = 0.0;
49 this->valueFraction() = 1.0;
58 const DimensionedField<scalar, volMesh>& iF,
59 const fvPatchFieldMapper& mapper
62 mixedFvPatchScalarField(ptf, p, iF, mapper),
63 neighbourFieldName_(ptf.neighbourFieldName_),
72 const DimensionedField<scalar, volMesh>& iF,
73 const dictionary& dict
76 mixedFvPatchScalarField(p, iF),
77 neighbourFieldName_(dict.lookup(
"neighbourFieldName")),
78 KName_(dict.lookup(
"Kcond"))
80 if (!isA<directMappedPatchBase>(this->patch().patch()))
84 "solidWallMixedTemperatureCoupledFvPatchScalarField::"
85 "solidWallMixedTemperatureCoupledFvPatchScalarField\n"
87 " const fvPatch& p,\n"
88 " const DimensionedField<scalar, volMesh>& iF,\n"
89 " const dictionary& dict\n"
91 ) <<
"\n patch type '" << p.type()
92 <<
"' not type '" << directMappedPatchBase::typeName <<
"'"
93 <<
"\n for patch " << p.name()
94 <<
" of field " << dimensionedInternalField().name()
95 <<
" in file " << dimensionedInternalField().objectPath()
101 if (dict.found(
"refValue"))
104 refValue() =
scalarField(
"refValue", dict, p.size());
105 refGrad() =
scalarField(
"refGradient", dict, p.size());
106 valueFraction() =
scalarField(
"valueFraction", dict, p.size());
113 valueFraction() = 1.0;
122 const DimensionedField<scalar, volMesh>& iF
125 mixedFvPatchScalarField(wtcsf, iF),
126 neighbourFieldName_(wtcsf.neighbourFieldName_),
136 return this->patch().lookupPatchField<
volScalarField, scalar>(KName_);
148 const directMappedPatchBase& mpp = refCast<const directMappedPatchBase>
152 const polyMesh& nbrMesh = mpp.sampleMesh();
153 const fvPatch& nbrPatch = refCast<const fvMesh>
156 ).
boundary()[mpp.samplePolyPatch().index()];
159 const mapDistribute& distMap = mpp.map();
161 tmp<scalarField> intFld = patchInternalField();
165 refCast<const solidWallMixedTemperatureCoupledFvPatchScalarField>
174 scalarField nbrIntFld = nbrField.patchInternalField();
179 distMap.constructSize(),
181 distMap.constructMap(),
186 scalarField nbrKDelta = nbrField.K()*nbrPatch.deltaCoeffs();
191 distMap.constructSize(),
193 distMap.constructMap(),
197 tmp<scalarField> myKDelta =
K()*patch().deltaCoeffs();
216 this->refValue() = nbrIntFld;
218 this->refGrad() = 0.0;
220 this->valueFraction() = nbrKDelta / (nbrKDelta + myKDelta());
222 mixedFvPatchScalarField::updateCoeffs();
229 Info<< patch().boundaryMesh().mesh().name() <<
':'
230 << patch().name() <<
':'
231 << this->dimensionedInternalField().name() <<
" <- "
232 << nbrMesh.name() <<
':'
233 << nbrPatch.name() <<
':'
234 << this->dimensionedInternalField().name() <<
" :"
236 <<
" walltemperature "
237 <<
" min:" <<
gMin(*
this)
238 <<
" max:" <<
gMax(*
this)
250 mixedFvPatchScalarField::write(os);
251 os.writeKeyword(
"neighbourFieldName")<< neighbourFieldName_