Electron beam hitting the Tungsten target creates XRay photons. How do I define the resulting photons source since openMC cant simulate electrons

hi everyone,
I am trying to simulate Linear Accelerator (LINAC) Head using OpenMC. In LINAC an electron beam hits the high Z target and as a result XRay photons are emitted. As OpenMC cant simulate electrons so I was looking for an alternative approach like defining an XRay photon source right after the target material.
Could you please help me defining such a source?

Hi Mani,

my top recommendation would be to simulate the setup with MCNP mode p e. Write a phase-space file (wssa/rssa) where you want to propagate the photons from (so writing the photons after the target).

Then convert that rssa to mcpl format, and use that mcpl source in OpenMC.

Of course you are probably wanting to use OpenMC so not to have MCNP…
I am not familiar with EGS (DOSXYZ), but I presume there is a way you can write a phase-space file with it. You should be able to convert that phase-space file to mcpl format or OpenMC hd5 format.

The MCNP direct to MCPL is fairly straightforward.
The second way requires a bit more data handling/gymnastics.

You could also use a general source in OpenMC if you know approximately the energy, x,y,z,u,v,w.
(say from a uniform disc propagating photons along direction Z, at energy E MeV)


1 Like

thank you Perry! i want to use GEANT4 instead do you have any idea if its possible to import phasespace file from GEANT4 into openmc?

Yes, it is possible.
The MCPL phase-space file generated through the MCPL-Geant4 workflow can be directly used in OpenMC.