}) 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} # Init solver slv = spytran.SnSolver(geoFile, materialDict, bcDict, srcDict, nG=nG, sN=sN, dim=2) # Solve slv.trSolve(residTol=1e-5) slv.writeData(pwdpath + '/output/2Dtestout.h5') # Plot # Plot from spytran.fe.post import Fe2DOutput as fe2Dplt plotter = fe2Dplt(pwdpath + '/output/2Dtestout.h5') plotter.writeToVTK(fname=pwdpath + '/output/2Dmregion')
modrMat.setDensity(1.0) materialDict = {'mat_1': fuelMat, 'mat_2': cladMat, 'mat_3': modrMat} # Boundary conditions bcDict = {'bc1': 'ref', 'bc2': 'ref', 'bc3': 'ref', 'bc4': 'ref'} # Volumetric sources srcDict = {'mat_1': 'fission', 'mat_2': None, 'mat_3': None} # Init solver slv = spytran.D1solver(geoFile, materialDict, bcDict, srcDict, nG=nG, sN=sN, dim=2) # Solve slv.kSolve(residTol=1e-5, kTol=1e-5, outerIterMax=10) slv.writeData(pwdpath + '/output/2Dpintest.h5') # Plot from spytran.fe.post import Fe2DOutput as fe2Dplt plotter = fe2Dplt(pwdpath + '/output/2Dpintest.h5') plotter.writeToVTK(fname=pwdpath + '/output/2Dpin')
# 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.D1solver(geoFile, materialDict, bcDict, srcDict, nG=nG, sN=sN, dim=2) # Solve slv.kSolve(residTol=1e-6, kTol=1e-5, outerIterMax=4) slv.writeData(pwdpath + '/output/2Dfistestout.h5') # Plot from spytran.fe.post import Fe2DOutput as fe2Dplt plotter = fe2Dplt(pwdpath + '/output/2Dfistestout.h5') plotter.writeToVTK(fname=pwdpath + '/output/2dfisplot')
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} # Boundary conditions bcDict = {'bc1': 'ref', 'bc2': 'ref', 'bc3': 'ref', 'bc4': 'ref'} # Volumetric sources srcDict = {'mat_1': 'fission', 'mat_2': None, 'mat_3': None} # Init solver slv = spytran.SnSolver(geoFile, materialDict, bcDict, srcDict, nG=nG, sN=sN, dim=2) # Solve slv.kSolve(residTol=1e-5, kTol=1e-5, outerIterMax=10) slv.writeData(pwdpath + '/output/2Dpintest.h5') # Plot from spytran.fe.post import Fe2DOutput as fe2Dplt plotter = fe2Dplt(pwdpath + '/output/2Dpintest.h5') plotter.writeToVTK(fname=pwdpath + '/output/2Dpin')