Dear Jyoti,
based only on the code you included, the error is in the line:
THETA = FLRNDM(DUMMY) * TWOTWOPIPI
The 2 Pi is predefined in FLUKA with the variable TWOPIP.
TWOTWOPIPI is undefined, which can appear as the variable has the value 0.0. Thus making cos(theta) = 1.0, and sin(theta) = 0.0.
I hope this helps.
Kind regards,
Dávid Horváth
Junior Researcher
Radiation Protection
ELI Beamlines
E: david.horvath_at_eli-beams.eu
T: +420 266 051 283
M: Za Radnicí 835, 25241 Dolní Břeľany, Czech Republic
________________________________________
From: owner-fluka-discuss_at_mi.infn.it <owner-fluka-discuss_at_mi.infn.it> on behalf of Jyoti <jyoti.grg_at_britatom.gov.in>
Sent: 04 May 2019 08:25:48
To: fluka-discuss_at_fluka.org
Subject: [fluka-discuss]: Cylinderical source plotting
Dear FLUKA Experts,
I am drawing a annular cylinderical source using source.f subroutine.
Rmin=5cm, Rmax=10cm,Hmin=30cm and Hmax=50cm
These are the particle coordinates in the subroutine file.
Particle coordinates
RMIN = 5
RMAX = 10
ZMIN = 30
ZMAX = 50
R=SQRT(FLRNDM(DUMMY)) * (RMAX-RMIN) + RMIN
THETA = FLRNDM(DUMMY) * TWOTWOPIPI
x = R * cos(THETA)
y = R * sin(THETA)
z = ZMIN + (ZMAX - ZMIN) * FLRNDM(DUMMY)
XFLK (NPFLKA) =x
YFLK (NPFLKA) =y
ZFLK (NPFLKA) =z
WRITE(*,*) x,y,z
After running the program, I opened the .log file so that I can plot the result in origin to check the source geometry
But, the values of y coordinates are all zero.
Where is the mistake in my particle coordinates?
With Regards,
Jyoti Garg
__________________________________________________________________________
You can manage unsubscription from this mailing list at
https://www.fluka.org/fluka.php?id=acc_info
Received on Sat May 04 2019 - 10:45:17 CEST