Efficient MCNP Lattice Source Help: Defining Universes and Tallies in Cell File

In summary, this is what I hate about MCNP, not a lot of documentation. How do I define all of a universe as a source and a tally? I have a lattice like the below code. How do I get this code to work with tallies for positions 1,2, and 3 in the lattice; and a source for the 2's. I get the error "sampling efficiency is too low" Since, I have a very, very low efficiency I'm not sure how to fix this.
  • #1
ethnscot
2
1
This is what I hate about MCNP, not a lot of documentation. How do I define all of a universe as a source and a tally? I have a lattice like the below code.
How do I get this code to work with tallies for positions 1,2, and 3 in the lattice; and a source for the 2's. I get the error "sampling efficiency is too low" Since, I have a very, very low efficiency I'm not sure how to fix this.
One That Doesn't Work:
MCNP Cell File
c Created on
    901     0         999   imp:p=0 imp:e=0
    902     6    -0.001205   -999 901 imp:p=0 imp:e=0
    903     0         -902  u=999 lat=1 imp:p=1 imp:e=1
            fill=0:2 0:8 0:4
       1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
       1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
       1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
       1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1
       4 2 1 1 1 1 1 1 1 1 1 1 1 1 1
    904     0     -901  fill=999 imp:p=1 imp:e=1
    42  0  -903  u=1 imp:p=1 imp:e=1
    43   0  903  u=1 imp:p=0 imp:e=0
    1   2   -0.997 -903  u=2 imp:p=1 imp:e=1
    101   0  903  u=2 imp:p=0 imp:e=0
    2   2   -0.997 -903  u=3 imp:p=1 imp:e=1
    102   0  903  u=3 imp:p=0 imp:e=0
    3   6   -0.001205 -903  u=4 imp:p=1 imp:e=1
    103   0  903  u=4 imp:p=0 imp:e=0

   901       rpp 0 71 0 167 0 119
   902       rpp -10.0 10.0 -10.0 10.0 -10.0 10.0
   903      rpp -10.1 10.1 -10.1 10.1 -10.1 10.1
   999       rpp -5 76 -5 172 -5 124

c water
m2    1000 -0.111902
     8000 -0.888098
c Air
m6    6000 -0.000124
     7000 -0.755268
     8000 -0.231781
     18000 -0.012827
mode p e
sdef erg=1 par=2 eff=0.0000001 X=d1 Y=d2 Z=d3 cel=d4
si1 -10.0 10.0
sp1 0 1
si2 -10.0 10.0
sp2 0 1
si3 -10.0 10.0
sp3 0 1
si4 L (3<903<904)
sp4 1
f8:e (2<903<904)
e8 0 0.0000001 5.0
f18:e (2<903<904)
e18 0 0.0000001 5.0
nps 1000000
 

Attachments

  • Input.txt
    1.5 KB · Views: 83
Engineering news on Phys.org
  • #2
I actually figured it out myself. I needed eff to be 1E-10. Now I have ***** lost particle in newcel - zero lattice element hit ***** as an error. Does anyone know how to fix this?
 
  • #3
Your x and z are misaligned so you get empty lattice hits. Run mcnp ip Input.txt and do some cross sections through the lattice to see. 'px 1' is helpful.

If you are setting an eff so low you are wasting 99.99% of your computer time that should be a hint something is not right. You seem to want to define your source in one of the other universes, this makes no sense to me. When you have fixed the alignment, locate the position in the real universe and redo the source and I would expect many problems to go away.
 

Related to Efficient MCNP Lattice Source Help: Defining Universes and Tallies in Cell File

What is an MCNP lattice and why is it important?

An MCNP lattice is a structured arrangement of repeating geometric cells used to model complex systems in a simplified manner. It is important because it allows for efficient computation and simulation of neutron, photon, and electron transport in large and repetitive structures, such as nuclear reactors or shielding materials.

How do I define a universe in the MCNP input file?

In MCNP, a universe is defined by assigning a unique integer number to a cell that will act as a container for other cells or lattices. You can assign a universe number to a cell by using the U= keyword in the cell card. For example, "1 0 -10 imp:n=1 u=2" defines a cell with universe number 2.

What are tallies in MCNP and how do I set them up in a lattice?

Tallies in MCNP are used to calculate quantities of interest, such as flux, dose, or reaction rates. To set up a tally in a lattice, you use the F4 tally (for flux) or appropriate tally type, and specify the cell numbers or universe numbers you are interested in. For example, "F4:n 1 2 3" would tally neutron flux in cells 1, 2, and 3. You can also use the FM card to specify the reactions of interest.

How can I ensure efficient computation when using lattices in MCNP?

To ensure efficient computation, you should minimize the complexity of individual cells and use symmetries whenever possible. Additionally, use the LATTICE keyword to define the repetitive structure and avoid redundant calculations. Properly setting up the importance and weight windows can also help in optimizing the computation.

What are some common errors when defining lattices and universes in MCNP?

Common errors include incorrect cell definitions, such as overlapping cells or gaps between cells, incorrect universe assignments, and improper use of lattice keywords. Another frequent mistake is not properly defining the boundaries of the lattice or misaligning the lattice structure with the overall geometry. Carefully checking the input file for these issues can help prevent errors.

Similar threads

Replies
1
Views
320
  • Nuclear Engineering
Replies
2
Views
2K
  • Nuclear Engineering
Replies
4
Views
2K
Replies
3
Views
2K
Replies
2
Views
3K
  • Nuclear Engineering
Replies
4
Views
2K
Replies
1
Views
3K
Replies
2
Views
2K
Replies
7
Views
2K
Replies
2
Views
3K
Back
Top