Пример #1
0
    def test_example(self):
        builder = suiteBuilder.SeparateEffectsSuiteBuilder(self.baseCase)
        builder.addDegreeOfFreedom(
            suiteBuilder.SettingsModifier("fpModel", v)
            for v in ("noFissionProducts", "infinitelyDilute", "MO99"))
        builder.addDegreeOfFreedom(
            suiteBuilder.SettingsModifier("detailedAxialExpansion", v)
            for v in (True, ))
        builder.addDegreeOfFreedom(
            suiteBuilder.SettingsModifier("buGroups", v) for v in (
                [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 100],
                [3, 5, 7, 9, 10, 20, 100],
                [3, 5, 10, 15, 20, 100],
            ))
        builder.addDegreeOfFreedom((suiteBuilder.FullCoreModifier(), ))

        neutronicKernelOpts = (
            {
                "neutronicsKernel": neutronics.DIF3DFD,
                "numberMeshPerEdge": 1
            },
            {
                "neutronicsKernel": neutronics.DIF3DFD,
                "numberMeshPerEdge": 2
            },
            {
                "neutronicsKernel": neutronics.DIF3DFD,
                "numberMeshPerEdge": 3
            },
            {
                "neutronicsKernel": neutronics.VARIANT,
                "epsEig": 1e-7,
                "epsFSAvg": 1e-5,
            },
            {
                "neutronicsKernel": neutronics.VARIANT,
                "epsEig": 1e-9,
                "epsFSAvg": 1e-6,
            },
            {
                "neutronicsKernel": neutronics.VARIANT,
                "epsEig": 1e-12,
                "epsFSAvg": 1e-7,
            },
            {
                "neutronicsKernel": neutronics.VARIANT,
                "epsEig": 1e-13,
                "epsFSAvg": 1e-8,
            },
        )
        builder.addDegreeOfFreedom(
            NeutronicsKernelOpts(opts) for opts in neutronicKernelOpts)

        with directoryChangers.TemporaryDirectoryChanger():
            suite = builder.buildSuite()
            for c in suite:
                c.writeInputs()

            self.assertTrue(os.path.exists("case-suite"))
Пример #2
0
    def test_example(self):
        builder = suiteBuilder.SeparateEffectsSuiteBuilder(self.baseCase)
        builder.addDegreeOfFreedom(
            inputModifiers.SettingsModifier("fpModel", v)
            for v in ("noFissionProducts", "infinitelyDilute", "MO99"))
        builder.addDegreeOfFreedom(
            inputModifiers.SettingsModifier("detailedAxialExpansion", v)
            for v in (True, ))
        builder.addDegreeOfFreedom(
            inputModifiers.SettingsModifier("buGroups", v) for v in (
                [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 100],
                [3, 5, 7, 9, 10, 20, 100],
                [3, 5, 10, 15, 20, 100],
            ))
        builder.addDegreeOfFreedom((inputModifiers.FullCoreModifier(), ))

        with directoryChangers.TemporaryDirectoryChanger():
            suite = builder.buildSuite()
            for c in suite:
                c.writeInputs()

            self.assertTrue(os.path.exists("case-suite"))