# Simple description of the C5G7 benchmark problem
# General description from: https://www.oecd-nea.org/upload/docs/application/pdf/2019-12/nsc-doc2003-16.pdf
# Composition/dimensions description from: https://www.oecd-nea.org/upload/docs/application/pdf/2020-01/nsc-doc96-02-rev2.pdf
# start-custom-isotopics
custom isotopics:
    # NEA/NSC/DOC(96)2 Table 2 - Isotopic Distributions for each medium
    mox low: # 4.3%
        input format: number densities
        U235: 5.00E-5
        U238: 2.21E-2
        PU238: 1.50E-5
        PU239: 5.80E-4
        PU240: 2.40E-4
        PU241: 9.80E-5
        PU242: 5.40E-5
        AM241: 1.30E-5
        O: 4.63E-2
    mox medium: # 7.0%
        input format: number densities
        U235: 5.00E-5
        U238: 2.21E-2
        PU238: 2.40E-5
        PU239: 9.30E-4
        PU240: 3.90E-4
        PU241: 1.52E-4
        PU242: 8.40E-5
        AM241: 2.00E-5
        O: 4.63E-2
    mox high: # 8.7%
        input format: number densities
        U235: 5.00E-5
        U238: 2.21E-2
        PU238: 3.00E-5
        PU239: 1.16E-3
        PU240: 4.90E-4
        PU241: 1.90E-4
        PU242: 1.05E-4
        AM241: 2.50E-5
        O: 4.63E-2
    UO2:
        input format: number densities
        U235: 8.65e-4
        U238: 2.225E-2
        O: 4.622E-2
    moderator:
        input format: number densities
        H: 6.70e-2
        O: 3.35E-2
        B: 2.78E-5
    Zr clad:
        input format: number densities
        ZR: 4.30E-2
    Al clad:
        input format: number densities
        AL27: 6.00e-2
    fission chamber:
        # NEA/NSC/DOC(96)2 Documents:
        # "Central guide tube contains: moderator (as defined in Table 2)
        # and 1.0E-8 at/(b cm) of U-235"
        input format: number densities
        H: 6.70e-2
        O: 3.35E-2
        B: 2.78E-5
        U235: 1.0e-8
# end-custom-isotopics
blocks:
    uo2: &block_uo2
        # NEA/NSC/DOC(96)2 Table 1 - Cell geometries
        grid name: UO2 grid
        fuel:
            shape: Circle
            material: UO2
            isotopics: UO2
            Tinput: 20.0
            Thot: 20.0
            od: .8190
            latticeIDs: [U]
        gap 1: &fuel_gap_1
            shape: Circle
            material: Void
            Tinput: 20.0
            Thot: 20.0
            id: fuel.od
            od: zirconium clad.id
            latticeIDs: [U]
        zirconium clad: &clad_Zr
            shape: Circle
            material: Custom
            isotopics: Zr clad
            Tinput: 20.0
            Thot: 20.0
            id: .8360
            od: .9500
            latticeIDs: [U]
        gap 2: &fuel_gap_2
            shape: Circle
            material: Void
            Tinput: 20.0
            Thot: 20.0
            id: zirconium clad.od
            od: aluminum clad.id
            latticeIDs: [U]
        aluminum clad: &clad_Al
            # NEA/NSC/DOC(96)2 Documents:
            # "This clad is used to simulate hot conditions at room temperature
            # (decrease the moderation ratio)"
            shape: Circle
            material: Custom
            isotopics: Al clad
            Tinput: 20.0
            Thot: 20.0
            id: .9700
            od: 1.0800
            latticeIDs: [U]
        moderator: &moderator
            shape: DerivedShape
            material: SaturatedWater
            isotopics: moderator
            Tinput: 450.0
            Thot: 450.0
        # Moderator within the guide tube
        inner moderator guide tube: &guide_tube_moderator
            shape: Circle
            material: SaturatedWater
            isotopics: moderator
            Tinput: 20.0
            Thot: 20.0
            od: guide tube.id
            latticeIDs: [GT]
        guide tube: &guide_tube
            shape: Circle
            material: Custom
            isotopics: Al clad
            Tinput: 20.0
            Thot: 20.0
            id: .6800
            od: 1.0800
            latticeIDs: [GT]
        fission chamber guide tube: &fission_chamber_guide_tube
            <<: *guide_tube
            # Avoid giving this the same flag as "guide tube" by implementing
            # a custom flag. This is done to distinguish the "fission chamber guide tube"
            # from the regular "guide tube". This demonstrates the use of setting
            # flags directly rather than relying on them to be implied based on the
            # name.
            flags: fission chamber structure
            latticeIDs: [FC]
        fission chamber: &fission_chamber
            shape: Circle
            material: Custom
            isotopics: fission chamber
            Tinput: 20.0
            Thot: 20.0
            od: .8190 # No documentation fission chamber dims of composition
            latticeIDs: [FC]
        inner moderator FC: &fission_chamber_mod
            # No documentation of this either, but assuming fission chamber
            # has same od as fuel, so there needs to be something in the gap.
            shape: Circle
            material: Void
            Tinput: 20.0
            Thot: 20.0
            id: fission chamber.od
            od: guide tube.id
            latticeIDs: [FC]
        pitch: &pitch
        # dummy component for assembly sizing
            shape: Square
            material: Void
            Tinput: 20.0
            Thot: 20.0
            widthInner: 21.42
            widthOuter: 21.42
            mult: 1.0
# end-block-uo2
    mox: &block_mox
        grid name: MOX grid
        mox low fuel:
            shape: Circle
            material: UO2
            isotopics: mox low
            Tinput: 20.0
            Thot: 20.0
            od: .8190
            latticeIDs: [ML]
        mox medium fuel:
            shape: Circle
            material: UO2
            isotopics: mox medium
            Tinput: 20.0
            Thot: 20.0
            od: .8190
            latticeIDs: [MM]
        mox high fuel:
            shape: Circle
            material: UO2
            isotopics: mox high
            Tinput: 20.0
            Thot: 20.0
            od: .8190
            latticeIDs: [MH]
        void 1:
            <<: *fuel_gap_1
            id: mox low fuel.od
            latticeIDs: [ML, MM, MH]
        zirconium clad:
            <<: *clad_Zr
            latticeIDs: [ML, MM, MH]
        void 2:
            <<: *fuel_gap_2
            latticeIDs: [ML, MM, MH]
        aluminum clad:
             # See Aluminum Clad note above about why there are 2 clads.
            <<: *clad_Al
            latticeIDs: [ML, MM, MH]
        moderator: *moderator
        inner moderator GT: *guide_tube_moderator
        guide tube: *guide_tube
        fission chamber guide tube: *fission_chamber_guide_tube
        fission chamber: *fission_chamber
        moderator fission chamber: *fission_chamber_mod
        pitch: *pitch
# end-block-mox
    moderator: &block_mod
        moderator:
            shape: Square
            material: SaturatedWater
            isotopics: moderator
            Tinput: 20.0
            Thot: 20.0
            widthOuter: 21.42
            mult: 1.0
# end-block-mod
assemblies:
    heights: &heights
        - 64.26
        - 64.26
        - 64.26
        - 21.42
    axial mesh points: &mesh
        - 3
        - 3
        - 3
        - 2

    UO2:
        flags: fuel
        specifier: UO2
        blocks:
            - *block_uo2
            - *block_uo2
            - *block_uo2
            - *block_mod
        height: *heights
        axial mesh points: *mesh
        xs types: [A, A, A, A]
    mox:
        flags: fuel
        specifier: MOX
        blocks:
            - *block_mox
            - *block_mox
            - *block_mox
            - *block_mod
        height: *heights
        axial mesh points: *mesh
        xs types: [A, A, A, A]
    mod:
        specifier: MOD
        blocks:
            - *block_mod
            - *block_mod
            - *block_mod
            - *block_mod
        height: *heights
        axial mesh points: *mesh
        xs types: [A, A, A, A]
# end-assemblies
systems:
    core:
        grid name: core

        origin:
            x: 0.0
            y: 0.0
            z: 0.0
# end-systems
grids:
    core:
        symmetry: quarter reflective
        geom: cartesian
        lattice pitch:
            x: 21.42
            y: 21.42
        lattice map: |
         MOD MOD MOD
         MOX UO2 MOD
         UO2 MOX MOD
# end-grid-core
    UO2 grid:
        symmetry: full
        geom: cartesian
        lattice pitch:
            x: 1.26
            y: 1.26
        lattice map: |
            U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U
            U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U
            U  U  U  U  U  GT U  U  GT U  U  GT U  U  U  U  U
            U  U  U  GT U  U  U  U  U  U  U  U  U  GT U  U  U
            U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U
            U  U  GT U  U  GT U  U  GT U  U  GT U  U  GT U  U
            U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U
            U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U
            U  U  GT U  U  GT U  U  FC U  U  GT U  U  GT U  U
            U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U
            U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U
            U  U  GT U  U  GT U  U  GT U  U  GT U  U  GT U  U
            U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U
            U  U  U  GT U  U  U  U  U  U  U  U  U  GT U  U  U
            U  U  U  U  U  GT U  U  GT U  U  GT U  U  U  U  U
            U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U
            U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U  U
# end-grid-UO2
    MOX grid:
        symmetry: full
        geom: cartesian
        lattice pitch:
            x: 1.26
            y: 1.26
        lattice map: |
            ML ML ML ML ML ML ML ML ML ML ML ML ML ML ML ML ML
            ML MM MM MM MM MM MM MM MM MM MM MM MM MM MM MM ML
            ML MM MM MM MM GT MM MM GT MM MM GT MM MM MM MM ML
            ML MM MM GT MM MH MH MH MH MH MH MH MM GT MM MM ML
            ML MM MM MM MH MH MH MH MH MH MH MH MH MM MM MM ML
            ML MM GT MH MH GT MH MH GT MH MH GT MH MH GT MM ML
            ML MM MM MH MH MH MH MH MH MH MH MH MH MH MM MM ML
            ML MM MM MH MH MH MH MH MH MH MH MH MH MH MM MM ML
            ML MM GT MH MH GT MH MH FC MH MH GT MH MH GT MM ML
            ML MM MM MH MH MH MH MH MH MH MH MH MH MH MM MM ML
            ML MM MM MH MH MH MH MH MH MH MH MH MH MH MM MM ML
            ML MM GT MH MH GT MH MH GT MH MH GT MH MH GT MM ML
            ML MM MM MM MH MH MH MH MH MH MH MH MH MM MM MM ML
            ML MM MM GT MM MH MH MH MH MH MH MH MM GT MM MM ML
            ML MM MM MM MM GT MM MM GT MM MM GT MM MM MM MM ML
            ML MM MM MM MM MM MM MM MM MM MM MM MM MM MM MM ML
            ML ML ML ML ML ML ML ML ML ML ML ML ML ML ML ML ML
# end-grid-MOX
nuclide flags:
    H: {burn: false, xs: true}
    O:
        burn: false
        xs: true
        expandTo: ["O16", "O17"] # O18 is not in many nuclear data sets.
    B: {burn: false, xs: true}
    AL: {burn: false, xs: true}
    ZR: {burn: false, xs: true}
    U235: {burn: false, xs: true}
    U238: {burn: false, xs: true}
    PU238: {burn: false, xs: true}
    PU239: {burn: false, xs: true}
    PU240: {burn: false, xs: true}
    PU241: {burn: false, xs: true}
    PU242: {burn: false, xs: true}
    AM241: {burn: false, xs: true}
# end-nucflags
