mpacts.commands.onparticles. generateindisk

In order to be able to use this module import it like this:

import mpacts.commands.onparticles.generateindisk
#or assign it to a shorter name
import mpacts.commands.onparticles.generateindisk as gen

GenerateRandomParticleInDisk

class mpacts.commands.onparticles.generateindisk.GenerateRandomParticleInDisk(name, simulation, pc, delay, maxparticles, pos, rdisk, r, rsd=0, density=1000, message=None, init_dict={}, init_functions=[], r_sample_list=None)

Bases: mpacts.core.command.PythonCommand

GenerateRandomParticleInDisk(name, parent, **kwargs)
execute()

GenerateRandomParticleInSphere

class mpacts.commands.onparticles.generateindisk.GenerateRandomParticleInSphere(name, simulation, pc, rate, sphere_position, sphere_radius, inner_sphere_pos=(0, 0, 0), inner_sphere_radius=0.0, particle_properties={})

Bases: mpacts.core.command.PythonCommand

Generates spheres in a sphere (possibly excluding another spherical volume).

Parameters:

-name Name
-simulation Simulation (needed to access time-step
-pc ParticleContainer (new-style) to which particles should be added
-rate number of particles per volume and time, will be multiplied by volume particles can be generated in!
-sphere_position
 tuple of sphere centre
-sphere_radius radius of sphere
-inner_sphere_pos
 tuple of inner sphere centre
-inner_sphere_radius
 radius of inner sphere
-particle_properties
 dictionary of particle properties to be set in add_and_set_particles.
GenerateRandomParticleInSphere(name, parent, **kwargs)
execute()