25 params.
addParam<
bool>(
"full_output",
false,
"Add optional subchannel output variables");
38 const std::vector<SubdomainName> & blocks)
42 for (
const auto * aux_action : aux_actions)
43 if (aux_action->name() == var_name)
49 params.set<std::vector<SubdomainName>>(
"block") =
blocks;
51 _problem->addAuxVariable(
"MooseVariable", var_name, params);
57 bool pin_mesh_exist =
false;
58 bool duct_mesh_exist =
false;
60 std::vector<SubdomainName> fluid_blocks;
61 std::vector<SubdomainName> pin_blocks;
62 std::vector<SubdomainName> duct_blocks;
66 for (
const auto * mesh_action : mesh_actions)
68 if (!mesh_action->parameters().isParamValid(
"type"))
71 const auto & generator_type = mesh_action->
getParam<std::string>(
"type");
73 if (generator_type ==
"SCMQuadAssemblyMeshGenerator")
75 fluid_blocks = {
"subchannel"};
76 const auto & mesh_generator_params = mesh_action->getObjectParams();
77 const auto nx = mesh_generator_params.get<
unsigned int>(
"nx");
78 const auto ny = mesh_generator_params.get<
unsigned int>(
"ny");
81 pin_mesh_exist =
true;
82 pin_blocks = {
"fuel_pins"};
85 else if (generator_type ==
"SCMTriAssemblyMeshGenerator")
87 fluid_blocks = {
"subchannel"};
88 pin_mesh_exist =
true;
89 pin_blocks = {
"fuel_pins"};
91 else if (generator_type ==
"SCMQuadSubChannelMeshGenerator" ||
92 generator_type ==
"SCMTriSubChannelMeshGenerator")
95 fluid_blocks = {mesh_action->name()};
98 if (generator_type ==
"SCMTriPinMeshGenerator" || generator_type ==
"SCMQuadPinMeshGenerator")
100 pin_mesh_exist =
true;
102 pin_blocks = {mesh_action->name()};
105 if (generator_type ==
"SCMTriDuctMeshGenerator" || generator_type ==
"SCMQuadDuctMeshGenerator")
107 duct_mesh_exist =
true;
109 duct_blocks = {mesh_action->name()};
114 if (fluid_blocks.empty())
115 fluid_blocks = {
"subchannel"};
117 std::vector<std::pair<std::string, std::vector<SubdomainName>>> vars_to_add;
153 if (getParam<bool>(
"full_output"))
159 for (
const auto & var_info : vars_to_add)
static const std::string PRESSURE_DROP
static const std::string FRICTION_FACTOR
static const std::string MASS_FLOW_RATE
static const std::string DENSITY
const MooseEnum _fe_order
FE order of the aux variables added by this action.
const T & getParam(const std::string &name) const
void addAuxVariable(const std::string &var_name, const std::vector< SubdomainName > &blocks)
Add a block-restricted auxiliary variable unless the user already defined it.
static const std::string PIN_DIAMETER
virtual void act() override
InputParameters getValidParams(const std::string &name) const
const MooseEnum _fe_family
FE family of the aux variables added by this action.
static const std::string DUCT_HEAT_FLUX
static const std::string DUCT_TEMPERATURE
static const std::string WETTED_PERIMETER
static const std::string VISCOSITY
static const std::string PIN_TEMPERATURE
static InputParameters validParams()
static const std::string LINEAR_HEAT_RATE
static const std::string ENTHALPY
static const std::string SUM_CROSSFLOW
static const std::string PRESSURE
static const std::string SURFACE_AREA
registerMooseAction("SubChannelApp", SubChannelAddVariablesAction, "add_aux_variable")
std::shared_ptr< FEProblemBase > & _problem
static const std::string HEAT_TRANSFER_COEFFICIENT
SubChannelAddVariablesAction(const InputParameters ¶meters)
static const std::string DISPLACEMENT
Action that adds SubChannel variables needs for the solve.
static InputParameters validParams()
std::vector< const T *> getActions()
static const std::string TEMPERATURE