Esempio n. 1
0
    def test_collapse(self):

        fpd = lumpedFissionProduct.FissionProductDefinitionFile(io.StringIO(LFP_TEXT))
        lfps = fpd.createSingleLFPCollectionFromFile("LFP35")

        burnup = 0.01  # fima

        # make 1% burnup fuel
        refMassFracs = {"U235": 1 - burnup}

        lfp = lfps.getFirstLfp()
        for nb, mFrac in lfp.getMassFracs().items():
            refMassFracs[nb.name] = burnup * mFrac

        newMassFracs = lumpedFissionProduct.collapseFissionProducts(refMassFracs, lfps)

        self.assertAlmostEqual(newMassFracs["LFP35"], burnup, 6)

        lfps.updateYieldVector(massFrac=newMassFracs)
        self.assertAlmostEqual(lfps["LFP35"].getTotalYield(), 2.0)
Esempio n. 2
0
 def setUp(self):
     self.fpd = lumpedFissionProduct.FissionProductDefinitionFile(
         io.StringIO(LFP_TEXT))
Esempio n. 3
0
def getDummyLFPFile():
    return lumpedFissionProduct.FissionProductDefinitionFile(
        io.StringIO(LFP_TEXT))
Esempio n. 4
0
 def setUp(self):
     fpd = lumpedFissionProduct.FissionProductDefinitionFile(
         io.StringIO(LFP_TEXT))
     self.lfps = fpd.createLFPsFromFile()