19 params.
addParam<Real>(
"T_rel_step_tol", 1e-5,
"Temperature relative step tolerance");
20 params.
addParam<Real>(
"res_tol", 1e-5,
"Residual tolerance");
60 mooseError(
"ComponentsConvergence may only be used if 'solid_properties' is provided.");
78 const auto sp_names = getParam<std::vector<UserObjectName>>(
"solid_properties");
79 const auto T_ref = getParam<std::vector<Real>>(
"solid_properties_T_ref");
80 for (
unsigned int i = 0; i < sp_names.size(); i++)
86 for (
const auto i : make_range(
blocks.size()))
93 std::vector<PostprocessorName> pp_names;
94 std::vector<std::string> descriptions;
95 std::vector<Real> tolerances;
96 for (
const auto i : make_range(
blocks.size()))
98 pp_names.push_back(
blocks[i] +
"_T_step");
99 descriptions.push_back(
"T step (" +
blocks[i] +
")");
100 tolerances.push_back(getParam<Real>(
"T_rel_step_tol"));
102 for (
const auto i : make_range(
blocks.size()))
104 pp_names.push_back(
blocks[i] +
"_res");
105 descriptions.push_back(
"residual (" +
blocks[i] +
")");
106 tolerances.push_back(getParam<Real>(
"res_tol"));
115 unsigned int i_region)
const
118 const auto region_names =
getNames();
120 const std::string class_name =
"ADConstantDensityThermalSolidPropertiesMaterial";
122 params.
set<std::vector<SubdomainName>>(
"block") = {
blocks[i_region]};
124 params.
set<UserObjectName>(
"sp") = sp_name;
125 params.
set<Real>(
"T_ref") = T_ref;
127 class_name,
genName(
name(), class_name, region_names[i_region]), params);
133 const std::string class_name =
"AverageElementSize";
135 params.
set<std::vector<SubdomainName>>(
"block") = {block};
137 params.
set<std::vector<OutputName>>(
"outputs") = {
"none"};
143 const UserObjectName & sp_name,
146 const std::string class_name =
"NormalizedHeatStructureResidualNorm";
149 params.
set<std::vector<SubdomainName>>(
"block") = {block};
151 params.
set<Real>(
"T_ref") = T_ref;
152 params.
set<UserObjectName>(
"solid_properties") = sp_name;
153 params.
set<PostprocessorName>(
"ref_elem_size") = block +
"_havg";
155 params.
set<std::vector<OutputName>>(
"outputs") = {
"none"};
const ExecFlagType EXEC_INITIAL
const ExecFlagType EXEC_NONLINEAR_CONVERGENCE
static InputParameters validParams()
const std::vector< std::string > & getNames() const
Gets the names of the transverse regions.
virtual void check() const override
Check the component integrity.
virtual void init()
Initializes the component.
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
void addMaximumFunctorPostprocessor(const std::string &functor_name, const std::string &pp_name, const Real normalization, const std::vector< SubdomainName > &subdomains)
Adds a Postprocessor to compute the maximum of a functor over some domain.
THMProblem & getTHMProblem() const
Gets the THM problem.
Factory & _factory
The Factory associated with the MooseApp.
std::string nonlinearConvergenceName() const
Nonlinear Convergence name.
void addNonlinearStepFunctorMaterial(const std::string &functor_name, const std::string &property, bool functor_is_ad)
Adds a functor material to compute the absolute value of the change (step) of some functor between no...
void addMultiPostprocessorConvergence(const std::vector< PostprocessorName > &postprocessors, const std::vector< std::string > &descriptions, const std::vector< Real > &tolerances)
Adds a MultiPostprocessorConvergence for nonlinear convergence for the component.
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters ¶meters)
virtual Convergence & getConvergence(const std::string &name, const THREAD_ID tid=0) const
virtual void addPostprocessor(const std::string &pp_name, const std::string &name, InputParameters ¶meters)
InputParameters getValidParams(const std::string &name) const
static const libMesh::FEType & feType()
Get the FE type used for heat conduction.
static const std::string TEMPERATURE
void addAverageElementSizePostprocessor(const SubdomainName &block)
Adds a PP for the average element size on a block.
static InputParameters validParams()
HeatStructureBase(const InputParameters ¶ms)
void addConstantDensitySolidPropertiesMaterial(const UserObjectName &sp_name, const Real &T_ref, unsigned int i_region) const
Adds a ADConstantDensityThermalSolidPropertiesMaterial for a heat structure region.
virtual Convergence * getNonlinearConvergence() const override
Gets the Component's nonlinear Convergence object if it has one.
void addResidualNormPostprocessor(const SubdomainName &block, const UserObjectName &sp_name, Real T_ref)
Adds a residual norm PP for a block.
const unsigned int & getIndexFromName(const std::string &name) const
Get index of the block from its name.
virtual void check() const override
Check the component integrity.
virtual void addMooseObjects() override
virtual void addVariables() override
virtual void init() override
Initializes the component.
std::map< std::string, unsigned int > _name_index
Map from block name to block index.
virtual bool usingSecondOrderMesh() const override
Check if second order mesh is being used by this geometrical component.
Interface class for heat structure components.
void addMooseObjects()
Method to be called in the component's addMooseObjects() method.
void check() const
Method to be called in the component's check() method.
void init()
Method to be called in the component's init() method.
void addVariables()
Method to be called in the component's addVariables() method.
static InputParameters validParams()
void mooseError(Args &&... args) const
bool isParamValid(const std::string &name) const
std::string genName(const std::string &prefix, unsigned int id, const std::string &suffix="") const
Build a name from a prefix, number and possible suffix.