mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
fvOptions::limitTemperature: Simplify controls and make documentation consistent with the code
This commit is contained in:
@ -56,8 +56,8 @@ Foam::fv::limitTemperature::limitTemperature
|
||||
)
|
||||
:
|
||||
cellSetOption(name, modelType, dict, mesh),
|
||||
Tmin_(readScalar(coeffs_.lookup("Tmin"))),
|
||||
Tmax_(readScalar(coeffs_.lookup("Tmax")))
|
||||
Tmin_(readScalar(coeffs_.lookup("min"))),
|
||||
Tmax_(readScalar(coeffs_.lookup("max")))
|
||||
{
|
||||
// Set the field name to that of the energy field from which the temperature
|
||||
// is obtained
|
||||
@ -73,6 +73,22 @@ Foam::fv::limitTemperature::limitTemperature
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::fv::limitTemperature::read(const dictionary& dict)
|
||||
{
|
||||
if (cellSetOption::read(dict))
|
||||
{
|
||||
coeffs_.lookup("min") >> Tmin_;
|
||||
coeffs_.lookup("max") >> Tmax_;
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::limitTemperature::correct(volScalarField& he)
|
||||
{
|
||||
const basicThermo& thermo =
|
||||
@ -122,20 +138,4 @@ void Foam::fv::limitTemperature::correct(volScalarField& he)
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fv::limitTemperature::read(const dictionary& dict)
|
||||
{
|
||||
if (cellSetOption::read(dict))
|
||||
{
|
||||
coeffs_.readIfPresent("Tmin", Tmin_);
|
||||
coeffs_.readIfPresent("Tmax", Tmax_);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -26,15 +26,24 @@ Class
|
||||
|
||||
Description
|
||||
Correction for temperature to apply limits between minimum and maximum
|
||||
values
|
||||
values.
|
||||
|
||||
Constraint described by:
|
||||
Usage
|
||||
Example usage:
|
||||
\verbatim
|
||||
limitT
|
||||
{
|
||||
type limitTemperature;
|
||||
active yes;
|
||||
|
||||
limitTemperatureCoeffs
|
||||
{
|
||||
minimum 200;
|
||||
maximum 500;
|
||||
selectionMode all;
|
||||
min 200;
|
||||
max 500;
|
||||
}
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
limitTemperature.C
|
||||
@ -109,16 +118,11 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Evaluate
|
||||
//- Read dictionary
|
||||
virtual bool read(const dictionary& dict);
|
||||
|
||||
//- Correct the energy field
|
||||
virtual void correct(volScalarField& he);
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Read dictionary
|
||||
virtual bool read(const dictionary& dict);
|
||||
//- Correct the energy field
|
||||
virtual void correct(volScalarField& he);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user