A Comprehensive Guide to the MCNP Source Card (SDEF): Definitions, Defaults, and Practical Examples
A Comprehensive Guide to the MCNP Source Card (SDEF): Definitions, Defaults, and Practical Examples
Introduction
In Monte Carlo N-Particle (MCNP) simulations, accurately defining the source of particles—the starting point for their random journeys—is paramount. The correctness of the source definition directly and profoundly impacts the validity of the final results. An incorrect source can render even the most sophisticated geometry and tallies meaningless. MCNP's primary and most versatile tool for this task is the SDEF (Source DEFinition) card. This article provides a comprehensive overview of the SDEF card, its parameters, default behaviors, and illustrates its use with five distinct, practical examples.
1. An Overview of the SDEF Card
The SDEF card is a highly flexible macro system that allows users to independently define the spatial, energy, directional, and other characteristics of the source particle. Its core philosophy is: "Create a particle with the following specifications."
Basic Syntax:
SDEF PAR=<particle type> [KEYWORD=ARGUMENT] [KEYWORD=ARGUMENT] ...
-
PAR: Specifies the particle type. Common values arePAR=Nfor neutron,PAR=Pfor photon, andPAR=Efor electron. If omitted, MCNP defaults to neutron (PAR=1). -
KEYWORD: A specific keyword that defines a particular source characteristic (e.g., position, energy, direction). -
ARGUMENT: The value or definition corresponding to that keyword. This can be a constant, a function, a distribution, or a reference to another card.
The most powerful feature of SDEF is the independence of its parameters. You can choose an energy distribution independently from the spatial distribution. MCNP automatically combines these independent distributions to produce a particle with a complete set of properties.
2. Key SDEF Keywords and Their Functions
The following section categorizes and explains the most important SDEF keywords.
2.1. Position Keywords
These keywords determine the coordinates where a particle's journey begins.
-
POS: Defines the position vector of the source center asPOS=x y z. This is the simplest case for a point source.-
Example:
SDEF POS=0 0 0(A point source at the origin).
-
-
X, Y, Z: Define the x, y, and z coordinates independently, allowing for different distributions. This is essential for defining extended sources (e.g., boxes, cylinders).-
Example:
SDEF X=-1 1 Y=-1 1 Z=0(A planar, uniform source on the XY plane between -1 and 1).
-
-
RAD(RADius): Defines the radial distance from the origin. Used for spherical or cylindrically symmetric sources. -
EXT(EXTent): Defines the axial extent (height) of a cylindrical source. -
AXS(AXiS): Specifies the axis vector for cylindrical sources (e.g.,AXS=0 0 1for the Z-axis). -
SUR(SURface): Defines the source on a surface. Particles are emitted from this surface outward, typically following a cosine law. -
CEL(CELl): A highly useful keyword that defines the source within a specific cell. The particle's position is sampled uniformly from the volume of that cell.
2.2. Energy Keywords
-
ERG(ERGy): Defines the energy of the source particle. It can be a constant value or a distribution.-
Example:
ERG=2.45(Particles with a fixed energy of 2.45 MeV). -
Example:
ERG=D1(Energy is sampled from the distribution defined by theSI1andSP1cards).
-
-
SI(Source Information) andSP(Source Probability): These are separate data cards used to define discrete or continuous distributions for parameters like energy, position, and direction.-
SIn: Defines the bin boundaries (for histograms) or discrete values (for a distribution). -
SPn: Defines the probability associated with each bin or value.
-
2.3. Direction Keywords
-
DIR(DIRection): Specifies the direction vector of the particle. This is a unit vector.-
Example:
DIR=1 0 0(All particles move in the positive X-direction).
-
-
VEC(VECtor): Synonym forDIR. -
COS(COSine): Used for sampling the cosine of the angle relative to a specific axis. -
D: Similar toERG, it is used to define a directional distribution usingSInandSPncards.
2.4. Other Important Keywords
-
NRM(NoRMalization): Sometimes used for probability normalization. -
WGT(WeiGhT): Specifies the starting weight of the particle (default=1).
3. Default Behaviors and MCNP Logic
If a user does not define a keyword for a specific parameter, MCNP uses a default behavior. Understanding these defaults is crucial to avoid unintended errors.
-
Position: If no position keyword (
POS,X,Y,Z,CEL, etc.) is defined, MCNP defaults to a uniform distribution in the unit sphere. This means a spherical source with a radius of 1 cm centered at the origin. This rarely matches a real-world geometry, so defining the source position is almost always mandatory. -
Energy: If the
ERGkeyword is not defined, MCNP uses its default energy distribution, which for neutrons is a Watt Fission Spectrum. This can also lead to completely wrong results if your source has a different energy. Defining the energy is also almost always mandatory. -
Direction: If no direction keyword (
DIR,D, etc.) is defined, MCNP uses an isotropic distribution. This is a logical default for many applications. -
Time: The default start time is zero.
-
Weight: The default particle weight is 1.
Key Takeaway: There is no single "global default source." Defaults are applied to each parameter independently. A source defined with only SDEF and no additional keywords will be isotropic, with a fission spectrum, emitting from a 1 cm radius sphere at the origin.
4. Five Simple and Practical Source Configurations in MCNP
Here are five simple, practical, and executable source examples.
Configuration 1: Isotropic Point Source with Monoenergetic Particles
This is the simplest and most common configuration for testing geometry or simulating calibration sources.
Description: A point source at the origin emitting particles uniformly in all directions with a single, fixed energy.
Code Example:
c ====================== c Source Card c ====================== SDEF POS=0 0 0 ERG=2.45 PAR=P c c ====================== c Rest of the input file c ====================== mode p ...
Explanation:
-
POS=0 0 0: The source is a point at the origin. -
ERG=2.45: All photons have an energy of 2.45 MeV. -
PAR=P: The particle type is a photon. -
Direction is undefined, so it defaults to isotropic.
Configuration 2: Uniform Rectangular Planar Source
Used for simulating parallel beams (e.g., radiotherapy) or large-area sources.
Description: Particles are emitted from a defined rectangular area, perpendicular to the plane of the rectangle.
Code Example:
c ====================== c Source Card c ====================== SDEF X=-5 5 Y=-10 10 Z=0 DIR=0 0 1 ERG=0.662 PAR=P c c ====================== c Rest of the input file c ====================== mode p ...
Explanation:
-
X=-5 5: The X-coordinate is sampled uniformly between -5 and 5 cm. -
Y=-10 10: The Y-coordinate is sampled uniformly between -10 and 10 cm. -
Z=0: All particles start in the plane Z=0, creating a 10x20 cm rectangular plane. -
DIR=0 0 1: All particles move in the positive Z-direction, creating a perfectly parallel beam. -
ERG=0.662: Photon energy is 0.662 MeV (Cs-137 source).
Configuration 3: Volumetric Spherical Source with an Energy Spectrum
For simulating sources that are spread throughout a volume and have a complex energy spectrum (e.g., a hot plasma).
Description: Particles are distributed uniformly within a sphere, and their energy follows a defined spectrum.
Code Example:
c ====================== c Source Definition Cards c ====================== SDEF POS=0 0 0 RAD=D1 ERG=D2 PAR=N SI1 0 3 $ Histogram for radius: from 0 to 3 cm SP1 -21 2 $ Probability density for radius: r^1 (for uniform in volume) SI2 H 0.01 0.1 1.0 10.0 $ Energy bins: 0.01, 0.1, 1, 10 MeV SP2 0.0 0.3 0.6 0.1 $ Probabilities for each energy bin c c ====================== c Rest of the input file c ====================== mode n ...
Explanation:
-
RAD=D1: Radius is sampled from distribution 1. -
SI1 0 3: Radial range is from 0 to 3 cm. -
SP1 -21 2: This tells MCNP to use a uniform-in-volume distribution for a sphere. -
ERG=D2: Energy is sampled from distribution 2. -
SI2 H 0.01 0.1 1.0 10.0: Defines a histogram energy distribution. -
SP2 0.0 0.3 0.6 0.1: The relative probability for each energy bin. -
Direction is undefined, so it is isotropic.
Configuration 4: Cylindrical Surface Source
For modeling sources on the shell of a cylinder, like a Cobalt-60 source in an irradiator.
Description: Particles are emitted from the lateral surface of a cylinder, with their direction outward and following a cosine law.
Code Example:
c ====================== c Surface Cards c ====================== 1 RCC 0 0 0 0 0 20 5 $ A cylinder: Z from 0 to 20, radius=5 cm c c ====================== c Source Card c ====================== SDEF SUR=1 ERG=1.25 1.33 PAR=P c c ====================== c Rest of the input file c ====================== mode p ...
Explanation:
-
SUR=1: The source is defined on surface 1 (the cylinder shell). -
MCNP automatically samples particle positions uniformly over this surface.
-
Particle direction is automatically set to be normal to the surface at each point, with a cosine-law distribution outward.
-
ERG=1.25 1.33: Photon energies are sampled evenly between 1.25 and 1.33 MeV (Co-60 energies).
Configuration 5: Cell-Based Source with Conical Direction
For simulating sources with complex shapes that are difficult to define with simple surfaces, and for creating a conical beam.
Description: Particles are emitted uniformly from the volume of a specific cell, and all are directed towards a common point (the target).
Code Example:
c ====================== c Cell Cards c ====================== 1 1 -1.0 -10 imp:n=1 $ A complex source cell defined by surface 10 2 0 -20 imp:n=1 $ Outside world c c ====================== c Source Card c ====================== SDEF CEL=1 ERG=14 POS=0 0 0 VEC=1 0 0 DIR=1 c c ====================== c Rest of the input file c ====================== mode n ...
Explanation:
-
CEL=1: Particle positions are sampled uniformly from the volume of cell 1. This is a robust method for complex source geometries. -
ERG=14: Neutron energy is 14 MeV (DT fusion neutron). -
POS=0 0 0: In this context, this acts as the "target" point—the focal point of the beam. -
VEC=1 0 0: This is a helper vector defining the main beam axis (here, the X-axis). -
DIR=1: This parameter tells MCNP to create a conical beam. The direction vector for each particle is calculated to point from its starting location towards thePOStarget. The number 1 specifies that all particles are aimed precisely at the target (no angular spread). To create a cone with an opening angle, one would useDIR=D3and define an angular distribution withSI3andSP3.
5. Conclusion and Final Recommendations
The SDEF card is the beating heart of an MCNP simulation. The ability to use it correctly is a fundamental skill for any MCNP user.
-
Always define position and energy. Do not rely on defaults.
-
Use the
CELkeyword for complex volumetric sources. This method prevents many geometrical errors. -
Use the
SIandSPcards to define complex spectra. -
Never finalize an input deck without verifying the source with a simple tally (e.g., a surface current tally) or a visualization tool (like VisEd) to ensure the position and direction are correct.
By mastering this card and its keywords, you will be able to correctly model virtually any physical source within the MCNP environment, laying a solid foundation for accurate and reliable simulations.