How to modified mgdraw.f collecting neutron properties

Dear FLUKA experts,

I have created new input as mention here with creating a vacuum region surrounded my target and tarclad , which I expect the result to give the position of neutron on the “border” boundary (If I’m not mistaken). But when I used fluscw.f routine it didn’t give me any .txt file which will including the properties of neutrons in it. However, when I used mgdraw.f instead it’s giving me a .txt file but the position of neutrons is only inside the target-cladding (“tarclad”) area

So what happened to the process of using fluscw.f ? and how to modified the mgdraw.f to get in neutron properties on the “border” boundary?

mgdraw.f (5.2 KB)
fluscw_forads.f (4.5 KB)

This is my input for fluscw.f routine
ads_2.inp (1.8 KB)
This is my input for mgdraw.f routine
ads_1.inp (1.8 KB)

This is what .txt file looks like from mgdraw.f routine, the columns 2,3,4 represent the position of neutron which it’s inside the target clad(if I’m not mistaken). It’s not what I want.
ads_1001_data.txt (3.0 MB)

edited : I have changed the USRYIELD card form bord region to void and changed the mgdraw.f from bord to void, so the positions changed already. but another problem is how to specify particle kinetic energy (same as PLA in fluscw.f), not total energy of particle (ETRACK in mgdraw.f).

Hello @thanapong,

Let us first take a look to the mgdraw.f case:

  • The USRYIELD has no relation with the mgdraw.f user routine so you can delete this card. The BXDRAW entry of that routine will be called every time a particle crosses a boundary provided that you have correctly included the USERDUMP card as we mentioned in our previous discussion, independently of whether you have a USRYIELD card or not.
  • In the .txt file that you provided I can see that all neutrons are on the boundary between “tarclad” and “bord”, which is what you have requested in the mgdraw routine as far as I can tell. If you want your neutrons to be scored in the boundary between “bord” and “void” then you need to change accordingly the routine, as I believe you have done already.
  • About the kinetic energy: since the total energy is provided and it is the sum of kinetic and rest energies, probably the most straightforward thing to do is to calculate it by yourself in the mgdraw routine before you print it out.

On the fluscw routine. The .txt file is not generated for two reasons:

  • In the USERWEIG card you did not specify a correct value for WHAT(3) if you want fluscw to be called, see USERWEIG | FLUKA. Most likely you want to specify the value 3.
  • You are using a USRYIELD scoring, but in the fluscw routine you filter out every call that is not triggered by a boundary crossing estimator (ISCRNG = 1), including those triggered by a yield estimator (ISCRNG = 5) and therefore nothing is ever written. See comments on the routine. You will need to substitute IF (ISCRNG.EQ.1) THEN by IF (ISCRNG.EQ.5) THEN.

Hope this helps!
Francisco

1 Like