diff --git a/modules/thermal_hydraulics/include/base/ThermalHydraulicsApp.h b/modules/thermal_hydraulics/include/base/ThermalHydraulicsApp.h index 3bde3a3eabff..1f6b9de352d1 100644 --- a/modules/thermal_hydraulics/include/base/ThermalHydraulicsApp.h +++ b/modules/thermal_hydraulics/include/base/ThermalHydraulicsApp.h @@ -51,26 +51,6 @@ class ThermalHydraulicsApp : public MooseApp ThermalHydraulicsApp(InputParameters parameters); virtual ~ThermalHydraulicsApp(); - /** - * Registers a closures option - * - * @param[in] closures_option Closures option string to register - * @param[in] closures_name Closures class name - * @param[in] flow_model_id Flow model ID - */ - static void registerClosuresOption(const std::string & closures_option, - const std::string & class_name, - const THM::FlowModelID & flow_model_id); - - /** - * Gets the class name of the closures corresponding to the flow model and user option - * - * @param[in] closures_option Closures option - * @param[in] flow_model_id Flow model ID - */ - static const std::string & getClosuresClassName(const std::string & closures_option, - const THM::FlowModelID & flow_model_id); - static void registerApps(); static void registerAll(Factory & f, ActionFactory & af, Syntax & s); @@ -94,8 +74,4 @@ class ThermalHydraulicsApp : public MooseApp static std::map _flow_model_map; static InputParameters validParams(); - -protected: - /// Map from flow model ID to map of closures option to its class - static std::map> _closures_class_names_map; }; diff --git a/modules/thermal_hydraulics/include/components/FlowChannelBase.h b/modules/thermal_hydraulics/include/components/FlowChannelBase.h index 9e00480c8ab1..0d1af0cac2ad 100644 --- a/modules/thermal_hydraulics/include/components/FlowChannelBase.h +++ b/modules/thermal_hydraulics/include/components/FlowChannelBase.h @@ -190,8 +190,6 @@ class FlowChannelBase : public Component1D, public GravityInterface virtual void initSecondary() override; virtual void check() const override; - virtual std::shared_ptr buildClosures(); - /** * Adds objects which are common for single- and two-phase flow */ diff --git a/modules/thermal_hydraulics/src/base/ThermalHydraulicsApp.C b/modules/thermal_hydraulics/src/base/ThermalHydraulicsApp.C index 85aa01634c48..cd7d2040f05a 100644 --- a/modules/thermal_hydraulics/src/base/ThermalHydraulicsApp.C +++ b/modules/thermal_hydraulics/src/base/ThermalHydraulicsApp.C @@ -27,9 +27,6 @@ std::map ThermalHydraulicsApp::_flow_model_map; -std::map> - ThermalHydraulicsApp::_closures_class_names_map; - namespace THM { @@ -102,9 +99,6 @@ ThermalHydraulicsApp::registerAll(Factory & f, ActionFactory & af, Syntax & s) THM::associateSyntax(s); THM::registerActions(s); - registerClosuresOption("simple", "Closures1PhaseSimple", THM::FM_SINGLE_PHASE); - registerClosuresOption("none", "Closures1PhaseNone", THM::FM_SINGLE_PHASE); - // flow models registerFlowModel(THM::FM_SINGLE_PHASE, FlowModelSinglePhase); @@ -148,45 +142,6 @@ ThermalHydraulicsApp::registerApps() MiscApp::registerApps(); } -const std::string & -ThermalHydraulicsApp::getClosuresClassName(const std::string & closures_option, - const THM::FlowModelID & flow_model_id) -{ - const std::string closures_option_lc = MooseUtils::toLower(closures_option); - - if (_closures_class_names_map.find(flow_model_id) != _closures_class_names_map.end()) - { - const auto & map_for_flow_model = _closures_class_names_map.at(flow_model_id); - if (map_for_flow_model.find(closures_option_lc) != map_for_flow_model.end()) - { - const std::string & closures_class = map_for_flow_model.at(closures_option_lc); - mooseDeprecated("The closures system now uses objects created in the input file instead of " - "enumerated options.\n", - "To remove this warning, add the following block to your input file " - "(replacing 'my_closures' as you choose):\n", - " [Closures]\n [my_closures]\n type = ", - closures_class, - "\n []\n []\n", - "Then, set the 'closures' parameter in your flow channel to this name:\n", - " closures = my_closures"); - return closures_class; - } - else - mooseError("The closures option '" + closures_option_lc + "' is not registered."); - } - else - mooseError("The closures option '" + closures_option_lc + "' is not registered."); -} - -void -ThermalHydraulicsApp::registerClosuresOption(const std::string & closures_option, - const std::string & class_name, - const THM::FlowModelID & flow_model_id) -{ - const std::string closures_option_lc = MooseUtils::toLower(closures_option); - _closures_class_names_map[flow_model_id][closures_option_lc] = class_name; -} - // // Dynamic Library Entry Points - DO NOT MODIFY // diff --git a/modules/thermal_hydraulics/src/components/FlowChannelBase.C b/modules/thermal_hydraulics/src/components/FlowChannelBase.C index ea1573bd6b32..29c132bf0e75 100644 --- a/modules/thermal_hydraulics/src/components/FlowChannelBase.C +++ b/modules/thermal_hydraulics/src/components/FlowChannelBase.C @@ -167,23 +167,9 @@ FlowChannelBase::init() if (getTHMProblem().hasClosures(_closures_name)) _closures = getTHMProblem().getClosures(_closures_name); - else - _closures = buildClosures(); } } -std::shared_ptr -FlowChannelBase::buildClosures() -{ - const std::string class_name = - ThermalHydraulicsApp::getClosuresClassName(_closures_name, getFlowModelID()); - InputParameters params = _factory.getValidParams(class_name); - params.set("_thm_problem") = &getTHMProblem(); - params.set("_logger") = &getTHMProblem().log(); - return _factory.create( - class_name, genName(name(), "closure", _closures_name), params); -} - void FlowChannelBase::initSecondary() { diff --git a/modules/thermal_hydraulics/test/tests/closures/none_1phase/tests b/modules/thermal_hydraulics/test/tests/closures/none_1phase/tests index 427282998c63..ead157dbac78 100644 --- a/modules/thermal_hydraulics/test/tests/closures/none_1phase/tests +++ b/modules/thermal_hydraulics/test/tests/closures/none_1phase/tests @@ -7,12 +7,4 @@ exodiff = 'phy.test_out.e' requirement = 'The system shall be able to define a closure object that does not define closures, so they can be defined directly in the input file.' [] - [enumeration_option] - type = RunException - input = 'phy.test.i' - cli_args = "GlobalParams/closures=none" - allow_deprecated = False - expect_err = 'The closures system now uses objects created in the input file' - requirement = 'The system shall report an error with a useful message if the user attempts the former way of not specifying closures.' - [] [] diff --git a/modules/thermal_hydraulics/test/tests/closures/simple_1phase/tests b/modules/thermal_hydraulics/test/tests/closures/simple_1phase/tests index 130d2a37d711..762bfdd38c02 100644 --- a/modules/thermal_hydraulics/test/tests/closures/simple_1phase/tests +++ b/modules/thermal_hydraulics/test/tests/closures/simple_1phase/tests @@ -7,12 +7,4 @@ expect_err = "pipe: When using simple closures, the parameter 'f' must be provided." requirement = 'The system shall report an error if the friction parameter is missing in the simple closures object.' [] - [enumeration_option] - type = RunException - input = 'err.missing_f_1phase.i' - cli_args = "GlobalParams/closures=simple Components/pipe/f=0" - allow_deprecated = False - expect_err = 'The closures system now uses objects created in the input file' - requirement = 'The system shall report an error if the user attempts passing closure parameters directly to components.' - [] []