ExBVelocityPolar Struct ReferenceΒΆ

adc_cpp: pops::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

◆ State

Member Function Documentation

◆ conservative_vars()

static VariableSet pops::ExBVelocityPolar::conservative_vars ( )
inlinestatic

◆ eigenvalues()

POPS_HD StateVec< 1 > pops::ExBVelocityPolar::eigenvalues ( const StateVec< 1 > &  ,
const Aux a,
int  dir 
) const
inline

Spectrum: one wave, the drift speed in direction dir.

+ Here is the call graph for this function:

◆ flux()

POPS_HD StateVec< 1 > pops::ExBVelocityPolar::flux ( const StateVec< 1 > &  u,
const Aux a,
int  dir 
) const
inline
+ Here is the call graph for this function:

◆ max_wave_speed()

POPS_HD Real pops::ExBVelocityPolar::max_wave_speed ( const StateVec< 1 > &  ,
const Aux a,
int  dir 
) const
inline
+ Here is the call graph for this function:

◆ primitive_vars()

static VariableSet pops::ExBVelocityPolar::primitive_vars ( )
inlinestatic

◆ to_conservative()

POPS_HD StateVec< 1 > pops::ExBVelocityPolar::to_conservative ( const Prim p) const
inline

◆ to_primitive()

POPS_HD Prim pops::ExBVelocityPolar::to_primitive ( const StateVec< 1 > &  u) const
inline

◆ velocity()

POPS_HD Real pops::ExBVelocityPolar::velocity ( const Aux a,
int  dir 
) const
inline

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

constexpr int pops::ExBVelocityPolar::n_vars = 1
staticconstexpr

The documentation for this struct was generated from the following file: