35 namespace incompressible
44 const DimensionedField<scalar, volMesh>& iF
47 mixedFvPatchScalarField(
p, iF),
48 TnbrName_(
"undefined-Tnbr")
50 this->refValue() = 0.0;
51 this->refGrad() = 0.0;
52 this->valueFraction() = 1.0;
59 const turbulentBoundaryCoupledFvPatchScalarField& ptf,
61 const DimensionedField<scalar, volMesh>& iF,
62 const fvPatchFieldMapper& mapper
65 mixedFvPatchScalarField(ptf,
p, iF, mapper),
66 TnbrName_(ptf.TnbrName_)
74 const DimensionedField<scalar, volMesh>& iF,
75 const dictionary&
dict
78 mixedFvPatchScalarField(
p, iF),
81 if (!isA<mappedPatchBase>(this->patch().patch()))
84 <<
"' not type '" << mappedPatchBase::typeName <<
"'"
85 <<
"\n for patch " <<
p.name()
93 if (
dict.found(
"refValue"))
105 valueFraction() = 1.0;
113 const turbulentBoundaryCoupledFvPatchScalarField& wtcsf,
114 const DimensionedField<scalar, volMesh>& iF
117 mixedFvPatchScalarField(wtcsf, iF),
118 TnbrName_(wtcsf.TnbrName_)
137 const mappedPatchBase& mpp =
138 refCast<const mappedPatchBase>(patch().patch());
139 const polyMesh& nbrMesh = mpp.sampleMesh();
140 const label samplePatchI = mpp.samplePolyPatch().index();
141 const fvPatch& nbrPatch =
142 refCast<const fvMesh>(nbrMesh).boundary()[samplePatchI];
160 tmp<scalarField> nbrIntFld(
new scalarField(nbrField.size(), 0.0));
161 tmp<scalarField> nbrKDelta(
new scalarField(nbrField.size(), 0.0));
163 mpp.distribute(nbrIntFld());
164 mpp.distribute(nbrKDelta());
181 this->refValue() = nbrIntFld();
182 this->refGrad() = 0.0;
183 this->valueFraction() = nbrKDelta()/(nbrKDelta());
202 mixedFvPatchScalarField::updateCoeffs();
206 Info<< patch().boundaryMesh().mesh().name() <<
':'
207 << patch().name() <<
':'
209 << nbrMesh.name() <<
':'
210 << nbrPatch.name() <<
':'
236 turbulentBoundaryCoupledFvPatchScalarField