mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: limitTemperature: obey 'active' flag. Fixes #2621
This commit is contained in:
@ -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.
|
||||||
@ -58,17 +58,20 @@ Foam::fv::limitTemperature::limitTemperature
|
|||||||
Tmax_(coeffs_.get<scalar>("max")),
|
Tmax_(coeffs_.get<scalar>("max")),
|
||||||
phase_(coeffs_.getOrDefault<word>("phase", word::null))
|
phase_(coeffs_.getOrDefault<word>("phase", word::null))
|
||||||
{
|
{
|
||||||
// Set the field name to that of the energy
|
if (isActive())
|
||||||
// field from which the temperature is obtained
|
{
|
||||||
const auto& thermo =
|
// Set the field name to that of the energy
|
||||||
mesh_.lookupObject<basicThermo>
|
// field from which the temperature is obtained
|
||||||
(
|
const auto& thermo =
|
||||||
IOobject::groupName(basicThermo::dictName, phase_)
|
mesh_.lookupObject<basicThermo>
|
||||||
);
|
(
|
||||||
|
IOobject::groupName(basicThermo::dictName, phase_)
|
||||||
|
);
|
||||||
|
|
||||||
fieldNames_.resize(1, thermo.he().name());
|
fieldNames_.resize(1, thermo.he().name());
|
||||||
|
|
||||||
fv::option::resetApplied();
|
fv::option::resetApplied();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user