Skip to content

implementing a nanoparticle #5397

Answered by aeriforme
kirstynvalles02 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello!

If you want to initialize a nanometric sphere in your simulation, you can add a particle species with:

<species_name>.profile = parse_density_function
<species_name>.density_function(x,y,z) =  n0 * ( ((x-x0)*(x-x0) + (y-y0)*(y-y0) + (z-z0)*(z-z0)) < R**2)

This would add particles in your simulation according to density_function, meaning that n0 would be the number density of that species inside the sphere, x0,y0,z0 the center and R the radius of the sphere.

This example could be of help.

Otherwise, if what you want is to initialize a single macro particle in a given location, you can use <species_name>.injection_style = SingleParticle. In this case, you can check out this other ex…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by aeriforme
Comment options

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

Comment options

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

Comment options

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #5392 on October 16, 2024 23:08.