Issue with cylindrical surface source

Hello,

I’m attempting to model a proton flux through a beryllium cylinder. The Be cylinder is surrounded by a vacuum region, and then surrounded by a black hole region. I’ve tried to define the proton source as a cylindrical surface source surrounding the Be cylinder in the vacuum region. I’ve done this using the CYLI-VOL option in BEAMPOS. The source is also isotropic with an energy spectrum which I’ve defined using the source_newgen.f user routine. The simulation is running without any errors, but the simulation is stuck on 0% for a significantly long period of time, so I’m not sure what the issue is.

be_cyl_gcr.flair (3.2 KB)
be_cyl_gcr.inp (2.3 KB)
gcr_source.txt (1.3 MB)
gcrsource_newgen_v2.f (19.1 KB)

Thanks,

Emma

Dear Emma,

if you are using a source_newgen routine, the BEAMPOS card with the CYLI-VOL card is ignored. You need to implement the spatial sampling by yourself using the coordinate_x/y/z variables.

Cheers,
David

Thanks, David. I set the coordinates in the source_newgen.f file:

  coordinate_x = 0.0D0
  coordinate_y = 0.0D0
  coordinate_z = 64.82D0

and set an annular distribution

call sample_annular_distribution( 49.2633D0, 50.0D0, coordinate_x, coordinate_y )

which from my understanding will sample from an infinite annular cylinder in the z-direction centered at (0.0,0.0).
However when I try to run the simulation is still getting stuck on 0%.

be_cyl_gcr.flair (3.2 KB)
gcrsource_newgen_v2.f (19.1 KB)

Thanks

Dear Emma,

sorry for the late reply! The problem with your input is with the LAM-BIAS card. You should make sure that you are not over biasing, otherwise the required time for following even one primary gets extremely long.

Cheers,
David

Oh yes that makes sense, thank you!