MCNP Guide
Basic MCNP Optimization
Introduction to Variance Reduction
Sometimes MCNP simulations can take a long time or give uncertain results. Variance reduction techniques help us get better results faster by focusing the simulation on the most important parts of our problem.
Why Use Variance Reduction?
- Get results faster
- Improve accuracy in important regions
- Make difficult calculations possible
- Focus on areas we care about
When to Use It
- Thick shielding problems
- Small detector regions
- When results are too uncertain
- When runs take too long
Cell Importances
The simplest way to improve your simulation is to use cell importances. This tells MCNP which regions are more important to focus on.
Basic Importance Example
c Simple shield with increasing importance
1 1 -2.35 -1 imp:n=1 $ Source region
2 1 -2.35 1 -2 imp:n=2 $ First layer
3 1 -2.35 2 -3 imp:n=4 $ Second layer
4 1 -2.35 3 -4 imp:n=8 $ Third layer
5 0 4 -5 imp:n=8 $ Detector region
6 0 5 imp:n=0 $ Outside world
c Surfaces
1 so 10 $ Inner sphere
2 so 20 $ Layer 1
3 so 30 $ Layer 2
4 so 40 $ Layer 3
5 so 50 $ Outer boundaryAs particles move through the shield, their importance doubles. This helps more particles reach the detector region.
Importance Tips
- Increase importance gradually (usually by factors of 2-4)
- Keep importance the same in similar regions
- Use importance=0 for regions you don't care about
- Higher importance = more particles in that region
Source Biasing
Sometimes we want to start more particles in certain directions or with certain energies that are more likely to contribute to our results.
Direction Biasing Example
c Source pointing toward detector
SDEF PAR=n POS=0 0 0 ERG=14
VEC=1 0 0 $ Point in +x direction
DIR=D1 $ Use direction distribution
SI1 -1 0.9 1 $ Cosine bins
SP1 0 0.1 0.9 $ More particles toward +xThis source definition sends more particles toward the +x direction, which might be where our detector is located.
Energy Cutoff
We can save time by stopping particles when their energy gets too low to be important.
Energy Cutoff Example
c Stop tracking at low energies
CUT:n 0.01 $ Stop neutrons below 10 keV
CUT:p 0.001 $ Stop photons below 1 keV
MODE n p $ Track both particlesThis stops tracking particles when they're too low energy to matter, saving computation time.
Key Points to Remember
- Start with cell importances - they're simple and effective
- Use source biasing when you know where particles need to go
- Set energy cutoffs to save computation time
- Always check that your results make physical sense
- Start simple and add optimization as needed