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++)
93 std::vector<PostprocessorName> pp_names;
94 std::vector<std::string> descriptions;
95 std::vector<Real> tolerances;
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"));
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"};
void addConstantDensitySolidPropertiesMaterial(const UserObjectName &sp_name, const Real &T_ref, unsigned int i_region) const
Adds a ADConstantDensityThermalSolidPropertiesMaterial for a heat structure region.
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.
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.
const ExecFlagType EXEC_NONLINEAR_CONVERGENCE
THMProblem & getTHMProblem() const
Gets the THM problem.
virtual void check() const override
Check the component integrity.
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters ¶meters)
InputParameters getValidParams(const std::string &name) const
const unsigned int & getIndexFromName(const std::string &name) const
Get index of the block from its name.
virtual void addPostprocessor(const std::string &pp_name, const std::string &name, InputParameters ¶meters)
void addAverageElementSizePostprocessor(const SubdomainName &block)
Adds a PP for the average element size on a block.
void check() const
Method to be called in the component's check() method.
const std::string & name() const
virtual Convergence & getConvergence(const std::string &name, const THREAD_ID tid=0) const
static const std::string TEMPERATURE
static InputParameters validParams()
std::string nonlinearConvergenceName() const
Nonlinear Convergence name.
virtual Convergence * getNonlinearConvergence() const override
Gets the Component's nonlinear Convergence object if it has one.
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 init()
Initializes the component.
HeatStructureBase(const InputParameters ¶ms)
Interface class for heat structure components.
static const libMesh::FEType & feType()
Get the FE type used for heat conduction.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
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 init()
Method to be called in the component's init() method.
Factory & _factory
The Factory associated with the MooseApp.
void addMooseObjects()
Method to be called in the component's addMooseObjects() method.
void addVariables()
Method to be called in the component's addVariables() method.
IntRange< T > make_range(T beg, T end)
virtual void check() const override
Check the component integrity.
virtual void addVariables() override
virtual bool usingSecondOrderMesh() const override
Check if second order mesh is being used by this geometrical component.
void mooseError(Args &&... args) const
static InputParameters validParams()
bool isParamValid(const std::string &name) const
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
void addResidualNormPostprocessor(const SubdomainName &block, const UserObjectName &sp_name, Real T_ref)
Adds a residual norm PP for a block.
std::map< std::string, unsigned int > _name_index
Map from block name to block index.
virtual void addMooseObjects() override
virtual void init() override
Initializes the component.
const std::vector< std::string > & getNames() const
Gets the names of the transverse regions.
const ExecFlagType EXEC_INITIAL