diffusion_coeffs module

diffusion_coeffs.CMSpectrum(ng, sigMtx0, sigT, sigTr, chi, nuSigF, kinf)

Solves CASMO-4E CM 1 step approach.

Parameters:
  • ng (int) – number energy groups

  • sigMtx0 (2-dim array) – P0 scattering matrix.

  • sigS1 (2-dim array) – scattering cross section matrix (1st moment) as a function of energy.

  • sigT (array) – total cross section as a function of energy.

  • sigTr (array) – transport cross section as a function of energy.

  • chi (array) – neutron fission source spectra.

  • nuSigF (array) – nu-sigma-fission from serpent.

  • kinf (float) – kinf term from Serpent.

Returns:

  • flx (1-dim array) – flux

  • B2 (float) – buckling

diffusion_coeffs.Condense2gr(xs, flx, energy, cutoffE=0.625)

Condenses a xs into 2 groups.

Parameters:
  • xs (array) – xs values as an array.

  • flx (array) – exact neutron flux as a function of energy.

  • energy (array) – energy mesh points.

  • cutoffE (float) – Cutoff energy for 2g separation (eV).

Returns:

xs – 2g cross section after condensing

Return type:

1-dim array

diffusion_coeffs.CriticalSpectrum(ng, sigMtx0, sigMtx1, sigT, chi, nuSigF, kinf, P1=False)

Performs B1 or P1 critical spectrum calculation

Parameters:
  • ng (int) – number energy groups

  • sigMtx0 (2-dim array) – P0 scattering matrix.

  • sigS1 (2-dim array) – scattering cross section matrix (1st moment) as a function of energy.

  • sigT (array) – total cross section as a function of energy.

  • sigTr (array) – transport cross section as a function of energy.

  • chi (array) – neutron fission source spectra.

  • nuSigF (array) – nu-sigma-fission from serpent.

  • kinf (float) – kinf term from Serpent.

Returns:

  • flx (1-dim array) – flux

  • iJ (1-dim array) – current

  • B2 (float) – buckling

diffusion_coeffs.FluxLimited(ng, sigS1, sigT, flx)

Obtains the transport correction ratio using flux limited approach

Parameters:
  • ng (int) – number energy groups

  • sigS1 (2-dim array) – scattering cross section matrix (1st moment) as a function of energy.

  • sigT (array) – total cross section as a function of energy.

  • flx (array) – exact neutron flux as a function of energy.

Returns:

  • transportxs (1-dim array) – transport xs

  • tau (1-dim array) – transport correction factor

diffusion_coeffs.InScatter(ng, sigS1, sigT, flx, B2=0.0001)

Obtains the transport correction ratio using exact in-scatter expression

Parameters:
  • energy (array) – energy mesh points.

  • sigS1 (2-dim array) – scattering cross section matrix (1st moment) as a function of energy.

  • sigT (array) – total cross section as a function of energy.

  • flx (array) – exact neutron flux as a function of energy.

  • B2 (float) – Buckling squared term.

Returns:

  • transportxs (1-dim array) – transport xs

  • tau (1-dim array) – transport correction factor

  • Jg (1-dim array) – neutron current from inscattering approach

diffusion_coeffs.OutScatter(ng, sigS1, sigT)

Obtains the transport correction ratio using out-scatter approximation

Parameters:
  • ng (int) – number energy groups

  • sigS1 (2-dim array) – scattering cross section matrix (1st moment) as a function of energy.

  • sigT (array) – total cross section as a function of energy.

Returns:

  • transportxs (1-dim array) – transport xs

  • tau (1-dim array) – transport correction factor

diffusion_coeffs.SolveB1(ng, sigMtx0, sigMtx1, sigT, chi, B2=0.0, alpha=1.0)

B1 approach (solves for flux in B1 method)

Parameters:
  • ng (int) – energy mesh points.

  • sctMtx0 (2-dim array) – scattering cross section matrix (0th moment) g’g.

  • sctMtx1 (2-dim array) – scattering cross section matrix (1st moment) g’g’.

  • sigT (array) – total cross section as a function of energy.

  • chi (array) – fission spectrum.

  • B2 (float) – energy-independent buckling value

  • alpha (array) – energy-dependent coefficients for the 2nd B1 equation

Returns:

  • flx (1-dim array) – flux

  • iJ (1-dim array) – current