# About spherical shell definition

**URL:** <https://fluka-forum.web.cern.ch/t/about-spherical-shell-definition/2780>\
**Category:** Source Definition\
**Created:** [13 February 2022 08:53 UTC](https://fluka-forum.web.cern.ch/t/about-spherical-shell-definition/2780 "2022-02-13T08:53:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiongbp](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/x/ac8455/32.png) [@xiongbp](https://fluka-forum.web.cern.ch/u/xiongbp)\
**Post date:** [13 February 2022 08:53 UTC](https://fluka-forum.web.cern.ch/t/about-spherical-shell-definition/2780/1 "2022-02-13T08:53:45Z")

</div>

Dear @horvathd ,  
I am new of source user routine , I have read a topic titled “Spherical shell definition” and also want to define a source like that, I have some questions need your help.

1. If the source particle energy is monoenergetic thermal neutron，may I use “particle\_code = WHASOU(1), momentum\_energy = WHASOU(2)” with SOURCE CARD instead of “call neutron\_sampling()” and delete line133 to line222?
2. About subroutine spherical\_shell distribution, For a fixed-size sphere, I guess do while() is to judge inner spherical shell set to isotropic, but I really do not understand the sentence “new\_radius=10\*radius” and the function RACO().  
Look forward to your help.  
[spherical\_shell.f](https://fluka-forum.web.cern.ch/uploads/short-url/tsX9RMEsJzW8cCdYOzf0riGtrud.f) (7.1 KB)

---

<div class="post-metadata">

**Author:** ![horvathd](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/horvathd/32/10584_2.png) [@horvathd](https://fluka-forum.web.cern.ch/u/horvathd)\
**Post date:** [14 February 2022 08:10 UTC](https://fluka-forum.web.cern.ch/t/about-spherical-shell-definition/2780/2 "2022-02-14T08:10:24Z")

</div>

Dear @xiongbp,

1. Yes, you can remove the call and code of `neutron_sampling()`.
2. the `RACO()` subroutine gives a random uniformly distributed direction. The `do while()` cycle - as far as I can tell - checks if the sampled direction is pointing inside, and if not, it resampled the directions.

Please note, that this code is provided by another user, you need to make sure that it is appropriate for your needs.

You may want to look at FLUKA’s built in _FLOOD_ source option. See slide 22 of:

> **[07\_Simple\_sources\_and\_preprocessor\_2021\_online.pdf](https://indico.cern.ch/event/1012211/contributions/4247794/attachments/2257004/3829944/07_Simple_sources_and_preprocessor_2021_online.pdf)**

Cheers,  
David

---

<div class="post-metadata">

**Author:** ![xiongbp](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/x/ac8455/32.png) [@xiongbp](https://fluka-forum.web.cern.ch/u/xiongbp)\
**Post date:** [14 February 2022 12:50 UTC](https://fluka-forum.web.cern.ch/t/about-spherical-shell-definition/2780/3 "2022-02-14T12:50:40Z")

</div>

Dear @horvathd ,  
Thank you for your reply.  
For the second question, I have figured it out after rethinking.  
I have read the built in source option of “FLOOD”, The inside of the sphere satisfied my goal, but it seems that outside of the spherical surface exist source fluence? I do not want it and anyway to solve it?

---

<div class="post-metadata">

**Author:** ![horvathd](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/horvathd/32/10584_2.png) [@horvathd](https://fluka-forum.web.cern.ch/u/horvathd)\
**Post date:** [14 February 2022 12:58 UTC](https://fluka-forum.web.cern.ch/t/about-spherical-shell-definition/2780/4 "2022-02-14T12:58:49Z")

</div>

Dear @xiongbp,

the source particles only directed towards the inside of the sphere. Outside the sphere the fluence is caused by the particles leaving. However, the fluence outside is **not** isotropic, **nor** uniform.

If you have a sphere big enough to contain your whole geometry, then you don’t need to worry about the fluence outside.

Cheers,  
David

---

<div class="post-metadata">

**Author:** ![xiongbp](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/x/ac8455/32.png) [@xiongbp](https://fluka-forum.web.cern.ch/u/xiongbp)\
**Post date:** [14 February 2022 13:07 UTC](https://fluka-forum.web.cern.ch/t/about-spherical-shell-definition/2780/5 "2022-02-14T13:07:07Z")

</div>

Dear @horvathd ,  
I have understand it and thank you very much for your help. 😊

---

<div class="post-metadata">

**Author:** ![horvathd](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/horvathd/32/10584_2.png) [@horvathd](https://fluka-forum.web.cern.ch/u/horvathd)\
**Post date:** [14 February 2022 13:18 UTC](https://fluka-forum.web.cern.ch/t/about-spherical-shell-definition/2780/6 "2022-02-14T13:18:13Z")

</div>


