This module handles the polarisation part in the quasi-neutrality equation, particularly the time discretisation
\f[ \nabla\cdot\left[co\frac{\partial}{\partial t}\nabla_\perp\mathbf{E}\perp\right] = rhs, \f] where \f[ \mathbf{E}\perp = \left(\nabla_\perp\phi+\tau\frac{\nabla_\perp p_i}{n}\right) \f] the perpendicular electric field.
The module solves for the generalised vorticity atr timestep t+1 \f[ Omega^{t+1} = div[co (\nabla_perp\pot^{t+1}) \f] and electrostatic potential
The time-advancement is quite intricate due to the position of the time derivative in the vorticity equation The scheme is described in [W. Zholobenko et al., Contrib. Plasma Phys. 2019;e201900131. (https://doi.org/10.1002/ctpp.201900131.)] Therefore some intricate modifications to the storage values in the time-step integrator tstep_vort are necessary and additional storage of values
Also, parallel advection of vorticity is handeled here.
Further intricate things arise from the use of Shortley-Weller stencil for the elliptic operator
Advances vorticity in time and solves for pential
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(comm_handler_t), | intent(in) | :: | comm_handler |
Communicators |
||
| class(equilibrium_t), | intent(in) | :: | equi |
Equilibrium |
||
| type(mesh_cart_t), | intent(in) | :: | mesh_cano |
Mesh (canonical) |
||
| class(helmholtz_solver_t), | intent(inout) | :: | hsolver_cano |
Elliptic (2D) solver on canonical mesh |
||
| type(penalisation_t), | intent(in) | :: | penalisation_cano |
Penalisation (canonical) |
||
| type(polars_t), | intent(in) | :: | polars_cano |
Polar grid and operators (canonical) |
||
| type(boundaries_braginskii_t), | intent(inout) | :: | boundaries |
Boundary information for the BRAGINSKII model |
||
| type(karniadakis_t), | intent(inout) | :: | tstep_vort |
Time-step integrator for vorticity equation |
||
| real(kind=GP), | intent(in), | dimension(mesh_cano%get_n_points(), tstep_order) | :: | pot_tseq |
Time sequence of electrostatic potential at time-points, t, t-1, t-2,...t-(order-1) |
|
| real(kind=GP), | intent(in), | dimension(mesh_cano%get_n_points(), tstep_order) | :: | ne_tseq |
Time sequence of density values at time-points, t, t-1, t-2,...t-(order-1) |
|
| real(kind=GP), | intent(in), | dimension(mesh_cano%get_n_points(), tstep_order) | :: | ti_tseq |
Time sequqence of ion temperature values at time-points, t, t-1, t-2,...t-(order-1) |
|
| type(multistep_storage_t), | intent(inout) | :: | pot_firstsolve_store |
Storage of electrostatic potential values at time-points, t, t-1, t-2,...t-(order-1) - first solve - only used with BND_BRAGTYPE_ZONAL_NEUMANN |
||
| real(kind=GP), | intent(in), | dimension(mesh_cano%get_n_points()) | :: | co |
Polarisation coefficient |
|
| real(kind=GP), | intent(in), | dimension(mesh_cano%get_n_points()) | :: | nev |
Density at t+1 |
|
| real(kind=GP), | intent(in), | dimension(mesh_cano%get_n_points()) | :: | tiv |
Ion temperature at t+1 |
|
| real(kind=GP), | intent(in), | dimension(mesh_cano%get_n_points()) | :: | dvort |
Right hand side of vorticity equation |
|
| real(kind=GP), | intent(in), | dimension(mesh_cano%get_n_points_inner()) | :: | pot_pen |
Penalisation values for electrostatic potential |
|
| real(kind=GP), | intent(inout), | dimension(mesh_cano%get_n_points()) | :: | pot_adv |
Initial guess on input / values of electrostatic potential at time t+1 on output |
|
| real(kind=GP), | intent(out), | dimension(mesh_cano%get_n_points()) | :: | vort_adv |
Values of Vorticity at time t+1 |
|
| integer, | intent(out) | :: | sinfo |
Infor from solver |
||
| real(kind=GP), | intent(out) | :: | res |
Residual of solve |
||
| integer, | intent(out) | :: | sinfo_zon |
Info of solver required for zonal (second) solve in case of zonal Neumann boundary condition |
||
| real(kind=GP), | intent(out) | :: | res_zon |
Residual of zonal (second) solve in case of zonal Neumann boundary condition |
Computes generalised vorticity \f[ \nabla\cdot\left[co\nabla_\perp\left(swpot\nabla_\perp\phi+swdia\tau\frac{\nabla_\perp p_i}{n}\right)\right] \f]
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equilibrium_t), | intent(in) | :: | equi |
Equilibrium |
||
| type(mesh_cart_t), | intent(in) | :: | mesh_cano |
Mesh (canonical) |
||
| type(boundaries_braginskii_t), | intent(in) | :: | boundaries |
Boundary information for the BRAGINSKII model |
||
| real(kind=GP), | intent(in), | dimension(mesh_cano%get_n_points()) | :: | co |
Polarisation coefficient |
|
| real(kind=GP), | dimension(mesh_cano%get_n_points()) | :: | potv |
Values of electrostatic potential |
||
| real(kind=GP), | dimension(mesh_cano%get_n_points()) | :: | nev |
Values of density |
||
| real(kind=GP), | dimension(mesh_cano%get_n_points()) | :: | tiv |
Values of ion temperature |
||
| real(kind=GP), | intent(out), | dimension(mesh_cano%get_n_points()) | :: | vortv |
Generalised values for vorticity on inner grid |
|
| real(kind=GP), | intent(in), | optional | :: | swpot |
Switch in front of \nabla_\perp\phi term, default = 1 |
|
| real(kind=GP), | intent(in), | optional | :: | swdia |
Switch in front of \nabla_\perp p_i/n term, default = 1 |
Computes the parallel advection part in the vorticity equation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(comm_handler_t), | intent(in) | :: | comm_handler |
Communicators |
||
| class(equilibrium_t), | intent(in) | :: | equi |
Equilibrium |
||
| type(mesh_cart_t), | intent(in) | :: | mesh_cano |
Mesh (canonical) |
||
| type(mesh_cart_t), | intent(in) | :: | mesh_stag |
Mesh (staggered) |
||
| type(parallel_map_t), | intent(in) | :: | map |
Parallel map |
||
| type(penalisation_t), | intent(in) | :: | penalisation_cano |
Penalisation (canonical) |
||
| type(boundaries_braginskii_t), | intent(in) | :: | boundaries |
Boundary information for the BRAGINSKII model |
||
| real(kind=GP), | intent(in), | dimension(:) | :: | co |
Polarisation coefficient n/B^2, with n advanced to t+1 |
|
| type(variable_t), | intent(in) | :: | pot |
Electrostatic potential |
||
| type(variable_t), | intent(in) | :: | ti |
Ion temperature |
||
| type(variable_t), | intent(in) | :: | ne |
Electron density |
||
| type(variable_t), | intent(in) | :: | logne |
Logarithm of the electron density |
||
| real(kind=GP), | intent(in), | dimension(mesh_cano%get_n_points()) | :: | uparv_cano |
Values of parallel velocity mapped to canonical grid |
|
| real(kind=GP), | intent(inout), | dimension(mesh_cano%get_n_points()) | :: | dvort |
Change of vorticity |