Help with neutron spectroscopy experiments in MCNP code

  • #1
Hamidul
21
4
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: 36
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: 37
  • Screenshot 2023-11-13 111118.png
    Screenshot 2023-11-13 111118.png
    35.3 KB · Views: 35
  • #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: 38
  • #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: 38
  • outp.txt
    3.7 KB · Views: 37
  • #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: 25
  • presentworking2.txt
    2.2 KB · Views: 28
  • outp.txt
    3.7 KB · Views: 26
  • #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: 39
  • outp.txt
    3.7 KB · Views: 27
  • #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
 

1. What is MCNP and how is it used in neutron spectroscopy experiments?

MCNP (Monte Carlo N-Particle) is a general-purpose Monte Carlo radiation transport code designed to track all types of particles over an extended range of energies. In neutron spectroscopy experiments, MCNP is used to simulate the interaction of neutrons with materials to predict the neutron energy spectrum. This is crucial for designing experiments and interpreting experimental data, especially in complex scenarios where analytical solutions are not feasible.

2. How do I model a neutron source in MCNP for spectroscopy experiments?

In MCNP, a neutron source can be modeled using the 'SDEF' card, which specifies the source definition including the particle type, energy distribution, and spatial distribution. For neutron spectroscopy, you typically define the energy spectrum of the source to match the expected experimental conditions or to explore the response of the system to different neutron energies. It's important to accurately model the source to ensure that the simulation results are representative of the real-world scenario.

3. What materials should I use in my MCNP simulation for neutron spectroscopy?

The choice of materials in an MCNP simulation for neutron spectroscopy depends on the specific objectives of the experiment. Commonly, materials with known neutron interaction cross-sections are used to calibrate the system or to serve as targets. Materials such as polyethylene, boron, cadmium, and lead are frequently used because of their distinct neutron absorption or scattering properties. Ensure that the material definitions in your MCNP input file accurately reflect the isotopic composition and density of the materials used in the experiment.

4. How do I analyze the output of a neutron spectroscopy experiment simulated in MCNP?

MCNP provides various output files that contain detailed information about the particle transport simulation. For neutron spectroscopy, the most relevant output is typically found in the tally results, which provide the neutron flux or reaction rates as a function of energy. Analyzing these tallies involves extracting the energy spectrum of the neutrons and comparing it to theoretical predictions or experimental measurements. Tools like MCNPX Visual Editor or Python scripts can be used to parse and visualize the data for easier analysis.

5. What are common challenges in simulating neutron spectroscopy experiments in MCNP and how can they be addressed?

Common challenges in simulating neutron spectroscopy experiments in MCNP include handling complex geometries, achieving sufficient statistical accuracy, and managing long computation times. These issues can be addressed by optimizing the geometry definition to reduce unnecessary complexity, increasing the number of simulated particles (while balancing computational resources), and using variance reduction techniques to improve the statistical quality of important regions in the simulation. Regularly validating the simulation setup against known benchmarks or simpler models can also help ensure accuracy and reliability of the results.

Similar threads

  • Nuclear Engineering
Replies
17
Views
1K
Replies
5
Views
2K
Replies
5
Views
1K
Replies
11
Views
2K
Replies
2
Views
2K
  • Nuclear Engineering
Replies
7
Views
2K
Replies
3
Views
1K
  • Nuclear Engineering
Replies
6
Views
210
  • Nuclear Engineering
Replies
2
Views
2K
Back
Top