MCNP6.2 - Source particle started in a cell of zero importance

Click For Summary

Discussion Overview

The discussion revolves around the challenges of defining a surface source in MCNP6.2 for a cylindrical geometry, particularly focusing on the implications of setting the importance of certain regions to zero and the resulting errors encountered during execution. Participants explore various approaches to address the issue of particles starting in a cell of zero importance and the handling of lost particles.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes their approach of setting the importance inside the cylinder to zero to prevent distortions but encounters an error indicating that particles are starting in a cell of zero importance.
  • Another participant suggests shifting the source slightly off the cylinder to avoid the zero importance issue and inquires about the use of the SB card for normalization.
  • Concerns are raised about lost particles, with one participant indicating that this often points to a bug in the geometry, such as regions not being filled correctly.
  • Several participants discuss the use of the SDEF card and the NRM option to control the direction of particles emitted from the surface, suggesting that a random distribution could be beneficial.
  • One participant mentions the complications that arise when using specific geometries, such as tangential surfaces or toroidal shapes, which can lead to particle loss.
  • Another participant explains their use of a degenerate volumetric source and the challenges faced when trying to set the importance of different regions, noting that changing the importance leads to errors related to lost particles.
  • Questions are raised about the implications of using air versus vacuum in the external region and whether to define a distribution for the VEC to ensure particles start inwards.
  • One participant expresses confusion regarding the distributions used and the concept of a degenerate surface, seeking clarification on how luminosity is maintained across the geometry.

Areas of Agreement / Disagreement

Participants express differing opinions on the best approach to resolve the issues with the surface source and lost particles. There is no consensus on a single solution, as multiple strategies are proposed and debated.

Contextual Notes

Participants note that the geometry setup and the definitions of regions play a crucial role in the behavior of the simulation, with specific configurations leading to unexpected errors. The discussion highlights the complexity of managing particle sources and geometry in MCNP.

19matthew89
Messages
46
Reaction score
12
TL;DR
Error with SDEF for particle starting in a cell with zero importance
Hi everyone,

My plan is defining a surface source on a cylindrical object (cylindrical surface+top end+bottom end) and I am interested in what happens outside the cylindrical body. To avoid distortions of particles starting on the surface, directed inwards and emerging on the other side of the body, I set the importance inside the cylinder =0 so that all the particles entering the inner region are killed (keeping in mind to double the probability of particles for normalization as half of them are terminated).
However, this seems to be an issue as the error "source particle started in a cell of zero importance" stops the execution of the code.

I didn't think that was a problem.

How do you recommend to solve it?

  1. The first idea is to shift slightly off the source so that all the particles are started in a cell of importance different than 0 and, in case they move inwards they'll just cover a little distance and then be killed
  2. Use maybe the card SB? But I have not really understood how this works for normalization. Is normalization not affected because weights are already modified to keep SB into account?
  3. Do you have any other recommendation?
Thanks in advance
 
Engineering news on Phys.org
P.S. I tried implementing option 1. but I bump into another error: "mcnp run terminated because 10 particles got lost".
 
It might help if you posted your input file.

I'm guessing you are using an SDEF card to specify your source. Look at the NRM option for the SDEF card. This lets you specify the normal to the surface you start particles on. If you specify NRM=1 (if I am remembering correctly) it will start all the particles going straight out from the surface. So if it's a cylinder, they all start going radially out from it. There are other options possible for NRM. For example, you could specify a random distribution of some kind so that the particles start at randomly selected angles to the surface, with a range.

Lost particles usually indicate a bug in your geometry. Either a region is not filled or it is doubly filled or some such thing.

Also, MCNP has trouble with some specific geometry situations that you would think would be OK.
For example, if a cylinder is tangent to a surface then MCNP can lose particles near the contact point. Or if you are using a torus that has its small radius much smaller than its large radius, it can lose particles. That is like a bicycle tire that is very thin relative to the the size of the wheel. Or if you try to make "pizza slices" by intersecting plane surfaces at other than 90 degrees, it can lose particles near the pointy part of the slices.

Each of these has its own work-arounds. For example, don't try to use a torus to make a 90 degree corner in a pipe. Instead make the pipe out of squared off corners and don't try to make the corner round.
 
  • Like
Likes   Reactions: Alex A
Grelbr42 said:
It might help if you posted your input file.

I'm guessing you are using an SDEF card to specify your source. Look at the NRM option for the SDEF card. This lets you specify the normal to the surface you start particles on. If you specify NRM=1 (if I am remembering correctly) it will start all the particles going straight out from the surface. So if it's a cylinder, they all start going radially out from it. There are other options possible for NRM. For example, you could specify a random distribution of some kind so that the particles start at randomly selected angles to the surface, with a range.

Lost particles usually indicate a bug in your geometry. Either a region is not filled or it is doubly filled or some such thing.

Also, MCNP has trouble with some specific geometry situations that you would think would be OK.
For example, if a cylinder is tangent to a surface then MCNP can lose particles near the contact point. Or if you are using a torus that has its small radius much smaller than its large radius, it can lose particles. That is like a bicycle tire that is very thin relative to the the size of the wheel. Or if you try to make "pizza slices" by intersecting plane surfaces at other than 90 degrees, it can lose particles near the pointy part of the slices.

Each of these has its own work-arounds. For example, don't try to use a torus to make a 90 degree corner in a pipe. Instead make the pipe out of squared off corners and don't try to make the corner round.
Thanks!
Yeah, indeed I'm using SDEF to define my source, however I didn't use NRM as I could not really use a surface since both cylinder surface and planes defining the cylinder cell are infinite. I know that in theory I could use macrobodies to define a finite cylinder and and then use the associated surface to employ NRM keyword but I'd prefer not to use macrobodies as this is just supposed to be only first step and geometry could get much more difficult than a mere cylinder later so I'd like to understand the code in this setup.

So what I did (see the code), was to define a degenerate volumetric source. In the code I implemented the other case I'm interested in (namely only the inside of the cylinder) and so I set kind of the opposite of what I had written in the original post, i.e. IMP:N 1 inside the cylinder and 0 outside the cylinder. But the issue is of course the same and...as soon as the first particle is produced outside the cylinder I keep on getting again the error: "the source particle started in a cell of zero importance".

If I set instead the importance of the cell 2 equal to 1 the code stops automatically after 10 particles being lost. The particles are actually expected to be lost in passing from a well defined material (the cylinder of cell 1) to a vacuum material like the one of the cell 2. So I'm not much surprised about this. Of course I could use the card LOST to enable more particle loss and in this case the code would run smoothly.

My question is now...which approach would you use?
  • Setting IMP=1 and adding the card LOST? If so, is there any tricky point in the normalization procedure I should beware of, in this case?
  • Filling the external sphere with air instead of vacuum?
  • Would you define a distribution also for the VEC so to be sure that, all the times, the particle starts only inwards? even if, I surmise that with this setup the problems of lost particles would simply pop up again.
Thanks
 

Attachments

I'm a little fuzzy on distributions. I don't follow what the ds cards do, but you have a very involved source which includes distributions for RAD. What makes this a degenerate surface?
 
Alex A said:
I'm a little fuzzy on distributions. I don't follow what the ds cards do, but you have a very involved source which includes distributions for RAD. What makes this a degenerate surface?
Hi.

Yeah..it's already pretty involved and actually it is a simplification with respect to the real source I have in mind o_O

The DS cards just define other distributions given by the following SI/SP.

By the way, the source is a degenerate column because for the top and bottom end it samples a disk (see SI31/SP31 and SI33/SP33) while for the lateral surface SI32/SP32 a constant radius is given and sampled with probability 1.

So in this way I manage to define a volume but with one dimension being zero and so it's a surface.
 
This is an issue with the neutrons appearing on the boundary of cells in the geometry and I think you knew that. Changing the geometry very slightly avoids the issue, so for me option 1 is the way to go. Your source is a surface, and I still don't fully understand it, for example what sets the luminosity per unit area of the edges to be the same as the cylinder?

Code:
10  CZ  0.750001
11  PZ  -7.00001 
12  PZ  7.00001
Sees to work fine for me,

Code:
10  CZ  0.749999
11  PZ  -6.99999 
12  PZ  6.99999
also sees to work fine (with the importance of the first two cells reversed).

I'm not seeing the particles getting lost error, that is normally the result of a volume in the problem that isn't assigned to a cell in the geometry. Maybe it's an error you have that is only showing itself because the source is working.
 
  • Informative
Likes   Reactions: 19matthew89
Alex A said:
This is an issue with the neutrons appearing on the boundary of cells in the geometry and I think you knew that. Changing the geometry very slightly avoids the issue, so for me option 1 is the way to go. Your source is a surface, and I still don't fully understand it, for example what sets the luminosity per unit area of the edges to be the same as the cylinder?

Code:
10  CZ  0.750001
11  PZ  -7.00001
12  PZ  7.00001
Sees to work fine for me,

Code:
10  CZ  0.749999
11  PZ  -6.99999
12  PZ  6.99999
also sees to work fine (with the importance of the first two cells reversed).

I'm not seeing the particles getting lost error, that is normally the result of a volume in the problem that isn't assigned to a cell in the geometry. Maybe it's an error you have that is only showing itself because the source is working.
Hi!

Thanks a lot. These solutions actually work and indeed I also got no error of particles getting lost.

I actually didn't know (although I had guessed) that MCNP would complain about neutrons appearing on the boundary of a cell.
And for what concern the intensity of the 3 sources (top end, lateral surface and bottom end) I just put equal values for this simple test code but of course, in what I aim to do, the luminosity would be different.

Thanks again!
 
  • Like
Likes   Reactions: Alex A

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
Replies
3
Views
3K
Replies
6
Views
7K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 20 ·
Replies
20
Views
19K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K