and the one is given by the user routine DEMO.f (18.7 KB)
The two plots are different. The only difference that I can see between the two source definitions is the beam width, but I am not able to find the location in the user routine file where I can define the width of the beam.
the beam size settings on the BEAM card is overwritten by the source routine.
To specify an extended source, you need to sample the random position. This can be easily done with the sample_flat_distribution() function described at section 5.2.1 in the source_newgen.f file.
Remember, you need to specify the numbers in the source routine as double precision, like 20.0D0.
Thanks for your reply, Sir.
I tried to change the file following your guidlines, however, the results I get have different order of magnitude even if I have written the same values. Could you please suggest me away to check where I am doing wrong? DEMO1.f (18.7 KB) DEMOwithSource1.inp (6.1 KB)
The coordinate_x variable needs to be sampled between -5 and 45 to match the BEAM card
The beam direction is also not correct. To match the settings on the BEAMPOS card you need set direction_cosy to zero and direction_flag to 1. Or of you don’t set direction_cosx then the values from the BEAMPOS card will be used from all the components.
Thanks Sir,
Now the results are comparable. I have just 1 question related to correction 1: why is it not between 0 and 50 if my x_coordinate goes from 0 to 50 in the geometry?