15 #include "libmesh/string_to_enum.h" 44 "Action that controls the creation of all of the necessary objects for " 45 "calculation of Thermal Contact");
50 "A string representing the Moose object that will be used for computing the gap size");
51 params.
addRequiredParam<NonlinearVariableName>(
"variable",
"The variable for thermal contact");
52 params.
addParam<std::vector<BoundaryName>>(
53 "primary",
"The list of boundary IDs referring to primary sidesets");
55 "secondary",
"The list of boundary IDs referring to secondary sidesets");
57 "tangential_tolerance>=0",
58 "Tangential distance to extend edges of contact surfaces");
60 "normal_smoothing_distance",
61 "normal_smoothing_distance>=0 & normal_smoothing_distance<=1",
62 "Distance from edge in parametric coordinates over which to smooth contact normal");
63 params.
addParam<std::string>(
"normal_smoothing_method",
64 "Method to use to smooth normals (edge_based|nodal_normal_based)");
70 "warnings",
false,
"Whether to output warning messages concerning nodes not being found");
72 "quadrature",
false,
"Whether or not to use quadrature point based gap heat transfer");
76 "The penalty used in the residual and Jacobian calculations " 77 "when using the GapPerfectConductance model");
79 "appended_property_name",
"",
"Name appended to material properties to make them unique");
82 "A string representing the Moose object that will be used for heat conduction over the gap");
84 params.
addParam<std::vector<VariableName>>(
86 "The displacements appropriate for the simulation geometry and coordinate system");
88 params.
addParam<std::vector<AuxVariableName>>(
89 "save_in", {},
"The Auxiliary Variable to (optionally) save the boundary flux in");
93 "The thermal conductivity of the gap material");
95 "gap_conductivity_function",
96 "Thermal conductivity of the gap material as a function. Multiplied by gap_conductivity.");
97 params.
addParam<std::vector<VariableName>>(
98 "gap_conductivity_function_variable",
99 "Variable to be used in gap_conductivity_function in place of time");
100 params.
addParam<VariableName>(
"secondary_gap_offset",
101 "Offset to gap distance from secondary side");
102 params.
addParam<VariableName>(
"mapped_primary_gap_offset",
103 "Offset to gap distance mapped from primary side");
105 "check_boundary_restricted",
107 "Whether to check for multiple element sides on the boundary for the boundary restricted, " 108 "element aux variable set up for thermal contact enforcement. Setting this to false will " 109 "allow contribution to a single element's elemental value(s) from multiple boundary sides " 110 "on the same element (example: when the restricted boundary exists on two or more sides " 111 "of an element, such as at a corner of a mesh");
116 params.addParamNamesToGroup(
"primary secondary",
"Gap surface definition");
117 params.addParamNamesToGroup(
118 "tangential_tolerance normal_smoothing_distance normal_smoothing_method",
119 "Gap edge and edge normal smoothing");
120 params.addParamNamesToGroup(
"gap_aux_type secondary_gap_offset mapped_primary_gap_offset",
122 params.addParamNamesToGroup(
"order quadrature",
"Integration");
123 params.addParamNamesToGroup(
124 "gap_conductivity gap_conductivity_function gap_conductivity_function_variable",
126 params.addParamNamesToGroup(
"save_in check_boundary_restricted warnings",
127 "Diagnostics and debug");
134 _quadrature(getParam<bool>(
"quadrature")),
136 _penetration_var_name(_quadrature ?
"qpoint_penetration" :
"penetration"),
137 _gap_value_name(
"paired_" + getParam<NonlinearVariableName>(
"variable")),
138 _gap_conductivity_name(
"paired_k_" + getParam<NonlinearVariableName>(
"variable")),
139 _boundary_pairs(getParam<BoundaryName, BoundaryName>(
"primary",
"secondary"))
141 if (!params.
get<
bool>(
"check_boundary_restricted"))
145 "check_boundary_restricted",
146 "This parameter is set to 'false'. Although thermal contact ",
147 "will be correctly enforced, the contact-related output may have issues ",
148 "in cases where where more than one face of an element belongs to a contact surface ",
149 "because the values from only one of the faces will be reported.");
152 "This parameter cannot be 'false' when 'quadrature=false'");
155 getParam<std::string>(
"type") !=
"GapPerfectConductance")
157 "This parameter should only be set by the user when 'type=GapPerfectConductance'.");
187 {
"tangential_tolerance",
188 "normal_smoothing_distance",
189 "normal_smoothing_method",
192 "check_boundary_restricted"});
196 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
197 params.
set<BoundaryName>(
"paired_boundary") = contact_pair.first;
198 params.
set<VariableName>(
"paired_variable") = getParam<NonlinearVariableName>(
"variable");
200 _problem->addAuxKernel(getParam<std::string>(
"gap_aux_type"),
206 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.first};
207 params.
set<BoundaryName>(
"paired_boundary") = contact_pair.second;
209 _problem->addAuxKernel(getParam<std::string>(
"gap_aux_type"),
210 "gap_value_primary_" +
name() +
"_" +
221 {
"tangential_tolerance",
222 "normal_smoothing_distance",
223 "normal_smoothing_method",
225 "check_boundary_restricted"});
228 params.
set<std::vector<VariableName>>(
"secondary_gap_offset") = {
229 getParam<VariableName>(
"secondary_gap_offset")};
231 params.
set<std::vector<VariableName>>(
"mapped_primary_gap_offset") = {
232 getParam<VariableName>(
"mapped_primary_gap_offset")};
234 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
235 params.
set<BoundaryName>(
"paired_boundary") = contact_pair.first;
237 _problem->addAuxKernel(
"PenetrationAux",
250 auto order = getParam<MooseEnum>(
"order");
251 std::string family =
"LAGRANGE";
263 var_params.set<
MooseEnum>(
"family") = family;
274 const std::string object_name = getParam<std::string>(
"type");
278 if (object_name ==
"GapPerfectConductance")
280 params.set<
Real>(
"penalty") = getParam<Real>(
"penalty");
281 params.set<std::vector<VariableName>>(
"gap_distance") = {
"penetration"};
283 params.set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
291 params.set<BoundaryName>(
"paired_boundary") = contact_pair.first;
292 params.set<
bool>(
"use_displaced_mesh") =
true;
296 params.set<std::vector<VariableName>>(
"gap_distance") = {
"penetration"};
300 params.set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
308 params.set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.first};
309 params.set<BoundaryName>(
"paired_boundary") = contact_pair.second;
327 const std::string object_name =
"GapHeatPointSourceMaster";
330 {
"tangential_tolerance",
331 "normal_smoothing_distance",
332 "normal_smoothing_method",
335 params.
set<BoundaryName>(
"boundary") = contact_pair.first;
336 params.
set<BoundaryName>(
"secondary") = contact_pair.second;
346 if (getParam<std::string>(
"type") !=
"GapHeatTransfer")
354 "Cannot specify both gap_conductance and gap_conductivity or gap_conductivity_function");
358 const std::string object_type =
"GapConductanceConstant";
361 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
368 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.first};
370 name() +
"_" +
"gap_value_primary" +
"_" +
379 const std::string object_type =
"GapConductance";
386 params.
set<std::vector<VariableName>>(
"variable") = {
387 getParam<NonlinearVariableName>(
"variable")};
388 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
391 params.
set<BoundaryName>(
"paired_boundary") = contact_pair.first;
395 params.
set<std::vector<VariableName>>(
"gap_distance") = {
"penetration"};
404 params.set<BoundaryName>(
"paired_boundary") = contact_pair.second;
405 params.set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.first};
408 name() +
"_" +
"gap_value_primary" +
"_" +
422 _problem->getNonlinearSystemBase(0).zeroVectorForResidual(
"secondary_flux");
428 if (!
_problem->isSNESMFReuseBaseSetbyUser())
429 _problem->setSNESMFReuseBase(
false,
false);
440 const auto & object_name = getParam<std::string>(
"type");
444 params.set<BoundaryName>(
"paired_boundary") = contact_pair.first;
445 params.set<
bool>(
"use_displaced_mesh") =
true;
446 params.set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
static InputParameters actionParameters()
static InputParameters actionParameters()
InputParameters getValidParams(const std::string &name) const
virtual const std::string & name() const
bool isParamValid(const std::string &name) const
static InputParameters validParams()
static MooseEnum getNonlinearVariableOrders()
const std::string & _current_task
static std::string variableType(const libMesh::FEType &fe_type, const bool is_fv=false, const bool is_array=false)
void paramError(const std::string ¶m, Args... args) const
const ExecFlagType EXEC_LINEAR
std::string stringify(const T &t)
bool isParamSetByUser(const std::string &nm) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
std::shared_ptr< FEProblemBase > & _problem
const InputParameters & parameters() const
void paramInfo(const std::string ¶m, Args... args) const
const ExecFlagType EXEC_INITIAL