fvOptions::limitTemperature: Simplify controls and make documentation consistent with the code
This commit is contained in:
parent
922785d9cf
commit
8929e959ff
2 changed files with 35 additions and 31 deletions
|
|
@ -56,8 +56,8 @@ Foam::fv::limitTemperature::limitTemperature
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cellSetOption(name, modelType, dict, mesh),
|
cellSetOption(name, modelType, dict, mesh),
|
||||||
Tmin_(readScalar(coeffs_.lookup("Tmin"))),
|
Tmin_(readScalar(coeffs_.lookup("min"))),
|
||||||
Tmax_(readScalar(coeffs_.lookup("Tmax")))
|
Tmax_(readScalar(coeffs_.lookup("max")))
|
||||||
{
|
{
|
||||||
// Set the field name to that of the energy field from which the temperature
|
// Set the field name to that of the energy field from which the temperature
|
||||||
// is obtained
|
// is obtained
|
||||||
|
|
@ -73,6 +73,22 @@ Foam::fv::limitTemperature::limitTemperature
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * 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)
|
void Foam::fv::limitTemperature::correct(volScalarField& he)
|
||||||
{
|
{
|
||||||
const basicThermo& thermo =
|
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
|
Description
|
||||||
Correction for temperature to apply limits between minimum and maximum
|
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
|
limitTemperatureCoeffs
|
||||||
{
|
{
|
||||||
minimum 200;
|
selectionMode all;
|
||||||
maximum 500;
|
min 200;
|
||||||
|
max 500;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
limitTemperature.C
|
limitTemperature.C
|
||||||
|
|
@ -109,16 +118,11 @@ public:
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Evaluate
|
//- Read dictionary
|
||||||
|
virtual bool read(const dictionary& dict);
|
||||||
|
|
||||||
//- Correct the energy field
|
//- Correct the energy field
|
||||||
virtual void correct(volScalarField& he);
|
virtual void correct(volScalarField& he);
|
||||||
|
|
||||||
|
|
||||||
// IO
|
|
||||||
|
|
||||||
//- Read dictionary
|
|
||||||
virtual bool read(const dictionary& dict);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue