Re: [fluka-discuss]: Biasing with usimbs.f

From: Vittorio Boccone <dr.vittorio.boccone_at_ieee.org>
Date: Tue, 28 Apr 2015 23:29:21 +0200

Hi Mina,
  I guess you already tried out some basic example with region importance
(i.e. with concentric cylinders) to appreciate the effect of the biasing on
the simulation results.

First of all there's no magic wand or recipes to setup the a biasing
strategy for your any generic problem. This is what the Biasing lecture is
about.
In your particular case the usage of an the external routine give you the
flexibility of defining your importance growth and the disadvantage of not
being able to test the effect of the biasing strategy you defined in a more
controlled environment before finally deploying your solution in your
simulation.

The idea it that you must also try to evaluate the spectrum at the boundary
crossing where you want to activate your biasing, in order to be sure that
the effect of the biasing would produce some effect and not just increase
the multiplicity of events to be simulated. For example non tuned
importance biasing in air is in principle very time consuming and generate
very few gain in terms of statistics in shadowed regions.

If you are interested in evaluating the dose on the other side of the
shielding, you'd need to have the simulation penetrating efficiently your
shielding. You can achieve this trying to keep the fluence constant for
example increasing the importance by a factor 2-4 for every interaction
length.asing

In a summary I would suggest you to initially invest in region
stratification next to the shielding to appreciate the effect of the
biasing and to try your importance routing on a smaller simulation with a
symmetrical geometry (and maybe only activating it on one side) to evaluate
the difference for the same computational time.

Following my comments to your questions:

*Here the reply to your questions (from the first mail to the list)*

> 1) Is it ok to call usimbs.f called multiple times, once for each region
> where biasing is to be applied - see image below - or whether it needs to
> be called only once with regions included as a range
>
 The default routines are called at every step. If in the biasing card for
a specific region(s) the SDUM = USER and WHAT(3) = 1. the calls to the
USIMBS during tracking inside that region will be suppressed.


2) I have read (in slide 21 of 'Simulation Optimization' of the most recent
> advanced course), that *"usimbs.f allows to implement any importance
> biasing schemed based on region number and/or phase space coordinates." *
> How can one bias purely based on phase space (i.e. without a region
> number)? This would simplify my life since I would not have to be
> concerned with calling the routine for every region I am interested to
> apply the biasing. I only want to apply the biasing as a function of say R
> (radial distance from the center of the target beyond a minimum distance
> and to a maximum distance (i.e. Rmin to some Rmax).
> If I set the region selection to 'blank', the routine does not get
> called. So how does one bias without a region selection, using usimbs?
>
See conditions of question (1). You change the importance of the region as
you would do with the card, thought the other COMMONS you can access to the
other parameters of the particle. It's not called only if you have
SDUM=USER and WHAT(1)=1 (or blank)

3) Does 'Hadrons & Muons' under Type selection (WHAT 1) include low energy
> neutrons?
>
Hemm... I think you miss WHAT(1)=3

> WHAT(1) specifies the particles to be biased:
> = 0.0 : all particles
> = 1.0 : hadrons, heavy ions and muons
> = 2.0 : electrons, positrons and photons
> = 3.0 : low energy neutrons
>


4) How does one best customize 'particle type selection' for '75 MeV
> electron beam shielding' and '500 MeV proton beam shielding'?
>
There's no golden rule. First you need to evaluate the spectrum at the
boundary crossing where you want to activate your biasing, then tune it
depending on what particle (and energies) you have there.

*Here the reply to your questions (from the second mail to the fluka-team)*

> 1) Is it ok [...same as first mail...]
>
 See above

2) I am setting RR and IMP values (WHAT (2) and WHAT (3)) to 2 in the
> Biasing card with SDUM = USER (to call usimbs.f). See image
> BIASING_usimbs.jpg please. In the input file, I tried 'blank for RR and 2
> for IMP). Not having access to the source code, I don't know what the
> different settings do. And even though default values for RR and IMP are
> 1, inside fllair, I don't see
> Slide 22 of 'Simulation Optimization' of the most recent advanced course
> says
> * "WHAT(2) and WHAT(3) ≠ 1.0 (Any value ≠ 1.0)*"
>
Not sure what is the question


> 3) From trial and error, I have found that setting RR and IMP ratios (WHAT
> 2 and WHAT 3) to 1 will not activate a call to usimbs.f. Does this have
> the same effect as not having a Biasing card for the regions where I don't
> wish biasing applied to via usimbs.f?
>
The routines are called at every step. If in the biasing card for a
specific region(s) the SDUM = USER and WHAT(3) = 1. the calls to the USIMBS
during tracking inside that region will be suppressed.

4) Slide 21 of 'Simulation Optimization' of the most recent advanced course
> says
> * "usimbs.f allows to implement any importance biasing schemed based on
> region number and/or phase space coordinates." *
>
> How can one bias purely based on phase space (i.e. without a region
> number)? This would simplify my life since I would not have to be
> concerned with calling the routine for every region I am interested to
> apply the biasing. I only want to apply the biasing as a function of say R
> (radial distance from the center of the target beyond a minimum distance
> and to a maximum distance (i.e. Rmin to some Rmax).
>
> If I set the region selection to 'blank', the routine does not get
> called. So how does one bias without a region selection, using usimbs?
> Right now, usimbs can not be called without assigning a region to WHAT(4).
>
As before see conditions of question (1). You change the importance of the
region as you would do with the card, thought the other COMMONS you can
access to the other parameters of the particle. It's not called only if you
have SDUM=USER and WHAT(1)=1 (or blank)


> 5) Does 'Hadrons & Muons' under Type selection (WHAT 1) include low energy
> neutrons?
> 6) How does one best customize 'particle type selection' for '75 MeV
> electron beam shielding' and '500 MeV proton beam shielding'?
>
5) Private -> 3) fluka-list
6) Private -> 3) fluka-list


> 7) I am using usimbs.f for both proton and electron beams, see image
> (usimbs.jpg) please. As I mentioned in my follow-up message on the forum,
> for the photons, I am getting this error message in the output file that
> produces huge output files. I have tried different settings, but can't
> seem to resolve the issue.
>
 I have the feeling that you hit some reduction factor step and "*Reduction
factors excessively large can result in an abnormal increase of the number
of secondaries to be loaded on the stack, especially at high primary
energies. In such cases, FLUKA issues a message that the secondary could
not be loaded because of a lack of space. The weight adjustment is modified
accordingly(therefore the results are not affected) but if the number of
messages exceeds a certain limit, the run is terminated.*"

8) When I check in the output file, I see [....]
>
No clue. Need to check.


Best,
Vittorio

On Tue, Apr 28, 2015 at 1:48 AM, Mina Nozar <nozarm_at_triumf.ca> wrote:
>
>> Hi Vittorio,
>>
>> Thank you for your help. I see it was past midnight when you responded.
>>
>> Wish you a nice evening,
>> Mina
>>
>>
>> On 15-04-27 03:30 PM, Dr. Vittorio Boccone wrote:
>>
>> Hi Mina I'll have a look tomorrow, now it's too late for me.
>> Best
>> V.
>> P.s. The first mail you sent to the forum includes only part of it.
>>
>> Sent from my iPad
>>
>> On 28/apr/2015, at 00:00, Mina Nozar <nozarm_at_triumf.ca> wrote:
>>
>>
>> Hi Vittorio,
>>
>> I put in the wrong email address for you the first time.
>>
>>
>>
>> -------- Forwarded Message -------- Subject: Fwd: [fluka-discuss]:
>> Biasing with usimbs.f Date: Mon, 27 Apr 2015 14:57:44 -0700 From: Mina
>> Nozar <nozarm_at_triumf.ca> <nozarm_at_triumf.ca> To: Alfredo Ferrari
>> <alfredo.ferrari_at_cern.ch> <alfredo.ferrari_at_cern.ch>, Alberto Fasso'
>> <Alberto.Fasso_at_eli-beams.eu> <Alberto.Fasso_at_eli-beams.eu>, paola sala
>> <paola.sala_at_cern.ch> <paola.sala_at_cern.ch>, Vasilis Vlachoudis
>> <Vasilis.Vlachoudis_at_cern.ch> <Vasilis.Vlachoudis_at_cern.ch>, Mario Santana
>> <msantana_at_SLAC.Stanford.EDU> <msantana_at_SLAC.Stanford.EDU>, Francesco
>> Cerutti <francesco.cerutti_at_cern.ch> <francesco.cerutti_at_cern.ch>,
>> Giuseppe Battistoni <giuseppe.battistoni_at_mi.infn.it>
>> <giuseppe.battistoni_at_mi.infn.it>, Vittorio Boccone
>> <Vittorio.Boccone_at_cern.ch> <Vittorio.Boccone_at_cern.ch>, Mina Nozar
>> <nozarm_at_triumf.ca> <nozarm_at_triumf.ca>, Stefan Roesler
>> <sroesler_at_mail.cern.ch> <sroesler_at_mail.cern.ch>
>>
>> Hello everyone,
>>
>> I sent this message to the forum about a week ago but have not heard any
>> responses. There is very little information on biasing using the user
>> routine usimbs.f in the manual, so I have followed the instructions/example
>> in the last advanced course (Simulation Optimization, pages 21-26. The
>> problem with presenting a topic such as this in an advanced course is that
>> if we don't do an example (which we did not), then it is almost guaranteed
>> that no one will try to understand or use if afterwards. This is a
>> powerful tool but not a simple/straight-forward concept without the
>> appropriate documentation/working example. The two examples in the adv.
>> course are not complete (and I have found an error in one of them i.e. FIMP
>> = FSTART / FEND).
>>
>> Seeing how no one responded to my message, it shows not that many know
>> about the routine or have experience using it.
>>
>> I am including a modified (more detailed) version of the message I sent
>> to the forum on Apr. 22nd. I am hoping someone from this list can help
>> answer these questions or at least put me in contact with someone who can.
>> I am attaching usimbs_Pbeam.f (for the proton beam), and usimbs_Ebeam.f
>> (for the electron beam). I am also attaching the input file (not to be
>> sent to the forum please).
>>
>>
>>
>> Thank you in advance,
>> Mina
>>
>> ===================================
>> This is, in a nut shell, what the routine is supposed to do:
>>
>> Start biasing 150 cm (in the radial direction) from the center of the
>> target, (i.e. RMIN = 150 cm)
>>
>> Below this, set the biasing to 1E-4
>>
>> Every 35 cm (RINC), I bias by a factor of 2, so
>> 0 < R < 150 ---> 1*1E-4
>> 150 < R < 185 ---> 2*1E-4
>> 185 < R < 220 ---> 4*1E-4
>> 220 < R < 255 ---> 8*1E-4
>> ...
>> ...
>> Above, R = 800 cm (RMAX), biasing is set to
>> R > 800 ----> ~2^18*1E-4
>>
>> For the electron beam, I played around with RMIN, and RINC
>>
>> RMIN = 180 , RINC = 35 *Doeimb errr*
>> RMIN = 200 , RINC = 25 *Doeimb errr*
>> RMIN = 200 , RINC = 30 *Doeimb errr*
>> RMIN = 200 , RINC = 50 *Doeimb errr *
>> RMIN = 220 , RINC = 25 *Doeimb errr*
>> RMIN = 150 , RINC = 70 The run gets stuck at the following
>> ...
>> ...
>> *NEXT SEEDS:16AF847A 0 0 0 0 0 C6AD
>> 2A4C 0 0*
>> * 420000 580000 580000
>> 3.7246006E-04 1.0000000E+30 25195 *
>> * NEXT SEEDS:17C857DC 0 0 0 0 0 C6AD
>> 2A4C 0 0*
>> * 440000 560000 560000
>> 3.7276379E-04 1.0000000E+30 26393 *
>> * NEXT SEEDS:18EC26AF 0 0 0 0 0 C6AD
>> 2A4C 0 0*
>>
>>
>>
>> Thanks in advance,
>> Mina
>>
>> -------- Forwarded Message -------- Subject: [fluka-discuss]: Biasing
>> with usimbs.f Date: Wed, 22 Apr 2015 14:01:51 -0700 From: Mina Nozar
>> <nozarm_at_triumf.ca> <nozarm_at_triumf.ca> To: fluka-discuss_at_fluka.org
>> <fluka-discuss_at_fluka.org> <fluka-discuss_at_fluka.org>
>>
>> Hello everyone,
>>
>> I have few questions about usimbs.f:
>>
>> 1) Is it ok to call usimbs.f multiple times, once for each region where
>> biasing is to be applied - see image below - or whether it needs to be
>> called only once with regions included as a range (i.e. from region to
>> region).
>>
>> 2) I am setting RR and IMP values (WHAT (2) and WHAT (3)) to 2 in the
>> Biasing card with SDUM = USER (to call usimbs.f). See image
>> BIASING_usimbs.jpg please. In the input file, I tried 'blank for RR and 2
>> for IMP). Not having access to the source code, I don't know what the
>> different settings do. And even though default values for RR and IMP are
>> 1, inside fllair, I don't see
>> Slide 22 of 'Simulation Optimization' of the most recent advanced course
>> says
>> * "WHAT(2) and WHAT(3) ≠ 1.0 (Any value ≠ 1.0)*"
>>
>>
>> 3) From trial and error, I have found that setting RR and IMP ratios
>> (WHAT 2 and WHAT 3) to 1 will not activate a call to usimbs.f. Does this
>> have the same effect as not having a Biasing card for the regions where I
>> don't wish biasing applied to via usimbs.f?
>>
>> 4) Slide 21 of 'Simulation Optimization' of the most recent advanced
>> course says
>> * "usimbs.f allows to implement any importance biasing schemed based on
>> region number and/or phase space coordinates." *
>>
>> How can one bias purely based on phase space (i.e. without a region
>> number)? This would simplify my life since I would not have to be
>> concerned with calling the routine for every region I am interested to
>> apply the biasing. I only want to apply the biasing as a function of say R
>> (radial distance from the center of the target beyond a minimum distance
>> and to a maximum distance (i.e. Rmin to some Rmax).
>>
>> If I set the region selection to 'blank', the routine does not get
>> called. So how does one bias without a region selection, using usimbs?
>> Right now, usimbs can not be called without assigning a region to WHAT(4).
>>
>>
>> 5) Does 'Hadrons & Muons' under Type selection (WHAT 1) include low
>> energy neutrons?
>>
>>
>> 6) How does one best customize 'particle type selection' for '75 MeV
>> electron beam shielding' and '500 MeV proton beam shielding'?
>>
>>
>> 7) I am using usimbs.f for both proton and electron beams, see image
>> (usimbs.jpg) please. As I mentioned in my follow-up message on the forum,
>> for the photons, I am getting this error message in the output file that
>> produces huge output files. I have tried different settings, but can't
>> seem to resolve the issue.
>>
>> 8) I see a warning message in the output file which I don't understand.
>>
>> ***** Warning: EMF neutron importances input, but no EMF option **** *What
>> is this saying?
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ****** usimbs CALLED ***** AETE_Cx -1278. AETE_Cy 8183.88 AETE_Cz
>> 5948. DMIN_IMP 0.0001 RMIN 100. RMAX 800. RINC 35.
>> 1 99999 99999
>> 0.0000000E+00 1.0000000E+30 0 NEXT
>> SEEDS: E9 0 0 0 0 0 C6AD
>> 2A4C 0 0 2000 98000
>> 98000 5.6441402E-04 1.0000000E+30
>> 133 NEXT SEEDS: 2C8E4A 0 0 0 0 0
>> C6AD 2A4C 0 0 4000
>> 96000 96000 5.5066633E-04
>> 1.0000000E+30 255 NEXT SEEDS: 57629D 0
>> 0 0 0 0 C6AD 2A4C 0 0*
>> ...
>> ...
>>
>> In the .err file, I see:
>>
>>
>> *NEXT SEEDS: 0 0 0 0 0 0 C6AD
>> 2A4C 0 0*
>> * 1 99999 99999
>> 0.0000000E+00 1.0000000E+30 0 *
>> * NEXT SEEDS: E9 0 0 0 0 0 C6AD
>> 2A4C 0 0*
>> * 2000 98000 98000
>> 5.7591248E-04 1.0000000E+30 133 *
>> * NEXT SEEDS: 2C8E4A 0 0 0 0 0 C6AD
>> 2A4C 0 0*
>> * 4000 96000 96000
>> 5.6066513E-04 1.0000000E+30 255 *
>> * NEXT SEEDS: 57629D 0 0 0 0 0 C6AD
>> 2A4C 0 0*
>> * 6000 94000 94000
>> 5.9057713E-04 1.0000000E+30 409 *
>> * NEXT SEEDS: 8987D8 0 0 0 0 0 C6AD
>> 2A4C 0 0*
>> * 8000 92000 92000
>> 5.9815907E-04 1.0000000E+30 530 *
>> * NEXT SEEDS: B9BD7F 0 0 0 0 0 C6AD
>> 2A4C 0 0*
>> * 10000 90000 90000
>> 6.0090866E-04 1.0000000E+30 666 *
>> * NEXT SEEDS: E9782F 0 0 0 0 0 C6AD
>> 2A4C 0 0*
>> * 12000 88000 88000
>> 6.2340530E-04 1.0000000E+30 808 *
>> * NEXT SEEDS: 120B7BB 0 0 0 0 0 C6AD
>> 2A4C 0 0*
>> * 14000 86000 86000
>> 6.2054852E-04 1.0000000E+30 939 *
>> * NEXT SEEDS: 14F66E4 0 0 0 0 0 C6AD
>> 2A4C 0 0*
>> * 16000 84000 84000
>> 6.1765611E-04 1.0000000E+30 1058 *
>> * NEXT SEEDS: 17DC3F2 0 0 0 0 0 C6AD
>> 2A4C 0 0*
>> * *** Doeimb: importance splitting not performed for missing room *
>> * in Emf stack ****
>> * *** Doeimb: importance splitting not performed for missing room *
>> * in Emf stack ****
>> * *** Doeimb: importance splitting not performed for missing room *
>> * in Emf stack ****
>> * *** Doeimb: importance splitting not performed for missing room *
>> * in Emf stack ****
>> * *** Doeimb: importance splitting not performed for missing room *
>> * in Emf stack ****
>> * *** Doeimb: importance splitting not performed for missing room *
>> * in Emf stack ****
>> * *** Doeimb: importance splitting not performed for missing room *
>> *...*
>> *...*
>>
>> 8) When I check in the output file, I see:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *NEXT SEEDS:359B0F06 1DB 0 0 0 0 F4AD
>> 4F6E 0 0 *** Eveneu: no downsc. group selected, cusngl,
>> rsngl, igpr *** 1. 1. 181 *** Eveneu: no downsc. group selected,
>> cusngl, rsngl, igpr *** 0.999999881 1. 132 *** Eveneu: no downsc.
>> group selected, cusngl, rsngl, igpr *** 0.999999702 0.999999821 102
>> 740000 260000 260000
>> 9.9333373E-03 1.0000000E+30 1661590 NEXT
>> SEEDS:10FB66FE 1DC 0 0 0 0 F4AD
>> 4F6E 0 0 *** Eveneu: no downsc. group selected, cusngl,
>> rsngl, igpr *** 0.999999881 *
>>
>> What does this message
>>
>> **** Eveneu: no downsc. group selected, cusngl, rsngl, igpr ***
>> 0.999999881 *mean?
>>
>> How do I know whether biasing is being applied? I am asking since if I
>> check the proton runs with biasing, using usimbs.f, I am not seeing biasing
>> applied, even though I see the message "usimbs.f called" printed. Near the
>> end, I see:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *Total number of primaries run: 1000000 for a weight of:
>> 1.000000E+06 !!! Please remember that all results are normalized per
>> unit weight !!! The main stack maximum occupancy was 105 out
>> of 40000 available Total number of inelastic interactions
>> (stars): 2243567 Total weight of the inelastic interactions
>> (stars): 2.244883E+06 Total number of elastic interactions:
>> 2363306 Total weight of the elastic interactions: 2.365214E+06 Total
>> number of low energy neutron interactions: 1307909965 Total
>> weight of the low energy neutron interactions: 1.307157E+09 Total CPU
>> time used to follow all primary particles: 9.928E+03 seconds
>> of: Average CPU time
>> used to follow a primary particle: 9.928E-03 seconds
>> of: Maximum CPU time
>> used to follow a primary particle: 7.749E-01 seconds
>> of: Residual CPU time
>> left: 1.000E+30 seconds of:*
>>
>>
>> I read (in one of the forum messages) that to check that biasing has
>> worked, the number of inelastic interactions (stars) should be noticeably
>> larger than the total weight of the inelastic interactions and similarly,
>> the totla number of elastic interactions should be larger than the total
>> weight of the elastic interactions. This is not what I see above and the
>> images in usimbs.f show that biasing is not being applied to the proton
>> runs.
>>
>>
>>
>>
>>
>>
>>
>> <BIASING_usimbs.jpg>
>>
>> <usimbs.pdf>
>>
>> <usimbs_Ebeam.f>
>>
>> <usimbs_Pbeam.f>
>>
>> <ARIEL_TS.inp>
>>
>>
>>
>


__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Wed Apr 29 2015 - 01:28:21 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 29 2015 - 01:28:23 CEST