Skip to content

Questions about arbitrary distribution functions (species block) #631

Answered by Status-Mirror
wnguyen1312 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @wnguyen1312,

This can be done using a similar method to that outlined in our momentum distribution demo. In my attached input.deck, I create a kinetic-energy variable part_ke, and I use this to construct two quardratic distribution functions, both of which peak at 1 for a kinetic energy KE_edge. The first function rises from 0 at 0 KE, and the second drops back to 0 at KE_max.

This example isn't perfect, as I haven't accounted for something important. EPOCH randomly draws px, py and pz values, compares it to the distribution function (assumed between 0 and 1), and draws a random number to see if we keep this px, py and pz set or not. However, this would only work for a KE distributio…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wnguyen1312
Comment options

Answer selected by wnguyen1312
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants