22 #include "turbulentHeatFluxTemperatureFvPatchScalarField.H"
54 namespace incompressible
72 const DimensionedField<scalar, volMesh>& iF
75 fixedGradientFvPatchScalarField(
p, iF),
78 alphaEffName_(
"undefinedAlphaEff")
84 turbulentHeatFluxTemperatureFvPatchScalarField::
85 turbulentHeatFluxTemperatureFvPatchScalarField
89 const DimensionedField<scalar, volMesh>& iF,
90 const fvPatchFieldMapper& mapper
93 fixedGradientFvPatchScalarField(ptf,
p, iF, mapper),
94 heatSource_(ptf.heatSource_),
96 alphaEffName_(ptf.alphaEffName_)
103 turbulentHeatFluxTemperatureFvPatchScalarField::
104 turbulentHeatFluxTemperatureFvPatchScalarField
107 const DimensionedField<scalar, volMesh>& iF,
108 const dictionary&
dict
111 fixedGradientFvPatchScalarField(
p, iF),
112 heatSource_(heatSourceTypeNames_.
read(
dict.
lookup(
"heatSource"))),
113 q_(
"q",
dict,
p.size()),
116 Info <<
"value and gradient is " <<
endl;
117 if (
dict.found(
"value") &&
dict.found(
"gradient"))
119 Info <<
"value and gradient is " <<
endl;
121 gradient() = Field<scalar>(
"gradient",
dict,
p.size());
125 Info <<
"else value and gradient is " <<
endl;
132 turbulentHeatFluxTemperatureFvPatchScalarField::
133 turbulentHeatFluxTemperatureFvPatchScalarField
138 fixedGradientFvPatchScalarField(thftpsf),
139 heatSource_(thftpsf.heatSource_),
141 alphaEffName_(thftpsf.alphaEffName_)
147 turbulentHeatFluxTemperatureFvPatchScalarField::
148 turbulentHeatFluxTemperatureFvPatchScalarField
151 const DimensionedField<scalar, volMesh>& iF
154 fixedGradientFvPatchScalarField(thftpsf, iF),
155 heatSource_(thftpsf.heatSource_),
157 alphaEffName_(thftpsf.alphaEffName_)
166 void turbulentHeatFluxTemperatureFvPatchScalarField::autoMap
168 const fvPatchFieldMapper& m
176 void turbulentHeatFluxTemperatureFvPatchScalarField::rmap
182 fixedGradientFvPatchScalarField::rmap(ptf, addr);
185 refCast<const turbulentHeatFluxTemperatureFvPatchScalarField>
190 q_.rmap(thftptf.q_, addr);
194 void turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
206 const IOdictionary& transportProperties =
207 db().lookupObject<IOdictionary>(
"transportProperties");
208 const scalar rhoCp0(
readScalar(transportProperties.lookup(
"rhoCp0")));
215 const scalar Ap =
gSum(patch().magSf());
216 gradient() = q_/(Ap*rhoCp0*alphaEffp);
217 Info <<
"gradient="<< gradient();
222 Info <<
"gradient="<< gradient();
223 gradient() = q_/(rhoCp0*alphaEffp);
230 "turbulentHeatFluxTemperatureFvPatchScalarField"
233 "const DimensionedField<scalar, volMesh>&, "
236 ) <<
"Unknown heat source type. Valid types are: "
241 fixedGradientFvPatchScalarField::updateCoeffs();
248 os.writeKeyword(
"heatSource") << heatSourceTypeNames_[heatSource_]
250 q_.writeEntry(
"q", os);
252 writeEntry(
"value", os);