Dear Experts,
I want to define a photon source (with energy spectrum) and source type: FLOOD (distributed over a spherical surface and direction towards the centre of the sphere).
I am using “source_newgen.f” (which is given with example) + spectrum.dat file (for energy spectrum)
Source type “FLOOD” given through BEAMPOS CARD and in 2nd BEAMPOS CARD, co-ordinate of the centre is given with Type: POSITIVE.
Whether my settings are correct.
However, it seems to me that when I am using “source_newgen.f”, then Source Type: FLOOD is not taken from BEAMPOS CARD. If I am correct, how to define source type: FLOOD (distributed over a spherical surface and direction towards the centre of the sphere) in source.f subroutine ?
Any suggestion will be helpful to me.
Thanking you in advance.
You are correct, when a source user routine is used, some of the beam settings in the input file are disregarded. These include the extended sources specified on a BEAMPOS card.
To sample a FLOOD source in a source routine you can use the SFLOOD subroutine:
CALL SFLOOD ( XXX, YYY, ZZZ, UXX, VYY, WZZ )
which returns a random position and direction on the surface of a sphere of unit radius, generating a uniform and isotropic field inside the sphere.
Thank you very much for your reply.
When I inserted CALL SFLOOD ( XXX, YYY, ZZZ, UXX, VYY, WZZ ) without any numerical values of ( XXX, YYY, ZZZ, UXX, VYY, WZZ ), it is giving compilation error.
What will be the values of ( XXX, YYY, ZZZ, UXX, VYY, WZZ ) for a FLOOD source of radius 10 cm and centred at (0,0,0) producing uniform radiation field inside the sphere.
Is there any specific place in the “source_newgen.f” where I need to add this line ?
The XXX, YYY, … WZZ variables are the output of the SFLOOD() subroutine.
In source_newgen.f you need to define them first, then call SFLOOD(), finally assign the variables to the appropriate coordinate and direction variables.
To scale the sphere to a specific radius, the coordinates need to be multiplied with the radius.