nrc-cnrc / EGSnrc

Toolkit for Monte Carlo simulation of ionizing radiation — Trousse d'outils logiciels pour la simulation Monte Carlo du rayonnement ionisant
http://nrc-cnrc.github.io/EGSnrc
GNU Affero General Public License v3.0
216 stars 146 forks source link

A problem about BEAMnrc MESH component module #981

Open CQUswl opened 1 year ago

CQUswl commented 1 year ago

When I run BEAMnrc GUI, after some time, the Running window shows a message and the program shows that it failed to run. QQ截图20230404094553 This is the input file information: Sandwich #!GUI1.0 VACUUM 0, 0, 0, 0, 0, 2, 0, IWATCH ETC. 1000000000.0, 33, 97, 99, 0, 0, 0, 0, NCASE ETC. 0, 21, 1, 0, 0, 0, 0, 0, 0, 0, IQIN, ISOURCE + OPTIONS C:/Source/3mm.egsphsp1 0, 0, 1, 0.01, 0, 0, 0, 0 , ECUT,PCUT,IREJCT,ESAVE 0, 0, 0, 0, 0, PHOTON FORCING 1, 2, SCORING INPUT 1, 1 2.5, 0, DOSE COMPONENTS 0.0, Z TO FRONT FACE start of CM SLABS with identifier Air 10, RMAX air 1, NSLABS 0, ZMIN 50, 0, 0, 0, 0, 0 AIR521ICRU start of CM MESH with identifier Sandwich 10, RMAX Sandwich 50, MESH 0.01, 5, 0.01, 20, , AIR AND WIRE WIDTHS 2.5, 2.5, XTOTAL, YTOTAL 1, 0.01, 0, 0, 1, 0.01, 0, 0, CU521ICRU *end of all CMs***** ######################### :Start MC Transport Parameter:

Global ECUT= 1 Global PCUT= 0.01 Global SMAX= 5 ESTEPE= 0.25 XIMAX= 0.5 Boundary crossing algorithm= EXACT Skin depth for BCA= 0 Electron-step algorithm= PRESTA-II Spin effects= On Brems angular sampling= KM Brems cross sections= BH Bound Compton scattering= Norej Compton cross sections= default Pair angular sampling= Simple Pair cross sections= BH Photoelectron angular sampling= On Rayleigh scattering= On Atomic relaxations= EADL Electron impact ionization= Off Photon cross sections= xcom Photon cross-sections output= Off

:Stop MC Transport Parameter: #########################

CQUswl commented 1 year ago

When I reduced the number of particles to a certain level, the phenomenon no longer appeared, but the error of the obtained results was too large.

rtownson commented 1 year ago

I couldn't reproduce this, using a monoenergetic photon beam. Can you try with a monoenergetic beam or a different phase-space? Is it possible to generate a new phase-space, in case this one is corrupted?

CQUswl commented 1 year ago

I couldn't reproduce this, using a monoenergetic photon beam. Can you try with a monoenergetic beam or a different phase-space? Is it possible to generate a new phase-space, in case this one is corrupted?

I used a new phase-space,it still prompts an error when too much input history is entered.And I found that when I change the value of "Z thickness of wire in the mesh, it causes the number of history that prompt errors to change. I use the first phase space file generated from the following input file as the input source:

3mm #!GUI1.0 VACUUM 0, 0, 0, 0, 0, 2, 0, IWATCH ETC. 1000000, 33, 97, 99, 1, 100, 2, 0, NCASE ETC. -1, 0, 0.08, 0, 0, 1, 0.0, 0.0, 0.0, 0.0, IQIN, ISOURCE + OPTIONS 0, MONOENERGETIC 9 0, 0, 0.521, 0.01, 0, 0, , 0 , ECUT,PCUT,IREJCT,ESAVE 0, 1, 10, 2, 2, PHOTON FORCING 2, 1, 2, SCORING INPUT 1, 1 5, 1, 1 10, 0, DOSE COMPONENTS 0.0, Z TO FRONT FACE start of CM SLABS with identifier Target 5, RMAX Target 3, NSLABS 0, ZMIN 0.3, 0, 0, 0, 0, 0 W521ICRU 0.2, 0, 0, 0, 0, 0 H2O521ICRU 0.2, 0, 0, 0, 0, 0 STEEL521ICRU start of CM SLABS with identifier Air 10, RMAX Air 1, NSLABS 0.7, ZMIN 30, 0, 0, 0, 0, 0 AIR521ICRU *end of all CMs***** ######################### :Start MC Transport Parameter:

Global ECUT= 0.521 Global PCUT= 0.01 Global SMAX= 5 ESTEPE= 0.25 XIMAX= 0.5 Boundary crossing algorithm= EXACT Skin depth for BCA= 0 Electron-step algorithm= PRESTA-II Spin effects= On Brems angular sampling= KM Brems cross sections= BH Bound Compton scattering= Norej Compton cross sections= default Pair angular sampling= Simple Pair cross sections= BH Photoelectron angular sampling= On Rayleigh scattering= On Atomic relaxations= EADL Electron impact ionization= Off Photon cross sections= xcom Photon cross-sections output= Off

:Stop MC Transport Parameter: ######################### :Start BCSE:

Use BCSE= On Media to enhance= W521ICRU Enhancement constant= 20 Enhancement power= Russian Roulette= on

:Stop BCSE: #########################

Here is the CM file: CM names: SLABS SLABS Identifiers: Target Air

rtownson commented 1 year ago

I've reproduced the issue, and so far I don't know what the problem is. It does seem to be source specific - other phase-spaces run fine.