ENH: Re-locating externalWallHeatFluxTemperature

This commit is contained in:
Sergio Ferraris
2011-09-05 11:10:13 +01:00
parent 24e1aeaaa7
commit ce7245c3fa
5 changed files with 22 additions and 21 deletions

View File

@ -1,3 +0,0 @@
externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
LIB = $(FOAM_LIBBIN)/libcoupledDerivedFvPatchFields

View File

@ -1,12 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude
LIB_LIBS = \
-lmeshTools \
-lbasicThermophysicalModels \
-lfiniteVolume \
-lradiationModels

View File

@ -9,5 +9,6 @@ derivedFvPatchFields/turbulentTemperatureCoupledBaffle/regionProperties.C
derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarFields.C
derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
LIB = $(FOAM_LIBBIN)/libcompressibleTurbulenceModel

View File

@ -202,17 +202,16 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
return;
}
scalarField q(size(), 0.0);
scalarField KDelta = K(*this)*patch().deltaCoeffs();
if (oldMode_ == fixedHeatFlux)
{
this->refGrad() = q_/K(*this);
this->refValue() = 0.0;
this->valueFraction() = 0.0;
q = q_;
}
else if(oldMode_ == fixedHeatTransferCoeff)
{
this->refGrad() = (Ta_ - *this)*h_/K(*this);
this->refValue() = 0.0;
this->valueFraction() = 0.0;
q = (Ta_ - *this)*h_;
}
else
{
@ -224,6 +223,22 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
<< exit(FatalError);
}
forAll (*this, i)
{
if (q[i] > 0) //in
{
this->refGrad()[i] = q[i]/K(*this)()[i];
this->refValue()[i] = 0.0;
this->valueFraction()[i] = 0.0;
}
else //out
{
this->refGrad()[i] = 0.0;
this->refValue()[i] = KDelta[i]*q[i] + patchInternalField()()[i];
this->valueFraction()[i] = 1.0;
}
}
mixedFvPatchScalarField::updateCoeffs();
if (debug)