pyopensn.xs.MultiGroupXS
- class pyopensn.xs.MultiGroupXS
Multi-group cross section.
Wrapper of
opensn::MultiGroupXS
.- Combine(self: pyopensn.xs.MultiGroupXS, combinations: list[tuple[pyopensn.xs.MultiGroupXS, float]]) None
Combine cross-section
- Parameters:
combinations (List[Tuple[pyopensn.xs.MultiGroupXS, float]]) – List of combinations (cross section, factor)
Examples
>>> xs_1 = MultiGroupXS() >>> xs_1.CreateSimpleOneGroup(sigma_t=1, c=0.5) >>> xs_2 = MultiGroupXS() >>> xs_2.CreateSimpleOneGroup(sigma_t=2, c=1./3.) >>> xs_combined = MultiGroupXS() >>> combo = [ ... ( xs_1, 0.5 ), ... ( xs_2, 3.0 ) ... ] >>> xs_combined.Combine(combo)
- CreateSimpleOneGroup(self: pyopensn.xs.MultiGroupXS, sigma_t: float, c: float) None
Create a one-group cross section.
- Parameters:
sigma_t (float) – Total cross section.
c (float) – Scattering ratio.
- LoadFromOpenMC(self: pyopensn.xs.MultiGroupXS, file_name: str, dataset_name: str, temperature: float) None
Load multi-group cross sections from an OpenMC cross-section file.
- LoadFromOpenSn(self: pyopensn.xs.MultiGroupXS, file_name: str) None
Load multi-group cross sections from an OpenSn cross section input file.
Format is as follows (for transfers, gprime denotes the departing group and g is the arrival group).
# Add comment lines, as needed NUM_GROUPS ng NUM_MOMENTS nmom SIGMA_T_BEGIN 0 value . . ng-1 value SIGMA_T_END SIGMA_A_BEGIN 0 value . . ng-1 value SIGMA_A_END TRANSFER_MOMENTS_BEGIN M_GPRIME_G_VAL 0 0 0 value . M_GPRIME_G_VAL moment gprime g value . M_GPRIME_G_VAL nmom-1 ng-1 ng-1 value TRANSFER_MOMENTS_END
- SetScalingFactor(self: pyopensn.xs.MultiGroupXS, factor: float) None
Scale the cross sections by the specified factor.
- __init__(self: pyopensn.xs.MultiGroupXS) None
Create an empty multi-group cross section.
- property chi
Get neutron fission spectrum.
- property inv_velocity
Get inverse velocity.
- property is_fissionable
Check if the material is fissile.
- property nu_delayed_sigma_f
Get delayed neutron production due to fission.
- property nu_prompt_sigma_f
Get prompt neutron production due to fission.
- property nu_sigma_f
Get neutron production due to fission.
- property num_groups
Get number of energy groups.
- property num_precursors
Get number of precursors.
- property scaling_factor
Get the arbitrary scaling factor.
- property scattering_order
Get Legendre scattering order.
- property sigma_a
Get absorption cross section.
- property sigma_f
Get fission cross section.
- property sigma_t
Get total cross section.