diff options
author | 2022-02-25 12:03:56 -0800 | |
---|---|---|
committer | 2022-02-25 20:03:56 +0000 | |
commit | 39d9b06eef5913f05a0c44a6d0b339f974849a9a (patch) | |
tree | 84942412721d0afcb63ae592e47c789a2b27b2b7 /Python | |
parent | 44d64184f39619b4090ce3c34240046d3f0d2cb0 (diff) | |
download | WarpX-39d9b06eef5913f05a0c44a6d0b339f974849a9a.tar.gz WarpX-39d9b06eef5913f05a0c44a6d0b339f974849a9a.tar.zst WarpX-39d9b06eef5913f05a0c44a6d0b339f974849a9a.zip |
Add Coulomb collision installation to picmi.py (#2864)
* added Coulomb collision installation to picmi.py
* added comment saying the input values for the new PICMI test comes from inputs_2d
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pywarpx/picmi.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py index 69fa25ac0..f197afbc2 100644 --- a/Python/pywarpx/picmi.py +++ b/Python/pywarpx/picmi.py @@ -859,6 +859,27 @@ class Mirror(picmistandard.PICMI_Mirror): pywarpx.warpx.mirror_z_npoints.append(self.number_of_cells) +class CoulombCollisions(picmistandard.base._ClassWithInit): + """Custom class to handle setup of binary Coulmb collisions in WarpX. If + collision initialization is added to picmistandard this can be changed to + inherit that functionality.""" + + def __init__(self, name, species, CoulombLog=None, ndt=None, **kw): + self.name = name + self.species = species + self.CoulombLog = CoulombLog + self.ndt = ndt + + self.handle_init(kw) + + def initialize_inputs(self): + collision = pywarpx.Collisions.newcollision(self.name) + collision.type = 'pairwisecoulomb' + collision.species = [species.name for species in self.species] + collision.CoulombLog = self.CoulombLog + collision.ndt = self.ndt + + class MCCCollisions(picmistandard.base._ClassWithInit): """Custom class to handle setup of MCC collisions in WarpX. If collision initialization is added to picmistandard this can be changed to inherit |