Re: [fluka-discuss]: Source.f-routine

From: Kilian Baumann <>
Date: Fri, 5 Sep 2014 13:13:00 +0200

Dear Paola and Vottorio,

thank you very much for your answers!

In fact we have build the actual geometry of one foil and compared runs
with the geometry and runs with the source.f (whrere we change the geometry
runtime, as you suggested). The results are the same and since the
simulation-time needed can be shortened by over 90% (!) we decided to use
the source.f for all the eleven foils.
We will try your suggestion with one source.f-routine for eleven foils,
where we call many times SETBDY with each time the correct body number.
Thank you very very much!


2014-09-05 8:03 GMT+02:00 paola sala <>:

> Dear Kilian and Vittorio,
> this is similar to a previous question, where we agreed to change the
> geometry runtime (dangerous but possible if made with care) instead of
> tricking in usrmed. (
> First of all, I would **NOT** encourage the use of moving bodies unless
> really necessary. Use of lattices or some more effort in building the
> geometry are surely much safer, and will help in tracing back simulation
> set-ups (for future use or use by others..) and possible errors ("Where
> was this parile finally???")
> Moving more than one body needs much much care in order to keep the
> geometry "valid". Flair will not be able to help you on this!!
> Summary : better to spend one week on a geometry than one year in
> understanding what to do and what has
> been done.
> Now, if you ***really**** need to "change" more than one body, of course
> you have to specify it in a the UNIQUE source routine.
> It means, that in the source.f you have to call many times SETBDY with
> each time the correct body number. Previously, you will have called the
> NM2BDY with the 11 different body names in order to get the 11 body
> numbers.
> Hope this helps
> Paola
> On 09/04/2014 11:36 PM, Vittorio Boccone wrote:
> Dear Kilian,
> first thing first:
> *"Thou shalt not use more than a source routine at the time" *
> There can be at most one source routine, in case you use it all the
> primaries comes from there
> From what I extrapolate from the description you are talking about the
> first set of foils upstream the nozzle entrance right?
> (a sketch or the geometry or your problem would help to understand exactly
> what you mean)
> I don't understand how can you change the thickness of the foil from the
> source routine. In any case is not a good idea to try change the geometry
> of the system during the simulation.
> If the meshes are randomly aligned and you are interest by the "material
> budget" of the problem you could define a foil of the real thickens, but
> instead of associating it with the real material of the foil you could
> create a compound material compose by air (or vacuum) and the material of
> the foil with the corresponding volumes proportion of your mesh,
> Can you give us some more details about your problem?
> Best,
> Vittorio
> On Wed, Sep 3, 2014 at 2:06 PM, Kilian-Simon Baumann <
>> wrote:
>> Dear Fluka-experts,
>> we are calculating the particle transport in the nozzle of a particle
>> therapy device.
>> In this nozzle there are eleven identical foils. Since these foils are not
>> homogeneous but have a mesh-like structure, the building of these foils
>> using cylinders is either complex and the calculation time is very high.
>> The mesh-like structure results in a shift and broadening of the
>> bragg-peak in a water-phantom behind these foils.
>> In order to reduce the calculation time, we had the idea to implement
>> homogeneous foils (give us the shift in the bragg-peak) and vary the
>> thickness of these foils using a source.f-routine. With a gaussian
>> distribtuion we are able to change the postion of the exit face of one
>> foil event by event (to get the broadening of the bragg-peak).
>> However, since we have eleven foils we would need to apply the
>> source.f-routine 11 times, for each foil.
>> My question now is: How can we achieve this in Fluka? I tried to use 11
>> source-cards, each adjusted to on of the 11 foils and calling the
>> source.f-routine, however in the run the source.f-routine is called only
>> one time, for the last of the eleven foils...
>> Thanking you in advance!
>> Regards,
>> Kilian
Received on Fri Sep 05 2014 - 14:29:29 CEST

This archive was generated by hypermail 2.3.0 : Fri Sep 05 2014 - 14:29:32 CEST