https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ElectrostaticContactCondition.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
11
13
16{
18 params.addParam<MaterialPropertyName>(
19 "primary_conductivity", "electrical_conductivity", "Conductivity on the primary block.");
20 params.addParam<MaterialPropertyName>(
21 "secondary_conductivity", "electrical_conductivity", "Conductivity on the secondary block.");
22 params.addParam<MaterialPropertyName>(
23 "mean_hardness",
24 "mean_hardness",
25 "Geometric mean of the hardness of each contacting material.");
26 params.addParam<Real>("user_electrical_contact_conductance",
27 "User-supplied electrical contact conductance coefficient.");
28 params.addParam<FunctionName>("mechanical_pressure",
29 0.0,
30 "Mechanical pressure uniformly applied at the contact surface area "
31 "(Pressure = Force / Surface Area).");
33 "Interface condition that describes the current continuity and contact conductance across a "
34 "boundary formed between two dissimilar materials (resulting in a potential discontinuity). "
35 "Conductivity on each side of the boundary is defined via the material properties system.");
36 return params;
37}
38
40 : ADInterfaceKernel(parameters),
41 _conductivity_primary(getADMaterialProperty<Real>("primary_conductivity")),
42 _conductivity_secondary(getNeighborADMaterialProperty<Real>("secondary_conductivity")),
43 _mean_hardness(isParamValid("user_electrical_contact_conductance")
44 ? getGenericZeroMaterialProperty<Real, true>("mean_hardness")
45 : getADMaterialProperty<Real>("mean_hardness")),
46 _mechanical_pressure(getFunction("mechanical_pressure")),
47 _user_contact_conductance(isParamValid("user_electrical_contact_conductance")
48 ? getParam<Real>("user_electrical_contact_conductance")
49 : _real_zero),
50 _alpha_electric(64.0),
51 _beta_electric(0.35)
52{
53 _conductance_was_set = parameters.isParamSetByUser("user_electrical_contact_conductance");
55
58 "In ",
59 _name,
60 ", both user-supplied electrical contact conductance and mean hardness values (for "
61 "calculating contact conductance) have been provided. Please only provide one or the "
62 "other!");
63}
64
67{
68 using std::pow;
69
70 ADReal res = 0.0;
71 ADReal contact_conductance = 0.0;
72
73 ADReal mean_conductivity = 2 * _conductivity_primary[_qp] * _conductivity_secondary[_qp] /
75
77 contact_conductance = _user_contact_conductance;
79 contact_conductance =
80 _alpha_electric * mean_conductivity *
82
83 switch (type)
84 {
85 case Moose::Element:
86 res = -contact_conductance * (_neighbor_value[_qp] - _u[_qp]) * _test[_i][_qp];
87 break;
88
89 case Moose::Neighbor:
91 break;
92 }
93
94 return res;
95}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("ElectromagneticsApp", ElectrostaticContactCondition)
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const MooseArray< Point > & _normals
const ADTemplateVariableGradient< T > & _grad_u
const OutputTools< T >::VariableTestValue & _test_neighbor
const OutputTools< T >::VariableTestValue & _test
static InputParameters validParams()
const ADTemplateVariableValue< T > & _neighbor_value
const ADTemplateVariableValue< T > & _u
This ADInterfaceKernel object calculates the electrostatic potential value and gradient relationship ...
virtual ADReal computeQpResidual(Moose::DGResidualType type) override
bool _mean_hardness_was_set
Check parameter for material-provided mean hardness value.
ElectrostaticContactCondition(const InputParameters &parameters)
const ADMaterialProperty< Real > & _mean_hardness
Geometric mean of the hardness from both sides of the boundary, taken in as a material property.
bool _conductance_was_set
Check parameter for user-provided electrical contact conductance value.
const Function & _mechanical_pressure
Mechanical pressure uniformly applied at the contact surface area (user-supplied for now)
const ADMaterialProperty< Real > & _conductivity_primary
Electrical conductivity property for the primary side.
const Real _alpha_electric
Experimental proportional fit parameter for contact conductance parameter (set using Cincotti et al D...
const Real _beta_electric
Experimental power fit parameter for contact conductance parameter (set using Cincotti et al DOI:10....
const ADMaterialProperty< Real > & _conductivity_secondary
Electrical conductivity property for the secondary side.
const Real & _user_contact_conductance
User-provided electrical contact conductance constant value.
virtual Real value(Real t, const Point &p) const
bool isParamSetByUser(const std::string &name) const
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)
const MooseArray< Point > & _q_point
const InputParameters & parameters() const
const std::string & type() const
void mooseError(Args &&... args) const
const std::string & _name
DGResidualType