https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GapFluxModelPressureDependentConduction.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
12
14
17{
19
20 params.addClassDescription("Heat flux model across a closed gap to calculate the conductance "
21 "between two solid materials");
22 params.addRequiredCoupledVar("temperature", "The name of the temperature variable");
23 params.addParam<UserObjectName>(
24 "contact_pressure_uo",
25 "The mortar contact user object that provides the normal contact pressure. Required when the "
26 "contact pressure comes from a mechanical contact solve.");
27 params.addCoupledVar(
28 "contact_pressure",
29 "An auxiliary variable holding a prescribed physical normal contact pressure");
30
31 params.addParam<Real>(
32 "scaling_coefficient",
33 1.0,
34 "The leading coefficient for the closed gap conductance value; used for tuning");
35 params.addRequiredParam<MaterialPropertyName>(
36 "primary_conductivity", "The thermal conductivity of the primary surface solid material");
37 params.addRequiredParam<MaterialPropertyName>(
38 "secondary_conductivity", "The thermal conductivity of the secondary surface solid material");
39 params.addRequiredParam<MaterialPropertyName>(
40 "primary_hardness", "The hardness value of the primary surface material");
41 params.addRequiredParam<MaterialPropertyName>("secondary_hardness",
42 "The hardness of the secondary surface material");
43
44 return params;
45}
46
48 const InputParameters & parameters)
49 : GapFluxModelBase(parameters),
50 _primary_T(adCoupledNeighborValue("temperature")),
51 _secondary_T(adCoupledValue("temperature")),
52 _contact_pressure_provider(
53 isParamValid("contact_pressure_uo")
54 ? &getUserObject<MortarContactPressureProvider>("contact_pressure_uo")
55 : nullptr),
56 _contact_pressure(isCoupled("contact_pressure") || isCoupledConstant("contact_pressure")
57 ? &adCoupledLowerValue("contact_pressure")
58 : nullptr),
59 _scaling(getParam<Real>("scaling_coefficient")),
60 _primary_conductivity(getNeighborADMaterialProperty<Real>("primary_conductivity")),
61 _secondary_conductivity(getADMaterialProperty<Real>("secondary_conductivity")),
62 _primary_hardness(getNeighborADMaterialProperty<Real>("primary_hardness")),
63 _secondary_hardness(getADMaterialProperty<Real>("secondary_hardness"))
64{
66 paramError("contact_pressure",
67 "Provide the contact pressure through either 'contact_pressure' or "
68 "'contact_pressure_uo', but not both.");
70 paramError("contact_pressure_uo",
71 "Provide the contact pressure through 'contact_pressure_uo' or 'contact_pressure'.");
72}
73
74void
76 const ModularGapConductanceConstraint & mortar_constraint) const
77{
80 "contact_pressure_uo",
81 mortar_constraint.primarySubdomain(),
82 mortar_constraint.secondarySubdomain(),
83 getParam<bool>("use_displaced_mesh"));
84}
85
94
97{
98 // Check that the surfaces are in actual contact with the pressure:
99 const auto contact_pressure = contactPressure();
100 if (contact_pressure <= 0.0)
101 return 0.0;
102
103 // calculate the harmonic means of the two material properties
105 const ADReal k_harmonic = 2 * _primary_conductivity[_qp] * _secondary_conductivity[_qp] / k_sum;
106
108 const ADReal h_harmonic = 2 * _primary_hardness[_qp] * _secondary_hardness[_qp] / h_sum;
109
110 return _scaling * k_harmonic * (_primary_T[_qp] - _secondary_T[_qp]) * contact_pressure /
111 h_harmonic;
112}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("HeatTransferApp", GapFluxModelPressureDependentConduction)
Base class for gap flux models used by ModularGapConductanceConstraint.
static InputParameters validParams()
const Elem * _lower_secondary_elem
The secondary lower-dimensional element of the current mortar segment.
Gap flux model used to compute the conductance across a closed gap along which two solid materials ar...
const Real _scaling
Parameter used to scale the closed gap interface conductance value.
const MortarContactPressureProvider *const _contact_pressure_provider
Mortar contact object that provides the physical contact pressure, or nullptr.
const ADVariableValue *const _contact_pressure
Prescribed contact pressure variable, or nullptr when the pressure comes from the user object provide...
ADReal contactPressure() const
The contact pressure at the current quadrature point.
void checkConstraint(const ModularGapConductanceConstraint &mortar_constraint) const override
Report an error if this model cannot operate with the mortar constraint that calls it.
const ADVariableValue & _primary_T
Temperatures from the primary and secondary surfaces at the interface.
const ADMaterialProperty< Real > & _primary_hardness
Material hardness value of the two solid materials at the interface.
const ADMaterialProperty< Real > & _primary_conductivity
Thermal conductivity of the two solid materials at the closed gap interface.
GapFluxModelPressureDependentConduction(const InputParameters &parameters)
ADReal computeFlux() const override
Compute gap physics used cache information in GapFluxModelBase.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
This Constraint implements thermal contact using a "gap conductance" model in which the flux is repre...
void paramError(const std::string &param, Args... args) const
SubdomainID primarySubdomain() const
SubdomainID secondarySubdomain() const
void checkConsumer(const MooseObject &consumer, const std::string &param, SubdomainID primary_subdomain, SubdomainID secondary_subdomain, bool use_displaced_mesh) const
ADReal qpContactPressure(const libMesh::Elem &lower_secondary_elem, unsigned int qp) const