Re: [fluka-discuss]: UsrMed Energy modulation

From: Yuri Simeonov <yuri.simeonov_at_gmail.com>
Date: Thu, 21 Aug 2014 18:14:00 +0200

Dear Paola,

I will try this in the next couple of days.
1. Is there a chance that the right command is not "NM2BDY ", but
"BDY2NM"? I tried "BDY2NM" but for different materials I always get
the number "538976288"
2. Our Mesh foil has also holes in it, which means zero shift. I
suppose it is not right to use SETBDY to set the thickness of the body
to zero?

Regards
Yuri

2014-08-21 10:56 GMT+02:00 Paola Sala <paola.sala_at_mi.infn.it>:
> Dear Yuri,
> perfect, we can start already with a source.f, that you can later modify
> for your further needs.
> The standard version of the source.f takes the parameters given in the
> BEAM and BEAMPOS cards to defin a monochromatic pencil beam, therefore for
> the moment you do not need to modify this part.
>
> Fluka works internally with numbered lists of bodies and regions, so the
> first job is to convert the name of the body that you need to move/change
> into the internal fluka number.
> In the source.f, "first call initialisation" part, retrieve and save the
> number of the body that you need to move:
>
> CALL NM2BDY ( BODNAM, IBODY, IERR )
> BODNAM is a charachter*8 variable containing the body name, left justified
> IBODY returns the body number
> IERR is an error code, =0 means OK, =1 means body not found
>
> It is a good practice to add a " SAVE IBODY" declaration in the routine
> header
>
>
> Then, event by event you chan change the parameters defining your body,
> taking care not to introduce geometry errors, via a call to
>
> SUBROUTINE SETBDY ( IBODY, ITYPE, BDYFIN, NBDYFI )
>
> Where
> input:
> IBODY is the output of nm2bdy
> ITYPE is the type of body. I attach a list of correspondence, for instance
> an XYP is input number 12
> BDYFIN is a vector containing the body papameters in the same order as in
> the fluka input cards. These values will override the ones given in the
> input cards.
> NBDYFI is the number of parameters (see attached list)
>
>
> For instance, you can define the foil with an RPP and change runtime the
> position of the exit face, Or define the foil faces with two planes and
> change the position of one of them.
>
> In this way, you can modulate the thickness of the foil according to your
> range shift probability.
>
> Moreover, if you will later on modify the source in order to define a
> geometrically spread beam, you can even choose the thickness correlated
> with the primary C12 position.
>
> Hope this helps
> Paola
>
>
>> Dear Paola,
>> Right now I am using the normal Beam Card with C12, momentum
>> spread=0,angular distr. = 0, but I am planning to use the source.f
> routine in the near future.
>> Regards
>> Yuri
>> 2014-08-20 10:39 GMT+02:00 Paola Sala <paola.sala_at_mi.infn.it>:
>>> Dear Yuri,
>>> sorry, but I have to confirm that changing the energy in usrmed is NOT
> possible. It may seem to work, but it doesn't, it spoils preset
> quantities.
>>> There is a better and safer way to perform what you plan, that is to
> change the thickness of your foil event by event. In this way all the
> simulation will be self-consistent. I'll explain you how to do, only I
> would like to know if you are already using a "source.f" routine or
> not.
>>> Regards
>>> Paola
>>>> Dear Paola,
>>>> thank you for your answer!
>>>> We have the following idea: There is a thin foil in the nozzle of a
> particle therapie device. This foil has mesh structure and therefore:
> 1. shifts the Bragg Peak of C12 Ions
>>>> 2. modulates(broadens) the BP
>>>> We want to take these 2 effects into account in Fluka. As it is quite
> difficult to modell the mesh foil geometrically, we decided to replace
> the mesh foil with a homogeneous one. This will only shift the BP. In
> order to broaden it we want to use the UsrMed routine. The modulation
> function of the foil (probability vs. particle range shift) is already
> known. We want to sample from this function delta_z ("particle shift"
> in cm) and convert it to delta_E using an ICRU49 equation. Delta_E
> will be then added to the original Energy of the particle. This way we
> can artificially broaden the BP.
>>>> Actually we already tried this and it seems to work fine. The only
> problem is that I still use in my equation Z and A from the projectile
> (IPROZ, IPROA), whereas I need the specific Z and A of each particle
> flying into the material. Do you know how I can access them?
>>>> Best regards
>>>> Yuri
>>>> 2014-08-17 17:32 GMT+02:00 Paola Sala <paola.sala_at_mi.infn.it>:
>>>>> Dear Yuri Simeonov,
>>>>> The energy of particles cannot be changed inside usrmed.f,
> attempting
>>>>> to
>>>>> do s it would make the program crash or give meaningless results. If you
>>>>> could explain in more detail your problem could try to see if there is
>>>>> a
>>>>> way to solve it.
>>>>> Regards
>>>>> Paola
>>>>>> Dear fluka experts,
>>>>>> I want to use UsrMed.f routine to modulate the energy of each particle,
>>>>>> which is transported into a user-defined material (Initial source is
> C12).
>>>>>> As I calculate the energy using an equation, I need to know the
> specific Z
>>>>>> and A of each particle inside the UsrMed (Z will vary due to
> fragmentation). Which variables should I use?
>>>>> Paola Sala
>>>>> INFN Milano
>>>>> tel. Milano +39-0250317374
>>>>> tel. CERN +41-227679148
>>> Paola Sala
>>> INFN Milano
>>> tel. Milano +39-0250317374
>>> tel. CERN +41-227679148
>
>
> Paola Sala
> INFN Milano
> tel. Milano +39-0250317374
> tel. CERN +41-227679148
>
>
Received on Thu Aug 21 2014 - 20:00:18 CEST

This archive was generated by hypermail 2.3.0 : Thu Aug 21 2014 - 20:00:21 CEST