[Gate-users] Geometry causes simulation run to abort
Didier Benoit
benoit at imnc.in2p3.fr
Wed Nov 23 16:00:30 CET 2011
Hi Jasper,
Maybe it's a problem of boundary in Geant4, or a problem of double/float
precision. For me if you don't want a tiny space between your 2 volumes
you can generate a voxelized phantom and load it in GATE.
Kind regards,
Didier
On 11/18/2011 02:51 AM, Jasper C wrote:
> 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
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
--
----------------------------------------------------------------
Didier BENOIT, GATE Engineer
Imagerie et Modélisation en Neurobiologie et Cancérologie (IMNC)
IMNC – UMR 8165 CNRS – Université Paris 7 – Université Paris 11
Campus d’Orsay
Bâtiment 440
91406 ORSAY Cedex
Tél : (33) 1 69 15 68 76
E-mail : benoit at imnc.in2p3.fr
http://www.imnc.in2p3.fr
----------------------------------------------------------------
More information about the Gate-users
mailing list