Plane source using source_newgen.f

Hello,

I’m attempting to define a plane source using the source_newgen.f user routine. The source is perpendicular to the x-axis at x=60.0cm, and it cut off by the blackhole region of the geometry (y0=-70.0, y1=70.0, z0=-5.0, z1=130.0). The source also has an energy spectrum defined by an additional file. I just wanted to check that it it being defined correctly using the source_newgen.f routine?

snre_gcr_source_v4.flair (11.8 KB)
gcr_spectrum.txt (1.9 KB)
gcrsource.f (19.3 KB)

Thanks,

Emma

Dear Emma,

the following three lines are enough, setting the same variable multiple times overwrites the previous values.

coordinate_x = 60.0D0
coordinate_y = sample_flat_distribution( -70.0D0, 70.0D0 )
coordinate_z = sample_flat_distribution( -5.0D0, 135.0D0 )

Note: The maximum value of the z coordinate differs in your description and the code.

Cheers,
David