diff options
author | 2022-01-21 13:25:03 -0800 | |
---|---|---|
committer | 2022-01-21 13:25:03 -0800 | |
commit | 23ff60beeaaa08263aaa9680f82cab20803ce9e7 (patch) | |
tree | 7662f99230a789f21f529bed40fea2829efbc76a /Examples/Physics_applications/capacitive_discharge/analysis_1d.py | |
parent | a3561eedf9fc0ac58c067b95258fb9b69e5cf07a (diff) | |
download | WarpX-23ff60beeaaa08263aaa9680f82cab20803ce9e7.tar.gz WarpX-23ff60beeaaa08263aaa9680f82cab20803ce9e7.tar.zst WarpX-23ff60beeaaa08263aaa9680f82cab20803ce9e7.zip |
Access species specific charge density from python (#2710)
* added python wrapper function to deposit a specific species density in rho_fp
* added 1D ES input file with MCC that uses the charge deposition functionality
* reset rho_fp[lev] before depositing
* updated documentation
* switch to using simulation.extension in Poisson solver
* Apply suggestion from code review
Co-authored-by: Phil Miller <phil.miller@intensecomputing.com>
* suggested changes from code review
* add comment explaining why a direct Poisson solver is used
* removed direct solver in 1D example since it is actually slower than the MLMG solver
* Apply suggestions from code review
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
* added docstring for warpx_depositChargeDensity
* fixed order of imports in new PICMI input file
Co-authored-by: Phil Miller <phil.miller@intensecomputing.com>
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Examples/Physics_applications/capacitive_discharge/analysis_1d.py')
-rwxr-xr-x | Examples/Physics_applications/capacitive_discharge/analysis_1d.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Examples/Physics_applications/capacitive_discharge/analysis_1d.py b/Examples/Physics_applications/capacitive_discharge/analysis_1d.py new file mode 100755 index 000000000..9a014e494 --- /dev/null +++ b/Examples/Physics_applications/capacitive_discharge/analysis_1d.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python3 + +# Copyright 2021 Modern Electron + +import numpy as np + +density_data = np.load( 'avg_ion_density.npy' ) +assert np.isclose(np.mean(density_data), 2.53023e14) |