Arbitrary Distribution functions
Closed this issue · 3 comments
Hi,
I use the Arbitrary Distribution functions method to initialize the drift-ring-beam distribution of particles. Are there any other methods for initializing the drift-ring-beam distribution of particles?
input.deck
begin:constant
malpha = 1836.04me
vp =malpha* 0.0431618 * c #the unique perpendicular speed
vpt=0.001vp #the perpendicular velocity spread of the fast ions
vparat=malpha1000 #the parallel velocity spread of the fast ions
vrange =3.0* vp
end:constant
begin:species
name =alpha
charge = 2.0
mass = 1836.0*4
npart = 100 * nx
number_density = 1.e16
#ring beam distribution in velocity space
dist_fn =exp(-(sqrt(px^(2)+py^(2))-vp)^(2)/vpt^2)*exp(-pz^2/vparat^2)
dist_fn_px_range = (-vrange, vrange)
dist_fn_py_range = (-vrange, vrange)
dist_fn_pz_range = (-3vparat, 3vparat)
end:species
I think this would be the easiest method for your distribution.
If you wanted to specify the start position, momentum and weight of each macro-particle, you could use the particles_from_file block, but this would be more involved than what you're currently doing.
Hope this helps,
Stuart
When sampling a generic distribution, EPOCH will randomly choose a
Hence, EPOCH will generate momenta most efficiently when your maximum
Hope this helps,
Stuart