diff options
author | 2021-07-16 01:24:54 -0700 | |
---|---|---|
committer | 2021-07-16 01:24:54 -0700 | |
commit | baa122d44a3e005492f805ad1ea925dc4981e139 (patch) | |
tree | 0623276d5de6e7687c1dc0df0f2ba54e4effb4dc /Examples/Modules/ParticleBoundaryProcess/analysis_absorption.py | |
parent | 0e1c407e98531e50ac22a5790399247e491b2614 (diff) | |
download | WarpX-baa122d44a3e005492f805ad1ea925dc4981e139.tar.gz WarpX-baa122d44a3e005492f805ad1ea925dc4981e139.tar.zst WarpX-baa122d44a3e005492f805ad1ea925dc4981e139.zip |
Infrastructure for interacting particles with embedded boundary walls (#2069)
* Infrastructure for interacting particles with embedded boundary walls
* remove debug prints
* protect with AMREX_USE_EB
* fix for 2D XZ
* also update level set when regridding
* rename level set to 'DistanceToEB'
* add docstring for scrape particles.
* add assertion on maxLevel() since EB does not work with mesh refinement right now.
* m_eb_if_parser no longer exists
* add test for particle aborption at embedded boundaries
* fix bug I introduced refactoring
* add new test to suite
* fix test names
* fix 2D
* rookie python error
* fix filename in test
* fix script
* fix unused
* make sure we turn EB on in test
Diffstat (limited to 'Examples/Modules/ParticleBoundaryProcess/analysis_absorption.py')
-rwxr-xr-x | Examples/Modules/ParticleBoundaryProcess/analysis_absorption.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Examples/Modules/ParticleBoundaryProcess/analysis_absorption.py b/Examples/Modules/ParticleBoundaryProcess/analysis_absorption.py new file mode 100755 index 000000000..cb6595c78 --- /dev/null +++ b/Examples/Modules/ParticleBoundaryProcess/analysis_absorption.py @@ -0,0 +1,19 @@ +#! /usr/bin/env python + +import yt + +# This test shoots a beam of electrons at cubic embedded boundary geometry +# At time step 40, none of the particles have hit the boundary yet. At time +# step 60, all of them should have been absorbed by the boundary. In the +# absence of the cube, none of the particles would have had time to exit +# the problem domain yet. + +# all particles are still there +ds40 = yt.load("particle_absorption_plt00040") +np40 = ds40.index.particle_headers['electrons'].num_particles +assert(np40 == 612) + +# all particles have been removed +ds60 = yt.load("particle_absorption_plt00060") +np60 = ds60.index.particle_headers['electrons'].num_particles +assert(np60 == 0) |