<commit_before># ADInterfaceJouleHeatingConstraint

!syntax description /Constraints/ADInterfaceJouleHeatingConstraint

## Description

The `ADInterfaceJouleHeatingConstraint` class is intended to calculate and add the heat source due to Joule Heating which results from the electric potential drop across an interface.
The heat source is then added to the temperature field variable  in a coupled electro-thermal simulation.
This class is intended to be used in conjunction with [ModularGapConductanceConstraint](ModularGapConductanceConstraint.md) and [GapFluxModelPressureDependentConduction](GapFluxModelPressureDependentConduction.md), which enforce the closed gap interface requirement by checking for a postive normal pressure.
As such, the `ADInterfaceJouleHeatingConstraint` takes as a required argument the name of the Lagrange Multiplier variable used in the electrical contact.

!alert note title=Closed Gap Interface Assumed by this Class
The `ADInterfaceJouleHeatingConstraint` class should only be employed in simulations when the user is certain that electric potential flux is nonzero only when the interface gap is closed. This class may also be used in simulations with an open gap at the interface, so long as the electric potential flux across that gap is zero while the interface gap is open.

The heat source is calculated as a function of the electric potential flux across the interface, as given by the associated Lagrange multiplier $\lambda_{\phi}$,
\begin{equation}
  \label{eq:interfaceJH_fromLMvariable}
   q_{electric} = \sigma_e \left( \nabla \phi \right)^2 = \frac{(\lambda_{\phi})^2}{\sigma_e}
\end{equation}
where $\sigma_e$ is the harmonic mean of the electrical conductivity of the primary and secondary blocks,
\begin{equation}
  \label{eq:electricCond_harmonicMean}
  \sigma_e = \frac{2 \sigma_{primary} \sigma_{secondary}}{\sigma_{primary} + \sigma_{secondary}}
\end{equation}
following [!citep](cincotti2007modeling).
The Lagrange multiplier, passed from a separate mortar contact calculation, holds the electric potential flux
\begin{equation}
  \lambda_{\phi} = \sigma_e \nabla \phi
\end{equation}
where the harmonic mean of the electrical conductivity is the same as given in [eq:electricCond_harmonicMean].


!alert note title=Employ Consistency in Primary and Secondary Designations
Consistency in the selection of the primary boundary and secondary boundary among the electrical, thermal, and interface Joule Heating mortar contact input file compoments is recommended.

With the total interface Joule heating source determined, the fraction of the heat source applied to each block at the interface is determined as
\begin{equation}
  \label{eq:primary_interfaceJH}
  q_{primary} = -q_{electric} w_f
\end{equation}
and<commit_msg>Correct nomenclature used in the documentation of ADInterfaceJouleHeatingConstraint, refs #22114<commit_after># ADInterfaceJouleHeatingConstraint

!syntax description /Constraints/ADInterfaceJouleHeatingConstraint

## Description

The `ADInterfaceJouleHeatingConstraint` class is intended to calculate and add the heat source due to Joule Heating which results from the electric potential drop across an interface.
The heat source is then added to the temperature field variable  in a coupled electro-thermal simulation.
This class is intended to be used in conjunction with [ModularGapConductanceConstraint](ModularGapConductanceConstraint.md) and [GapFluxModelPressureDependentConduction](GapFluxModelPressureDependentConduction.md), which enforce the closed gap interface requirement by checking for a postive normal pressure.
As such, the `ADInterfaceJouleHeatingConstraint` takes as a required argument the name of the Lagrange Multiplier variable used in the electrical contact.

!alert note title=Closed Gap Interface Assumed by this Class
The `ADInterfaceJouleHeatingConstraint` class should only be employed in simulations when the user is certain that electric potential flux is nonzero only when the interface gap is closed. This class may also be used in simulations with an open gap at the interface, so long as the electric potential flux across that gap is zero while the interface gap is open.

The heat source is calculated as a function of the electric potential change across the interface, as determined from the associated Lagrange multiplier $\lambda_{\phi}$,
\begin{equation}
  \label{eq:interfaceJH_fromLMvariable}
   q_{electric} = C_e \left( \Delta \phi \right)^2 = \frac{(\lambda_{\phi})^2}{C_e}
\end{equation}
where $C_e$ is the harmonic mean of the electrical conductivity of the primary and secondary blocks,
\begin{equation}
  \label{eq:electricCond_harmonicMean}
  C_e = \frac{2 \sigma_{primary} \sigma_{secondary}}{\sigma_{primary} + \sigma_{secondary}}
\end{equation}
following [!citep](cincotti2007modeling).
The Lagrange multiplier variable, passed from a separate mortar contact calculation, is calculated as
\begin{equation}
  \label{eq:electricalContact_LMvariable}
  \lambda_{\phi} = C_e \left[ \frac{S}{m} \right] \Delta \phi  \left[ \frac{V}{m} \right]
\end{equation}
where the harmonic mean of the electrical conductivity is the same as given in [eq:electricCond_harmonicMean].
In base SI units this Lagrange multiplier variable has the units $\left[ \frac{A}{m^2} \right]$ and is similar to the common approximation for the current density
\begin{equation}
  \label{eq:currentDensityApprox}
  J = \sigma E
\end{equation}
where $J$ is the current density, $\sigma$ is the electrical conductivity, and $E$ is the electric field.


!alert note title=Employ Consistency in Primary and Secondary Designations
Consistency in the selection of the primary boundary and secondary boundary among the electrical, thermal, and interface Joule Heating mortar contact input file compoments is recommended.

With the total interface Joule heating source determined, the fraction of the heat source applied to each block at the interface is determined as
\begin{equation}
  \label{eq:primary_interfaceJH}
  q_{primary} = -q_{electric} w_f
\end{equation}
and
{'fraction_non_alphanumeric': 0.06217018469656992, 'fraction_numerical': 0.0032981530343007917, 'mean_word_length': 5.776536312849162, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2658579', 'n_tokens_mistral': 1587, 'n_tokens_neox': 1522, 'n_words': 716}