How can I model both photons and neutrons with MCNP?

Click For Summary

Discussion Overview

The discussion revolves around modeling both photons and neutrons using MCNP (Monte Carlo N-Particle Transport Code). Participants are addressing issues related to code implementation, error messages, and library configurations necessary for accurate simulations involving neutron interactions with matter.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant seeks help with a data card for neutron simulations, expressing uncertainty about errors encountered when transitioning from photon to neutron simulations.
  • Another participant requests more details about the specific errors reported by MCNP, suggesting that a minimal reproducible example would be helpful.
  • A participant identifies potential library issues, indicating that materials should be specified using the format ZZAAA instead of ZZ000 for neutron transport.
  • Some participants note that the problem file may contain numerous mistakes that require careful line-by-line correction.
  • One participant mentions fatal errors related to missing data files when trying to compile MCNPX code, expressing confusion about how to resolve these errors.
  • Another participant provides specific corrections regarding the syntax for defining particle types and suggests proper material definitions for various elements.
  • A participant points out that the DATAPATH variable may not be set correctly, which could lead to data file access issues in MCNPX.

Areas of Agreement / Disagreement

Participants generally agree that there are issues with library configurations and data file accessibility, but there is no consensus on the exact nature of the problems or the best solutions. Multiple competing views on how to address the errors remain present.

Contextual Notes

Limitations include potential misunderstandings of error messages, dependencies on specific library setups, and unresolved details regarding the implementation of the MCNP code.

elua0105
Messages
2
Reaction score
0
Hello, I am a student who started studying MCNP. I'm not used to writing in English, so I'd appreciate it if you could understand even if there were grammatical errors in my thread.

I want to check the energy of gamma rays from neutrons reacting with matter. So, I wrote this in the content of the data card.

C data card
mode n p
imp:n 1 1 1 1 1 1 1 1 0
imp:p 1 1 1 1 1 1 1 1 0
F8:p 1
E8 0 98i 11
F5:p 0 0 1 0
Sdef pos 5 5 10 ERG=25 PAR=1
phys:p 100 1 1 -1 0
phys:n 100 0 0 0 0
M1 ~~~
M2 ~~~
...
nps 100000

I've used the code for shooting photons several times, but I'm not sure what the problem is because it's my first time shooting neutron.
Can you tell me where the problem is or if you have any information site to refer to?

Thank you
 
Engineering news on Phys.org
Hi,

It's easier to help if you send either the full problem, or a minimal problem that still shows the error.

Also if MCNP is reporting an error, what is the error, or if it's reporting a result incorrectly, what is it reporting and what should it be reporting?
 
Alex A said:
Hi,

It's easier to help if you send either the full problem, or a minimal problem that still shows the error.

Also if MCNP is reporting an error, what is the error, or if it's reporting a result incorrectly, what is it reporting and what should it be reporting?
Thanks for your reply.
When I used the code through the mcnpx, the mcnpx didn't work completely and seemed to have errors with some warning phrases. So I implemented it with a visual editor, and the following warning came up.

캡처.JPG
zs.JPG

I guess there was probably a problem setting up phys or imp:n because it's okay to shoot only photons except Neutron. But I don't know exactly where the problem is and how to fix it.

Thank you so much for taking the time to care my question.
 
First I think you have a library problem.
For a neutron transport, materials must be write ZZAAA not ZZ000. For example 1001 not 1000 ; 8016 not 8000
 
  • Like
Likes   Reactions: Asmae SAADI and Alex A
Some libraries use ZZ000 for natural abundance elements, but that is very patchy. There clearly is a library problem. Some surfaces are the same as other surfaces, so the problem needs attention.

To me the problem file seems to contain a lot of mistakes and probably needs to be fixed line by line.
 
  • Like
Likes   Reactions: PSRB191921
Hi,
I'm trying to calculate the number of photons-neutrons produced when an electron beam hits a target, but when compiling the MCNPX code, I find these fatal errors, and actually I don't understand them and how I can solve them:
fatal error. missing gdr.dat file.
fatal error. missing CEM data file(s).
fatal error. more than one particle-type designator
 

Attachments

  • ext.PNG
    ext.PNG
    7.5 KB · Views: 161
  • Qn2.PNG
    Qn2.PNG
    4.9 KB · Views: 207
First you cannot write f2:p,n but :
F2:n 23
F12:p 23

Second you have problem with the libraries
For W write
M1 74182 -.3 74183 -.1 74184 -.3 74186 -.3

For pb :
M3 80206 -.24 80207 -.22 80208 -.52

For kapton :
M2 6000 22 7014 2 8016 5
Mx2:p 6012 j j

For your source I think there is a mistake I would have written something like :
Sdef pos=0 0 0 erg=18 par=3 vec = 0 0 -1 dir=1 rad=d1
 
  • Like
  • Informative
Likes   Reactions: rpp and Alex A
@Asmae SAADI ,
mcnpx cannot find your data files. Most probably your DATAPATH variable is not set, or not set correctly. Your xsdir file is presumably present, or you would get a different error. I have mine edited so the first line looks like
Code:
DATAPATH=/media/alex/path/to/MCNP_DATA/
(I am in linux)
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
6
Views
7K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
6
Views
2K