MCNP IMP:n=0 when IMP:p,e=1

  • Thread starter Thread starter Adina C
  • Start date Start date
Adina C
Messages
1
Reaction score
0
TL;DR
How do I set imp 0 for neutrons in acell while having imp 1 for p and e?
This is my geometry. I do not want to follow neutrons in the active area of the detector. I want to see only the pulse height deposited only by gammas coming from the NaCl target.
Code:
title                                                                 
c                                                                     
c CELL CARDS                                                          
9901 1 -5.32 0104 -0106 -0112 -0116:                                  
          0106 -0108 -0112 0117 -0116:                                
          0106 -0108 -0112 0114 -0116 -0117                           
          IMP:p,e=1 IMP:n=1 $ Active part of det 01 cyl + well                
011  1 -5.32 0103 -0104 -0111 -0115:                                  
          0104 -0115 0116 -0111:                                      
          0104 -0116 -0111 0112 -0108:                                
         -0111 0113 0108 -0107:                                       
          0106 -0105 -0117 -0114:                                     
          0105 -0117 -0108 -0114 0113:                                
          0105 -0117 0118 -0113                                       
            IMP:p,e=1 IMP:n=1 $ Dead layer of det 01                          
016  4 -2.70 0105 -0107 -0113 -0118                                   
            IMP:p,e=1 IMP:n=1 $ Cold finger of det 01                         
017 7 -1.600 0150 -0151 -0152 IMP:p,e=1 IMP:n=1 $  C window of d01            
019 0  0151 -0102 -0153 IMP:p,e=1 IMP:n=1 $ empty cell behind the C           
c window of det 01                                                    
012 4 -2.7 0101 -0151 0152 -0109:0151 -0102 0153 -0109:               
       0102 -0119 0110 -0109 IMP:p,e=1 IMP:n=1 $Al cap of det 01              
015 4 -2.7 (0103 -0120 0131 -0129):(0120 -0121 0131 -0130):           
          (0121 -0122 0131 -0129):(0122 -0123 0131 -0130):            
          (0123 -0124 0131 -0129):(0124 -0125 0131 -0130):            
          (0125 -0126 0133 -0130):(0126 -0127 0133 -0132):            
          (0127 -0128 -0132) IMP:p,e=1  IMP:n=1 $ Al holder det01             
013 0 (0102 -0119 -0110)#9901#011#015#016 IMP:p,e=1 IMP:n=0                  
c       void cell of  det01  
20  8  -2.165  -200 201 -202  IMP:n,p,e=1
c  Int of a fi 45 air sphere, detectors excluded!                     
5 2 -.00121 -1                                                        
         #(0150 -0119 -0109:0101 -0150 -0109 0152) #20                    
              IMP:n,p,e=1                                               
6 0 1 IMP:n,p,e=0 $outside world for terminating propagation

c  SURFACE CARDS                                                      
c  Det.01 cylinder+well in Al can, transf. 01                         
0101 01 px  18.00000
0102 01 px  18.13000
0103 01 px  18.63000
0104 01 px  18.63050
0105 01 px  20.03000
0106 01 px  20.02950
0107 01 px  26.63000
0108 01 px  26.62950
0119 01 px  30.00000
0120 01 px  18.76000
0121 01 px  20.03000
0122 01 px  20.89000
0123 01 px  23.77000
0124 01 px  24.63000
0125 01 px  26.96000
0126 01 px  27.26000
0127 01 px  28.26000
0128 01 px  29.26000
0150 01 px  18.03000
0151 01 px  18.11000
0109 01 cx   4.55000
0110 01 cx   4.40000
0111 01 cx   3.92500
0112 01 cx   3.92450
0113 01 cx   0.85000
0114 01 cx   0.85050
0129 01 cx   4.19600
0130 01 cx   4.00600
0131 01 cx   3.92600
0132 01 cx   1.16000
0133 01 cx   0.86000
0152 01 cx   4.06000
0153 01 cx   3.92600
0115 01 kx  14.79500  1.00000
0116 01 kx  14.79571  1.00000
0117 01 kx  19.26929  1.00000
0118 01 kx  19.27000  1.00000
200  cx 3.5
201  px -0.35
202  px  0.35
c  Container: Sphere fi 45 in origin                                  
1    so    60.                                                        
                                                                                                            
c TRANSFORMATIONS FOR DETECTORS                                       
*TR01 0 0 0    150.000     90.000     20.000                          
c  DATA CARDS                                                         
MODE N P E  
c                                                                     
c ===== SOURCE =====
c
SDEF PAR=N POS=-40 0 0 VEC=1 0 0 DIR=1 RAD=d2 ERG=d1
C
si2  L 0 3
sp2  0 3
si1 L &
   0.37384   0.40067   0.45066   0.50014   0.55058  &
...
sp1 &
     0     0.066139     0.074529     0.104615     0.136241  &
...
C
c --- Pulse-height (HPGe) ---
c
F8:P 9901
E8 0.0 1666i 5.0
FT8 GEB 5.094e-4 1.118e-3 0.0
c
c  MATERIALS
c
m1  32070.85c 1.0                 $ Ge
m2  7014.85c  0.79 8016.85c 0.21  $ aer
m4  13027.85c 1.0                 $ Al
m7  6000.85c  1.0                 $ C
m8  11023.85c  0.5  17035.85c  0.37875  17037.85c  0.12125  $ NaCl
c
c  Number of generated particles, directives
c
prdmp 0 0 0 1 0 
nps    1000000000000
 
Last edited by a moderator:
Engineering news on Phys.org
Welcome to Physics Forums @Adina C,

I'm a bit confused by the question and a bit confused by the input file. The number of histories nps, is extremely large, you might want to try 10e5 to start with. What else I see looks strange like a lot of brackets are missing. Does the input file actually work?

The first cell is described as the active volume, changing IMP:n= from 1 to 0 will destroy any neutrons that enter the volume.

So my question is what have you tried and what isn't working like you want?
 
  • Like
Likes   Reactions: berkeman
As Alex A said, your NPS is rather large. It will take a long time to run. As a usual method, you want to start with a small number of particles and see what your tally uncertainties come out as. If they get too few particles you can increase NPS. I would suggest starting with something like 1 million particles and see how it goes. You can also consider various methods to decrease the uncertainty. Getting pretty complicated though. If you get to that, look in the manual for "variance reduction."

You can set the importance of individual particle types as Alex suggested. And any neutron entering a zero importance cell will be discarded from the problem. I didn't look closely at your problem, but that might not be what you want. Any neutron so discarded is gone permanently from the problem. It does not, for example, take up again on the other side of the cell. It is simply gone.

Depending on what you want to get out of the analysis, there is another approach. You can tally on each type of particle. So you can tally only neutrons or only electrons or only photons. Keeping the importance set to 1 for neutrons will mean that neutrons keep going. Tallying only on one of the other particles will mean you get contributions from them, and not from neutrons passing through. At least, not directly. You may get a contribution from the neutron producing photons as it goes.

This is probably what you want, since neutrons running around are likely to be a source of photons and electrons getting scattered. So zeroing out the neutrons in the cell probably removes some photons and electrons as well.

So read up in the manual on your tally type. Looking at your code, you are already doing F8:P which is a photon-only tally. So it is already giving you only the result from photons in the specified cell.

I only quickly read your code, but I do not see any energy cut off. You want to specify an energy below which you toss out particles. Following very low energy photons, for example, is nearly always a waste of time. You should consider the nature of your system to pick the low energy cut offs.

Generically you should consider whether you need electrons in your problem. If you do, that is very good, keep them. If you do not, then you should consider turning them off. It won't make a huge difference to the neutrons and photons, but it might decrease your code's run time significantly. Yes, electron scattering will produce some photons. But electrons tend to travel quite short distances in matter. If I'm reading your code correctly, you have a neutron source up to 0.55 MeV. I would guess that electrons are probably not a huge thing in this system, but I could be wrong. You could test this by getting a case running with electrons turned on, then turn them off and compare. It will also test whether the time savings is significant.