|
METHOD
|
#include <srrmhd.h>


Public Member Functions | |
| SRRMHD () | |
| SRRMHD (Data *data) | |
| virtual | ~SRRMHD () |
| void | sourceTermSingleCell (double *cons, double *prims, double *aux, double *source, int i=-1, int j=-1, int k=-1) |
| void | sourceTerm (double *cons, double *prims, double *aux, double *source) |
| void | getPrimitiveVarsSingleCell (double *cons, double *prims, double *aux, int i=-1, int j=-1, int k=-1) |
| void | getPrimitiveVars (double *cons, double *prims, double *aux) |
| void | primsToAll (double *cons, double *prims, double *aux) |
| void | fluxVector (double *cons, double *prims, double *aux, double *f, const int dir) |
| void | finalise (double *cons, double *prims, double *aux) |
Public Member Functions inherited from Model | |
| Model () | |
| Model (Data *data) | |
| virtual | ~Model () |
Additional Inherited Members | |
Public Attributes inherited from Model | |
| Data * | data |
| int | Ncons |
| int | Nprims |
| int | Naux |
Special Relativistic Resistive MagnetHydroDynamics
The equations of motion are:
\begin{align} \partial_t \begin{pmatrix} D \\ S^i \\ \tau \\ B^i \\ E^i \\ \psi \\ \phi \\ \varrho \end{pmatrix} + \partial_k \begin{pmatrix} Dv^k \\ S^k_i\\ S^k - D v^k \\ - \epsilon^{ijk} E^j + \delta^k_i \phi \\ \epsilon^{ijk} B^j + \delta^k_i \psi \\ E^k \\ B^k \\ J^k \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0 \\ 0 \\ -J^i \\ \varrho -\psi / c_p^2 \\ -\phi / c_p^2 \\ 0 \end{pmatrix}. \end{align}
\begin{align} D &= \rho W \\ S^i &= \rho h^* W^2 v^i + \epsilon^{ijk}E^j B^k \\ \tau &= \rho h^* W^2 - p^* + \frac{E^2 + B^2}{2} - D \\ W &= 1 / \sqrt(1 - v_i v^i) \\ J^i &= \varrho v^i + W \sigma \bigg[E^i + \epsilon^{ijk} v^j B^k - (v^kE^k)v^i\bigg] \\ S^{ij} &= \rho h W^2 v^i v^j + \delta^{ij}\bigg(P + \frac{E^2 + B^2}{2}\bigg) - E^i E^j - B^i B^j \\ c_p &= const. \end{align}
| SRRMHD::SRRMHD | ( | ) |
Default constructor.
| SRRMHD::SRRMHD | ( | Data * | data | ) |
|
inlinevirtual |
|
virtual |
Flux vector.
Method determines the value of the conserved vector in the specified direction. For the form of the fluxes see Dionysopoulou 2016 with the inclusion of divergence cleaning from Muddle 2015.
| *cons | pointer to conserved vector work array. Size is Ncons*Nx*Ny*Nz |
| *prims | pointer to primitive vector work array. Size is Nprims*Nx*Ny*Nz |
| *aux | pointer to auxiliary vector work array. Size is Naux*Nx*Ny*Nz |
| *f | pointer to flux vector work array. Size is Ncons*Nx*Ny*Nz |
| dir | direction in which to generate flux vector. (x, y, z) = (0, 1, 2) |
Implements Model.
|
virtual |
Spectral decomposition.
Generates the values of the primitive and auxiliary variables consistent with the conservative vector given. Method first subtracts the EM fields from the conserved quantities, reducing the problem to the hydrodynamic properties only before determining their values via a newton method. Function calls single celled version (below) for each compute cell.
| *cons | pointer to conserved vector work array. Size is Ncons*Nx*Ny*Nz |
| *prims | pointer to primitive vector work array. Size is Nprims*Nx*Ny*Nz |
| *aux | pointer to auxiliary vector work array. Size is Naux*Nx*Ny*Nz |
Implements Model.
|
virtual |
Single cell spectral decomposition.
Generates the values for aux and prims for the given cons vector for only a single cell (i, j, k). Note : pointers to arrays are the (Ncons,) conservative array, (Nprims,) prim array and (Naux,) aux array, NOT the (Ncons, Nx, Ny, Nz) arrays as in most other functions. Single celled version required for the inside of the residual functions for the (semi) implicit time integrators.
| *cons | pointer to conserved vector work array. Size is Ncons |
| *prims | pointer to primitive vector work array. Size is Nprims |
| *aux | pointer to auxiliary vector work array. Size is Naux |
| i | cell number in x-direction (optional) |
| j | cell number in y-direction (optional) |
| k | cell number in z-direction (optional) |
Implements Model.
|
virtual |
Primitive-to-all transformation.
Transforms the initial state given in primitive form in to the conserved vector state. Relations have been taken from Dionysopoulou 2016.
| *cons | pointer to conserved vector work array. Size is Ncons*Nx*Ny*Nz |
| *prims | pointer to primitive vector work array. Size is Nprims*Nx*Ny*Nz |
| *aux | pointer to auxiliary vector work array. Size is Naux*Nx*Ny*Nz |
Implements Model.
|
virtual |
Source term contribution.
Source terms arise from the evolution of the electric fields and from implementing the divergence cleaning method. This function determines the source contribution to the change in the conserved vector for all cells. This function calls sourceTermSingleCell for every compute cell.
| *cons | pointer to conserved vector work array. Size is Ncons*Nx*Ny*Nz |
| *prims | pointer to primitive vector work array. Size is Nprims*Nx*Ny*Nz |
| *aux | pointer to auxiliary vector work array. Size is Naux*Nx*Ny*Nz |
| *source | pointer to source vector work array. Size is Ncons*Nx*Ny*Nz |
Implements Model.
|
virtual |
Destructor.
Single cell source term contribution
Determines the source vector due the the cond prims and aux vector of a single compute cell. Note : pointers to arrays are the (Ncons,) conservative array, (Nprims,) prim array and (Naux,) aux array, NOT the (Ncons, Nx, Ny, Nz) arrays as in most other functions.
| *cons | pointer to conserved vector work array. Size is Ncons |
| *prims | pointer to primitive vector work array. Size is Nprims |
| *aux | pointer to auxiliary vector work array. Size is Naux |
| *source | pointer to source vector work array. Size is Ncons |
| i | cell number in x-direction (optional) |
| j | cell number in y-direction (optional) |
| k | cell number in z-direction (optional) |
Implements Model.