User rotuine for multiple locations of a source

Dear Experts,

I would like to place two point sources at two locations to score dose eq at 1 m. As I understand that I can not use two BEAM POS cards, I have to use source.f file to give the two locations [(-50,0,0) & (50,0,0)]. I tried doing that, but I am not able to define the expression for FLRNDM(DUMMY). Please see the following:

* Particle coordinates
      RNDNUM = FLRNDM(DUMMY)
	IF (RNDNUM .LE. 0.5D0) THEN
	x= -50.0D0
	y= 0.0D0
	z= 0.0D0
	ELSE 
	x= 50.0D0
	y= 0.0D0
	z= 0.0D0
	ENDIF
	
       XFLK (NPFLKA) =x 
       	YFLK (NPFLKA) =y
      	ZFLK (NPFLKA) =z

Please help.
Thanks and regards,
Raksha.

Dear Raksha,

I don’t see any obvious errors with the code section you posted. Without the whole file it is not possible to test.

However, since FLUKA version 4, it is possible to specify multiple beam positions, with the SPECSOUR and SPOTBEAM / SPOTPOS / SPOTDIR cards. You may take a look at the lecture, starting from slide 25:

Cheers,
David

Thank you David. I will try using SPECSOUR.
Can you please see the complete user routine attached and confirm the correctness, specially the particle co-ordinates?
Thanks in advance.
Regards,
Raksha.source2loc.f (8.4 KB)

Dear Raksha,

the attached source routine is for an older / incompatible version of FLUKA. Please try to use the current template located usually at /usr/local/fluka/scr/user/source.f, or use Flair to copy it to your project.

Cheers,
David

Good morning David,

I tried using SPECSOUR and associated cards to define two Beam spots for Co-60 point sources. I got the results too…Thanks.

Referring to the slide no. 34 of the “Advanced source_2020.pdf”, how to define the length(or height) of the cylinder sources ? If it is a 2.5 mm cylindrical beam, I saw Rmax=0.25 (cm)…

In my case, it will be a (0.6 cm dia * 40 cm L) cylindrical sources arranged in either a circular or a rectangular array. Can I do this using Beam spots ?
I did once such evaluation using the source.f for defining the 25 cylindrical sources (0.6 cm dia. * 40 cm L).

Please suggest.

Regards,
Raksha.

Dear Raksha,

Unfortunately, the Volumetric sources can’t be used with the multiple spot sources. To have multiple cylinders as your sources you need to use a source routine. (On slide 34 you see pencil beams with 0.25 cm radius.)

I would suggest to take a look at your colleague’s Jyoti Garg’s (@jyoti) problem, since she is using a similar source routine:

Cheers,
David