PLUTO
vec_pot_update.c File Reference

Function to handle vector potential. More...

#include "pluto.h"
Include dependency graph for vec_pot_update.c:

Go to the source code of this file.

Detailed Description

Function to handle vector potential.

Update the cell-centered vector potential by integrating

\[ \pd{\vec{A}}{t} + \vec{E} = 0 \]

Depending on the time-stepping algorithm, we advance the solution in time using the following increments

\[ \begin{array}{ll} \rm{RK2:}\quad &\DS A^{n+1} = A^n + \frac{\Delta t^n}{2} (E^n + E^*) \\ \noalign{\medskip} \rm{RK3:}\quad &\DS A^{n+1} = A^n + \frac{\Delta t^n}{6} (E^n + E^* + 4E^{**}) \\ \noalign{\medskip} \rm{CTU:}\quad &\DS A^{n+1} = A^n + \Delta t^nE^{n+\HALF} \end{array} \]

The cell-centered electric field E is computed by averaging values available at faces or edges, depending on the MHD formulation:

  • staggered_mhd: we average the electric field values available at cell edges and previously computed . In this case the function does the job only if called from CT;
  • Cell-cent. mhd: we average the face values using upwind fluxes. In this case the function does the job only if called from time stepping algorithms. The flux components of induction equation contain the emf: $ F_{i+\HALF} = ( 0,-E_z, E_y)_{i+\HALF}$, $ F_{j+\HALF} = ( E_z, 0,-E_x)_{j+\HALF}$, $ F_{k+\HALF} = (-E_y, E_x, 0)_{k+\HALF}$,

Note that the vector potential is NOT used in the rest of the code and serves solely as a diagnostic tool.

Parameters
[in,out]dpointer to PLUTO Data structure
[in]vppointer to an EMF structure, used only with CT
[in]statepointer to State_1D structure containing the electric field components (cell-centered MHD)
[in]gridpointer to an array of Grid structures
Attention
In cylindrical coordinates: PLUTO treats cylindrical (but not polar) coordinates as Cartesian so that $ (x_1,x_2) = (R,z) $ . Nevertheless, the correct right-handed cylindrical system is defined by $ (x_1,x_2,x_3) = (R,\phi,z)$. The fact that the $ \phi $ coordinate is missing causes an ambiguity when computing the third component of the EMF in 2.5 D:

\[ E_3 = v_2B_1 - v_1B_2 \]

which is (wrongly) called $ E_z $ but is, indeed, $ -E_\phi $ . This is not a problem in the update of the magnetic field, since the contribution coming from $ E_3 $ is also reversed:

\[ \Delta B_1 = -\Delta t dE_3/dx_2 \quad\Longrightarrow\quad \Delta B_r = \Delta t dE_\phi/dz \]

as it should be. However, it is a problem in the definition of the vector potential which is consistently computed using its physical definition. Therefore, to correctly update the phi component of the vector potential we change sign to $ E_z $ ( $ = -E_\phi $).
Authors
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
P. Tzeferacos (petro.nosp@m.s.tz.nosp@m.efera.nosp@m.cos@.nosp@m.ph.un.nosp@m.ito..nosp@m.it)
Date
Sep 24, 2012

Definition in file vec_pot_update.c.