mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
output bounding temp for cell temp out of bounds
This commit is contained in:
parent
bee963be86
commit
7cb6883647
1 changed files with 6 additions and 6 deletions
12
src/cell.cpp
12
src/cell.cpp
|
|
@ -334,12 +334,12 @@ double Cell::temperature(int32_t instance) const
|
|||
void Cell::set_temperature(double T, int32_t instance, bool set_contained)
|
||||
{
|
||||
if (settings::temperature_method == TemperatureMethod::INTERPOLATION) {
|
||||
if (T < data::temperature_min - settings::temperature_tolerance) {
|
||||
throw std::runtime_error {"Temperature is below minimum temperature at "
|
||||
"which data is available."};
|
||||
} else if (T > data::temperature_max + settings::temperature_tolerance) {
|
||||
throw std::runtime_error {"Temperature is above maximum temperature at "
|
||||
"which data is available."};
|
||||
if (T < (data::temperature_min - settings::temperature_tolerance)) {
|
||||
throw std::runtime_error {fmt::format("Temperature of {} K is below minimum temperature at "
|
||||
"which data is available of {} K.", T, data::temperature_min)};
|
||||
} else if (T > (data::temperature_max + settings::temperature_tolerance)) {
|
||||
throw std::runtime_error {fmt::format("Temperature of {} K is above maximum temperature at "
|
||||
"which data is available of {} K.", T, data::temperature_max)};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue