[Gate-users] Geometry causes simulation run to abort

Jasper C jaspercwork at gmail.com
Fri Nov 18 02:51:27 CET 2011


Hello all,

I've been trying to run simulations with a line source phantom,
consisting of a glass tube filled with water.  My F18 source is
modeled as a cylinder the same size as the water.

My simulation will abort (GATE will crash) within 10 minutes, with the
following error message:

--------------------------------------------------
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted
--------------------------------------------------

I have been able to track this down to my use of a cylindrical
phantom.  My code is as follows:

--------------------------------------------------
#	Phantom body

/gate/world/daughters/name			phntmBody
/gate/world/daughters/insert			cylinder
/gate/phntmBody/placement/setTranslation	10.0 0.0 0.0 mm
/gate/phntmBody/geometry/setRmax		0.9 mm
/gate/phntmBody/geometry/setRmin		0.5 mm
/gate/phntmBody/geometry/setHeight		128.0 mm
/gate/phntmBody/setMaterial			Glass
/gate/phntmBody/vis/forceWireframe
/gate/phntmBody/vis/setColor		yellow
/gate/phntmBody/vis/setVisible		1

#	Radioactive media in body

/gate/phntmBody/daughters/name		phntmMedia
/gate/phntmBody/daughters/insert		cylinder
/gate/phntmMedia/placement/setTranslation	0.0 0.0 0.0 mm
/gate/phntmMedia/geometry/setRmax		0.5 mm
/gate/phntmMedia/geometry/setRmin		0.0 mm
/gate/phntmMedia/geometry/setHeight		128.0 mm
/gate/phntmMedia/setMaterial		Water
/gate/phntmMedia/vis/forceSolid
/gate/phntmMedia/vis/setColor		red
/gate/phntmMedia/vis/setVisible		1


/gate/phntmBody/attachPhantomSD
/gate/phntmMedia/attachPhantomSD
--------------------------------------------------

What I have found is that having the Rmax of the inner cylinder set
equal to the Rmin of the outer cylinder causes this crash.  If I set
the outer Rmin to be slightly larger than the inner Rmax the
simulation will run fine, ie:

--------------------------------------------------
/gate/phntmBody/geometry/setRmin		0.5001 mm
/gate/phntmMedia/geometry/setRmax		0.5 mm
--------------------------------------------------

or

--------------------------------------------------
/gate/phntmBody/geometry/setRmin		0.5 mm
/gate/phntmMedia/geometry/setRmax		0.4999 mm
--------------------------------------------------

My question is is this a bug in the implementation of the geometry, or
is the correct way of implementing such things to leave a tiny gap in
between the two objects?

Curiously, I have not seen this problem with my previous phantom,
which was a solid sphere of sodium defined in (as a daughter of) a
solid cube of plastic.

Thanks and best regards,

Jasper


More information about the Gate-users mailing list