ThermoElectric Toolbox
This section focuses on defining and solving of a thermoelectric model, which couples heat transfer and electrostatic models. The current flow inside an electrical conductor leads to the heating of the material, due to Joule effect. The temperature in the conductor can be deduced from the standard heat equation whose source term reads from the electrical potential to mimic the Joule effect.
In the following sections, the domain is denoted by \(\Omega \subset \mathbb{R}^d\), \(d=2,3\) and its border by \(\Gamma\).
1. Electrostatic problem
The electrostatic model consists in a diffusion equation. The electrical potential \(V\) satisfies
where \(\sigma\) is the electrical conductivity.
The electrical conductivity \(\sigma\) often depends on the temperature. The thermoelectric model becomes nonlinear in this case. 
The current flow within the conductor is modeled by a difference in electrical potential between the current input \(\Gamma_{in} \subset \Gamma\) and the current output \(\Gamma_{out} \subset \Gamma\).

\(V=0 ~~\text{on}~~ \Gamma_{in}\)

\(V=V_{out} ~~\text{on}~~ \Gamma_{out}\).
We consider in this model that all other boundaries are electrically insulating. This conditions reads from the current density \(\mathbf{j} =  \sigma \nabla V\) as

\(\mathbf{j}\cdot\mathbf{n} = \sigma\nabla V\cdot\mathbf{n} = 0 ~~\text{on}~~ \Gamma \setminus (\Gamma_{in} \cup \Gamma_{out})\).
The local form of Joule’s law defines the heat source corresponding to Joule effect as the dot product of the current density \(\mathbf{j} =  \sigma \nabla V\) by the electric field \(E=\nabla V\). This product \(P = \sigma \nabla V \cdot \nabla V\) will be the source term of the heat equation defined in the next section.
2. Heat transfer problem
The temperature \(T\) satisfies the standard heat equation with the previously introduced Joule effect as source term,
where \(k\) is the thermal conductivity.
As for the electrical conductivity \(\sigma\), the thermal conductivity \(k\) can also depends on temperature. 
The thermal flux can eventually be controled by a water cooling process which limit the heating. The thermal exchange between the electrical conductor and the cooling water is governed by a convection phenomenon involving a heat transfert coefficient \(h\) and the water temperature \(T_c\). This cooling process is handled by a Robin condition on the cooled regions \(\Gamma_{c} \subset \Gamma\)

\(k\nabla T\cdot\mathbf{n} = h(TT_c) ~~\text{on}~~ \Gamma_{C}\)
We consider that the thermal exchanges are limited to the cooled region, which amounts to apply an homogeneous Neumann condition on all other boundaries.

\(k\nabla T\cdot \mathbf{n} = 0 ~~\text{on}~~ \Gamma \setminus \Gamma_{C}\)