Skip to content

Commit

Permalink
Add argument to define Gaussian flux (#102)
Browse files Browse the repository at this point in the history
* Add argument to define Gaussian flux

* Update PICMI_Python/particles.py
  • Loading branch information
RemiLehe authored Aug 10, 2023
1 parent aedfae2 commit b89423c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PICMI_Python/particles.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ class PICMI_UniformFluxDistribution(_ClassWithInit):
flux_tmax: float, optional
Time at which the flux injection will be turned off.
gaussian_flux_momentum_distribution: bool, optional
If True, the momentum distribution is v*Gaussian,
in the direction normal to the plane. Otherwise,
the momentum distribution is simply Gaussian.
"""

def __init__(self, flux, flux_normal_axis,
Expand All @@ -402,6 +407,7 @@ def __init__(self, flux, flux_normal_axis,
directed_velocity = [0.,0.,0.],
flux_tmin = None,
flux_tmax = None,
gaussian_flux_momentum_distribution = None,
**kw):
self.flux = flux
self.flux_normal_axis = flux_normal_axis
Expand All @@ -413,6 +419,7 @@ def __init__(self, flux, flux_normal_axis,
self.directed_velocity = directed_velocity
self.flux_tmin = flux_tmin
self.flux_tmax = flux_tmax
self.gaussian_flux_momentum_distribution = gaussian_flux_momentum_distribution

self.handle_init(kw)

Expand Down

0 comments on commit b89423c

Please sign in to comment.