14 #include "libmesh/string_to_enum.h" 43 "Action that controls the creation of all of the necessary objects for " 44 "calculation of Thermal Contact");
49 "A string representing the Moose object that will be used for computing the gap size");
50 params.
addRequiredParam<NonlinearVariableName>(
"variable",
"The variable for thermal contact");
51 params.
addParam<std::vector<BoundaryName>>(
52 "primary",
"The list of boundary IDs referring to primary sidesets");
54 "secondary",
"The list of boundary IDs referring to secondary sidesets");
56 "tangential_tolerance>=0",
57 "Tangential distance to extend edges of contact surfaces");
59 "normal_smoothing_distance",
60 "normal_smoothing_distance>=0 & normal_smoothing_distance<=1",
61 "Distance from edge in parametric coordinates over which to smooth contact normal");
62 params.
addParam<std::string>(
"normal_smoothing_method",
63 "Method to use to smooth normals (edge_based|nodal_normal_based)");
69 "warnings",
false,
"Whether to output warning messages concerning nodes not being found");
71 "quadrature",
false,
"Whether or not to use quadrature point based gap heat transfer");
74 "appended_property_name",
"",
"Name appended to material properties to make them unique");
77 "A string representing the Moose object that will be used for heat conduction over the gap");
79 params.
addParam<std::vector<VariableName>>(
81 "The displacements appropriate for the simulation geometry and coordinate system");
83 params.
addParam<std::vector<AuxVariableName>>(
84 "save_in", {},
"The Auxiliary Variable to (optionally) save the boundary flux in");
88 "The thermal conductivity of the gap material");
90 "gap_conductivity_function",
91 "Thermal conductivity of the gap material as a function. Multiplied by gap_conductivity.");
92 params.
addParam<std::vector<VariableName>>(
93 "gap_conductivity_function_variable",
94 "Variable to be used in gap_conductivity_function in place of time");
95 params.
addParam<VariableName>(
"secondary_gap_offset",
96 "Offset to gap distance from secondary side");
97 params.
addParam<VariableName>(
"mapped_primary_gap_offset",
98 "Offset to gap distance mapped from primary side");
100 "check_boundary_restricted",
102 "Whether to check for multiple element sides on the boundary for the boundary restricted, " 103 "element aux variable set up for thermal contact enforcement. Setting this to false will " 104 "allow contribution to a single element's elemental value(s) from multiple boundary sides " 105 "on the same element (example: when the restricted boundary exists on two or more sides " 106 "of an element, such as at a corner of a mesh");
116 _quadrature(getParam<bool>(
"quadrature")),
118 _penetration_var_name(_quadrature ?
"qpoint_penetration" :
"penetration"),
119 _gap_value_name(
"paired_" + getParam<NonlinearVariableName>(
"variable")),
120 _gap_conductivity_name(
"paired_k_" + getParam<NonlinearVariableName>(
"variable")),
121 _boundary_pairs(getParam<BoundaryName, BoundaryName>(
"primary",
"secondary"))
123 if (!params.
get<
bool>(
"check_boundary_restricted"))
127 "check_boundary_restricted",
128 "This parameter is set to 'false'. Although thermal contact ",
129 "will be correctly enforced, the contact-related output may have issues ",
130 "in cases where where more than one face of an element belongs to a contact surface ",
131 "because the values from only one of the faces will be reported.");
134 "This parameter cannot be 'false' when 'quadrature=false'");
165 {
"tangential_tolerance",
166 "normal_smoothing_distance",
167 "normal_smoothing_method",
170 "check_boundary_restricted"});
174 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
175 params.
set<BoundaryName>(
"paired_boundary") = contact_pair.first;
176 params.
set<VariableName>(
"paired_variable") = getParam<NonlinearVariableName>(
"variable");
178 _problem->addAuxKernel(getParam<std::string>(
"gap_aux_type"),
184 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.first};
185 params.
set<BoundaryName>(
"paired_boundary") = contact_pair.second;
187 _problem->addAuxKernel(getParam<std::string>(
"gap_aux_type"),
188 "gap_value_primary_" +
name() +
"_" +
199 {
"tangential_tolerance",
200 "normal_smoothing_distance",
201 "normal_smoothing_method",
203 "check_boundary_restricted"});
206 params.
set<std::vector<VariableName>>(
"secondary_gap_offset") = {
207 getParam<VariableName>(
"secondary_gap_offset")};
209 params.
set<std::vector<VariableName>>(
"mapped_primary_gap_offset") = {
210 getParam<VariableName>(
"mapped_primary_gap_offset")};
212 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
213 params.
set<BoundaryName>(
"paired_boundary") = contact_pair.first;
215 _problem->addAuxKernel(
"PenetrationAux",
228 MooseEnum order = getParam<MooseEnum>(
"order");
229 std::string family =
"LAGRANGE";
241 var_params.set<
MooseEnum>(
"family") = family;
252 const std::string object_name = getParam<std::string>(
"type");
258 params.set<BoundaryName>(
"paired_boundary") = contact_pair.first;
259 params.set<
bool>(
"use_displaced_mesh") =
true;
263 params.set<std::vector<VariableName>>(
"gap_distance") = {
"penetration"};
267 params.set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
275 params.set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.first};
276 params.set<BoundaryName>(
"paired_boundary") = contact_pair.second;
293 const std::string object_name =
"GapHeatPointSourceMaster";
296 {
"tangential_tolerance",
297 "normal_smoothing_distance",
298 "normal_smoothing_method",
301 params.
set<BoundaryName>(
"boundary") = contact_pair.first;
302 params.
set<BoundaryName>(
"secondary") = contact_pair.second;
312 if (getParam<std::string>(
"type") !=
"GapHeatTransfer")
320 "Cannot specify both gap_conductance and gap_conductivity or gap_conductivity_function");
324 const std::string object_type =
"GapConductanceConstant";
327 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
334 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.first};
336 name() +
"_" +
"gap_value_primary" +
"_" +
345 const std::string object_type =
"GapConductance";
352 params.
set<std::vector<VariableName>>(
"variable") = {
353 getParam<NonlinearVariableName>(
"variable")};
354 params.
set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.second};
357 params.
set<BoundaryName>(
"paired_boundary") = contact_pair.first;
361 params.
set<std::vector<VariableName>>(
"gap_distance") = {
"penetration"};
370 params.set<BoundaryName>(
"paired_boundary") = contact_pair.second;
371 params.set<std::vector<BoundaryName>>(
"boundary") = {contact_pair.first};
374 name() +
"_" +
"gap_value_primary" +
"_" +
386 _problem->getNonlinearSystemBase(0).addVector(
"secondary_flux",
false,
GHOSTED);
387 _problem->getNonlinearSystemBase(0).zeroVectorForResidual(
"secondary_flux");
393 if (!
_problem->isSNESMFReuseBaseSetbyUser())
394 _problem->setSNESMFReuseBase(
false,
false);
static InputParameters actionParameters()
static std::string variableType(const FEType &fe_type, const bool is_fv=false, const bool is_array=false)
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
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