Function mesh_to_ww
pub fn mesh_to_ww(
mesh: &Mesh,
power: f64,
max_error: f64,
total_only: bool,
) -> WeightWindow
Expand description
Mesh tally to global weight windows with simple parameters
A constant power factor and error tolerance are applied to all energy/time groups.
powers
- Softening factor used as ww=>ww^powermax_errors
- Errors above this are set to 0/analoguetotal_only
- Only generate weights from Group::Total
Weights are calculated as (0.5 * (v.result / flux_ref)).powf(power)
. For
example, applying a 0.7 de-tuning factor and setting voxels with errors
below 10% to analogue:
// Read tally 104 from a meshtal file
let mesh = read_target("./data/meshes/fmesh_104.msht", 104).unwrap();
// Convert the mesh into a weight window set
let weight_window = mesh_to_ww(&mesh, 0.7, 0.10, false);
By default, this generates weight windows for all time and energy groups.
To generate a simpler set of weight windows based only on the
Group::Total, set the total_only
boolean to true
.