Skip to content

Replace theta with temperature_in_eV for the Maxwell-Juttner momentum distribution - #7205

Open
oshapoval wants to merge 23 commits into
BLAST-WarpX:developmentfrom
oshapoval:replace_theta_in_maxwell_juttner
Open

Replace theta with temperature_in_eV for the Maxwell-Juttner momentum distribution#7205
oshapoval wants to merge 23 commits into
BLAST-WarpX:developmentfrom
oshapoval:replace_theta_in_maxwell_juttner

Conversation

@oshapoval

@oshapoval oshapoval commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

This is a follow-up PR to #7184: it replaces Maxwell–Juttner theta / theta_function inputs with temperature_in_eV/temperature_in_eV_function with similar interface used for Maxwellian momentum distribution with temperature_in_eV . It also adds capability to read temperature_in_eV from file for Maxwell–Juttner;

User-facing interface changes:

maxwell_juttner_parser.momentum_distribution_type = "maxwell_juttner"
maxwell_juttner_parser.maxwell_juttner_temperature_in_eV_distribution_type = "parser"
maxwell_juttner_parser.temperature_in_eV_function(x,y,z) = "(1.0 + heaviside(x,0)) * m_e * clight**2 / q_e"

or

maxwell_juttner.momentum_distribution_type = "maxwell_juttner"
maxwell_juttner.maxwell_juttner_temperature_in_eV_distribution_type = "constant"
maxwell_juttner.temperature_in_eV          = m_e * clight**2 / q_e

or

maxwell_juttner_read_from_file.momentum_distribution_type = "maxwell_juttner"
maxwell_juttner_read_from_file.maxwell_juttner_temperature_in_eV_distribution_type = "read_from_file"
maxwell_juttner_read_from_file.read_temperature_in_eV_from_path = "../test_3d_initial_distribution_prepare/example-temperature-in-eV-MJ.h5"

To support both Maxwellian and Maxwell–Juttner with the same temperature_in_eV inputs, parsing and internal conversion (to either u_std or theta) were split:

  • Added a shared helper parse_temperature_in_eV() used by both distributions for constant, parser, and read_from_file (Cartesian geometry + openPMD only for file).
  • Always store raw temperature_in_eV (scalar / parser / openPMD field) plus the species factor m_q_e_over_mc2 = q_e / (m c²). No parse-time conversion to either u_std or theta.
  • Physics conversion happens only at the consumer:
    • Maxwell–Juttner (InjectorMomentumJuttner): T_eV × q_e/(m c²)
    • Maxwellian (GetTemperatureVector): isotropic sqrt(T_eV × q_e/(m c²))

To do list:

  • add option to read temperature_in_eV from openPMD file.

oshapoval and others added 23 commits August 21, 2026 12:43
@oshapoval
oshapoval requested a review from RemiLehe August 28, 2026 19:30
@oshapoval oshapoval changed the title [WIP] Replace theta in maxwell juttner Replace theta with temperature_in_eV for the Maxwell-Juttner momentum distribution Aug 28, 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