From 4f00b59603bfa98c47e9a6a4bf9e3775ccae44af Mon Sep 17 00:00:00 2001 From: Mouginot B Date: Fri, 17 Mar 2017 12:35:41 -0500 Subject: [PATCH] fix formula --- src/special_enrich.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/special_enrich.cc b/src/special_enrich.cc index 3c1db44..7a77abd 100644 --- a/src/special_enrich.cc +++ b/src/special_enrich.cc @@ -481,18 +481,22 @@ cyclus::Material::Ptr SEnrichment::Enrich_(cyclus::Material::Ptr mat, // Re-Add the special nuc inside the product, and fix tails amount accordingly double prod_mass = response->quantity(); - double u5_raw_enrich = UraniumAssay(response); + + cyclus::toolkit::MatQuery mq_resp(response); + double u5_raw_enrich = mq_resp.mass_frac(922350000); + cyclus::toolkit::MatQuery mq_flip(flip_mat.first); + double u5_flip_enrich = mq_flip.mass_frac(922350000); std::map::iterator it; for (it = ux.begin(); it != ux.end(); it++) { + double nuc_i_enrich_factor = - u5_raw_enrich / UraniumAssay(flip_mat.first) * it->second; + u5_raw_enrich / u5_flip_enrich * it->second; cyclus::toolkit::MatQuery mq_(natu_matl); double nuc_i_feed_enrich = mq_.mass(it->first) / natu_matl->quantity(); double nuc_i_prod_enrich = nuc_i_feed_enrich * nuc_i_enrich_factor; - double nuc_i_prod_mass = nuc_i_prod_enrich * prod_mass; // Remove come ux from the material pushed in the tails and add in into the