EGSnrc icon indicating copy to clipboard operation
EGSnrc copied to clipboard

Zero number of photons in exit phase space generated from dosxyznrc source 20 simulation

Open xpetan opened this issue 4 years ago • 7 comments

When attempting to create an exit phase space using a below jaws phase space as input to a dynamic MLC (chair) simulation using source 20 the resulting exit phase space contains zero photons with all other particle types as e- or e+ and with overwhelming majority e-.

xpetan avatar Nov 05 '20 15:11 xpetan

More details here: https://www.reddit.com/r/EGSnrc/comments/jk9qo5/particles_in_exit_phase_space_generated_from/

I haven't confirmed whether or not this is a bug yet.

rtownson avatar Nov 05 '20 16:11 rtownson

Could you share your dosxyznrc input file? Since we've now determined this is likely a dosxyznrc issue instead of a BEAMnrc one.

rtownson avatar Nov 06 '20 00:11 rtownson

GENERIC TITLE                   #!GUI1.0
0
/pathToPhantom.egsphant
0.7, 0.01, 0
0, 0, 0, 
2, 20, 156, 0, 0, 0, 0, 0, 0, 0
[ 156 lines of beam angles ]
2, 2, 0, 80, 0, 0, 0, 0
BEAM_SYNCVMLC,/pathToPhsp.IAEAphsp,Phantom_chair
100000, 0, 999, 23800, 26535, 100, 0, 0, 1, 1, 1, 0, 0, 0, 25, 0, 2
 #########################
 :Start MC Transport Parameter:
 
 Global ECUT= 0.7
 Global PCUT= 0.01
 Global SMAX= 1e10
 ESTEPE= 0.25
 XIMAX= 0.5
 Boundary crossing algorithm= EXACT
 Skin depth for BCA= 3
 Electron-step algorithm= PRESTA-II
 Spin effects= On
 Brems angular sampling= KM
 Brems cross sections= NIST
 Bound Compton scattering= On
 Compton cross sections= default
 Pair angular sampling= KM
 Pair cross sections= BH
 Photoelectron angular sampling= On
 Rayleigh scattering= Off
 Atomic relaxations= On
 Electron impact ionization= Off
 Photon cross sections= si
 Photon cross-sections output= Off
 
 :Stop MC Transport Parameter:
 #########################

image BeamDP image BeamDP plot image DOSXYZ show

xpetan avatar Nov 06 '20 07:11 xpetan

Try setting photon splitting to 1 instead of 25. Let me know if that resolves the issue, I have a hunch that it might.

Unrelated, but consider changing your surrounding material to air instead of vacuum, if that is more realistic. In the input file this means changing the line: 2, 2, 0, 80, 0, 0, 0, 0 to (assuming air is the first material in the egsphant material list): 2, 2, 1, 80, 0, 0, 0, 0 You can't make this change in the GUI when using egsphant input, so have to do it in the input file.

rtownson avatar Nov 06 '20 18:11 rtownson

Setting photon splitting to 1 resulted in a resonable number of photons in the exit phase space.

xpetan avatar Nov 06 '20 22:11 xpetan

I'm going to reopen this issue because it might be worth investigating why - i.e. is this a bug?

rtownson avatar Nov 07 '20 15:11 rtownson

Good catch, @rtownson and @xpetan! Yes, this is a bug in dosxyznrc: Even with photon splitting, photons can still exit the geometry and, thus, should potentially still get output to the phase space file. I'll go ahead a PR with the fix.

blakewalters avatar Jan 12 '21 00:01 blakewalters