Why is my SSW/SSR code not producing readable output from a KCODE run?

  • Thread starter Thread starter 19matthew89
  • Start date Start date
Click For Summary
SUMMARY

The forum discussion centers on issues encountered when using SSW (Surface Source Writer) and SSR (Surface Source Reader) in MCNP (Monte Carlo N-Particle Transport Code) simulations, particularly when transitioning from KCODE (criticality calculations) to non-KCODE setups. The user faced errors indicating that no particles were accepted from the generated output file "output_ssw.w" and received warnings about particle type conversion failures. The resolution involved removing the HSRC (History Source) card, which was conflicting with the SSW card, allowing for successful generation of a readable output file.

PREREQUISITES
  • Familiarity with MCNP 6.0 syntax and command structure
  • Understanding of KCODE and its application in criticality calculations
  • Knowledge of SSW and SSR functionalities within MCNP
  • Experience with particle source definitions in MCNP simulations
NEXT STEPS
  • Review the MCNP 6.0 manual for detailed instructions on SSW and SSR usage
  • Experiment with different particle definitions using SDEF to understand source behavior
  • Investigate the implications of using the HSRC card in conjunction with SSW
  • Learn about file size verification techniques to ensure proper particle output in SSW
USEFUL FOR

Researchers, physicists, and simulation engineers working with MCNP who are involved in generating and reading surface sources, particularly those transitioning from criticality calculations to other simulation setups.

19matthew89
Messages
46
Reaction score
12
TL;DR
SSW/SSR works with SDEF run but not with KCODE run
Hi everyone,

I am trying to use SSW to write a surface source starting from a criticality calculation (i.e. a KCODE run). I am trying to write all the particles entering a cylindrical cell.
The code seems running smoothly and at last I end up having a file "output_ssw.w" which I expect to be the source code.

However, when I run the code trying to use that file as input file with SSR, launching the code as

Code:
MCNP  i=input.i n=output. RSSA=output_ssw.w

I keep on receiving this error:
"no particles accepted from the output_ssw.w file".
I also tried to have it opened with MCPL and I receive this error:
"ssw_load_particle WARNING: Could not convert raw MCNP6 SSW type (16777212) to pdg code
Warning: ignored particle with no PDG code set (raw ssw type was 16777212)."

If instead I try to run a simple run with an SDEF source (a sphere emitting neutrons inwards), no KCODE, and I use SSW to write the surface file "test.w", then it works and if I then try to emply it in a SSR run, the simulation works smoothly.

Do you know where the issue could be? Are SSW/SSR only suitable to write and read surface source from an SDEF simulation?

Thanks in advance
 
Last edited:
Engineering news on Phys.org
I struggled a long time with SSW/SSR. Never got confident with it. I especially had difficulty going from KCODE calcs to non-KCODE. I can only offer some things that I found that were tripping me up. Maybe they are not relevant to you.

First: Read the manual VERY carefully and VERY thoroughly regarding this feature. Make sure you are doing the syntax correctly. Look at the examples.

Be sure you are correctly writing the file using the SSW. You can get some indication by looking at the size of the file it creates. If you double the number of particles you expect to get written, does it (pretty close) double the size of the file? You can experiment with small numbers of files, like a few thousand.

Be sure you are using the SSR correctly. I had a huge amount of trouble figuring out how many particles were supposed to be in the file and how many to ask for when I used the SSR. And after that, how to normalize things. (But you are not getting that far.)
 
  • Like
Likes   Reactions: Alex A and 19matthew89
Grelbr42 said:
I struggled a long time with SSW/SSR. Never got confident with it. I especially had difficulty going from KCODE calcs to non-KCODE. I can only offer some things that I found that were tripping me up. Maybe they are not relevant to you.

First: Read the manual VERY carefully and VERY thoroughly regarding this feature. Make sure you are doing the syntax correctly. Look at the examples.

Be sure you are correctly writing the file using the SSW. You can get some indication by looking at the size of the file it creates. If you double the number of particles you expect to get written, does it (pretty close) double the size of the file? You can experiment with small numbers of files, like a few thousand.

Be sure you are using the SSR correctly. I had a huge amount of trouble figuring out how many particles were supposed to be in the file and how many to ask for when I used the SSR. And after that, how to normalize things. (But you are not getting that far.)
Thanks for the inouts.

Yeah...I thought (or simply hoped) that the runs with SSW/SSR would be easier and more straightforward but I'm really struggling understanding what is happening.
If I use first KCODE in the setup I'd like to use to write the source file it seems to work but it's not.

But if I use a simpler setup then it produces a working .w file. SO it seems there's something conflicting with SSW in my model. But I'm really having a hard time discovering it...
 
Solved issue: apparently there is a conflict between the simultaneous use of the HSRC card and SSW.

Once I removed the HSRC card, the SSW card worked perfectly fine and producing readable .w output file.
 
  • Informative
Likes   Reactions: Alex A

Similar threads

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