Help with neutron spectroscopy experiments in MCNP code

In summary, the document discusses the use of MCNP (Monte Carlo N-Particle Transport Code) for performing neutron spectroscopy experiments. It outlines the principles of neutron interactions with matter, the setup of MCNP simulations to model these interactions, and the analysis of results to extract spectroscopic information. The focus is on optimizing simulation parameters and interpreting data to improve experimental accuracy and reliability. The document serves as a guide for researchers looking to leverage MCNP for neutron spectroscopy applications.
  • #1
Hamidul
21
5
Hello everyone, currently I am doing a neutron spectroscopy experiments. I am doing it with the MCNP code. I designed my Geometry there, but facing problems in data cards, is there anyone who can help me in this sector?
 
Engineering news on Phys.org
  • #2
Welcome to PF.

Can you say what kind of problems you are having in your data cards? The more information you can provide, the better we will be able to help you.
 
  • Like
Likes Hamidul
  • #3
Thank you Berkeman for your reply. I was not able to run the program, it shows error. The document I uploaded below is my cell and surface card. My californium source is in cell 1 within surface no. 80 . I need to measure surface flux of neutron across surface 111.1 ( helium-3) surface. My source will radiate only from the radial part of 80 number cyllinder..In my experiments , I need to find out neutron spectroscopy. Thank you for your response , for additional information, please reply.
 

Attachments

  • doc for physics forum.txt
    2.2 KB · Views: 73
Last edited:
  • #4
The sdef card is incomplete, for a simple test a single value of energy will work. Cf sources produce neutrons by spontaneous fission, so a better source definition would use a fission spectrum, does that make sense? There is a good example of a californium source on this forum you could try searching for.

There also seem to be geometry errors. Are you aware that cells must not overlap? All locations must be inside a cell, and no points can be inside more than one cell. I will continue to look at this, I think the problem may be one or more polyethyene cylinders.
 
  • Informative
  • Like
Likes berkeman and Hamidul
  • #5
Thank you, Alex. I modified the source card and use the surface 80 as the source. But it shows fatal error, illegal antry 0. Nevertheless the code runs, but gives no output !!! If I define the source card as pos=0 0 0 , it shows no fatal errors, but the code does not run !
 

Attachments

  • presentworking.txt
    2.2 KB · Views: 61
  • Screenshot 2023-11-13 111118.png
    Screenshot 2023-11-13 111118.png
    35.3 KB · Views: 74
  • #6
Does your source need to be a cylinder? That is possible, but complicated. It needs to be constructed from distributions. Surface 80 is composite (it's really three infinite surfaces) which is why that fails.

EXT takes a single variable, which is why the second coordinate in your attempt "0" produces an error.

POS=0 0 0 I think is the default, so just setting an energy should let it work fine as a point source if you want to start with that.

Your tally needs energy bins (an e card) if you want to do spectroscopy on the neutrons.
 
  • #7
Hello Alex, if I put POS= 0 0 0 , the code does not run ........... :cry: . It shows error in the run section .

would you please see the output file I attatched? I TRY TO RUN THE SAME CODE which shows on this output, but this time it does not work, it shows error. MOREVER , i did not find ant tally in this output file across my desired surface..
 

Attachments

  • running output.txt
    32.2 KB · Views: 84
  • #8
The problem you ran has
Code:
   42-       sdef erg=100 par=1 sur=80 ext=0 0 1.96 rad=0.47                                 
 warning.  ext is constant.  in most problems it is a variable.
 fatal error.  illegal entry:  0
Running just 'sdef erg=100 par=1' should work as explained above.

Your e card is good but it needs to be e2 to match the f2 and they should be together, f2 first.

A minor thing, but erg is in MeV so 100 Mev is quite high for neutrons it does not need fixing now but your high value for the e card should probably exceed 100 to show everything.

Code:
f2:n 111.1
e2 0 224i 101
nps 30000
 
  • #9
Hello Alex, would you please check the code? It is running but , I did not get any data. In my visual data it shows all the nps .
 

Attachments

  • presentworking2.txt
    2.2 KB · Views: 72
  • outp.txt
    3.7 KB · Views: 66
  • #10
you have a problem with your library :
try with this material :
m1 98252.60c -1 $MAT1
m2 6000.60c -5e-005 $MAT2
25055. -0.0161 15031. -0.00012 16032. -9e-005
14028. -0.0037 24054. -0.1696 28058. -0.0362
42098. -0.0229 26054. -0.6516
m4 13027. -1 $MAT4
m5 6000.60c -0.000124 $MAT5
7014.60c -0.755268 8016.70c -0.2231781 18040.70c -0.012827
m6 2003. -1 $MAT6
m8 6000. 2 $MAT8
1001.
 
  • Like
Likes Hamidul
  • #11
Hamidul, is outp.txt uploaded in error? It does not contain what I would expect.
 
  • #12
Alex A said:
Hamidul, is outp.txt uploaded in error? It does not contain what I would expect.
No dear , this is exactly the output what I got . I recheck after uploading. This is also a matter of sadness for me for few days !!!
 
  • #13
I have to find out neutron spectroscopy over a surface. Should i use Whatt fission spectrum distribution ?
 
  • #14
PSRB191921 said:
you have a problem with your library :
try with this material :
m1 98252.60c -1 $MAT1
m2 6000.60c -5e-005 $MAT2
25055. -0.0161 15031. -0.00012 16032. -9e-005
14028. -0.0037 24054. -0.1696 28058. -0.0362
42098. -0.0229 26054. -0.6516
m4 13027. -1 $MAT4
m5 6000.60c -0.000124 $MAT5
7014.60c -0.755268 8016.70c -0.2231781 18040.70c -0.012827
m6 2003. -1 $MAT6
m8 6000. 2 $MAT8
1001.
Hi dear, After modifying and running the code I got these output. Do I have any issues with my software?
 

Attachments

  • Screenshot 2023-11-18 155434.png
    Screenshot 2023-11-18 155434.png
    40.4 KB · Views: 51
  • presentworking2.txt
    2.2 KB · Views: 57
  • outp.txt
    3.7 KB · Views: 51
  • #15
You are not deleting your out files and run files. So your output file should not be called outp. It might be called outq or outa, or something else, I can't read the screenshot. Are you posting the newest file made by the program?
 
  • Like
Likes Hamidul and PSRB191921
  • #16
for Cf-252 you must simulated a watt spectra:
SDEF erg=d1
SP1 -3 1.025 2.926
 
  • Informative
  • Like
Likes Hamidul and Alex A
  • #17
Alex A said:
You are not deleting your out files and run files. So your output file should not be called outp. It might be called outq or outa, or something else, I can't read the screenshot. Are you posting the newest file made by the program?
actually there was issues with my laptop , code runs here but did not produce any data. I run it to another laptop, it give me data, but that was not enough for getting spectra,
 

Attachments

  • pw2.txt
    2.2 KB · Views: 80
  • outp.txt
    3.7 KB · Views: 57
  • #18
Ohhhhhh! I think you have an incorrect character, most probably in your xsdir file. The line should have "C:\Program Files (x86)\LANL\MCNPDATA" if that is where your cross section files are, but instead of C is something not ASCII, that causes MCNP to break and also gedit to break. It might be unicode.

So open your xsdir file, it should be in the same dir that mcnp is in and the first line should tell mcnp where your cross section files are. Edit that to make it correct.
 
  • Like
Likes Hamidul
  • #19
PSRB191921 said:
for Cf-252 you must simulated a watt spectra:
SDEF erg=d1
SP1 -3 1.025 2.926
I modified the output as of your code
SDEF erg=d1
SP1 -3 1.025 2.926

the output file and the corresponding exel graph is uploaded below
 
  • #20
don't forget your "pos=" and your "par=" in the sdef
 

FAQ: Help with neutron spectroscopy experiments in MCNP code

How do I set up a basic neutron source in MCNP for spectroscopy experiments?

To set up a basic neutron source in MCNP, you need to define the source particles, their energy distribution, and spatial distribution. This is typically done using the SDEF (Source Definition) card. For example, to define a monoenergetic point source, you might use:

SDEF POS=0 0 0 ERG=2.45
This sets the source at the origin (0,0,0) with an energy of 2.45 MeV. You can customize the source further by specifying different distributions and parameters as needed for your experiment.

What tally options are available in MCNP for neutron spectroscopy, and how do I use them?

MCNP offers several tally options for neutron spectroscopy, including F4 (flux tally), F5 (point detector tally), and F8 (energy deposition tally). For neutron spectroscopy, the F4 tally is commonly used to measure neutron flux in a cell, and the F8 tally can be used to measure energy deposition, which can be correlated with neutron spectra. To use an F4 tally, you might include:

F4:N 1
where 'N' indicates neutrons and '1' is the cell number. You can refine this tally with energy bins using the E4 card to get spectral information.

How can I model a detector in MCNP for neutron spectroscopy experiments?

Modeling a detector in MCNP involves defining the geometry of the detector, the materials it is made of, and the appropriate tallies to record the interactions. For instance, if you are using a helium-3 detector, you would define the detector region with helium-3 gas and use an F8 tally to measure the energy deposition. You might set up the geometry and tally like this:

CELL 1 0 -1 IMP:N=1CELL 2 1 -2 IMP:N=1MATERIAL 1 2004.70c 1.0F8:N 2
This sets up a simple helium-3 detector and uses an F8 tally to record the neutron interactions within the detector cell.

What are common sources of error in neutron spectroscopy simulations in MCNP, and how can I minimize them?

Common sources of error in neutron spectroscopy simulations include incorrect source definitions, improper tally settings, and inadequate statistical sampling. To minimize these errors, ensure your source definition accurately represents the physical source, verify that your tallies are correctly set up to capture the desired data, and run sufficient particles to achieve statistically significant results. Additionally, using variance reduction techniques such as importance sampling and weight windows can help improve the efficiency and accuracy of your simulations

Back
Top