How Can I Simulate a Narrow Spectrum X-Ray Beam Using MCNP?

  • #1
Anisur Rahman
9
1
Screenshot 2023-11-01 232436.png
I don't know where is the problem. My supervisor couldn't provide me the actual specification of my X-ray tube. I was asked to simulate the X-ray narrow spectrum beam. I run that code, but it produces nothing. Can anyone help me?
 

Attachments

  • N.txt
    2.6 KB · Views: 35
Engineering news on Phys.org
  • #2
I ran that at 1/100th the nps in MCNP5 and it produces a spectrum for me. The electron voltage might be set at the RMS of the supply voltage of the tube. That would limit the spectrum a bit, it's not fully correct.

Also of note "e0 0.001 100i 0.328" is a linear interpolation and an electron at 47.9keV can't produce an X ray photon above 47.9keV so most of the spectrum must be blank under these conditions.

If you still think you are getting nothing add your output file to a post.
 
  • #3
Here is my output.
 

Attachments

  • Output.txt
    14.1 KB · Views: 37
  • #4
in your file "sdef par=2" emits photons not electrons. You must write par=3
 
  • Wow
Likes Alex A
  • #5
Oh wow, good catch @PSRB191921!

@Anisur Rahman, the output file looks otherwise fine but incomplete. Like the program has been told not to run the problem, or it's crashing or it's being killed. 3e6 on one core of my old laptop took 15mins, 3e8 would have taken a full day, what do you see and do when you run it?
 
  • Like
Likes Anisur Rahman
  • #6
I make some modifications (see my input and output).
first I modified sdef :
"sdef POS= 5 0 0 PAR=3 ext=0 ERG= 0.06 AXS= -1 0 0 vec -1 0 0 DIR= 1 RAD=d1"
I put "par=3" to emit electrons and not photons
I create an electrons beam on the W target (POS= 5 0 0 ext=0 AXS= -1 0 0 vec -1 0 0 DIR= 1 RAD=d1)
It gives :
source.gif

I transport electrons only in cell 100 and 107 (imp:e 1 0 0 0 0 0 1 0 0), because there is no point in transporting electrons outside of these areas except to increase the calculation time!

I put a F5 tally at 3 cm (in front of the aluminum filter) and F15 at 10 cm (behind the aluminum filter) note that F4 and F1 did not converge with few particles

it gives this results :
reults.gif


hope it's help
 

Attachments

  • Xrayw.txt
    104.1 KB · Views: 48
  • N.txt
    2.7 KB · Views: 49
  • Informative
Likes Alex A
  • #7
Hi @Alex A and @PSRB191921. I am sorry, i uploaded the incomplete output file. In the mean time, i have changed the geometry. I have changed the par and tally too. But when the electron is emitted, it doesn't collide with the tungsten target. I am not sure why this is happening. Can you help me please? I am uploading the input and the output file here.
 

Attachments

  • NEW.txt
    2.6 KB · Views: 41
  • Outp.txt
    56.1 KB · Views: 41
  • #8
You have a fatal error,
" fatal error. 9 entries not equal to number of cells = 10."
This seems to apply to,
Code:
imp:e   1 0 1r 1 0 4r          $ 100, 109
This is the same as,
Code:
imp:e   1 0 0 1 0 0 0 0 0          $ 100, 109
So you've assigned 9 importances when you need 10.
 
  • #9
I have corrected this fatal error, but still no photon is being recorded. i am attaching the input and output file.
 

Attachments

  • NEW.txt
    2.6 KB · Views: 36
  • outp.txt
    89.7 KB · Views: 34
  • #10
Your void cell is 107, this cell needs to have 0 importance for all (both in this case) particles.
 

Similar threads

Replies
8
Views
1K
  • Nuclear Engineering
Replies
14
Views
5K
Replies
19
Views
1K
  • Nuclear Engineering
Replies
7
Views
2K
Replies
2
Views
725
  • Nuclear Engineering
Replies
2
Views
2K
  • General Engineering
Replies
9
Views
2K
Replies
3
Views
3K
  • High Energy, Nuclear, Particle Physics
Replies
6
Views
1K
  • Biology and Chemistry Homework Help
Replies
1
Views
264
Back
Top