ModernElectron / WarpX

Modern Electron's WarpX repository serves as both a fork of the WarpX code (an advanced electromagnetic Particle-In-Cell code - see https://ecp-warpx.github.io) and the repository for a set of tools used in simulating thermionic devices (mewarpx).
https://mewarpx.readthedocs.io/en/latest/index.html
Other
0 stars 1 forks source link

Add x and r emitters #131

Closed roelof-groenewald closed 2 years ago

roelof-groenewald commented 2 years ago

XPlaneEmitter and ZCylinderEmitter were added to emit from the side walls of either XZ or RZ simulations. The XPlaneEmitter follows easily from the ZPlaneEmitter so it was not heavily tested. The ZCylinderEmitter however was compared to the known vacuum diode solution to ensure that the velocity distribution of emitted particles were properly sampled. This also served as a test of the rmin != 0 functionality in RZ simulations in WarpX. A 50 um gap was simulated with r_max = 1e-3 m, the cathode was on the outer wall of the tube. The area of the anode in this case is about 5% smaller than the cathode's and therefore we should expect only small deviations from theory due to the RZ nature of the problem. The input file used for the data points below was also added as an example file.

D_50

Still to do:

The changes to ElectrostaticSolver.cpp now allows us to actually use a Nuemann boundary condition for the r_max boundary. Due to this change I reran the vacuum diode simulation with the ZDiscEmitter as was done in PR #121. The results are shown below and still agrees well with theory.

D_50

codecov-commenter commented 2 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (memaster_update@a23ba88). Click here to learn what that means. The diff coverage is n/a.

:exclamation: Current head 04a8cfa differs from pull request most recent head 1fca41b. Consider uploading reports for the commit 1fca41b to get more accurate results Impacted file tree graph

@@                Coverage Diff                 @@
##             memaster_update     #131   +/-   ##
==================================================
  Coverage                   ?   78.41%           
==================================================
  Files                      ?       28           
  Lines                      ?     3516           
  Branches                   ?        0           
==================================================
  Hits                       ?     2757           
  Misses                     ?      759           
  Partials                   ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a23ba88...1fca41b. Read the comment docs.