ENH: limited parcel max temperature to TMax

This commit is contained in:
andy
2012-08-21 17:49:15 +01:00
parent 01c5f5136f
commit f60ae60fe1

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -324,7 +324,16 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
IntegrationScheme<scalar>::integrationResult Tres = IntegrationScheme<scalar>::integrationResult Tres =
td.cloud().TIntegrator().integrate(T_, dt, ap*bp, bp); td.cloud().TIntegrator().integrate(T_, dt, ap*bp, bp);
scalar Tnew = max(Tres.value(), td.cloud().constProps().TMin()); scalar Tnew =
min
(
max
(
Tres.value(),
td.cloud().constProps().TMin()
),
td.cloud().constProps().TMax()
);
Sph = dt*htc*As; Sph = dt*htc*As;