Skip to content
Snippets Groups Projects
Commit c49d9233 authored by sergio's avatar sergio Committed by Mark OLESEN
Browse files

BUG: Correcting htc definition to avoid negative values

parent 4248fdcd
No related branches found
No related tags found
No related merge requests found
......@@ -280,9 +280,18 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::writeData
const scalarField Tfluid(tfluid);
// 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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment