# How to define spherical USRBIN

**URL:** <https://fluka-forum.web.cern.ch/t/how-to-define-spherical-usrbin/1916>\
**Category:** Scoring\
**Created:** [8 June 2021 08:04 UTC](https://fluka-forum.web.cern.ch/t/how-to-define-spherical-usrbin/1916 "2021-06-08T08:04:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Junjie\_Zhang](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@Junjie\_Zhang](https://fluka-forum.web.cern.ch/u/Junjie_Zhang)\
**Post date:** [8 June 2021 08:04 UTC](https://fluka-forum.web.cern.ch/t/how-to-define-spherical-usrbin/1916/1 "2021-06-08T08:04:53Z")

</div>

Dear expert,

As shown in the figure, it is a spherical shell model. Assuming that the center of the spherical shell is an isotropic neutron source, if I want to get the neutron flux at various thickness positions in the shield, how should I set the USRBIN card?  
 ![2021.6.8.1](https://fluka-forum.web.cern.ch/uploads/default/original/2X/d/d74959a3ffd0eb139ee14f07f7c0930c2e936bec.png)

---

<div class="post-metadata">

**Author:** ![blefebvre](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/b/bc79bd/32.png) [@blefebvre](https://fluka-forum.web.cern.ch/u/blefebvre)\
**Post date:** [8 June 2021 09:47 UTC](https://fluka-forum.web.cern.ch/t/how-to-define-spherical-usrbin/1916/2 "2021-06-08T09:47:45Z")

</div>

Dear Junjie,

It is not possible in FLUKA to declare a spherical binning using the built-in USRBIN options. Cylindrical binning is possible, however, see the screenshot attached for an example. With a cylindrical binning you could take a thin slice of bins close to z=0 and then do a radial projection to obtain the approximate fluence as function of the radius.

If you don’t find this option satisfying for your purposes, you could use a user-defined binning by writing your own musrbr.f, lusrbl.f and fusrbv.f routines and selecting type=“special” in flair. Depending on your implementation, those routines could return the radial, phi and theta bins. See sections 13.2.9 and 7.20.USRBIN of the FLUKA manual for details.

![usrbin](https://fluka-forum.web.cern.ch/uploads/default/original/2X/c/cedaeecc29981b56fee2969f462f98c5969e472a.png)

---

<div class="post-metadata">

**Author:** ![Junjie\_Zhang](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@Junjie\_Zhang](https://fluka-forum.web.cern.ch/u/Junjie_Zhang)\
**Post date:** [9 June 2021 02:26 UTC](https://fluka-forum.web.cern.ch/t/how-to-define-spherical-usrbin/1916/4 "2021-06-09T02:26:02Z")

</div>

Dear expert,

For this spherical shell model, can I create a cube inspection area in Cartesian coordinate system, so that the spherical shell is inside the inspection area? Finally, the calculation results of spherical shell model are obtained.

---

<div class="post-metadata">

**Author:** ![blefebvre](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/b/bc79bd/32.png) [@blefebvre](https://fluka-forum.web.cern.ch/u/blefebvre)\
**Post date:** [9 June 2021 05:02 UTC](https://fluka-forum.web.cern.ch/t/how-to-define-spherical-usrbin/1916/5 "2021-06-09T05:02:41Z")

</div>

Dear Junjie,

With FLUKA, you can create detector for fluence in Cartesian coordinates using the USRBIN card. Create the detector centered on the sphere with half-widths corresponding to the sphere radius. See the example below.

Then you can consider transforming the Cartesian bin contents into a spherical equivalent, like I think you suggest. FLUKA doesn’t offer a tool for such a conversion, you would need to write your own script to analyse the ASCII detector output.

![usrbin2](https://fluka-forum.web.cern.ch/uploads/default/original/2X/e/e76271916e58eeadd406998c345817dc2f3805c6.png)

---

<div class="post-metadata">

**Author:** ![amario](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/a/47e85d/32.png) [@amario](https://fluka-forum.web.cern.ch/u/amario)\
**Post date:** [9 June 2021 05:09 UTC](https://fluka-forum.web.cern.ch/t/how-to-define-spherical-usrbin/1916/6 "2021-06-09T05:09:53Z")

</div>

Dear @Junjie_Zhang,  
If you are just interest in the spectra of particles at different radii, you might also consider to divide you spherical region in several concentric spherical regions and add [USRBDX](https://flukafiles.web.cern.ch/manual/USRBDX.html) estimators between each contiguous shell.

---

<div class="post-metadata">

**Author:** ![rversaci](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/r/cc9497/32.png) [@rversaci](https://fluka-forum.web.cern.ch/u/rversaci)\
**Post date:** [9 July 2021 08:56 UTC](https://fluka-forum.web.cern.ch/t/how-to-define-spherical-usrbin/1916/7 "2021-07-09T08:56:35Z")

</div>

Closed on 9 July 2021 08:56 UTC


