Hello everyone, in my project i try to simulate the neutron flux of one module of HTR-PM core, in the first time, i’ve used one pebble with enrichment at 8% and after the calculation, i obtained the neutron flux distribution like in the first picture. But after restarting the simulation with differents pebble who have different enrichment like in the following code:
Materials
#Triso materials
comb1=openmc.Material(name=‘Noyau combustible 1’)
comb1.add_nuclide(‘U235’, 0.085)
comb1.add_nuclide(‘U238’, 0.915)
comb1.add_element(‘O’, 2.0)
comb1.set_density(‘g/cm3’, 10.5)
comb2=openmc.Material(name=‘Noyau combustible 2’)
comb2.add_nuclide(‘U235’, 0.06)
comb2.add_nuclide(‘U238’, 0.94)
comb2.add_element(‘O’, 2.0)
comb2.set_density(‘g/cm3’, 10.5)
comb3=openmc.Material(name=‘Noyau combustible 3’)
comb3.add_element(‘U’, 1.0, enrichment = 4.0)
comb3.add_element(‘O’, 2.0)
comb3.set_density(‘g/cm3’, 10.5)
comb4=openmc.Material(name=‘Noyau combustible 4’)
comb4.add_element(‘U’, 1.0, enrichment = 2.0)
comb4.add_element(‘O’, 2.0)
comb4.set_density(‘g/cm3’, 10.5)
comb5=openmc.Material(name=‘Noyau combustible 4’)
comb5.add_element(‘U’, 1.0, enrichment = 1.0)
comb5.add_element(‘O’, 2.0)
comb5.set_density(‘g/cm3’, 10.5)
PyC = openmc.Material(name =‘Buffer layer’)
PyC.add_element(‘C’, 1.0)
PyC.set_density(‘g/cm3’, 1.02)
PyC.add_s_alpha_beta(‘c_Graphite’)
IPyC = openmc.Material(name =‘Inner Pyrocarbon layer’)
IPyC.add_element(‘C’, 1.0)
IPyC.set_density(‘g/cm3’, 1.92)
IPyC.add_s_alpha_beta(‘c_Graphite’)
SiC = openmc.Material( name = ‘SiC layer’)
SiC.add_element(‘Si’, 1.0)
SiC.add_element(‘C’, 1.0)
SiC.set_density(‘g/cm3’, 3.2)
SiC.add_s_alpha_beta(‘c_Graphite’)
OPyC = openmc.Material(name =‘Outter Pyrocarbon layer’)
OPyC.add_element(‘C’, 1.0)
OPyC.set_density(‘g/cm3’, 1.92)
OPyC.add_s_alpha_beta(‘c_Graphite’)
#Reflector
graphite_refl= openmc.Material(name =‘Graphite’)
graphite_refl.add_element(‘C’, 1.0)
graphite_refl.set_density(‘g/cm3’, 1.8)
graphite_refl.add_s_alpha_beta(‘c_Graphite’)
#Moderator
graphite_mod = openmc.Material(name =‘Graphite pour moderateur’)
graphite_mod.add_element(‘C’, 1.0)
graphite_mod.set_density(‘g/cm3’, 1.8)
graphite_mod.add_s_alpha_beta(‘c_Graphite’)
#isolation
isolateur = openmc.Material(name = ‘isolateur’)
isolateur.add_element(‘C’, 0.95, ‘ao’)
isolateur.add_element(‘B’, 0.05, ‘ao’)
isolateur.set_density (‘g/cm3’, 1.8)
#Coolant
caloporteur_ch = openmc.Material(name = ‘He_cal’)
caloporteur_ch.add_element(‘He’, 1.0)
caloporteur_ch.set_density(‘g/cm3’, 0.01)
caloporteur_ch.temperature = 900
caloporteur_f = openmc.Material(name = ‘He_calo’)
caloporteur_f.add_element(‘He’, 1.0)
caloporteur_f.set_density(‘g/cm3’, 0.01)
caloporteur_f.temperature = 600
#BC
Barre = openmc.Material(name = “Barre de controle”)
Barre.add_element(‘C’, 1.0)
Barre.add_element(‘B’, 4.0, enrichment = 70.0, enrichment_target =‘B10’)
Barre.set_density(‘g/cm3’, 2.5)
materials = openmc.Materials ([comb1, comb2, comb3, comb4, comb5, PyC, IPyC, SiC, OPyC, graphite_refl, graphite_mod, isolateur, caloporteur_ch, caloporteur_f,Barre])
materials.export_to_xml()
###Creation of a TRISO particle
###Creation of a TRISO particle
s= openmc.Sphere(r=0.025)
s1= openmc.Sphere(r=0.035)
s2= openmc.Sphere(r=0.039)
s3=openmc.Sphere(r=0.0415)
s4=openmc.Sphere(r=0.0455)
kernel_zone = openmc.Cell(fill=comb1, region=-s, name =‘kz’)
buff_zone = openmc.Cell(fill=PyC , region=+s & -s1, name =‘bz’)
IPyC_zone = openmc.Cell(fill=IPyC , region=+s1 & -s2, name =‘iz’)
SiC_zone = openmc.Cell(fill=SiC , region=+s2 & -s3, name =‘sz’)
OPyC_zone = openmc.Cell(fill=OPyC , region=+s3 & -s4, name =‘oz’)
cellules = [ kernel_zone, buff_zone, IPyC_zone, SiC_zone, OPyC_zone]
triso1 = openmc.Universe(cells = cellules)
triso1.plot(color_by = ‘material’, colors = { comb1 :(255, 255, 0)})
#Creation of pebble fuel
s6 = openmc.Sphere(r=3, boundary_type=‘vacuum’)
s5 = openmc.Sphere(r=2.5)
bille1 = -s5
bille2 = -s6 & +s5
rayon_triso= 0.0455
centers = np.load(‘/home/fandresena/model_boky/Data_pour centre_pebble/postriso.dat’, allow_pickle=True)
couche_graph = openmc.Cell(fill = graphite_mod, region = bille2, name =‘Couche_graphite1’)
pebble_cells =
for c in centers:
pebble_cell = openmc.model.TRISO(rayon_triso, triso1, center=c) # Universe comme fill
pebble_cells.append(pebble_cell)
zone_comb1 = openmc.Cell(region=bille1)
lower_left, upper_right = zone_comb1.region.bounding_box
shape = (5, 5, 5)
pitch = (upper_right - lower_left)/shape
lattice = openmc.model.create_triso_lattice(
pebble_cells, lower_left, pitch, shape, graphite_mod)
zone_comb1.fill = lattice
pebble1 = openmc.Universe(cells = [couche_graph, zone_comb1])
pebble1.plot(color_by = ‘material’, colors = {graphite_mod : ‘grey’, comb1 :(255, 255, 0)}, pixels = (1200, 1200))
ss= openmc.Sphere(r=0.025)
ss1= openmc.Sphere(r=0.035)
ss2= openmc.Sphere(r=0.039)
ss3=openmc.Sphere(r=0.0415)
ss4=openmc.Sphere(r=0.0455)
kernel_zone = openmc.Cell(fill=comb2, region=-ss, name =‘kz’)
buff_zone = openmc.Cell(fill=PyC , region=+ss & -ss1, name =‘bz’)
IPyC_zone = openmc.Cell(fill=IPyC , region=+ss1 & -ss2, name =‘iz’)
SiC_zone = openmc.Cell(fill=SiC , region=+ss2 & -ss3, name =‘sz’)
OPyC_zone = openmc.Cell(fill=OPyC , region=+ss3 & -ss4, name =‘oz’)
cellules = [ kernel_zone, buff_zone, IPyC_zone, SiC_zone, OPyC_zone]
triso2 = openmc.Universe(cells = cellules)
triso2.plot(color_by = ‘material’, colors = { comb2 :(208, 211, 18)})
#Creation of pebble fuel
s11 = openmc.Sphere(r=3) # , boundary_type=‘vacuum’
s12 = openmc.Sphere(r=2.5)
bille_3 = -s12
bille_4 = -s11 & +s12
couche_graph2 = openmc.Cell(fill = graphite_mod, region = bille_4, name =‘Couche_graphite2’)
couche_graph2.temperature = 1200
rayon_triso= 0.0455
centers = np.load(‘/home/fandresena/model_boky/Data_pour centre_pebble/postriso.dat’, allow_pickle=True)
pebble_cells =
for c in centers:
pebble_cell = openmc.model.TRISO(rayon_triso, triso2, center=c)
pebble_cells.append(pebble_cell)
zone_comb2 = openmc.Cell(region=bille_3)
lower_left, upper_right = zone_comb2.region.bounding_box
shape = (5, 5, 5)
pitch = (upper_right - lower_left)/shape
lattice = openmc.model.create_triso_lattice(
pebble_cells, lower_left, pitch, shape, graphite_mod)
zone_comb2.fill = lattice
zone_comb2.temperature = 1200
pebble2 = openmc.Universe(cells = [couche_graph2, zone_comb2])
pebble2.plot(color_by = ‘material’, colors = {graphite_mod : ‘grey’, comb2 :(208, 211, 18)}, pixels = (1200, 1200))
sss= openmc.Sphere(r=0.025)
sss1= openmc.Sphere(r=0.035)
sss2= openmc.Sphere(r=0.039)
sss3=openmc.Sphere(r=0.0415)
sss4=openmc.Sphere(r=0.0455)
kernel_zone = openmc.Cell(fill=comb3, region=-sss, name =‘kz’)
buff_zone = openmc.Cell(fill=PyC , region=+sss & -sss1, name =‘bz’)
IPyC_zone = openmc.Cell(fill=IPyC , region=+sss1 & -sss2, name =‘iz’)
SiC_zone = openmc.Cell(fill=SiC , region=+sss2 & -sss3, name =‘sz’)
OPyC_zone = openmc.Cell(fill=OPyC , region=+sss3 & -sss4, name =‘oz’)
cellules = [ kernel_zone, buff_zone, IPyC_zone, SiC_zone, OPyC_zone]
triso3 = openmc.Universe(cells = cellules)
triso3.plot(color_by = ‘material’, colors = { comb3 :(188, 191, 24)})
#Creation of pebble fuel
s13 = openmc.Sphere(r=3) # , boundary_type=‘vacuum’
s14 = openmc.Sphere(r=2.5)
bille_5 = -s14
bille_6 = -s13 & +s14
couche_graph3 = openmc.Cell(fill = graphite_mod, region = bille_6, name =‘Couche_graphite3’)
couche_graph3.temperature = 1200
rayon_triso= 0.0455
centers = np.load(‘/home/fandresena/model_boky/Data_pour centre_pebble/postriso.dat’, allow_pickle=True)
pebble_cells =
for c in centers:
pebble_cell = openmc.model.TRISO(rayon_triso, triso3, center=c)
pebble_cells.append(pebble_cell)
zone_comb3= openmc.Cell(region=bille_3)
lower_left, upper_right = zone_comb3.region.bounding_box
shape = (5, 5, 5)
pitch = (upper_right - lower_left)/shape
lattice = openmc.model.create_triso_lattice(
pebble_cells, lower_left, pitch, shape, graphite_mod)
zone_comb3.fill = lattice
zone_comb3.temperature = 1200
pebble3 = openmc.Universe(cells = [couche_graph3, zone_comb3])
pebble3.plot(color_by = ‘material’, colors = {graphite_mod : ‘grey’, comb3 :(188, 191, 24)}, pixels = (1200, 1200))
ssss= openmc.Sphere(r=0.025)
ssss1= openmc.Sphere(r=0.035)
ssss2= openmc.Sphere(r=0.039)
ssss3=openmc.Sphere(r=0.0415)
ssss4=openmc.Sphere(r=0.0455)
kernel_zone = openmc.Cell(fill=comb4, region=-ssss, name =‘kz’)
buff_zone = openmc.Cell(fill=PyC , region=+ssss & -ssss1, name =‘bz’)
IPyC_zone = openmc.Cell(fill=IPyC , region=+ssss1 & -ssss2, name =‘iz’)
SiC_zone = openmc.Cell(fill=SiC , region=+ssss2 & -ssss3, name =‘sz’)
OPyC_zone = openmc.Cell(fill=OPyC , region=+ssss3 & -ssss4, name =‘oz’)
cellules = [ kernel_zone, buff_zone, IPyC_zone, SiC_zone, OPyC_zone]
triso4 = openmc.Universe(cells = cellules)
triso4.plot(color_by = ‘material’, colors = { comb4 :(164, 166, 38)})
#Creation of pebble fuel
s15 = openmc.Sphere(r=3) # , boundary_type=‘vacuum’
s16 = openmc.Sphere(r=2.5)
bille_7 = -s16
bille_8 = -s15 & +s16
couche_graph4 = openmc.Cell(fill = graphite_mod, region = bille_8, name =‘Couche_graphite4’)
couche_graph4.temperature = 1200
rayon_triso= 0.0455
centers = np.load(‘/home/fandresena/model_boky/Data_pour centre_pebble/postriso.dat’, allow_pickle=True)
pebble_cells =
for c in centers:
pebble_cell = openmc.model.TRISO(rayon_triso, triso4, center=c)
pebble_cells.append(pebble_cell)
zone_comb4 = openmc.Cell(region=bille_7)
lower_left, upper_right = zone_comb4.region.bounding_box
shape = (5, 5, 5)
pitch = (upper_right - lower_left)/shape
lattice = openmc.model.create_triso_lattice(
pebble_cells, lower_left, pitch, shape, graphite_mod)
zone_comb4.fill = lattice
zone_comb4.temperature = 1200
pebble4 = openmc.Universe(cells = [couche_graph4, zone_comb4])
pebble4.plot(color_by = ‘material’, colors = {graphite_mod : ‘grey’, comb4 :(164, 166, 38)}, pixels = (1200, 1200))
sssss= openmc.Sphere(r=0.025)
sssss1= openmc.Sphere(r=0.035)
sssss2= openmc.Sphere(r=0.039)
sssss3=openmc.Sphere(r=0.0415)
sssss4=openmc.Sphere(r=0.0455)
kernel_zone = openmc.Cell(fill=comb5, region=-sssss, name =‘kz’)
buff_zone = openmc.Cell(fill=PyC , region=+sssss & -sssss1, name =‘bz’)
IPyC_zone = openmc.Cell(fill=IPyC , region=+sssss1 & -sssss2, name =‘iz’)
SiC_zone = openmc.Cell(fill=SiC , region=+sssss2 & -sssss3, name =‘sz’)
OPyC_zone = openmc.Cell(fill=OPyC , region=+sssss3 & -sssss4, name =‘oz’)
cellules = [ kernel_zone, buff_zone, IPyC_zone, SiC_zone, OPyC_zone]
triso5 = openmc.Universe(cells = cellules)
triso5.plot(color_by = ‘material’, colors = { comb5 :(125, 127, 47)})
#Creation of pebble fuel
s15 = openmc.Sphere(r=3) # , boundary_type=‘vacuum’
s16 = openmc.Sphere(r=2.5)
bille_9 = -s16
bille_10 = -s15 & +s16
couche_graph5 = openmc.Cell(fill = graphite_mod, region = bille_10, name =‘Couche_graphite5’)
couche_graph5.temperature = 1200
rayon_triso= 0.0455
centers = np.load(‘/home/fandresena/model_boky/Data_pour centre_pebble/postriso.dat’, allow_pickle=True)
pebble_cells =
for c in centers:
pebble_cell = openmc.model.TRISO(rayon_triso, triso5, center=c)
pebble_cells.append(pebble_cell)
zone_comb5 = openmc.Cell(region=bille_9)
lower_left, upper_right = zone_comb5.region.bounding_box
shape = (5, 5, 5)
pitch = (upper_right - lower_left)/shape
lattice = openmc.model.create_triso_lattice(
pebble_cells, lower_left, pitch, shape, graphite_mod)
zone_comb5.fill = lattice
zone_comb5.temperature = 1200
pebble5 = openmc.Universe(cells = [couche_graph5, zone_comb5])
pebble5.plot(color_by = ‘material’, colors = {graphite_mod : ‘grey’, comb5 :(125, 127, 47)}, pixels = (1200, 1200))
#Creation of the core
gcyl = openmc.ZCylinder(r = 150)
dcyl = openmc.ZCylinder(r = 35)
plan_coeur_lim_sup = openmc.ZPlane(z0=1175)
plan_coeur_mi1 = openmc.ZPlane(z0=808)
plan_coeur_mi2 = openmc.ZPlane(z0=441)
plan_coeur_mi3 = openmc.ZPlane(z0=75)
plan_0 = openmc.ZPlane(z0=0.0)
plan_dech_mi = openmc.ZPlane(z0=-250)
plan_dech_lim = openmc.ZPlane(z0=-500)
gcyl1 = -gcyl & -plan_coeur_lim_sup & +plan_coeur_mi1
gcyl2 = -gcyl & -plan_coeur_mi1 & +plan_coeur_mi2
gcyl3 = -gcyl & -plan_coeur_mi2 & +plan_coeur_mi3
dech1 = -plan_0 & -dcyl & +plan_dech_mi
dech2 = -plan_dech_mi & -dcyl & +plan_dech_lim
rayon_pebble = 3
centers = np.load(‘/home/fandresena/model_boky/Data_pour centre_pebble/Gcyl1.dat’, allow_pickle=True)
fuel_cells =
for c in centers:
fuel_cell = openmc.model.TRISO(rayon_pebble, pebble1, center=c) # Universe comme fill
fuel_cells.append(fuel_cell)
Gcyl1 = openmc.Cell(region=gcyl1)
lower_left = np.array((-155,-155,800))
upper_right = np.array((155,155,1180))
shape = np.array((2,2,5))
pitch = (upper_right - lower_left)/shape
Gcyli = openmc.model.create_triso_lattice(fuel_cells, lower_left, pitch, shape, caloporteur_f)
Gcyl1.fill =Gcyli
centers = np.load(‘/home/fandresena/model_boky/Data_pour centre_pebble/Gcyl2.dat’, allow_pickle=True)
fuel_cells =
for c in centers:
fuel_cell = openmc.model.TRISO(rayon_pebble, pebble2, center=c) # Universe comme fill
fuel_cells.append(fuel_cell)
Gcyl2 = openmc.Cell(region=gcyl2)
lower_left = np.array((-155,-155,436))
upper_right = np.array((155,155,816))
shape = np.array((2,2,5))
pitch = (upper_right - lower_left)/shape
Gcyli = openmc.model.create_triso_lattice(fuel_cells, lower_left, pitch, shape, caloporteur_ch)
Gcyl2.fill =Gcyli
centers = np.load(‘/home/fandresena/model_boky/Data_pour centre_pebble/Gcyl3.dat’, allow_pickle=True)
fuel_cells =
for c in centers:
fuel_cell = openmc.model.TRISO(rayon_pebble, pebble3, center=c) # Universe comme fill
fuel_cells.append(fuel_cell)
Gcyl3 = openmc.Cell(region=gcyl3)
lower_left = np.array((-155,-155,70))
upper_right = np.array((155,155,446))
shape = np.array((2,2,5))
pitch = (upper_right - lower_left)/shape
Gcyli = openmc.model.create_triso_lattice(fuel_cells, lower_left, pitch, shape, caloporteur_ch)
Gcyl3.fill =Gcyli
centers = np.load(‘/home/fandresena/model_boky/Data_pour centre_pebble/Dech.dat’, allow_pickle=True)
fuel_cells =
for c in centers:
fuel_cell = openmc.model.TRISO(rayon_pebble, pebble4, center=c) # Universe comme fill
fuel_cells.append(fuel_cell)
Dech1 = openmc.Cell(region=dech1)
lower_left = np.array((-38,-38,-253))
upper_right = np.array((38,38,3))
shape = np.array((2, 2, 5))
pitch = (upper_right - lower_left)/shape
Decha= openmc.model.create_triso_lattice(fuel_cells, lower_left, pitch, shape, caloporteur_ch)
Dech1.fill =Decha
centers = np.load(‘/home/fandresena/model_boky/Data_pour centre_pebble/Dech1.dat’, allow_pickle=True)
fuel_cells =
for c in centers:
fuel_cell = openmc.model.TRISO(rayon_pebble, pebble5, center=c) # Universe comme fill
fuel_cells.append(fuel_cell)
Dech2 = openmc.Cell(region=dech2)
lower_left = np.array((-38,-38,-503))
upper_right = np.array((38,38,-247))
shape = np.array((2, 2, 5))
pitch = (upper_right - lower_left)/shape
Decha= openmc.model.create_triso_lattice(fuel_cells, lower_left, pitch, shape, caloporteur_f)
Dech2.fill =Decha
c1 = openmc.ZCylinder(r = 111.5)
p1 = openmc.ZPlane(37.5)
c2 = openmc.ZCylinder(r = 73)
co1= -plan_coeur_mi3 & -c1 & +p1
co2= -p1 & -c2 & +plan_0
cone = co1 |co2
centers = np.load(‘/home/fandresena/model_boky/Data_pour centre_pebble/c1.dat’, allow_pickle=True)
fuel_cells =
for c in centers:
fuel_cell = openmc.model.TRISO(rayon_pebble, pebble3, center=c) # Universe comme fill
fuel_cells.append(fuel_cell)
ent1 = openmc.Cell(region=co1)
lower_left = np.array((-115, -115,25))
upper_right = np.array((115, 115, 90))
shape = np.array((2, 2, 5))
pitch = (upper_right - lower_left)/shape
entc= openmc.model.create_triso_lattice(fuel_cells, lower_left, pitch, shape, caloporteur_ch)
ent1.fill = entc
centers = np.load(‘/home/fandresena/model_boky/Data_pour centre_pebble/c2.dat’, allow_pickle=True)
fuel_cells =
for c in centers:
fuel_cell = openmc.model.TRISO(rayon_pebble, pebble4, center=c) # Universe comme fill
fuel_cells.append(fuel_cell)
ent2 = openmc.Cell(region=co2)
lower_left = np.array((-105,-105, -3))
upper_right = np.array((105, 105, 45))
shape = np.array((10, 10, 10))
pitch = (upper_right - lower_left)/shape
entc= openmc.model.create_triso_lattice(fuel_cells, lower_left, pitch, shape, caloporteur_ch)
ent2.fill = entc
plan_dessus1 = openmc.ZPlane(z0=1250, boundary_type=‘vacuum’)
plan_finbc = openmc.ZPlane(z0=-100)
plan_bas1 = openmc.ZPlane(z0 =-550, boundary_type =‘vacuum’)
cells_bc =
bc_region = None
#BC & sas
r = 170
n_sas = 6
n_barres_m = 4
R_bc = 7.5
R_sas = 6.3
cells =
cells_region = None
n_total = 30
theta_step = 2*np.pi / n_total
for i in range(n_total):
theta = i * theta_step
x = r* np.cos(theta)
y = r * np.sin(theta)
if i % 5 == 0: #sas
cyl = openmc.ZCylinder(x0=x, y0=y, r=R_sas)
reg = -cyl & +plan_finbc & -plan_dessus1
cell = openmc.Cell(region=reg)
cell.temperature=900
else:# Barre de contrôle
cyl = openmc.ZCylinder(x0=x, y0=y, r=R_bc)
reg = -cyl & +plan_finbc & -plan_dessus1
cell = openmc.Cell(fill=Barre, region=reg)
cell.temperature = 900
cells_region = reg if cells_region is None else (cells_region | reg)
cells.append(cell)
#canaux a helium
cells_he=
he_region=None
r_he = 265
R_he = 5.0
n_he = 30
for i in range(n_he):
theta = 2*np.pi * i / n_he
x = r_he * np.cos(theta)
y = r_he * np.sin(theta)
cyl = openmc.ZCylinder(x0=x, y0=y, r=R_he)
reg = -cyl & +plan_bas1 & -plan_dessus1
he_region = reg if he_region is None else (he_region | reg)
cell = openmc.Cell(fill=caloporteur_f, region=reg)
cells_he.append(cell)
plan_dessus2 = openmc.ZPlane(z0 =1225)
plan_bas1 = openmc.ZPlane(z0 =-550, boundary_type =‘vacuum’)
plan_bas2 = openmc.ZPlane(z0 =-525)
cyl_ref = openmc.ZCylinder(r = 275)
cyl_lim = openmc.ZCylinder(r = 285,boundary_type =‘vacuum’)
refl_reg = -plan_dessus2 & -cyl_ref & +plan_bas2 & ~cells_region & ~he_region
isol_reg = -plan_dessus1 & -cyl_lim & +plan_bas1 & ~cells_region & ~he_region
reflect = openmc.Cell(fill =graphite_refl, region =refl_reg)
isolat = openmc.Cell(fill =isolateur, region =isol_reg)
reflect.temperature = 1200
isolat.temperature = 600
cuve = openmc.Universe(cells = [Gcyl1, Gcyl2, Gcyl3, Dech1, Dech2, ent1, ent2, reflect, isolat]+ cells +cells_he)
cuvereg = -plan_dessus1 & -cyl_lim & +plan_bas1
cuvesimp = openmc.Cell(region=cuvereg, fill=cuve)
geometry = openmc.Geometry([cuvesimp ])
geometry.export_to_xml()
tallies = openmc.Tallies()
#normalisation
cellfilter = openmc.CellFilter([cuvesimp])
volcuve = np.pi * 285**2 * (1250 + 550)
tallyforSourceCalculation = openmc.Tally(name=‘SourceCalculation’)
tallyforSourceCalculation.filters = [cellfilter]
tallyforSourceCalculation.scores = [
‘flux’,
‘fission’,
‘nu-fission’,
‘kappa-fission’,
‘fission-q-recoverable’,
‘heating’
]
tallies.append(tallyforSourceCalculation)
#MESH XZ et tally DU COEUR
meshXZ = openmc.RegularMesh(name=‘Mesh_pour_XZ’)
meshXZ.lower_left = [-285, -285, -550]
meshXZ.upper_right = [285, 285, 1250]
meshXZ.dimension = [100, 1, 200]
meshpourXZ = openmc.MeshFilter(meshXZ)
KappaXZ = openmc.Tally(name=‘kappa_XZ’)
KappaXZ.filters = [meshpourXZ]
KappaXZ.scores = [‘kappa-fission’]
tallies.append(KappaXZ)
HeatingXZ = openmc.Tally(name=‘heating_XZ’)
HeatingXZ.filters = [meshpourXZ]
HeatingXZ.scores = [‘heating’]
tallies.append(HeatingXZ)
FluxXZ = openmc.Tally(name=‘flux_XZ’)
FluxXZ.filters = [meshpourXZ]
FluxXZ.scores = [‘flux’]
tallies.append(FluxXZ)
#mesh XY et tally
meshXY = openmc.RegularMesh(name=‘Mesh_pour_XY’)
meshXY.lower_left = [-285, -285, -550]
meshXY.upper_right = [285, 285, 1250]
meshXY.dimension = [100, 100, 1]
meshpourXY = openmc.MeshFilter(meshXY)
— KAPPA-FISSION XY
KappaXY = openmc.Tally(name=‘kappa_XY’)
KappaXY.filters = [meshpourXY]
KappaXY.scores = [‘kappa-fission’]
tallies.append(KappaXY)
— HEATING XY
HeatingXY = openmc.Tally(name=‘heating_XY’)
HeatingXY.filters = [meshpourXY]
HeatingXY.scores = [‘heating’]
tallies.append(HeatingXY)
— FLUX XY
FluxXY = openmc.Tally(name=‘flux_XY’)
FluxXY.filters = [meshpourXY]
FluxXY.scores = [‘flux’]
tallies.append(FluxXY)
tallies.export_to_xml()
n=150
settings = openmc.Settings()
settings.batches = n
settings.inactive = 50
settings.particles = 2000
settings.source = openmc.IndependentSource(
space=openmc.stats.CylindricalIndependent(
r=openmc.stats.Uniform(0.0, 150.0),
phi=openmc.stats.Uniform(0.0, 2*np.pi),
z=openmc.stats.Uniform(-500.0, 1175.0)
)
)
Settings
settings.statepoint = {‘batches’: range(5, n + 5, 5)}
settings.export_to_xml()
openmc.run()
sp = openmc.StatePoint(‘statepoint.300.h5’)
— keff
keff = sp.keff.nominal_value
— Source tally
source_tally = sp.get_tally(name=‘SourceCalculation’)
value_fission = source_tally.mean[0,0,source_tally.get_score_index(‘fission’)]
value_nufission = source_tally.mean[0,0,source_tally.get_score_index(‘nu-fission’)]
value_kappa = source_tally.mean[0,0,source_tally.get_score_index(‘kappa-fission’)]
nu = value_nufission / value_fission
kappa = value_kappa / value_fission
eV_to_J = 1.602176634e-19
power_model = 250e6 # 250 MW
source_multiplier = (power_model/(kappaeV_to_J))(nu/keff)
Get tallies
gettallyfluxxz = sp.get_tally(name=‘flux_XZ’)
get slice
FluxDistributionxz = gettallyfluxxz.get_slice(scores=[‘flux’])
FluxDistributionxz.mean.shape = [meshXZ.dimension[2], meshXZ.dimension[0], meshXZ.dimension[1]]
FluxDistributionxz.std_dev.shape = [meshforXZcore.dimension[2], meshforXZcore.dimension[0], meshforXZcore.dimension[1]]
meshvol = round(meshXZ.volumes[0,0,0], 10)
print(‘mesh volume for average flux’, meshvol, ‘cc’)
neutronfluxdistributionXZ = FluxDistributionxz.mean*source_multiplier/meshvol
XZextent = [meshXZ.lower_left[0], meshXZ.upper_right[0], meshXZ.lower_left[2], meshXZ.upper_right[2]] # xmin, xmax, zmin, zmax
Plot
FluxFigure, ax = plt.subplots()
images = ax.imshow(neutronfluxdistributionXZ, origin=‘lower’, extent=XZextent)
ax.set_title(‘flux xz’)
ax.set_xlabel(‘x(cm)’)
ax.set_ylabel(‘z(cm)’)
FluxFigure.colorbar(images, ax=ax, label=‘neutron flux (n/cm2-sec)’)
After the calculation, i obtained the neutron flux distribution like in the second pictures.
Can someone explain me why the neutron flux exist only in the top of the core (inside the zone were U enrichment = 8)? How can i do to have the same distribution like the in the first pictures?
NB: - I didn’t have an access to use an HPC thats why I used a few number of particles and batches but i obtained these results in the same number (batches and particles)
-I can’t send the .dat files so the code for obtainin each dat files is :
s6 = openmc.Sphere(r=3)
s5 = openmc.Sphere(r=2.5)
bille1 = -s5
bille2 = -s6 & +s5
rayon_triso= 0.0455
centers = openmc.model.pack_spheres(radius=rayon_triso, region=bille1,num_spheres=12000, seed = 11)
#transforme les centres en tableau
postriso = np.array(centers)
sauvegarde dans un fichier .dat
postriso.dump(‘postriso.dat’)
gcyl = openmc.ZCylinder(r = 150)
dcyl = openmc.ZCylinder(r = 35)
plan_coeur_lim_sup = openmc.ZPlane(z0=1175)
plan_coeur_mi1 = openmc.ZPlane(z0=808)
plan_coeur_mi2 = openmc.ZPlane(z0=441)
plan_coeur_mi3 = openmc.ZPlane(z0=75)
plan_0 = openmc.ZPlane(z0=0.0)
plan_dech_mi = openmc.ZPlane(z0=-250)
plan_dech_lim = openmc.ZPlane(z0=-500)
gcyl1 = -gcyl & -plan_coeur_lim_sup & +plan_coeur_mi1
gcyl2 = -gcyl & -plan_coeur_mi1 & +plan_coeur_mi2
gcyl3 = -gcyl & -plan_coeur_mi2 & +plan_coeur_mi3
dech1 = -plan_0 & -dcyl & +plan_dech_mi
dech2 = -plan_dech_mi & -dcyl & +plan_dech_lim
centers = openmc.model.pack_spheres(radius=rayon_pebble, region=gcyl1, pf = 0.6, seed = 12)
centres en tableau
position = np.array(centers)
sauvegarde dans un fichier .dat
position.dump(‘Gcyl1.dat’)
centers = openmc.model.pack_spheres(radius=rayon_pebble, region=gcyl2, pf = 0.6, seed = 12)
centres en tableau
position = np.array(centers)
sauvegarde dans un fichier .dat
position.dump(‘Gcyl2.dat’)
centers = openmc.model.pack_spheres(radius=rayon_pebble, region=gcyl3, pf = 0.6, seed = 12)
centres en tableau
position = np.array(centers)
sauvegarde dans un fichier .dat
position.dump(‘Gcyl3.dat’)
centers = openmc.model.pack_spheres(radius=rayon_pebble, region=dech1, pf=0.5, seed = 13)
#transforme les centres en tableau
pospebbde = np.array(centers)
sauvegarde dans un fichier .dat
pospebbde.dump(‘Dech.dat’)
centers = openmc.model.pack_spheres(radius=rayon_pebble, region=dech2, pf=0.5,)
#transforme les centres en tableau
pospebbde = np.array(centers)
sauvegarde dans un fichier .dat
pospebbde.dump(‘Dech1.dat’)
c1 = openmc.ZCylinder(r = 111.5)
p1 = openmc.ZPlane(37.5)
c2 = openmc.ZCylinder(r = 73)
co1= -plan_coeur_mi3 & -c1 & +p1
co2= -p1 & -c2 & +plan_0
cone = co1 |co2
rayon_pebble = 3
centers = openmc.model.pack_spheres(radius=rayon_pebble, region=co1, num_spheres=7500)
#transforme les centres en tableau
pospebbc1 = np.array(centers)
sauvegarde dans un fichier .datrayon_pebble = 3
pospebbc1.dump(‘c1.dat’)
centers = openmc.model.pack_spheres(radius=rayon_pebble, region=co2, num_spheres=3100)
#transforme les centres en tableau
pospebbc2 = np.array(centers)
sauvegarde dans un fichier .dat
pospebbc2.dump(‘c2.dat’)

