Uniformity nanpparticle distribution in a sphere

Hi
I want to define a sphere( 20 micrometer) with at least 500 nano particles inside it. how can i simulate this geometry? after do it I want to confine a source in the sphere without nano particles?? is this possible??? and how is this source define??( i dont wan to use voxelize source)
thanks

For this kind of geometry, you can try a simple algorithm like random sequential addition by adding a sphere at a time and checking that it does not overlap the others, but still falls inside the boundary. Since I already have a program that can pack spheres in different boundaries, I generated 501 small spheres (r = 0.027) inside a unit sphere (r = 1) and am attaching the positions as spheres.txt (18.6 KB), which you can try to convert into a gdml by hand, and what it looks like is shown below. I packed one extra so you can remove one to make space for your source if needed. I hope this is useful for you. Cheers,

1 Like

thank a lot

dear amadio

how can i define the source that distribute between nano particles spaces in The big sphere( green color region in picture) ??
Untitled

GDML is just the input format for Geant4, there is nothing else to install if you have Geant4 with GDML enabled. It’s an XML-based format to describe your detector geometry. If all you want is to create particles in the green area, you can just create them at random inside the big sphere and check that it’s not inside any smaller sphere. However, this would be part of your event generation (therefore separate from the geometry description). You can use a simple particle gun to generate particles, then set their positions using the method described above.

GDML is just the input format for Geant4, there is nothing else to install if you have Geant4 with GDML enabled.

Almost true. In order to build Geant4 with GDML enabled, the user must have XercesC (the GDML parser chosen by G4) installed on their system, and on the cmake command line, set -DXERCESC_ROOT_DIR=<path-to-XercesC>.