RE: [fluka-discuss]: modulator wheel in proton radiotherapy

From: Vasilis Vlachoudis <Vasilis.Vlachoudis_at_cern.ch>
Date: Mon, 7 Jul 2014 15:33:04 +0000

Hi Rafiq, I missed your email. Check the attached input file and the flair I've created a #define with a variable called ANGLE (in degrees) and modified the AnPl01 plane such as the normal is given as a function of the ANGLE What(1) =sind(ANGLE) What(2) =-cosd(ANGLE) Then if you go to the Geometry tab every time you change the ANGLE value you should see the plane rotating In the Run tab I created a new run called "mod_rot", and select the "mod_rot", and I click the "Loop" button Select as variable the "ANGLE" and set the start stop and step. It will create several runs where only the angle will change You can visualize/edit the geometry of each run in the "Geometry" by selecting the appropriate run Last step select all of them and click the button Run to start the execution Merging the files together you have to go to the "Data" sub tab and select your binning and click the "Rules" button Add the rule +\I-\d\d\d\d_fort.\U + = add files \I = input filename "mod_rot" -\d = for the extension -1 -2 -3 -4 that the loop function automatically adds \d\d\d = the standard cycles of fluka _fort.\U = the extension of fluka _fort.unit Please give a look on the flair manual all these are described in detail. Vasilis ________________________________________ From: rafiqphy_at_gmail.com [rafiqphy_at_gmail.com] on behalf of Mohammad Islam [rafiqul.islam_at_okstate.edu] Sent: 30 June 2014 05:13 To: Vasilis Vlachoudis Cc: fluka-discuss_at_fluka.org Subject: Re: [fluka-discuss]: modulator wheel in proton radiotherapy Dear Vasilis and FLUKA users, Thank you very much for your suggestions, Vasilis. As per suggestion, I would like to run multiple simulations using FLAIR's 'loop' function to create dynamic body. Attached is a test modulator wheel which I developed using Simple Geo. I used couple of infinite planes to cut the angle of different slice of the wheel. I bet there are much better better way to build a modulator wheel but that's what I came up with. Anyway, I have few questions: a) Can I use '#define' for rotation of the modulator wheel so that using FLAIR 'loop' function I can run multiple simulations for the rotation of the wheel. If so, I don't know how to do use '# define' for a region. And if not, could you please tell me what variable or how it should be used for this example to create dynamic geometry in order to mimic wheel's rotation by looking at the input. b) After multiple simulations, is it possible to merge all the data into one simulation using FLAIR or how would you do that? I sincerely appreciate all your help. Rafiq On Fri, Jun 20, 2014 at 5:07 AM, Vasilis Vlachoudis <Vasilis.Vlachoudis_at_cern.ch> wrote: > Hi Mohammad, > > I presume that the speed of rotation of your disc is very low compared to the propagation of the particles. > > In this case you should modify the geometry (the bodies of the disc) for every starting particle. > You have to create a custom source.f routine (enabled with the SOURCE card) > and inside the > IF (LFIRST) THEN > CALL NM2BDY('AAA ',IAAA,IERR) > ... > END IF > block call the NM2BDY routine to convert the names to indexes of the bodies you want to modify. > e.g. Imagine I am cutting my rotating disc with a tilted plane named 'AAA' located at (0,0,0) > defined as PLA (not XYP, ...) > (be carefull on the spaces after the name it has to be exactly 8 characters. > > Also in the header of the source.f you have to save the index with > SAVE IAAA > and to declare the array of the WHATs > DIMENSION WHAT(18) > > before pushing the particle in the stack you can randomly select lets say a rotation for this plane > PHI = FLRNDM(XXX)*TWOPIP > WHAT(1) = COS(PHI) > WHAT(2) = SIN(PHI) > WHAT(3) = ZERZER > WHAT(4) = ZERZER > WHAT(5) = ZERZER > WHAT(6) = ZERZER > CALL RSTBDY(IAAA, 15, WHAT, 6) > > Hope that helps > Vasilis > > ________________________________________ > From: rafiqphy_at_gmail.com [rafiqphy_at_gmail.com] on behalf of Mohammad Islam [rafiqul.islam_at_okstate.edu] > Sent: 18 June 2014 04:19 > To: Vasilis Vlachoudis > Cc: fluka-discuss_at_fluka.org > Subject: Re: [fluka-discuss]: modulator wheel in proton radiotherapy > > Dear Vasilis, > > Thank you very much for you help. > I am currently working as per your suggestion. One quick question: > where would I get CALL NM2BDY('name....', ID, IERR) and CALL > RSTBDY(ID, BODYTYPE, WHAT, NWHAT) routines. And where to use them. Any > example would be a great help. Thanks. > > Rafiq > > On Mon, Jun 16, 2014 at 1:51 AM, Vasilis Vlachoudis > <Vasilis.Vlachoudis_at_cern.ch> wrote: >> Hi Mohamad, >> >> it is possible to introduce a rotating wheel in your simulations. It will be treated as a moving body. >> You will have to modify its parameters (on the bodies that they describe it) during run time, most >> preferable with in a custom source routine. For every new particle you change the location of the wheel. >> >> However (even recommended) If you feel uncomfortable with user routines, then the easiest and safest >> way would be to make multiple simulations with various geometries. You can use >> #define VAR value >> to define variables and make a "dynamic" geometry. Using the flair ability to make muliple >> runs by tweaking the variables value you simulate several setups. Check the "loop" function. >> >> If you wish to modify a bodies parameter you need the following routines: >> >> * To get the body id (very slow, save the return value, to avoid multiple calls) >> CALL NM2BDY('name....', ID, IERR) >> >> * To reset the body parameters >> CALL RSTBDY(ID, BODYTYPE, WHAT, NWHAT) >> >> Body types: >> ARB 1 >> SPH 2 >> RCC 3 >> REC 4 >> TRC 5 >> ELL 6 >> BOX 7 >> WED 8 >> RPP 9 >> ZCC 10 >> ZEC 11 >> XYP 12 >> XZP 13 >> YZP 14 >> PLA 15 >> XCC 16 >> XEC 17 >> YCC 18 >> YEC 19 >> QUA 20 >> END 21 >> >> Vasilis >> >> ________________________________________ >> From: owner-fluka-discuss_at_mi.infn.it [owner-fluka-discuss_at_mi.infn.it] on behalf of Mohammad Islam [rafiqul.islam_at_okstate.edu] >> Sent: 15 June 2014 07:01 >> To: fluka-discuss_at_fluka.org >> Subject: [fluka-discuss]: modulator wheel in proton radiotherapy >> >> Dear fluka users, >> >> I have a question: >> In proton radiotherapy, a range modulator wheel is usually used to >> produce the desired spread out Bragg peak (SOBP). Roughly, the range >> modulator wheel rotates when the beam is on and produces the SOBP. My >> question is can I introduce a rotating wheel in the input file, i.e >> the beam will pass through a rotating wheel of particular speed. Is it >> possible to do in FLUKA? I would appreciate any suggestion. >> >> I want to mention that the effect of the modulation wheel can be >> produced in some other ways without physically introducing the >> modulator wheel. But I am interested if a rotating wheel can be >> directly placed in the input. >> >> Thanks >> Rafiq >>


Received on Mon Jul 07 2014 - 18:47:11 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 07 2014 - 18:47:12 CEST