Commit 8929e959 authored by Henry Weller's avatar Henry Weller
Browse files

fvOptions::limitTemperature: Simplify controls and make documentation consistent with the code

parent 922785d9
......@@ -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);
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment