diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index b756ad9911e6f7530966acbde2b7c50733d21332..60c7b79241bb183f19f6276d0952ebdfa9c12d36 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -496,6 +496,9 @@ template<class CloudType> void Foam::ThermoCloud<CloudType>::info() { CloudType::info(); + + Info<< " Temperature min/max = " << Tmin() << ", " << Tmax() + << endl; } diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H index 88cfde3172903b22046c59c09caed5bb283cf6bc..d746141aea2903a1f98be3b3506258023032d6f8 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -308,6 +308,15 @@ public: inline tmp<volScalarField> sigmap() const; + // Check + + //- Maximum temperature + inline scalar Tmax() const; + + //- Minimum temperature + inline scalar Tmin() const; + + // Cloud evolution functions //- Set parcel thermo properties diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H index a75f1f64d861a65ec9db19a1fe9bb01399291ea8..6d717bb1747419704390e5242cbd8e17d0dd76b6 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -379,4 +379,36 @@ Foam::ThermoCloud<CloudType>::sigmap() const } +template<class CloudType> +inline Foam::scalar Foam::ThermoCloud<CloudType>::Tmax() const +{ + scalar T = -GREAT; + forAllConstIter(typename ThermoCloud<CloudType>, *this, iter) + { + const parcelType& p = iter(); + T = max(T, p.T()); + } + + reduce(T, maxOp<scalar>()); + + return max(0.0, T); +} + + +template<class CloudType> +inline Foam::scalar Foam::ThermoCloud<CloudType>::Tmin() const +{ + scalar T = GREAT; + forAllConstIter(typename ThermoCloud<CloudType>, *this, iter) + { + const parcelType& p = iter(); + T = min(T, p.T()); + } + + reduce(T, minOp<scalar>()); + + return max(0.0, T); +} + + // ************************************************************************* //