Skip to content

Sources

This page describes the public source surfaces that a neomc user can build against today.

Core Source State

Every source eventually produces SourceSite, which wraps a validated ParticleState. A source particle carries:

  • position;
  • direction;
  • energy;
  • time;
  • weight;
  • ParticleType;
  • history and generation identifiers;
  • optional region and material hints.

SourceSite::to_transport_particle() normalizes direction and converts the source state into a validated TransportParticle.

Independent Sources

IndependentSourceDefinition is the main source type for one transport particle per history.

Spatial Modes

SourceSpatialDefinition supports:

  • point
  • uniform_box
  • uniform_sphere
  • uniform_cylinder

The lower-level distribution types exposed in source_distribution.hh are:

  • PointSpatialDistribution
  • UniformBoxSpatialDistribution
  • UniformSphereSpatialDistribution
  • UniformCylinderSpatialDistribution

Angular Modes

SourceAngularDefinition supports:

  • fixed_direction
  • isotropic

The lower-level distribution types are:

  • FixedDirectionDistribution
  • IsotropicDirectionDistribution

Energy Modes

SourceEnergyDefinition supports:

  • monoenergetic
  • discrete

The lower-level distribution types are:

  • MonoenergeticDistribution
  • DiscreteEnergyDistribution

Sampling

Use:

  • validate_independent_source_definition
  • sample_independent_source
  • apply_independent_source_override

The templated IndependentSource<...> wrapper is also public when a caller prefers to compose distributions directly instead of going through IndependentSourceDefinition.

General Multi-Component Sources

GeneralSourceDefinition extends the source surface to multiple weighted source components.

Each GeneralSourceComponentDefinition contains:

  • one IndependentSourceDefinition;
  • one positive component strength.

Public helpers include:

  • validate_general_source_definition
  • sample_general_source
  • apply_general_source_override
  • make_particle_gun_source

This is the source surface used by the application layer when a run needs one or more configurable source components instead of a single hard-coded source.

Static Decay Inventory Sources

StaticDecayInventorySource is the public source type for decay-driven source batches.

Each DecayInventoryItem contains:

  • nuclide
  • either activity_bq or atoms
  • spatial
  • optional region_hint
  • optional material_hint

The source-level controls are:

  • time
  • optional source_time_window
  • weight
  • master_seed
  • unsupported_emission_policy

Represented Emission Rates

The current static decay source summary can represent emission rates for:

  • photons
  • electrons
  • positrons
  • protons
  • neutrons
  • alphas

Transport execution routes those emissions only when the corresponding package is enabled for the session. If DecayUnsupportedEmissionPolicy::ignore_unsupported is selected, the source summary still records ignored unsupported emission rates.

Summaries

Use summarize_static_decay_inventory_source to obtain StaticDecayInventorySourceSummary, which reports:

  • total activity;
  • per-item activity;
  • source weight;
  • photon emission rate;
  • electron emission rate;
  • positron emission rate;
  • proton emission rate;
  • neutron emission rate;
  • alpha emission rate;
  • transport decay-event rate;
  • total transport emission rate;
  • expected transport events per decay;
  • expected transport emissions per decay;
  • weighted transport event rate;
  • weighted transport emission rate;
  • ignored unsupported emission rate.

Sampling

Use:

  • validate_static_decay_inventory_source
  • sample_static_decay_inventory_event
  • sample_static_decay_inventory_source_sites
  • make_static_decay_inventory_source_hook
  • make_static_decay_inventory_source_batch

Because a single decay may emit multiple transport particles, the batch hook is the natural source surface for mixed-package transport.

Use mixed_transport_source_from_static_decay when a StaticDecayInventorySourceHook should be converted into a mixed-transport source with source-rate metadata.

Decay Window Sources

DecayInventoryWindowSourceDefinition lets a caller define a source over a time window instead of only at one instant.

Use:

  • validate_decay_inventory_window_source_definition
  • make_decay_inventory_window_source

The returned DecayInventoryWindowSource contains:

  • the evolved static source;
  • the inventory evolution result over the window;
  • the source summary after normalization.

Decay Inventory Evolution

decay_inventory_evolution.hh exposes related inventory-evolution capabilities:

  • evolve_decay_inventory
  • evolve_decay_inventory_at_times
  • evolve_decay_inventory_over_windows

This is useful when a user needs to derive a static source inventory from a time-evolved nuclide inventory before sampling transport emissions.

Activation Inventory Evolution

activation_inventory_evolution.hh adds a separate source-term capability for one-group activation inventory evolution.

The public types are:

  • OneGroupActivationReaction
  • OneGroupActivationIrradiation
  • OneGroupActivationInventory
  • OneGroupActivationResult

Use:

  • evolve_one_group_activation_inventory

This is a source-term data path, not neutron transport.

Source Constraints

The public validation rules visible in the headers are:

  • transport source particles must have finite position and direction;
  • direction must be non-zero;
  • energy and weight must be finite and positive;
  • time must be finite;
  • ParticleType::energy_deposit is not a valid transport source particle;
  • decay inventory items may not define both atoms and activity_bq;
  • a decay inventory item must define one or the other with a positive value.

NeoMC user documentation.