# Discretization

To solve these two differential equations, we can first discretize the time derivative by finite differences. If u is a functions. Let us note $u^n$ the quantity designating $u$ at time $n$.

Let’s go back to our equations :

$$$\int_{\Omega} \frac{1}{\mu} \, (\nabla \times \phi) \cdot (\nabla \times A) = - \int_{\Omega_C} \sigma \phi \cdot (\nabla V + \frac{\partial A}{\partial t})$$$

(or the following one if the edges are curved :)

$$$\int_{\Omega} \frac{1}{\mu} \, (\nabla \times \phi) \cdot (\nabla \times A) - \int_{\Gamma_D} \frac{1}{\mu} A_D \cdot (\nabla \times A) = - \int_{\Omega_C} \sigma \phi \cdot (\nabla V + \frac{\partial A}{\partial t})$$$

and :

$$$- \int_{\Omega_C} \sigma ( -\nabla V -\frac{\partial A}{\partial t}) \cdot \nabla \psi = 0$$$

Let us note $\Delta t > 0$ the step time, such that $t_n = n\Delta t$. Let us note $A^n(x) := A(t_n,x)$. We have, using an implicit euler’s schema : $\frac{\partial A}{\partial t} = \frac{A^n-A^{n-1}}{\Delta t}$.

So, in the case where the edges are not curved, we have :

$$$\int_{\Omega} \frac{1}{\mu} \, (\nabla \times \phi) \cdot (\nabla \times A^n) = - \int_{\Omega_C} \sigma \phi \cdot (\nabla V + \frac{A^n-A^{n-1}}{\Delta t})$$$

In other words :

$$$\int_{\Omega} \frac{\Delta t}{\mu} \, (\nabla \times \phi) \cdot (\nabla \times A^n) + \int_{\Omega_C} \sigma \phi \cdot (A^n + \Delta t\nabla V) = \int_{\Omega_C} \sigma \phi \cdot A^{n-1}$$$

and the second equations :

$$$\int_{\Omega_C} \sigma (A^n + \Delta t\nabla V) \cdot \nabla \psi = \int_{\Omega_C} \sigma A^{n-1} \cdot \nabla \psi$$$

If the edges are curved, our first equation becomes :

$$$\int_{\Omega} \frac{\Delta t}{\mu} \, (\nabla \times \phi) \cdot (\nabla \times A^n) - \int_{\Gamma_D} \frac{1}{\mu} A_D \cdot (\nabla \times A^n) + \int_{\Omega_C} \sigma \phi \cdot (A^n + \Delta t \nabla V) = \int_{\Omega_C} \sigma \phi \cdot A^{n-1}$$$