Skip to content

Commit

Permalink
Update ElectrostaticContactCondition to calculate conductance.
Browse files Browse the repository at this point in the history
  • Loading branch information
cticenhour committed Apr 19, 2021
1 parent f5c9c37 commit 8df51a4
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

#include "ADInterfaceKernel.h"

/**
* This ADInterfaceKernel object calculates the electrostatic potential value
* and gradient relationship as a result of contact between two dissimilar,
* homogeneous materials.
*/

class ElectrostaticContactCondition : public ADInterfaceKernel
{
public:
Expand All @@ -12,7 +18,30 @@ class ElectrostaticContactCondition : public ADInterfaceKernel
protected:
virtual ADReal computeQpResidual(Moose::DGResidualType type) override;

/// Electrical conductivity property for the primary side
const MaterialProperty<Real> & _conductivity_master;

/// Electrical conductivity property for the secondary side
const MaterialProperty<Real> & _conductivity_neighbor;
const Real & _contact_resistance;

/// Geometric mean of the hardness from both sides of the boundary, taken in as a material property
const ADMaterialProperty<Real> & _mean_hardness;

/// Mechanical pressure uniformly applied at the contact surface area (user-supplied for now)
const Real & _mechanical_pressure;

/// User-provided electrical contact resistance constant value
const Real & _user_contact_resistance;

/// Experimental proportional fit parameter for contact resistance parameter (set using Cincotti et al DOI:10.1002/aic.11102)
const Real _alpha_electric;

/// Experimental power fit parameter for contact resistance parameter (set using Cincotti et al DOI:10.1002/aic.11102)
const Real _beta_electric;

/// Check parameter for user-provided electrical contact resistance value
bool _resistance_was_set;

/// Check parameter for material-provided mean hardness value
bool _mean_hardness_was_set;
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,74 @@ ElectrostaticContactCondition::validParams()
"master_conductivity", "electrical_conductivity", "Conductivity on the master block.");
params.addParam<MaterialPropertyName>(
"neighbor_conductivity", "electrical_conductivity", "Conductivity on the neighbor block.");
params.addRequiredParam<Real>("electrical_contact_resistance",
"Electrical contact resistance coefficient.");
params.addParam<MaterialPropertyName>(
"mean_hardness",
"mean_hardness",
"Geometric mean of the hardness of each contacting material.");
params.addParam<Real>("user_electrical_contact_resistance",
"User-supplied electrical contact resistance coefficient.");
params.addParam<Real>("mechanical_pressure",
"Mechanical pressure uniformly applied at the contact surface area "
"(Pressure = Force / Surface Area).");
params.addClassDescription(
"Interface condition that describes the current continuity and contact resistance across a "
"boundary formed between two dissimilar materials (resulting in a potential discontinuity), "
"as described in Cincotti, et al (https://doi.org/10.1002/aic.11102). Conductivity on each "
"side of the boundary is defined via the material peoperties system.");
"boundary formed between two dissimilar materials (resulting in a potential discontinuity). "
"Conductivity on each side of the boundary is defined via the material peoperties system.");
return params;
}

ElectrostaticContactCondition::ElectrostaticContactCondition(const InputParameters & parameters)
: ADInterfaceKernel(parameters),
_conductivity_master(getMaterialProperty<Real>("master_conductivity")),
_conductivity_neighbor(getNeighborMaterialProperty<Real>("neighbor_conductivity")),
_contact_resistance(getParam<Real>("electrical_contact_resistance"))
_mean_hardness(isParamValid("user_electrical_contact_resistance")
? getGenericZeroMaterialProperty<Real, true>("mean_hardness")
: getADMaterialProperty<Real>("mean_hardness")),
_mechanical_pressure(isParamValid("mechanical_pressure") ? getParam<Real>("mechanical_pressure")
: _real_zero),
_user_contact_resistance(isParamValid("user_electrical_contact_resistance")
? getParam<Real>("user_electrical_contact_resistance")
: _real_zero),
_alpha_electric(64.0),
_beta_electric(0.35)
{
_resistance_was_set = parameters.isParamSetByUser("user_electrical_contact_resistance");
_mean_hardness_was_set = parameters.isParamSetByUser("mean_hardness");
}

ADReal
ElectrostaticContactCondition::computeQpResidual(Moose::DGResidualType type)
{
ADReal res = 0.0;
ADReal contact_resistance = 0.0;

ADReal mean_conductivity = 2 * _conductivity_master[_qp] * _conductivity_neighbor[_qp] /
(_conductivity_master[_qp] + _conductivity_neighbor[_qp]);

if (_resistance_was_set && !_mean_hardness_was_set)
{
contact_resistance = _user_contact_resistance;
}
else if (_mean_hardness_was_set && !_resistance_was_set)
{
contact_resistance = _alpha_electric * mean_conductivity *
std::pow((_mechanical_pressure / _mean_hardness[_qp]), _beta_electric);
}
else
{
mooseError("In ",
_name,
", both user-supplied electrical contact resistance and mean hardness values (for "
"calculating contact resistance) have been provided. Please only provide one or the "
"other!");
}

switch (type)
{
case Moose::Element:
res = 0.5 *
(_conductivity_neighbor[_qp] * _grad_neighbor_value[_qp] * _normals[_qp] -
_contact_resistance * (_neighbor_value[_qp] - _u[_qp])) *
contact_resistance * (_neighbor_value[_qp] - _u[_qp])) *
_test[_i][_qp];
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
variable = potential_stainless_steel
neighbor_var = potential_graphite
boundary = ssg_interface
electrical_contact_resistance = 1.47e5 # as described in Cincotti et al (https://doi.org/10.1002/aic.11102)
user_electrical_contact_resistance = 1.47e5 # as described in Cincotti et al (https://doi.org/10.1002/aic.11102)
[../]
[]

Expand Down

0 comments on commit 8df51a4

Please sign in to comment.