コード例 #1
0
ファイル: pinCellMatCalc.py プロジェクト: wgurecky/spyTran
def createPinCellMat():
    # Create fuel mixture
    duUO2 = mx.mixedMat({'u238': 1. / 3., 'o16': 2 / 3.})
    duUO2.setDensity(10.35)
    heuUO2 = mx.mixedMat({'u235': 1 / 3., 'o16': 2 / 3.})
    heuUO2.setDensity(10.35)
    fuelMat = 0.964 * duUO2 + 0.036 * heuUO2
    #fuelMat = 0.6 * duUO2 + 0.4 * heuUO2
    fuelMat.setDensity(10.35)
    # create cladding mixture
    cladMat = mx.mixedMat({'zr90': 1.0})
    cladMat.setDensity(5.87)
    # create moderator mixture
    modrMat = mx.mixedMat({'h1': 2. / 3., 'o16': 1 / 3.})
    modrMat.setDensity(1.0)
    #j
    # Homogenize pin cell materials into one big soup
    regionVols = computeVols()
    volTot = sum(regionVols)
    pinCellMat = (regionVols[0] / volTot) * deepcopy(fuelMat) + \
                 (regionVols[1] / volTot) * deepcopy(cladMat) + \
                 (regionVols[2] / volTot) * deepcopy(modrMat)
    return pinCellMat
コード例 #2
0
def createPinCellMat():
    # Create fuel mixture
    duUO2 = mx.mixedMat({'u238': 1. / 3., 'o16': 2 / 3.})
    duUO2.setDensity(10.35)
    heuUO2 = mx.mixedMat({'u235': 1 / 3., 'o16': 2 / 3.})
    heuUO2.setDensity(10.35)
    fuelMat = 0.964 * duUO2 + 0.036 * heuUO2
    #fuelMat = 0.6 * duUO2 + 0.4 * heuUO2
    fuelMat.setDensity(10.35)
    # create cladding mixture
    cladMat = mx.mixedMat({'zr90': 1.0})
    cladMat.setDensity(5.87)
    # create moderator mixture
    modrMat = mx.mixedMat({'h1': 2. / 3., 'o16': 1 / 3.})
    modrMat.setDensity(1.0)
    #j
    # Homogenize pin cell materials into one big soup
    regionVols = computeVols()
    volTot = sum(regionVols)
    pinCellMat = (regionVols[0] / volTot) * deepcopy(fuelMat) + \
                 (regionVols[1] / volTot) * deepcopy(cladMat) + \
                 (regionVols[2] / volTot) * deepcopy(modrMat)
    return pinCellMat
コード例 #3
0
import numpy as np
import os
pwdpath = os.path.dirname(os.path.realpath(__file__))

# Load xs database
import spytran.materials.materialMixxer as mx
mx.genMaterialDict('../materials/newXS')

# Solver settings
sN, nG = 4, 10

# Geometry
geoFile = pwdpath + '/geometry/2d_3region.geo'

# Materials
modMat = mx.mixedMat({'h1': 3.35e22 / 1e24, 'o16': 1.67e22 / 1e24})
borMat = mx.mixedMat({
    'h1': 3.35e22 / 1e24,
    'o16': 1.67e22 / 1e24,
    'b10': 2.e21 / 1e24
})
materialDict = {'mat_1': modMat, 'mat_2': borMat}

# Boundary conditions
bcDict = {'bc1': 'ref', 'bc2': 'vac', 'bc3': 'ref', 'bc4': 'vac'}

# Volumetric sources
src = np.zeros((10, 12))
srcStrength = 1.e10  # [n / cm**3-s]
src[0, :] = srcStrength
srcDict = {'mat_1': None, 'mat_2': src}
コード例 #4
0
ファイル: 2d_simple.py プロジェクト: xiaopingguo165/SpyTran
pwdpath = os.path.dirname(os.path.realpath(__file__))

# Load xs database
import spytran.materials.materialMixxer as mx
mx.genMaterialDict('../materials/newXS')

# Solver settings
sN, nG = 6, 10

# Geometry
geoFile = pwdpath + '/geometry/2d_simple.geo'

# Materials
import spytran.utils.pinCellMatCalc as pcm
pinMaterial = pcm.createPinCellMat()
modMat = mx.mixedMat({'h1': 3.35e22 / 1e24, 'o16': 1.67e22 / 1e24})
modMat.setDensity(1.0)
materialDict = {'mat_1': pinMaterial, 'mat_2': modMat}

# Boundary conditions
bcDict = {'bc1': 'ref', 'bc2': 'ref', 'bc3': 'ref', 'bc4': 'ref'}

# Volumetric sources
srcDict = {'mat_1': 'fission', 'mat_2': None}

# Init solver
slv = spytran.SnSolver(geoFile,
                       materialDict,
                       bcDict,
                       srcDict,
                       nG=nG,
コード例 #5
0
pwdpath = os.path.dirname(os.path.realpath(__file__))

# Load xs database
import spytran.materials.materialMixxer as mx

mx.genMaterialDict('../materials/newXS')

# Solver settings
sN, nG = 8, 10

# Geometry
geoFile = pwdpath + '/geometry/1d_graphite_beam.geo'

# Materials
attnMat = mx.mixedMat({'c12': 1.0})
attnMat.setDensity(2.24)
materialDict = {'mat_1': attnMat, 'mat_2': attnMat}

# Boundary conditions
fixedFlux1 = np.zeros((nG, sN))
fixedFlux1[0, -1] = 16 * 1e6  # 1e6 flux in ord 0, grp 1
bcDict = {'bc1': fixedFlux1, 'bc2': 'vac'}

# Volumetric sources
srcDict = {'mat_1': None, 'mat_2': None}

# Init solver
slv = spytran.SnSolver(geoFile,
                       materialDict,
                       bcDict,
コード例 #6
0
ファイル: 2d_simple.py プロジェクト: wgurecky/spyTran
pwdpath = os.path.dirname(os.path.realpath(__file__))

# Load xs database
import spytran.materials.materialMixxer as mx
mx.genMaterialDict('../materials/newXS')

# Solver settings
sN, nG = 6, 10

# Geometry
geoFile = pwdpath + '/geometry/2d_simple.geo'

# Materials
import spytran.utils.pinCellMatCalc as pcm
pinMaterial = pcm.createPinCellMat()
modMat = mx.mixedMat({'h1': 3.35e22 / 1e24, 'o16': 1.67e22 / 1e24})
modMat.setDensity(1.0)
materialDict = {'mat_1': pinMaterial,
                'mat_2': modMat}

# Boundary conditions
bcDict = {'bc1': 'ref',
          'bc2': 'ref',
          'bc3': 'ref',
          'bc4': 'ref'}

# Volumetric sources
srcDict = {'mat_1': 'fission',
           'mat_2': None}

# Init solver
コード例 #7
0
ファイル: 1d_3region.py プロジェクト: wgurecky/spyTran
import numpy as np
import os
pwdpath = os.path.dirname(os.path.realpath(__file__))

# Load xs database
import spytran.materials.materialMixxer as mx
mx.genMaterialDict('../materials/newXS')

# Solver settings
sN, nG = 12, 10

# Geometry
geoFile = pwdpath + '/geometry/1d_3region.geo'

# Materials
modMat = mx.mixedMat({'h1': 3.35e22 / 1e24, 'o16': 1.67e22 / 1e24})
borMat = mx.mixedMat({'h1': 3.35e22 / 1e24, 'o16': 1.67e22 / 1e24, 'b10': 2.e21 / 1e24})
materialDict = {'mat_1': modMat,
                'mat_2': borMat}

# Boundary conditions
bcDict = {'bc1': 'vac',
          'bc2': 'vac'}

# Volumetric sources
src = np.zeros((10, sN))
srcStrength = 1.e10  # [n / cm**3-s]
src[0, :] = srcStrength
srcDict = {'mat_1': None,
           'mat_2': src}
コード例 #8
0
ファイル: 2d_pin.py プロジェクト: wgurecky/spyTran
import os
pwdpath = os.path.dirname(os.path.realpath(__file__))

# Load xs database
import spytran.materials.materialMixxer as mx
mx.genMaterialDict('../materials/newXS')

# Solver settings
sN, nG = 4, 10

# Geometry
geoFile = pwdpath + '/geometry/2d_pin.geo'

# Materials
# FUEL
duUO2 = mx.mixedMat({'u238': 1. / 3., 'o16': 2 / 3.})
duUO2.setDensity(10.35)
heuUO2 = mx.mixedMat({'u235': 1 / 3., 'o16': 2 / 3.})
heuUO2.setDensity(10.35)
fuelMat = 0.964 * duUO2 + 0.036 * heuUO2
fuelMat.setDensity(10.35)
# self shield fuel material
fuelMat.selfSheild()
# create cladding mixture
cladMat = mx.mixedMat({'zr90': 1.0})
cladMat.setDensity(5.87)
# create moderator mixture
modrMat = mx.mixedMat({'h1': 2. / 3., 'o16': 1 / 3.})
modrMat.setDensity(1.0)

コード例 #9
0
ファイル: 2d_pin.py プロジェクト: xiaopingguo165/SpyTran
import os
pwdpath = os.path.dirname(os.path.realpath(__file__))

# Load xs database
import spytran.materials.materialMixxer as mx
mx.genMaterialDict('../materials/newXS')

# Solver settings
sN, nG = 4, 10

# Geometry
geoFile = pwdpath + '/geometry/2d_pin.geo'

# Materials
# FUEL
duUO2 = mx.mixedMat({'u238': 1. / 3., 'o16': 2 / 3.})
duUO2.setDensity(10.35)
heuUO2 = mx.mixedMat({'u235': 1 / 3., 'o16': 2 / 3.})
heuUO2.setDensity(10.35)
fuelMat = 0.964 * duUO2 + 0.036 * heuUO2
fuelMat.setDensity(10.35)
# self shield fuel material
fuelMat.selfSheild()
# create cladding mixture
cladMat = mx.mixedMat({'zr90': 1.0})
cladMat.setDensity(5.87)
# create moderator mixture
modrMat = mx.mixedMat({'h1': 2. / 3., 'o16': 1 / 3.})
modrMat.setDensity(1.0)

materialDict = {'mat_1': fuelMat, 'mat_2': cladMat, 'mat_3': modrMat}
コード例 #10
0
ファイル: 1d_graphite_beam.py プロジェクト: wgurecky/spyTran
import numpy as np
import os
pwdpath = os.path.dirname(os.path.realpath(__file__))

# Load xs database
import spytran.materials.materialMixxer as mx
mx.genMaterialDict('../materials/newXS')

# Solver settings
sN, nG = 8, 10

# Geometry
geoFile = pwdpath + '/geometry/1d_graphite_beam.geo'

# Materials
attnMat = mx.mixedMat({'c12': 1.0})
attnMat.setDensity(2.24)
materialDict = {'mat_1': attnMat,
                'mat_2': attnMat}

# Boundary conditions
fixedFlux1 = np.zeros((nG, sN))
fixedFlux1[0, 0] = 16 * 1e6    # 1e6 flux in ord 0, grp 1
bcDict = {'bc1': fixedFlux1,
          'bc2': 'vac'}

# Volumetric sources
srcDict = {'mat_1': None,
           'mat_2': None}

# Init solver
コード例 #11
0
import numpy as np
import os
pwdpath = os.path.dirname(os.path.realpath(__file__))

# Load xs database
import spytran.materials.materialMixxer as mx
mx.genMaterialDict('../materials/newXS')

# Solver settings
sN, nG = 8, 10

# Geometry
geoFile = pwdpath + '/geometry/1d_graphite_beam_b10.geo'

# Materials
attnMat = mx.mixedMat({'c12': 1.0})
attnMat.setDensity(2.24)
borMat = mx.mixedMat({'b10': 1.0})
borMat.setDensity(5.00)
materialDict = {'mat_1': attnMat, 'mat_2': attnMat, 'mat_3': borMat}

# Boundary conditions
fixedFlux1 = np.zeros((nG, sN))
fixedFlux1[0, -1] = 16 * 1e6  # 1e6 flux in ord 0, grp 1
bcDict = {'bc1': fixedFlux1, 'bc2': 'vac'}

# Volumetric sources
srcDict = {'mat_1': None, 'mat_2': None}

# Init solver
slv = spytran.SnSolver(geoFile,