MCNP4 help: f4 tally in lattice

  • Thread starter J_P_C
  • Start date
  • Tags
    Lattice
In summary, the conversation discusses a problem with using MCNP4 to model a 17x17 fuel element and calculate the average neutron flux in a specific pincell. The issue is resolved by adding the "sd4 1" card after the F4 tally line. The original intention of the conversation was to compare the flux in an innermost pincell versus an outermost pincell, which is achieved in the attached working input file. The conversation ends with a thank you for the help.
  • #1
J_P_C
3
4
TL;DR Summary
I can't find the way to correctly apply an f4 tally in a precise lattice position. Help please?
Hi all, I'm new to the forum. Maybe you guys can give me hand with this.

I am using MCNP4 to model a 17x17 fuel element. I want to know the average neutron flux in a specific pincell but so far everything I try results in error. This is my input (text file is attached too):
Code:
c CELL CARDS
1  1 -10.24  -7        u=1     imp:n=1         $Fuel
2  2 -6.504   7 -8    u=1     imp:n=1         $Clad
3  3 -1.000   8         u=1     imp:n=1         $Water outside clad
4  3 -1.00   -9         u=2     imp:n=1         $Water inside guide tube
5  2 -6.504   9 -10  u=2     imp:n=1         $Guide tube
6  3 -1.000   10       u=2     imp:n=1         $Water outside guide tube
7  0          3 -4 5 -6 lat=1  u=3  imp:n=1  $Fuel element lattice
              fill=-8:8 -8:8 0:0
              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 2 1 1 2 1 1 1 1 1
              1 1 1 2 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 2 1 1 2 1 1 2 1 1 2 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 2 1 1 2 1 1 2 1 1 2 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 2 1 1 2 1 1 2 1 1 2 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 2 1 1 1 1 1 1 1 1 1 2 1 1 1
              1 1 1 1 1 2 1 1 2 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
8  0             11 -12 13 -14           fill=3  u=4  imp:n=1  $Fuel element
9  3   -1.0  -11:12:-13:14                        u=4  imp:n=1  $Water outside fuel element
10  0            1 -2 15 -16 17 -18  fill=4            imp:n=1  $Fuel element + water gap
999 0          -1:2:-15:16:-17:18                        imp:n=0  $Outside void

c SURFACE CARDS
*1  pz -200
*2  pz  200
 3  px -0.6325
 4  px  0.6325
 5  py -0.6325
 6  py  0.6325
 7  cz  0.4127 
 8  cz  0.4744
 9  cz 0.57294
 10 cz 0.61301
 11 px -10.7525
 12 px 10.7525
 13 py -10.7525 
 14 py 10.7525
*15 px -10.8055
*16 px 10.8055
*17 py -10.8055
*18 py 10.8055
I want to know the average neutron flux in the top right pincell.
I don't understand why the following tally results in the fatal error "tally volume or area was not input nor calculated":

f4:n ((1 2 3) < 7 [8 8 0] < 8 <10)

The way I see it all of my cells are finite when filled with their corresponding universes. I'm a bit lost right now. Any help is appreciated.
 

Attachments

  • e3fa.txt
    2.4 KB · Views: 176
Last edited by a moderator:
Engineering news on Phys.org
  • #2
F4 is a flux tally, but instead of counting the neutrons going through it MCNP measures the total path length and divides it by the volume of the cell to calculate the flux. It's only the cookie cutting later that gives (1 2 3) finite volume. So the function to find the volume fails and MCNP freaks.

Fixed by specifying the divisor explicitly, which in this case is the volume. Adding "SD4 1" the line after the F4 tally causes it to run, either replace 1 with the real volume, do the division later or rewrite the tally cells to be bounded (the problem is neatly defined so I imagine you don't want to go this way).
 
  • Like
  • Informative
Likes J_P_C, Astronuc and berkeman
  • #3
Alex A said:
F4 is a flux tally, but instead of counting the neutrons going through it MCNP measures the total path length and divides it by the volume of the cell to calculate the flux. It's only the cookie cutting later that gives (1 2 3) finite volume. So the function to find the volume fails and MCNP freaks.

Fixed by specifying the divisor explicitly, which in this case is the volume. Adding "SD4 1" the line after the F4 tally causes it to run, either replace 1 with the real volume, do the division later or rewrite the tally cells to be bounded (the problem is neatly defined so I imagine you don't want to go this way).
Thanks for the answer, I see what you mean. In fact, now that I know I need the sdn card I went looking into the manual and I saw that this card is especially recommended for tallies in repeated structures. I liked the idea of using the divisor just as 1 and dividing by the real value later, so I added the "sd4 1" line after the tally line, but still I get the same error. Maybe the chain of cells in the f4 tally is not correct? I am attaching the full, complete input to this message too.
 

Attachments

  • e3fa.txt
    2.4 KB · Views: 154
  • #4
Your input file works unmodified for me with 4b under linux, I just renamed it to inp. I've run it with 4c but the binary was older and I needed to strip carriage returns (a linux thing). I assume you are in windows.

Try reading the output file to make sure the modification is in the input it is processing, for whatever reason. Check for any other errors or warnings. If it still doesn't work post the output file.
 

Attachments

  • outj.txt
    146 KB · Views: 150
  • Like
Likes berkeman
  • #5
It finally works, although I have no idea why o0). I ran the very same input file from my previous message and this time it worked. And yes, I am in Windows. Thanks so much for the help!

My original intention was to compare the flux in an innmermost pincell versus flux in an outermost pincell. If by any chance anyone has my same problem in the future and finds the thread, the file I am attaching to this message is working and does what I intended.

Thanks again for the help.
 

Attachments

  • e3fa.txt
    2.5 KB · Views: 165
  • Like
Likes berkeman and Alex A

FAQ: MCNP4 help: f4 tally in lattice

What is MCNP4?

MCNP4 stands for Monte Carlo N-Particle Transport Code version 4. It is a computer program used to simulate and analyze the transport of particles, such as neutrons, photons, and electrons, through materials and structures.

What is the f4 tally in MCNP4?

The f4 tally in MCNP4 is a type of scoring function that calculates the flux or fluence of particles at a specific location in a lattice geometry. It is commonly used to analyze the radiation levels and dose rates in nuclear reactors and other radiation environments.

How do I use the f4 tally in lattice geometry?

To use the f4 tally in lattice geometry, you first need to define the lattice structure in your MCNP4 input file. Then, you can specify the f4 tally in the tally section of your input file, along with the appropriate parameters such as the lattice cell number and energy group.

What are the advantages of using the f4 tally in MCNP4?

The f4 tally in MCNP4 offers several advantages, including the ability to calculate the flux and fluence of particles at specific locations in a lattice geometry, the ability to score multiple energy groups simultaneously, and the ability to track particles through complex geometries and materials.

Are there any limitations to using the f4 tally in MCNP4?

While the f4 tally in MCNP4 is a powerful tool, it does have some limitations. For example, it may not be suitable for analyzing highly anisotropic radiation fields or for simulations with very high energy particles. It is important to carefully consider the applicability and accuracy of the f4 tally for your specific simulation needs.

Back
Top