mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Added calculation/output for cloud min,max(T)
This commit is contained in:
@ -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-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -496,6 +496,9 @@ template<class CloudType>
|
|||||||
void Foam::ThermoCloud<CloudType>::info()
|
void Foam::ThermoCloud<CloudType>::info()
|
||||||
{
|
{
|
||||||
CloudType::info();
|
CloudType::info();
|
||||||
|
|
||||||
|
Info<< " Temperature min/max = " << Tmin() << ", " << Tmax()
|
||||||
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -308,6 +308,15 @@ public:
|
|||||||
inline tmp<volScalarField> sigmap() const;
|
inline tmp<volScalarField> sigmap() const;
|
||||||
|
|
||||||
|
|
||||||
|
// Check
|
||||||
|
|
||||||
|
//- Maximum temperature
|
||||||
|
inline scalar Tmax() const;
|
||||||
|
|
||||||
|
//- Minimum temperature
|
||||||
|
inline scalar Tmin() const;
|
||||||
|
|
||||||
|
|
||||||
// Cloud evolution functions
|
// Cloud evolution functions
|
||||||
|
|
||||||
//- Set parcel thermo properties
|
//- Set parcel thermo properties
|
||||||
|
|||||||
@ -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-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user