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

  • Thread starter 19matthew89
  • Start date
In summary, the issue is that there is a conflict between the simultaneous use of the HSRC card and SSW.
  • #1
19matthew89
47
12
TL;DR Summary
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
  • #2
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 Alex A and 19matthew89
  • #3
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...
 
  • #4
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 Alex A

1. Why is my code not producing any output?

There could be several reasons for this. First, check if your code is actually being executed. Make sure you have included a print statement or some other way of displaying output. Also, check for any errors in your code that may be preventing it from running properly.

2. Why is my output not readable?

There could be a few reasons for this. One possibility is that your code is producing output, but it is not in a format that is easily readable. Check your code to see if you are properly formatting your output. Another possibility is that there is an error in your code that is causing the output to be garbled or unreadable.

3. Why is my code only producing partial output?

This could be due to a few different reasons. One possibility is that your code is only executing part of the code, so only part of the output is being produced. Check for any conditional statements or loops that may be preventing the rest of the code from running. Another possibility is that there is a bug in your code that is causing it to stop before completing all of the necessary computations.

4. Why is my output different than what I expected?

There could be a few reasons for this. First, check to see if your code is producing any errors or warnings. These can often provide clues as to why the output is different than expected. Also, make sure you are using the correct input values and that your code is performing the correct calculations. If you are still unsure, try stepping through your code line by line to see where the discrepancy may be occurring.

5. Why is my code not producing any output at all?

There are a few possible reasons for this. First, check to see if your code is actually being executed. Make sure there are no syntax errors or other issues that may be preventing your code from running. Also, check to see if your code is stuck in an infinite loop, which would prevent any output from being produced. If you are still having trouble, try reaching out to others for help or debugging your code more thoroughly.

Similar threads

  • Nuclear Engineering
Replies
1
Views
1K
Replies
1
Views
1K
Replies
2
Views
2K
  • Nuclear Engineering
Replies
1
Views
1K
  • Nuclear Engineering
Replies
6
Views
2K
Replies
6
Views
1K
Replies
7
Views
2K
  • Nuclear Engineering
Replies
1
Views
2K
  • Nuclear Engineering
Replies
1
Views
3K
  • Programming and Computer Science
Replies
6
Views
2K
Back
Top