Skip to content

feat(vfp2d): couple ion hydro and kinetic-electron pressure - #347

Draft
joglekara wants to merge 5 commits into
mainfrom
codex/vfp2d-ion-hydro-gate0
Draft

feat(vfp2d): couple ion hydro and kinetic-electron pressure#347
joglekara wants to merge 5 commits into
mainfrom
codex/vfp2d-ion-hydro-gate0

Conversation

@joglekara

@joglekara joglekara commented Aug 21, 2026

Copy link
Copy Markdown
Member

Summary

  • add the Gate 0a standalone 2D ideal-ion MUSCL-HLLC finite-volume backbone
  • close Gate 0b with quantitative Riemann, translating-vortex, Sedov, and magnetic-divergence benchmarks
  • add Gate 1 ion-frame electron operators for bulk transport, deformation, frame acceleration, and local finite-mass exchange
  • add the Gate 2a/2b ion-kinetic split with finite-mass remapping, full kinetic electron-pressure feedback, and sparse high-harmonic deformation operators
  • close the nonlinear coupled-energy gate under timestep and spatial/radial refinement

Nonlinear energy gate

The coupled map is now the symmetric composition

  1. ion hydro half-step;
  2. coupled pressure/exchange half-step;
  3. full kinetic-electron step at midpoint ion kinematics;
  4. coupled pressure/exchange half-step; and
  5. ion hydro half-step.

The kinetic-Ohm Ampere projection changes only f1, but in a moving ion frame that changes lab-frame electron energy by u_i . Delta p_e. Runs now accumulate that projection work explicitly and save both total_energy and accounted_total_energy = total_energy - current_projection_energy. A direct unit test compares the ledger to the independently measured lab-frame energy jump.

The nonlinear periodic benchmark evolves nonuniform electron density and temperature, accelerates the ions through the full f0 + f2 electron pressure, and generates magnetic field. Its declared accounted-energy tolerance is 3.1e-9:

  • the tolerance is met for dt = 2e-3, 1e-3, 5e-4;
  • ion-velocity and magnetic observables converge above order 1.8 in time;
  • the energy defect decreases by more than 8x from nv = 24 to nv = 96; and
  • the energy defect decreases by more than 8x from nx = 6 to nx = 12.

Gate 0b benchmarks

  • Sod and pressure-ratio 1e5 strong-shock tubes are compared with an exact Euler Riemann solution on both coordinate axes; normalized L1 tolerances are 3.5% and 12%, respectively.
  • A translating isentropic vortex converges above order 1.7 from 24x24 to 48x48.
  • A Cartesian Sedov blast preserves total energy to roundoff, stays positive and transpose-symmetric, and keeps fourfold kinetic-shell anisotropy below 5%.
  • A divergence-free magnetic field remains divergence-free through 24 nontrivial Faraday updates to 2e-12 absolute tolerance.

Physics demonstrated

  • exact frozen-ion regression to the kinetic-Ohm solver when u_i = 0
  • analytic ideal bulk magnetic advection with no magnetic-divergence source
  • finite-mass velocity-frame translation preserving electron density and lab-frame momentum/energy to roundoff
  • symmetric momentum, temperature, and electron-pressure exchange preserving coupled lab-frame invariants
  • scalar f0 plus traceless f2 electron pressure and equal-and-opposite pressure work
  • classical local-Maxwellian Biermann generation with spectral convergence
  • Epperlein-Haines Z* response recovering the analytic Spitzer-Harm T^(5/2) heat-flux coefficient
  • Galilean, compression, shear/f2, rigid-rotation, and accelerating-frame checks

Explicit boundary

This remains a draft and is not ready for production parameter scans. Moving-ion production is still periodic, nonrelativistic, unsharded, kinetic-Ohm, and quasineutral. ElectronIonExchange remains a weak-drift moment model rather than a full finite-mass Landau operator. Nonperiodic coupled boundaries and production-scale validation remain future gates.

Verification

  • uv run pytest -q tests/test_vfp2d -- 66 passed
  • uvx ruff check on all touched solver and test files -- passed
  • uvx ruff format on all touched solver and test files -- passed
  • git diff --cached --check -- passed

The earlier repository-wide non-slow run was interrupted after 7 passing tests because the existing test_reuse_config_dict path remained in urllib3 network retry for four minutes. The complete relevant VFP2D suite is green.

@joglekara joglekara changed the title feat(vfp2d): add conservative ion hydro backbone feat(vfp2d): add ion hydro and moving-frame electron references Aug 21, 2026
@joglekara joglekara changed the title feat(vfp2d): add ion hydro and moving-frame electron references feat(vfp2d): couple ion hydro to ion-frame kinetic electrons Aug 21, 2026
@joglekara joglekara changed the title feat(vfp2d): couple ion hydro to ion-frame kinetic electrons feat(vfp2d): couple ion hydro and kinetic-electron pressure Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant