Line data Source code
1 : //* This file is part of the MOOSE framework
2 : //* https://mooseframework.inl.gov
3 : //*
4 : //* All rights reserved, see COPYRIGHT for full restrictions
5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 : //*
7 : //* Licensed under LGPL 2.1, please see LICENSE for details
8 : //* https://www.gnu.org/licenses/lgpl-2.1.html
9 :
10 : #include "FluidPropertiesApp.h"
11 : #include "Moose.h"
12 : #include "AppFactory.h"
13 : #include "MooseSyntax.h"
14 : #include "MiscApp.h"
15 :
16 : #ifdef AIR_FP_ENABLED
17 : #include "AirApp.h"
18 : #endif
19 : #ifdef CARBON_DIOXIDE_FP_ENABLED
20 : #include "CarbonDioxideApp.h"
21 : #endif
22 : #ifdef HELIUM_FP_ENABLED
23 : #include "HeliumApp.h"
24 : #endif
25 : #ifdef NITROGEN_FP_ENABLED
26 : #include "NitrogenApp.h"
27 : #endif
28 : #ifdef POTASSIUM_FP_ENABLED
29 : #include "PotassiumApp.h"
30 : #endif
31 : #ifdef SODIUM_FP_ENABLED
32 : #include "SodiumApp.h"
33 : #endif
34 :
35 : InputParameters
36 802 : FluidPropertiesApp::validParams()
37 : {
38 802 : InputParameters params = MooseApp::validParams();
39 802 : params.set<bool>("use_legacy_material_output") = false;
40 802 : params.set<bool>("use_legacy_initial_residual_evaluation_behavior") = false;
41 802 : return params;
42 0 : }
43 :
44 : registerKnownLabel("FluidPropertiesApp");
45 :
46 181 : FluidPropertiesApp::FluidPropertiesApp(const InputParameters & parameters) : MooseApp(parameters)
47 : {
48 181 : FluidPropertiesApp::registerAll(_factory, _action_factory, _syntax);
49 181 : }
50 :
51 362 : FluidPropertiesApp::~FluidPropertiesApp() {}
52 :
53 : void
54 621 : FluidPropertiesApp::registerApps()
55 : {
56 621 : const std::string doc = "Saline thermophysical fluid properties ";
57 : #ifdef SALINE_ENABLED
58 621 : addBoolCapability("saline", true, doc + "are available.");
59 : #else
60 : addBoolCapability("saline", false, doc + "are not available.");
61 : #endif
62 :
63 621 : registerApp(FluidPropertiesApp);
64 621 : MiscApp::registerApps();
65 : #ifdef AIR_FP_ENABLED
66 621 : registerApp(AirApp);
67 : #endif
68 : #ifdef CARBON_DIOXIDE_FP_ENABLED
69 621 : registerApp(CarbonDioxideApp);
70 : #endif
71 : #ifdef HELIUM_FP_ENABLED
72 621 : registerApp(HeliumApp);
73 : #endif
74 : #ifdef NITROGEN_FP_ENABLED
75 621 : registerApp(NitrogenApp);
76 : #endif
77 : #ifdef POTASSIUM_FP_ENABLED
78 621 : registerApp(PotassiumApp);
79 : #endif
80 : #ifdef SODIUM_FP_ENABLED
81 1242 : registerApp(SodiumApp);
82 : #endif
83 621 : }
84 :
85 : void
86 802 : FluidPropertiesApp::registerAll(Factory & f, ActionFactory & af, Syntax & syntax)
87 : {
88 : #ifdef AIR_FP_ENABLED
89 802 : AirApp::registerAll(f, af, syntax);
90 : #endif
91 : #ifdef CARBON_DIOXIDE_FP_ENABLED
92 802 : CarbonDioxideApp::registerAll(f, af, syntax);
93 : #endif
94 : #ifdef HELIUM_FP_ENABLED
95 802 : HeliumApp::registerAll(f, af, syntax);
96 : #endif
97 : #ifdef NITROGEN_FP_ENABLED
98 802 : NitrogenApp::registerAll(f, af, syntax);
99 : #endif
100 : #ifdef POTASSIUM_FP_ENABLED
101 802 : PotassiumApp::registerAll(f, af, syntax);
102 : #endif
103 : #ifdef SODIUM_FP_ENABLED
104 802 : SodiumApp::registerAll(f, af, syntax);
105 : #endif
106 :
107 802 : MiscApp::registerAll(f, af, syntax);
108 :
109 802 : Registry::registerObjectsTo(f, {"FluidPropertiesApp"});
110 802 : Registry::registerActionsTo(af, {"FluidPropertiesApp"});
111 :
112 1604 : registerSyntaxTask(
113 : "AddFluidPropertiesDeprecatedAction", "Modules/FluidProperties/*", "add_fluid_properties");
114 1604 : registerSyntaxTask("AddFluidPropertiesAction", "FluidProperties/*", "add_fluid_properties");
115 1604 : registerMooseObjectTask("add_fluid_properties", FluidProperties, false);
116 1604 : registerMooseObjectTask("add_fp_output", Output, false);
117 :
118 : // Fluid properties depend on variables
119 1604 : syntax.addDependency("add_aux_variable", "add_fluid_properties");
120 1604 : syntax.addDependency("add_variable", "add_fluid_properties");
121 1604 : syntax.addDependency("add_elemental_field_variable", "add_fluid_properties");
122 1604 : syntax.addDependency("add_external_aux_variables", "add_fluid_properties");
123 1604 : syntax.addDependency("add_fp_output", "add_output");
124 1604 : syntax.addDependency("add_postprocessor", "add_fp_output");
125 :
126 1604 : syntax.registerActionSyntax("AddFluidPropertiesInterrogatorAction",
127 : "FluidPropertiesInterrogator");
128 802 : }
129 :
130 : extern "C" void
131 0 : FluidPropertiesApp__registerAll(Factory & f, ActionFactory & af, Syntax & s)
132 : {
133 0 : FluidPropertiesApp::registerAll(f, af, s);
134 0 : }
135 : extern "C" void
136 0 : FluidPropertiesApp__registerApps()
137 : {
138 0 : FluidPropertiesApp::registerApps();
139 0 : }
|