Example #1
0
    def test_reactorSpecificReporting(self):
        """Test a number of reporting utils that require reactor/core information"""
        o, r = loadTestReactor()

        with mockRunLogs.BufferLog() as mock:
            # we should start with a clean slate
            self.assertEqual("", mock._outputStream)
            runLog.LOG.startLog("test_reactorSpecificReporting")
            runLog.LOG.setVerbosity(logging.INFO)

            writeAssemblyMassSummary(r)
            self.assertIn("BOL Assembly Mass Summary", mock._outputStream)
            self.assertIn("igniter fuel", mock._outputStream)
            self.assertIn("primary control", mock._outputStream)
            self.assertIn("plenum", mock._outputStream)
            mock._outputStream = ""

            setNeutronBalancesReport(r.core)
            self.assertIn("No rate information", mock._outputStream)
            mock._outputStream = ""

            summarizePinDesign(r.core)
            self.assertIn("Assembly Design Summary", mock._outputStream)
            self.assertIn("Design & component information", mock._outputStream)
            self.assertIn("Multiplicity", mock._outputStream)
            mock._outputStream = ""

            summarizePower(r.core)
            self.assertIn("Power in radial shield", mock._outputStream)
            self.assertIn("Power in primary control", mock._outputStream)
            self.assertIn("Power in feed fuel", mock._outputStream)
            mock._outputStream = ""

            writeCycleSummary(r.core)
            self.assertIn("Core Average", mock._outputStream)
            self.assertIn("Outlet Temp", mock._outputStream)
            self.assertIn("End of Cycle", mock._outputStream)
            mock._outputStream = ""

            # this report won't do much for the test reactor - improve test reactor
            summarizeZones(r.core, o.cs)
            self.assertTrue(len(mock._outputStream) == 0)
            mock._outputStream = ""

            # this report won't do much for the test reactor - improve test reactor
            makeBlockDesignReport(r)
            self.assertTrue(len(mock._outputStream) == 0)
            mock._outputStream = ""

            # this report won't do much for the test reactor - improve test reactor
            summarizePowerPeaking(r.core)
            self.assertTrue(len(mock._outputStream) == 0)
Example #2
0
    def interactEOL(self):
        """Adds the data to the report, and generates it"""
        self.cs.setSettingsReport()
        b = self.o.r.core.getFirstBlock(Flags.FUEL)
        b.setAreaFractionsReport()

        from armi.bookkeeping import plotting

        plotting.plotReactorPerformance(self.r)

        reportingUtils.setNeutronBalancesReport(self.r.core)
        self.writeRunSummary()
        self.o.timer.stopAll()  # consider the run done
        runLog.info(self.o.timer.report(inclusion_cutoff=0.001, total_time=True))
        _timelinePlot = self.o.timer.timeline(
            self.cs.caseTitle, self.cs["timelineInclusionCutoff"], total_time=True
        )
        runLog.debug("Generating report HTML.")
        self.writeReports()
        runLog.debug("Report HTML generated successfully.")
        runLog.info(self.printReports())