Skip to content

Commit b89423c

Browse files
authored
Add argument to define Gaussian flux (#102)
* Add argument to define Gaussian flux * Update PICMI_Python/particles.py
1 parent aedfae2 commit b89423c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

PICMI_Python/particles.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,11 @@ class PICMI_UniformFluxDistribution(_ClassWithInit):
392392
393393
flux_tmax: float, optional
394394
Time at which the flux injection will be turned off.
395+
396+
gaussian_flux_momentum_distribution: bool, optional
397+
If True, the momentum distribution is v*Gaussian,
398+
in the direction normal to the plane. Otherwise,
399+
the momentum distribution is simply Gaussian.
395400
"""
396401

397402
def __init__(self, flux, flux_normal_axis,
@@ -402,6 +407,7 @@ def __init__(self, flux, flux_normal_axis,
402407
directed_velocity = [0.,0.,0.],
403408
flux_tmin = None,
404409
flux_tmax = None,
410+
gaussian_flux_momentum_distribution = None,
405411
**kw):
406412
self.flux = flux
407413
self.flux_normal_axis = flux_normal_axis
@@ -413,6 +419,7 @@ def __init__(self, flux, flux_normal_axis,
413419
self.directed_velocity = directed_velocity
414420
self.flux_tmin = flux_tmin
415421
self.flux_tmax = flux_tmax
422+
self.gaussian_flux_momentum_distribution = gaussian_flux_momentum_distribution
416423

417424
self.handle_init(kw)
418425

0 commit comments

Comments
 (0)