ENH: limitTemperature: obey 'active' flag. Fixes #2621

This commit is contained in:
mattijs
2022-10-27 10:00:00 +01:00
parent 2c7a7b27a3
commit 37e90dbad7

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2012-2017 OpenFOAM Foundation Copyright (C) 2012-2017 OpenFOAM Foundation
Copyright (C) 2018-2021 OpenCFD Ltd. Copyright (C) 2018-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -57,6 +57,8 @@ Foam::fv::limitTemperature::limitTemperature
Tmin_(coeffs_.get<scalar>("min")), Tmin_(coeffs_.get<scalar>("min")),
Tmax_(coeffs_.get<scalar>("max")), Tmax_(coeffs_.get<scalar>("max")),
phase_(coeffs_.getOrDefault<word>("phase", word::null)) phase_(coeffs_.getOrDefault<word>("phase", word::null))
{
if (isActive())
{ {
// Set the field name to that of the energy // Set the field name to that of the energy
// field from which the temperature is obtained // field from which the temperature is obtained
@ -70,6 +72,7 @@ Foam::fv::limitTemperature::limitTemperature
fv::option::resetApplied(); fv::option::resetApplied();
} }
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //