OpenGATE / GateContrib

User-oriented public repository of Gate (macros, examples and user contributions)
77 stars 135 forks source link

add example FieldMap implementation #40

Closed tbaudier closed 4 years ago

tbaudier commented 4 years ago

cc @fpadilla84

Example for pull request https://github.com/OpenGATE/Gate/pull/292 in Gate

fpadilla84 commented 4 years ago

Hi @jamalizadeh, Concerning your question, we implemented in GATE the setMagTabulateField3D function in order to extend the transport in magnetic fields, using not only to the homogeneous fields, but custom field maps. For that purpose, a custom input file is required (in the example case: GateMag3Dcm.TABLE) where the coordinates x,y,z, the magnetic permeability, as well as the vector field components Bx,By,Bz are stored. This input file (GateMag3Dcm.TABLE) is basically an ASCII, where the information of positions and B values is stored. A vector field then is then created with components Bx,By,Bz and interpolated to the entire simulation geometry. This will be done just adding the command: /gate/geometry/setMagTabulateField3D     PathTo/GateMag3Dcm.TABLE At the moment we are working on improvements to the current implementation, adding the electric fields, as well as the combination of both of them, However, only the magnetic field map implementation was extensively tested, therefore I suggest to use only this function. As soon as we have a stable version for the electric fields (homogeneous and custom field maps) as well as a combined electromagnetic fields we will submit it to the developer repository. Hope this helps ;-)