|
METHOD
|
#include <twoFluidEMHD.h>


Public Member Functions | |
| TwoFluidEMHD () | |
| TwoFluidEMHD (Data *data) | |
| virtual | ~TwoFluidEMHD () |
| 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 |
Two-Fluid ElectroMagnetoHydroDynamics
\begin{align} \partial_t \renewcommand\arraystretch{5.0} \begin{pmatrix} D \\ S^x \\ S^y \\ S^z \\ \tau \\ \bar{D} \\ \bar{S}^x \\ \bar{S}^y \\ \bar{S}^z \\ \bar{\tau} \\ B^x \\ B^y \\ B^z \\ E^x \\ E^y \\ E^z \\ \psi \\ \phi \end{pmatrix} + \partial_j \begin{pmatrix} \rho_s W_s v_s^j \\ \rho_s h_s W_s^2 v_{s,x} v_s^j - (E_x E^j + B_x B^j) + \delta_x^j [(E^2 + B^2) / 2+ p_s ] \\ \rho_s h_s W_s^2 v_{s,y} v_s^j - (E_y E^j + B_y B^j) + \delta_y^j [(E^2 + B^2) / 2+ p_s ] \\ \rho_s h_s W_s^2 v_{s,z} v_s^j - (E_z E^j + B_z B^j) + \delta_z^j [(E^2 + B^2) / 2+ p_s ] \\ \rho_s h_s W_s^2 v_s^i + \epsilon^{jkl} E_k B_l - \rho_s W_s v_s^j \\ \mu_s \rho_s W_s v_s^j \\ \mu_s \rho_s h_s W_s^2 v_{s, x} v_s^j + \delta_x^j \mu_s p_s \\ \mu_s \rho_s h_s W_s^2 v_{s, y} v_s^j + \delta_y^j \mu_s p_s \\ \mu_s \rho_s h_s W_s^2 v_{s, z} v_s^j + \delta_z^j \mu_s p_s \\ \mu_s \rho_s h_s W_s^2 v_s^i - \mu_s \rho_s W_s v_s^i \\ \epsilon^{ixj} E_i + \delta_x^j \phi \\ \epsilon^{iyj} E_i + \delta_y^j \phi \\ \epsilon^{izj} E_i + \delta_z^j \phi \\ -\epsilon^{ixj} B_i + \delta_x^j \psi \\ -\epsilon^{iyj} B_i + \delta_y^j \psi \\-\epsilon^{izj} B_i + \delta_z^j \psi \\ E^j \\ B^j \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ \omega_p^2 \big[ W E^x + (u^y B^z - u^z B^y) - (J^x - \varrho_0 u^x) / \sigma) \\ \omega_p^2 \big[ W E^y + (u^z B^x - u^x B^z) - (J^y - \varrho_0 u^y) / \sigma) \\ \omega_p^2 \big[ W E^z + (u^x B^y - u^y B^x) - (J^z - \varrho_0 u^z) / \sigma) \\ \omega_p^2 \big[u_i E^i - (\varrho - \varrho_0 W) / \sigma\big] \\ 0 \\ 0 \\ 0 \\ -J_x \\ -J_y \\ -J_z \\ \varrho - \psi / c_p^2 \\ -\phi / c_p^2 \end{pmatrix}. \end{align}
Definition at line 90 of file twoFluidEMHD.h.
| TwoFluidEMHD::TwoFluidEMHD | ( | ) |
Default constructor.
| TwoFluidEMHD::TwoFluidEMHD | ( | Data * | data | ) |
|
inlinevirtual |
Destructor.
Definition at line 105 of file twoFluidEMHD.h.
|
inlinevirtual |
Finalise the simulation variables.
Reimplemented from Model.
Definition at line 214 of file twoFluidEMHD.h.
|
virtual |
Flux vector.
Method determines the value of the conserved vector in the specified direction. For the form of the fluxes see Anton 2010, with the inclusion of divergence cleaning from Muddle 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 |
| *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 separates the fluids, then subtracts the EM fields implementing a resistive MHD single fluid proceedure to each species. 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 Amano 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 weighted sum of the species conserved vectors 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 |
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.