diff options
Diffstat (limited to 'Python/pywarpx/picmi.py')
-rw-r--r-- | Python/pywarpx/picmi.py | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py index aac083af0..dff224d07 100644 --- a/Python/pywarpx/picmi.py +++ b/Python/pywarpx/picmi.py @@ -73,6 +73,10 @@ class Species(picmistandard.PICMI_Species): Whether or not to deposit the charge and current density for for this species + warpx_random_theta: bool, default=True + Whether or not to add random angle to the particles in theta + when in RZ mode. + warpx_reflection_model_xlo: string, default='0.' Expression (in terms of the velocity "v") specifying the probability that the particle will reflect on the lower x boundary @@ -170,6 +174,7 @@ class Species(picmistandard.PICMI_Species): self.self_fields_verbosity = kw.pop('warpx_self_fields_verbosity', None) self.save_previous_position = kw.pop('warpx_save_previous_position', None) self.do_not_deposit = kw.pop('warpx_do_not_deposit', None) + self.random_theta = kw.pop('warpx_random_theta', None) # For particle reflection self.reflection_model_xlo = kw.pop('warpx_reflection_model_xlo', None) @@ -221,7 +226,8 @@ class Species(picmistandard.PICMI_Species): save_particles_at_zhi = self.save_particles_at_zhi, save_particles_at_eb = self.save_particles_at_eb, save_previous_position = self.save_previous_position, - do_not_deposit = self.do_not_deposit) + do_not_deposit = self.do_not_deposit, + random_theta = self.random_theta) # add reflection models self.species.add_new_attr("reflection_model_xlo(E)", self.reflection_model_xlo) @@ -988,6 +994,7 @@ class ElectrostaticSolver(picmistandard.PICMI_ElectrostaticSolver): self.relativistic = kw.pop('warpx_relativistic', False) self.absolute_tolerance = kw.pop('warpx_absolute_tolerance', None) self.self_fields_verbosity = kw.pop('warpx_self_fields_verbosity', None) + self.magnetostatic = kw.pop('warpx_magnetostatic', False) def initialize_inputs(self): @@ -996,7 +1003,10 @@ class ElectrostaticSolver(picmistandard.PICMI_ElectrostaticSolver): if self.relativistic: pywarpx.warpx.do_electrostatic = 'relativistic' else: - pywarpx.warpx.do_electrostatic = 'labframe' + if self.magnetostatic: + pywarpx.warpx.do_electrostatic = 'labframe-electromagnetostatic' + else: + pywarpx.warpx.do_electrostatic = 'labframe' pywarpx.warpx.self_fields_required_precision = self.required_precision pywarpx.warpx.self_fields_absolute_tolerance = self.absolute_tolerance pywarpx.warpx.self_fields_max_iters = self.maximum_iterations @@ -1748,7 +1758,11 @@ class FieldDiagnostic(picmistandard.PICMI_FieldDiagnostic, WarpXDiagnosticBase): fields_to_plot.add('jx') fields_to_plot.add('jy') fields_to_plot.add('jz') - elif dataname in ['Ex', 'Ey', 'Ez', 'Bx', 'By', 'Bz', 'rho', 'phi', 'F', 'proc_number', 'part_per_cell']: + elif dataname == 'A': + fields_to_plot.add('Ax') + fields_to_plot.add('Ay') + fields_to_plot.add('Az') + elif dataname in ['Ex', 'Ey', 'Ez', 'Bx', 'By', 'Bz', 'Ax', 'Ay', 'Az', 'rho', 'phi', 'F', 'proc_number', 'part_per_cell']: fields_to_plot.add(dataname) elif dataname in ['Jx', 'Jy', 'Jz']: fields_to_plot.add(dataname.lower()) |