Add relative permittivity (epsilon_r) to Ampere's law#6775
Open
tomzhu0225 wants to merge 1 commit intoBLAST-WarpX:developmentfrom
Open
Add relative permittivity (epsilon_r) to Ampere's law#6775tomzhu0225 wants to merge 1 commit intoBLAST-WarpX:developmentfrom
tomzhu0225 wants to merge 1 commit intoBLAST-WarpX:developmentfrom
Conversation
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
Author
|
Friendly reminder on this PR. This version reframes the feature as adding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a
warpx.epsilon_rparameter that introduces a uniform relative permittivity into Ampere's law, scaling thecurl(B)andJterms by1/epsilon_r. This effectively reduces the EM wave propagation speed toc/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::cwith a modifiedWarpX::c_lightacross 14 files. Per reviewer feedback, this PR reframes the approach as adding a relative permittivity to Ampere's law, which:epsilon_r = N²gives the same result asc → c/NPhysics
Standard Ampere's law:
With
warpx.epsilon_r:Faraday's law$\partial \mathbf{B}/\partial t = -\nabla \times \mathbf{E}$ is unchanged.
Implementation
WarpX.H/WarpX.cppepsilon_rwith safeguardsEvolveE.cppc2 → c2 / epsilon_r(Cartesian, Cylindrical, Spherical)EvolveEPML.cppc2 → c2 / epsilon_r,mu_c2_dtscaledEvolveG.cppc2 → c2 / epsilon_r(div cleaning)MacroscopicEvolveE.cppbeta → beta / epsilon_rWarpXComputeDt.cppdt *= sqrt(epsilon_r)ApplySilverMuellerBoundary.cppc → c / sqrt(epsilon_r)for ABC impedance matchingparameters.rstwarpx.epsilon_rExamples/Tests/epsilon_r/Safeguards
epsilon_r >= 1.0enforced at runtimealgo.evolve_scheme = explicitepsilon_r > 1Test
A lightweight 1D Z-pinch test (
test_1d_epsilon_r) withepsilon_r = 100.0verifies that the parameter is parsed, the CFL is relaxed by a factor of 10, and the simulation runs correctly.