Mesh-based Variance Reduction – pyne.variancereduction

This module contains functions for mesh-based Monte Carlo variance reduction using PyNE Mesh objects. Namely, functions for generating weight windows and source biasing parameters are included. The functionality of the module can be obtained by importing as such:

from pyne import variancereduction

Variance Reduction API

This module contains functions for mesh-based Monte Carlo variance reduction.

pyne.variancereduction.cadis(adj_flux_mesh, adj_flux_tag, q_mesh, q_tag, ww_mesh, ww_tag, q_bias_mesh, q_bias_tag, beta=5)[source]

This function reads PyNE Mesh objects tagged with adjoint fluxes and unbiased source densities and outputs PyNE Meshes of weight window lower bounds and biased source densities as computed by the Consistant Adjoint-Driven Importance Sampling (CADIS) method [1]. Note that values can be stored on the same Mesh object, all different Mesh objects, or any combination in between. Meshes can be structured or unstructured. Note that this function is suitable for Forward Weighted (FW) CADIS as well, the only difference being the adjoint source used for the estimation of the adjoint flux.

[1] Haghighat, A. and Wagner, J. C., “Monte Carlo Variance Reduction with

Deterministic Importance Functions,” Progress in Nuclear Energy, Vol. 42, No. 1, pp. 25-53, 2003.

Parameters
adj_flux_meshPyNE Mesh object

The mesh containing the adjoint fluxes.

adj_flux_tagstring

The name of the adjoint flux tag on adj_mesh.

q_meshPyNE Mesh object

The mesh containing the unbiased source density.

q_tagstring

The name of the source density tag on q_mesh.

ww_meshPyNE Mesh object

The mesh to store the output weight window mesh.

ww_tagstring

Name of the tag to store output weight window values on ww_mesh.

q_bias_meshPyNE Mesh object

The mesh to store the output biased source density mesh.

q_bias_tagPyNE Mesh object

Name of the tag to store output weight window values on q_bias_mesh.

betafloat

The ratio of the weight window upper bound to the weight window lower bound. The default value is 5: the value used in MCNP.

pyne.variancereduction.magic(meshtally, tag_name, tag_name_error, \*\*kwargs)[source]

This function reads a PyNE mcnp.MeshTally object and preforms the MAGIC algorithm and returns the resulting weight window mesh.