ExBVelocityPolar Struct ReferenceΒΆ
|
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
|
Scalar advection by the E x B drift in POLAR coordinates (r, theta) – "annular polar grid" effort, Phase 1. More...
#include <hyperbolic.hpp>
Collaboration diagram for pops::ExBVelocityPolar:Public Types | |
| using | State = StateVec< 1 > |
| using | Prim = StateVec< 1 > |
Public Member Functions | |
| POPS_HD Real | velocity (const Aux &a, int dir) const |
| PHYSICAL component of the drift velocity in direction index dir (0 = r, 1 = theta). | |
| POPS_HD StateVec< 1 > | flux (const StateVec< 1 > &u, const Aux &a, int dir) const |
| POPS_HD Real | max_wave_speed (const StateVec< 1 > &, const Aux &a, int dir) const |
| POPS_HD StateVec< 1 > | eigenvalues (const StateVec< 1 > &, const Aux &a, int dir) const |
| Spectrum: one wave, the drift speed in direction dir. | |
| POPS_HD Prim | to_primitive (const StateVec< 1 > &u) const |
| POPS_HD StateVec< 1 > | to_conservative (const Prim &p) const |
Static Public Member Functions | |
| static VariableSet | conservative_vars () |
| static VariableSet | primitive_vars () |
Public Attributes | |
| Real | B0 = 1 |
Static Public Attributes | |
| static constexpr int | n_vars = 1 |
Detailed Description
Scalar advection by the E x B drift in POLAR coordinates (r, theta) – "annular polar grid" effort, Phase 1.
This is a brick SEPARATE from ExBVelocity (Cartesian), not a modification: the polar solver (assemble_rhs_polar) uses it on a PolarGeometry.
aux CHANNEL LAYOUT IN POLAR (documented, contract of this brick) – the base components [0..2] carry the E field in the LOCAL ORTHONORMAL BASIS (e_r, e_theta): aux.phi [0] = phi (potential; unused by the flux, present for symmetry) aux.grad_x [1] = grad_r = d phi / d r (radial component of grad phi) aux.grad_y [2] = grad_theta = (1/r) d phi / d theta (PHYSICAL AZIMUTHAL component of grad phi) We REUSE the two grad_x/grad_y slots of pops::Aux for grad_r/grad_theta (no new aux field); the MEANING is polar and carried by this brick alone. grad_theta is the PHYSICAL derivative (already divided by r): thus the velocity below is symmetric to the Cartesian one (vr <- -grad_theta/B, vtheta <- grad_r/B) and the caller that fills aux carries the 1/r.
E x B VELOCITY IN POLAR (PHYSICAL components in the local basis): v_r = -(1/(B r)) d phi/d theta = -grad_theta / B (dir == 0, radial) v_theta = (1/B) d phi/d r = grad_r / B (dir == 1, azimuthal) The returned flux (dir 0 = F_r = n v_r; dir 1 = F_theta = n v_theta) is PHYSICAL; the 1/r metric and the divergence (1/r) d_r(r F_r) + (1/r) d_theta(F_theta) are carried by assemble_rhs_polar, NOT by this brick. The brick thus stays a pure physics (no box, no r).
Member Typedef Documentation
◆ Prim
| using pops::ExBVelocityPolar::Prim = StateVec<1> |
◆ State
| using pops::ExBVelocityPolar::State = StateVec<1> |
Member Function Documentation
◆ conservative_vars()
|
inlinestatic |
◆ eigenvalues()
|
inline |
Spectrum: one wave, the drift speed in direction dir.
Here is the call graph for this function:◆ flux()
|
inline |
Here is the call graph for this function:◆ max_wave_speed()
|
inline |
Here is the call graph for this function:◆ primitive_vars()
|
inlinestatic |
◆ to_conservative()
◆ to_primitive()
◆ velocity()
PHYSICAL component of the drift velocity in direction index dir (0 = r, 1 = theta).
Here is the caller graph for this function:Member Data Documentation
◆ B0
| Real pops::ExBVelocityPolar::B0 = 1 |
◆ n_vars
|
staticconstexpr |
The documentation for this struct was generated from the following file:
- include/pops/physics/bricks/hyperbolic.hpp
Generated by