Dear Experts,

I want to define a neutron source (with an energy spectrum) as an extended source shaped as a cylinder of 0.9cm radius and 4.5cm in height using: CYLI-VOL.

I am using “source_newgen.f” to implement the source spectrum, but after some tries I understood that my routine overwrite my CYLI-VOL command given through BEAMPOS card.

Also I found in an old post (Flood source & energy spectrum) that to solve the same problem with a FLOOD source I need to add `SFLOOD`

subroutine in “source_newgen.f”:

```
CALL SFLOOD ( XXX, YYY, ZZZ, UXX, VYY, WZZ )
```

So I searched in FLUKA manual and on this forum, but I couldn’t find which is the name and the syntax of the subroutine I need to use to implement the CYLI-VOL.

Or maybe there are other ways to do the same that are unknown to me.

I hope someone could help me!

Thanking you in advance.

Luca

Dear Luca,

In my opinion, the easiest way to create your cylindrical source is by using the **regionsource** implemented in s**ource_newgen.f** according to this post.

```
call regionsource ( coordinate_x, coordinate_y, coordinate_z, [region number], [xmin], [xmax], [ymin], [ymax], [zmin], [zmax] )
```

Regards,

Mihaela

Dear Mihaela,

thanks for the help!

I tried calling **regionsource** but I was just able to implement a parallelepiped shape with it.

So I navigated a little more the forum finding some extended cylindrical source implemented in **source.f** subroutine. Then I adjusted a little bit the code to use it in **source_newgen.f** and it worked!

That’s the part of the code I wrote in section 5.1 of **source_newgen.f**:

```
rmax = 0.9D0
zmin = 10.0D0
zmax = 14.5D0
theta = FLRNDM(xdummy)*TWOPIP
r = rmax * FLRNDM(xdummy)
coordinate_x = r*cos(theta)
coordinate_y = r*sin(theta)
coordinate_z = FLRNDM(xdummy)*(zmax-zmin) + zmin
```

Problem solved!