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");
118 params.addParamNamesToGroup(
"primary secondary",
"Gap surface definition");
119 params.addParamNamesToGroup(
120 "tangential_tolerance normal_smoothing_distance normal_smoothing_method",
121 "Gap edge and edge normal smoothing");
122 params.addParamNamesToGroup(
"gap_aux_type secondary_gap_offset mapped_primary_gap_offset",
124 params.addParamNamesToGroup(
"order quadrature",
"Integration");
125 params.addParamNamesToGroup(
126 "gap_conductivity gap_conductivity_function gap_conductivity_function_variable",
128 params.addParamNamesToGroup(
"save_in check_boundary_restricted warnings",
129 "Diagnostics and debug");
136 _quadrature(getParam<bool>(
"quadrature")),
138 _penetration_var_name(_quadrature ?
"qpoint_penetration" :
"penetration"),
139 _gap_value_name(
"paired_" + getParam<NonlinearVariableName>(
"variable")),
140 _gap_conductivity_name(
"paired_k_" + getParam<NonlinearVariableName>(
"variable")),
141 _boundary_pairs(getParam<BoundaryName, BoundaryName>(
"primary",
"secondary"))
143 if (!params.
get<
bool>(
"check_boundary_restricted"))
147 "check_boundary_restricted",
148 "This parameter is set to 'false'. Although thermal contact ",
149 "will be correctly enforced, the contact-related output may have issues ",
150 "in cases where where more than one face of an element belongs to a contact surface ",
151 "because the values from only one of the faces will be reported.");
154 "This parameter cannot be 'false' when 'quadrature=false'");
157 getParam<std::string>(
"type") !=
"GapPerfectConductance")
159 "This parameter should only be set by the user when 'type=GapPerfectConductance'.");
189 {
"tangential_tolerance",
190 "normal_smoothing_distance",
191 "normal_smoothing_method",
195 "check_boundary_restricted"});
199 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
200 params.
set<BoundaryName>(
"paired_boundary") = contact_pair.first;
201 params.
set<VariableName>(
"paired_variable") = getParam<NonlinearVariableName>(
"variable");
203 _problem->addAuxKernel(getParam<std::string>(
"gap_aux_type"),
209 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.first};
210 params.
set<BoundaryName>(
"paired_boundary") = contact_pair.second;
212 _problem->addAuxKernel(getParam<std::string>(
"gap_aux_type"),
213 "gap_value_primary_" +
name() +
"_" +
224 {
"tangential_tolerance",
225 "normal_smoothing_distance",
226 "normal_smoothing_method",
229 "check_boundary_restricted"});
232 params.
set<std::vector<VariableName>>(
"secondary_gap_offset") = {
233 getParam<VariableName>(
"secondary_gap_offset")};
235 params.
set<std::vector<VariableName>>(
"mapped_primary_gap_offset") = {
236 getParam<VariableName>(
"mapped_primary_gap_offset")};
238 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
239 params.
set<BoundaryName>(
"paired_boundary") = contact_pair.first;
241 _problem->addAuxKernel(
"PenetrationAux",
254 auto order = getParam<MooseEnum>(
"order");
255 std::string family =
"LAGRANGE";
267 var_params.set<
MooseEnum>(
"family") = family;
278 const std::string object_name = getParam<std::string>(
"type");
282 if (object_name ==
"GapPerfectConductance")
284 params.set<
Real>(
"penalty") = getParam<Real>(
"penalty");
285 params.set<std::vector<VariableName>>(
"gap_distance") = {
"penetration"};
287 params.set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
295 params.set<BoundaryName>(
"paired_boundary") = contact_pair.first;
296 params.set<
bool>(
"use_displaced_mesh") =
true;
300 params.set<std::vector<VariableName>>(
"gap_distance") = {
"penetration"};
304 params.set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
312 params.set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.first};
313 params.set<BoundaryName>(
"paired_boundary") = contact_pair.second;
331 const std::string object_name =
"GapHeatPointSourceMaster";
334 {
"tangential_tolerance",
335 "normal_smoothing_distance",
336 "normal_smoothing_method",
340 params.
set<BoundaryName>(
"boundary") = contact_pair.first;
341 params.
set<BoundaryName>(
"secondary") = contact_pair.second;
351 if (getParam<std::string>(
"type") !=
"GapHeatTransfer")
359 "Cannot specify both gap_conductance and gap_conductivity or gap_conductivity_function");
363 const std::string object_type =
"GapConductanceConstant";
366 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
373 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.first};
375 name() +
"_" +
"gap_value_primary" +
"_" +
384 const std::string object_type =
"GapConductance";
391 params.
set<std::vector<VariableName>>(
"variable") = {
392 getParam<NonlinearVariableName>(
"variable")};
393 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
396 params.
set<BoundaryName>(
"paired_boundary") = contact_pair.first;
400 params.
set<std::vector<VariableName>>(
"gap_distance") = {
"penetration"};
409 params.set<BoundaryName>(
"paired_boundary") = contact_pair.second;
410 params.set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.first};
413 name() +
"_" +
"gap_value_primary" +
"_" +
427 _problem->getNonlinearSystemBase(0).zeroVectorForResidual(
"secondary_flux");
433 if (!
_problem->isSNESMFReuseBaseSetbyUser())
434 _problem->setSNESMFReuseBase(
false,
false);
445 const auto & object_name = getParam<std::string>(
"type");
449 params.set<BoundaryName>(
"paired_boundary") = contact_pair.first;
450 params.set<
bool>(
"use_displaced_mesh") =
true;
451 params.set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
static InputParameters actionParameters()
static InputParameters actionParameters()
void paramError(const std::string ¶m, Args... args) const
const InputParameters & parameters() const
InputParameters getValidParams(const std::string &name) const
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)
const ExecFlagType EXEC_LINEAR
std::string stringify(const T &t)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
std::shared_ptr< FEProblemBase > & _problem
bool isParamValid(const std::string &name) const
static InputParameters validParams()
bool isParamSetByUser(const std::string &name) const
void paramInfo(const std::string ¶m, Args... args) const
const ExecFlagType EXEC_INITIAL