# MCNP diagnostic X-ray tube simulation

Eva Eva Eva
Dear all,

I would like to simulate X-ray tube and check the dose rate in the room.
My problem is when I simulate 80kV electrons bombard to the tungsten target, there is just a few photons coming out from the tube window. And the dose rate at 1m from the tube is nearly zero which is impossible. Please help. Thanks a lot.

Regards,
Eva

PSRB191921
Hi,
There are no difficulties to do that with MCNP. Can you put your input file ?

Unfortunately bremsstrahlung isn't a very efficient process. In Monte Carlo simulations this is usually solved using some kind of variance reduction technique such as bremsstrahlung splitting, where the basic idea is that when a bremsstrahlung photon is generated, N copies of if are made and added to the simulation, but their subsequent energy deposition events are assigned a weighting of 1/N. This prevents you from having to simulate as many incident electrons to get good statistics in your Monte Carlo results. I haven't used MCNP myself, so I can't offer much advice about specific implementation, but that's what I would start out with.

Maybe something else to consider too is that someone else may have simulated the photon spectra coming out of your tube already. This might be publically available as an open source phase space, or at least a spectra file that you can use so that you can start your simulation at the tube's exit window.

Eva Eva Eva
Sample Problem Input Deck
c cell cards for sample problem
1 1 -0.001205 -1 5 10 15 20 25 30
5 2 -11.3 -5
10 3 -1.1 -10
15 1 -0.001205 -15
20 4 -2.7 -20
25 5 -19.3 -25
30 0 -30 25
40 0 1

C Surface cards
1 rpp -500 500 -500 500 -500 500 $room 5 rpp 300 301 -500 0.1 -500 500$ lead shield
10 rcc 0 -400 0 0 300 0 50 $plastic phantom 15 rcc 0 -250 -60 0 30 0 10$ Tally
20 rpp -10 10 -260 -220 -190.25 -190 $Filter 25 rcc 0 -250 -205 0 1 1 5$ Target
30 rpp -10 10 -260 -220 -210 -190.25 $X-ray tube head 40 PY -205$ source

IMP:P,E 0 1 1 1 1 1 1 0
MODE P E
SDEF SUR=40 AXS= 0 -1 0 POS=0 -230 -202 PAR=3 RAD=d1 DIR=-1 ERG=0.08
si1 0 1
sp1 -21 1
m1 6000 -0.000125 7000 -0.755267 8000 -0.231781 18000 -0.012827 $Air m2 82000 1$ Lead
m3 1000 .14 6000 .86 $Plastic m4 13000 1$ Aluminium
m5 74000 1 $Tungsten F4:P 15 F6:P 15 NPS 10000 Eva Eva Eva For simplicity, I didn't add lead shielding around the X-ray tube head, just Al window at the exit. Thanks anyway. PSRB191921 Hi you have 2 problems first, because of "IMP:P,E 0 1 1 1 1 1 1 0" you don't transport photons in the cell 1 so you can't have photons in cell 15 (all photons are killed in cell 1) ! second you have a cookie-cutter beetwen cells 10 and 15 Furthermore because the transport and the generation of bremsstrahlung’s photons take a lot of computer time try to transport électrons only in cells 25 and 30. I propose the input file (in bold my modifications) : Sample Problem Input Deck c cell cards for sample problem 1 1 -0.001205 -1 5 10 15 20 25 30 5 2 -11.3 -5 10 3 -1.1 -10 15 1 -0.001205 -15 20 4 -2.7 -20 25 5 -19.3 -25 30 0 -30 25 40 0 1 C Surface cards 1 rpp -500 500 -500 500 -500 500$ room
5 rpp 300 301 -500 0.1 -500 500 $lead shield 10 rcc 0 -400 0 0 300 0 50$ plastic phantom
15 rcc 0 -250 -60 0 30 0 9.999 $Tally 20 rpp -10 10 -260 -220 -190.25 -190$ Filter
25 rcc 0 -250 -205 0 1 1 5 $Target 30 rpp -10 10 -260 -220 -210 -190.25$ X-ray tube head
40 PY -205 $source IMP:P 1 1 1 1 1 1 1 0 imp:E 0 0 0 0 0 1 1 0 MODE P E SDEF SUR=40 AXS= 0 -1 0 POS=0 -230 -202 PAR=3 RAD=d1 DIR=-1 ERG=0.08 si1 0 1 sp1 -21 1 m1 6000 -0.000125 7000 -0.755267 8000 -0.231781 18000 -0.012827$ Air
m2 82000 1 $Lead m3 1000 .14 6000 .86$ Plastic
m4 13000 1 $Aluminium m5 74000 1$ Tungsten
F4:P 15
F6:P 15
stop F4 .01

Ericdjs and Eva Eva Eva
Eva Eva Eva
Sorry for the late response.
I have updated the code, but still the F4 and F6 tally in cell 15 was zero.

The source came out from the X-ray tube could not reach the tally box and even the plastic phantom behind.
Is there anything wrong about the geometry? Thanks a lot!

#### Attachments

• simu.png
24.2 KB · Views: 892
PSRB191921
How much nps or tme did you run ?
I tried my file and it is ok but iit is monte carlo so you must have a signifiant run time.

Eva Eva Eva
Thanks PSRB191921
I have tried nps 10000000
The results were ok.

Just one more question
How to perform mesh tally inside the room?
I wanted the dose rate result inside the room F6:P 1 could be visualized in MCNP VE. Thanks a lot!

I tried
wwp: p 4j 1
wwg 6 5
wwge:p .01 0.1 0.14
mesh GEOM=cyl REF=1 1 0 ORIGIN=1 2 3 IMESH= 0 5 JMESH=0 5 KMESH=0 5
It didn't worked.

PSRB191921
Hi,
I'm surprised that with 10000000 particles the result has converged
Second I'm not sure to understand the calculation you want to perform. The calculation of the dose in cell 1 is a physical nonsense. The notion of dose is a punctual concept (or small volume like in a LiF) or in a organ. In air you can calculate the dose (more exactly the kerma) at a point ( for example at 50, 50, 50) but not in all the volume.
Third wwp, wwg, wwe ... in for a weight windows generator to variance reduction technique.

Eva Eva Eva

#### Attachments

68.4 KB · Views: 1,158
Eva Eva Eva
I would like to calculate the dose rate like the above graph.

So, I have to define the every small cell inside the room?

Any other method to do this?

Thank you.

PSRB191921
ok I understand. you want to calculate isodose.
for that you can use a "meshtally"
in your input file (block 3) you must put (for example) :
"tmesh
RMESH1:p pedep
cora1 -1 1
corb1 -500 100i 200
corc1 -190 100i 200
endmd"

your space is divided in cube cora is X corb is Y corc is Z. And you calculate pedep (MeV/cm3/particule) in all cubes.

Ericdjs and Eva Eva Eva
Eva Eva Eva
Thank you. As my version is mcnp4c2, error occurred when I typed tmesh code. I think the code should be fine. I have to ask for more updated version. Which version should I use? mcnp6 or mcnpx?Thank you again.

chatry christian
Dear Eva,

My advice is if you have budget for that is to procure Rayxpert software you solve your problem in the day !
just a quick example that we can do with !

regards

#### Attachments

• Cartography 3D _ 2.png
45.2 KB · Views: 571
• carto-3D-médical-légende-modif.png
50.4 KB · Views: 910