mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Correcting htc definition to avoid negative values
This commit is contained in:
@ -283,9 +283,18 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::writeData
|
|||||||
|
|
||||||
const scalarField Tfluid(tfluid);
|
const scalarField Tfluid(tfluid);
|
||||||
|
|
||||||
|
|
||||||
// Heat transfer coefficient [W/m2/K]
|
// Heat transfer coefficient [W/m2/K]
|
||||||
const scalarField htc(qDot/(max(Twall - Tfluid), 1e-3));
|
// This htc needs to be always larger or equal to zero
|
||||||
|
//const scalarField htc(qDot/max(Twall - Tfluid, 1e-3));
|
||||||
|
scalarField htc(qDot.size(), 0);
|
||||||
|
forAll (qDot, i)
|
||||||
|
{
|
||||||
|
scalar deltaT = mag(Twall[i] - Tfluid[i]);
|
||||||
|
if (deltaT > 1e-3)
|
||||||
|
{
|
||||||
|
htc[i] = sign(qDot[i])*qDot[i]/deltaT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const Field<scalar>& magSf = this->patch().magSf();
|
const Field<scalar>& magSf = this->patch().magSf();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user