Skip to content

Dielectric materials integrated - #7209

Open
atmyers wants to merge 47 commits into
BLAST-WarpX:developmentfrom
atmyers:dielectric-materials-integrated
Open

Dielectric materials integrated#7209
atmyers wants to merge 47 commits into
BLAST-WarpX:developmentfrom
atmyers:dielectric-materials-integrated

Conversation

@atmyers

@atmyers atmyers commented Aug 27, 2026

Copy link
Copy Markdown
Member

This pull request includes the changes from PR #7092 and PR #7154. It supersedes #7154 and could either replace or be merged after #7092.

In addition to the dielectric slab capacitor test from #7092, this adds a test with a conducting sphere embedded within a dielectric sphere. These plots show the WarpX solution compared to the analytic one:

conducting_cylinder_dielectric_shell_e_components_1536

And lineout comparison:

conducting_cylinder_dielectric_shell_centerline_1536

pearlmam and others added 30 commits August 21, 2026 12:25
This uses the MLEBNodeFDLaplacian solver along with setSigma() to set the diele>

The epsilon_r MultiFab is currently created in python and set with libwarpx.warpx.set_epsilon_r(). This is for testing; I need to figure out how to the warpx API.

This has been tested on 2D Cartesian geometry. Will add test file on next commit
This example is the beginings of an electron hop funnel model. Electron current emits from the bottom, electrons are pulled up by the electric field created by the hop electrod, they "hop" along the dielectric funnel via secondary electron emission, and exit the funnel and are pulled to the anode. With a sufficient hop electrod voltage, the dielectric surface charges to the point where the secondary electron yield is 1.0 and all electron current transmits through the funnel.

The hop funnel provides a simple-ish example to test surface charging on cut-cell dielectric boundaries. Current will not transmit with improper handling of surface charge.
Espilon should not be a member of Electrostatic class. Espilon can be generated externally and input into computePhi.
MacroscopicProperties already has methods to define spatial permitivity. This is normally used for the Maxwell solve and includes sigma and permeability. Electrostatic solve only needs epsilon, so this checks the electrostatic_id and provides a path to return only epsilon.

Utilizing Macroscopic properties is advantagous in that it reuses code and provides a unified place to create spatial material properites for both Maxwell and Electrostatic solvers. The disadvantage is the increased complexity of managing what each solver needs. Right now it is rather simple, but it may get complicated if cut-cell material properties or different grid locations are needed.
The ElectrostaticSolver::computePhi method has an optional epsilon input. ComputeSpaceChargeField now checks MaterialProperties to see if epsilon is defined and includes it in the computePhi call. This required using the new warpx.GetMacroscopicProperties() method. Another option would be to pass the MacroscopicProperties as an input, but would require passing that down the chain of calls. Need to decide which implementation matches the desired structure.
This was a clang-tidy error and github's LLM helped me change this. I also changed the 'efield' parameter to a reference; the correctness of these changes should be confirmed by humans other than me.
This example will be replaced by a simpler partially filled dielectric capacitor
This models a partially filled parallel plate capacitor. The simulation electric field solution is compared with the analytical one to check for correctness.
I reduced the tolerance of the electrostatic solver.
(cherry picked from commit 42f5612)
(cherry picked from commit 85cece1)

# Conflicts:
#	Source/FieldSolver/ElectrostaticSolvers/ElectrostaticSolver.H
#	Source/FieldSolver/ElectrostaticSolvers/LabFrameExplicitES.cpp
#	Source/ablastr/fields/PoissonSolver.H
(cherry picked from commit 5076f79)

# Conflicts:
#	Source/FieldSolver/ElectrostaticSolvers/ElectrostaticSolver.H
(cherry picked from commit c192a2a)
(cherry picked from commit ce3b1f5)
Comment thread Source/FieldSolver/ElectrostaticSolvers/DielectricMaterials.cpp Fixed
Comment thread Source/ablastr/fields/PoissonSolver.H Fixed
@n01r
n01r self-requested a review August 27, 2026 23:09
@atmyers atmyers changed the title [WIP] Dielectric materials integrated Dielectric materials integrated Aug 28, 2026
@pearlmam

pearlmam commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Moving the conversation from #7154 to keep things more linear.

Keeping macroscopic properties separate depends on the purpose, and maybe I conflated their use in the EM solver with the ES solver. One thing to keep in mind, the EM solver might benefit from the Dielectric BCs as well; so keeping the proposed design flexible to include this future capability might be beneficial.

One thing that would really benefit me is expanding the dielectric capabilities from a stair stepped approximation to a cut-cell approach. This is more of an AMRex concern, but I notice some stair-stepping artifacts in my research models. Something we can do in WarpX is to add the option to apply a sub-cell effective permittivity on cells cut by the boundary. This would set the permittivity of the cut-cells to something like a harmonic mean of the cells inside and outside of the dielectric. That might be better suited for a new PR, but it's worthwhile keeping this expanded capability in mind for this one.

I will start using this branch on the daily and update y'all on any issues I have.

@RemiLehe
RemiLehe self-requested a review September 1, 2026 22:40
@RemiLehe RemiLehe self-assigned this Sep 1, 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.

5 participants