Skip to content

Add relative permittivity (epsilon_r) to Ampere's law#6775

Open
tomzhu0225 wants to merge 1 commit intoBLAST-WarpX:developmentfrom
tomzhu0225:feature/ampere-epsilon-r
Open

Add relative permittivity (epsilon_r) to Ampere's law#6775
tomzhu0225 wants to merge 1 commit intoBLAST-WarpX:developmentfrom
tomzhu0225:feature/ampere-epsilon-r

Conversation

@tomzhu0225
Copy link
Copy Markdown

Summary

This PR adds a warpx.epsilon_r parameter that introduces a uniform relative permittivity into Ampere's law, scaling the curl(B) and J terms by 1/epsilon_r. This effectively reduces the EM wave propagation speed to c/sqrt(epsilon_r) and relaxes the CFL condition for explicit FDTD simulations.

Faraday's law and the particle pusher are not modified.

Issue #6769. Supersedes #6725.

Motivation

In high-density plasma simulations (e.g., Z-pinch, dense fusion targets), the light-wave CFL constraint can be orders of magnitude more restrictive than needed by the plasma dynamics. This feature allows users to relax the CFL by a factor of sqrt(epsilon_r) while keeping the explicit FDTD solver.

Changes from #6725

PR #6725 implemented this as a "reduced speed of light" by globally replacing PhysConst::c with a modified WarpX::c_light across 14 files. Per reviewer feedback, this PR reframes the approach as adding a relative permittivity to Ampere's law, which:

  • Does not redefine or shadow any physical constant
  • Confines modifications to the Ampere equation and related routines only
  • Is physically equivalent: setting epsilon_r = N² gives the same result as c → c/N

Physics

Standard Ampere's law:

$$\frac{\partial \mathbf{E}}{\partial t} = c^2 \nabla \times \mathbf{B} - \frac{\mathbf{J}}{\epsilon_0}$$

With warpx.epsilon_r:

$$\frac{\partial \mathbf{E}}{\partial t} = \frac{c^2}{\epsilon_r} \nabla \times \mathbf{B} - \frac{\mathbf{J}}{\epsilon_0 , \epsilon_r}$$

Faraday's law $\partial \mathbf{B}/\partial t = -\nabla \times \mathbf{E}$ is unchanged.

Implementation

File Change
WarpX.H / WarpX.cpp Declare, initialize, and parse epsilon_r with safeguards
EvolveE.cpp c2 → c2 / epsilon_r (Cartesian, Cylindrical, Spherical)
EvolveEPML.cpp c2 → c2 / epsilon_r, mu_c2_dt scaled
EvolveG.cpp c2 → c2 / epsilon_r (div cleaning)
MacroscopicEvolveE.cpp beta → beta / epsilon_r
WarpXComputeDt.cpp dt *= sqrt(epsilon_r)
ApplySilverMuellerBoundary.cpp c → c / sqrt(epsilon_r) for ABC impedance matching
parameters.rst Document warpx.epsilon_r
Examples/Tests/epsilon_r/ 1D Z-pinch test case

Safeguards

  • epsilon_r >= 1.0 enforced at runtime
  • Only allowed with algo.evolve_scheme = explicit
  • Rejected for PSATD and HybridPIC solvers
  • Informational message printed when epsilon_r > 1

Test

A lightweight 1D Z-pinch test (test_1d_epsilon_r) with epsilon_r = 100.0 verifies that the parameter is parsed, the CFL is relaxed by a factor of 10, and the simulation runs correctly.

Add warpx.epsilon_r parameter (default 1.0) that scales the curl(B) and J
terms in the E-field update by 1/epsilon_r, effectively reducing the EM
wave speed to c/sqrt(epsilon_r) and relaxing the CFL condition.

Faraday's law and the particle pusher are unchanged. Only supported with
the explicit FDTD solver.

Modified files:
- EvolveE, EvolveEPML, EvolveG: c2 -> c2/epsilon_r
- MacroscopicEvolveE: beta -> beta/epsilon_r
- ComputeDt: dt *= sqrt(epsilon_r)
- ApplySilverMuellerBoundary: c -> c/sqrt(epsilon_r)
- WarpX.H/cpp: declare, initialize, parse epsilon_r
- parameters.rst: document warpx.epsilon_r
- Tests/epsilon_r: 1D z-pinch test case
@RemiLehe RemiLehe self-assigned this Apr 14, 2026
@tomzhu0225
Copy link
Copy Markdown
Author

Friendly reminder on this PR. This version reframes the feature as adding epsilon_r to Ampère’s law, with default behavior unchanged at epsilon_r = 1.0. I’d appreciate any feedback on whether this design looks acceptable for merge.

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.

2 participants