Need help to model the same problem in OpenMC

Hi, I am new to use OpenMC, and want to learn by example, I have the problem modeled in Serpent and want to model the same with OpenMC, please write the OpenMC version of the given input file

Serpent version:
set title “cylMCFR radius 19.0, height 100.0, reflector 25.0”
%surface definitions____________________
surf 1 cylz 0.0 0.0 19.0 % fuel
surf 2 cylz 0.0 0.0 44.0 % reflector

%cell definitions_______________________
cell 30 re refl 1 -2 % radial reflector
cell 80 0 fill re 1 -2
cell 50 fs fuelsalt -1 % fuel salt
cell 85 0 fill fs -1
cell 99 0 outside 2

% Fuel salt: 66.66%NaCl + 33.34%UCl3, U enrichment 0.93
mat fuelsalt -3.16391796 rgb 240 30 30 burn 1 tmp 900.000
11023.09c -0.100274788825 % Na-23
17035.09c -0.289847995589 % Cl-35
17037.09c -0.096758222661 % Cl-37
92234.09c -0.004225929437 % U-234
92235.09c -0.476858378996 % U-235
92236.09c -0.002202896269 % U-236
92238.09c -0.029831788223 % U-238

% MgO reflector
mat refl -3.5 tmp 873.0 rgb 75 75 75
12024.06c 1.0
8016.06c 1.0

set mvol fuelsalt 0 226822.98958918

set pop 100000 240 40 % N pop and criticality cycles
set power 300000.0 % Power, 300 thermal kW
set bc 1 % vacuum

ene six_group 1 1E-11 7.485E-4 5.5308E-3 2.47875E-2 0.4979 2.2313 12
set gcu re fs % group constant generation in unis fs and re
set nfg six_group
set micro nj20

det default n
dn 1
0 44 25 % 25 radial bins, 0 to 44
0 360 1 % 1 angual bin, 0 to 360 deg
-25 125 75 % 75 axial bin, -25 to 125
de six_group

% Data Libraries
set acelib “/opt/JEFF-3.3/sss_jeff33.xsdir”
set declib “/opt/JEFF-3.3/jeff33.dec”
set nfylib “/opt/JEFF-3.3/jeff33.nfy”

% Plots
plot 3 1500 1500
plot 2 1500 1500

One simple option is to use serpent openmc convertor.

Hi Habib, welcome to the openmc community.
You could try the serpent adapter mentioned by Khurrum since I think the serpent geometry you want to model is still a simple model with cylz surfaces. But if the geometry becomes complicated, I recommend you build your geometry manually from the surface to the cell and universe based on your serpent model. That way you can avoid geometry errors.

The converter currently only handles geometry and material information, while i have model the same problem for simple criticality calculations but the problem is that i got very high relative errer of (817.22 pcm) keff_serpent = 1.09934, keff_openmc = 1.090356, i want to please check my input file and correctme if there are some mistakes

OpenMC Input File:

import numpy as np
import matplotlib.pyplot as plt
from PIL import Image # For image conversion
import openmc

Step 1: Define geometry dimensions

fuel_radius = 19.0 # Fuel radius in cm
reflector_thickness = 25.0 # Reflector thickness in cm
total_radius = 44.0
height = 100.0

Step 2: Define materials

Fuel Salt Material (NaCl-UCl3 mixture)

fuel = openmc.Material(name=‘Fuel Salt’)
fuel.add_element(‘Na’, 0.100274788825, percent_type=‘wo’)
fuel.add_nuclide(‘Cl35’, 0.289847995589, percent_type=‘wo’)
fuel.add_nuclide(‘Cl37’, 0.096758222661, percent_type=‘wo’)
fuel.add_nuclide(‘U234’, 0.004225929437, percent_type=‘wo’)
fuel.add_nuclide(‘U235’, 0.476858378996, percent_type=‘wo’)
fuel.add_nuclide(‘U236’, 0.002202896269, percent_type=‘wo’)
fuel.add_nuclide(‘U238’, 0.029831788223, percent_type=‘wo’)
fuel.set_density(‘g/cm3’, 3.16391796)
fuel.temperature = 900 # Set current temperature

Reflector Material (Magnesium Oxide)

reflector = openmc.Material(name=‘Magnesium Oxide’)
reflector.add_element(‘Mg’, 1.0) # Magnesium
reflector.add_element(‘O’, 1.0) # Oxygen
reflector.set_density(‘g/cm3’, 3.5)
reflector.temperature = 873.0 # Set current temperature

Step 3: Create a materials collection and export to XML

materials = openmc.Materials([fuel, reflector])
materials.export_to_xml()

Step 3: Define geometry

Fuel cylinder (infinite along z-axis)

fuel_cylinder = openmc.ZCylinder(r=fuel_radius)

Reflector cylinder (infinite along z-axis)

reflector_cylinder = openmc.ZCylinder(r=total_radius, boundary_type=‘vacuum’)

Define planes for z-boundaries

bottom_plane = openmc.ZPlane(z0=-0.5 * height, boundary_type=‘reflective’)
top_plane = openmc.ZPlane(z0=0.5 * height, boundary_type=‘reflective’)

Define regions

fuel_region = -fuel_cylinder & +bottom_plane & -top_plane # Inside the fuel cylinder
reflector_region = +fuel_cylinder & -reflector_cylinder & +bottom_plane & -top_plane # Between fuel and reflector cylinders

Assign materials to regions

fuel_cell = openmc.Cell(region=fuel_region, fill=fuel)
reflector_cell = openmc.Cell(region=reflector_region, fill=reflector)

Create a universe

root_universe = openmc.Universe(cells=[fuel_cell, reflector_cell])

Step 4: Export geometry

geometry = openmc.Geometry(root_universe)
geometry.export_to_xml()

Step 5: Define settings

settings = openmc.Settings()
settings.particles = 100000
settings.batches = 240
settings.inactive = 40
settings.output = {‘tallies’: True}

Define the bounds for the uniform source distribution

bounds = [-44, -44, -50, 44, 44, 50]
uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)
settings.source = openmc.Source(space=uniform_dist)
settings.trigger_active = True
settings.trigger_max_batches = settings.batches * 4
settings.temperature = {‘method’: ‘interpolation’, ‘multipole’: True}
settings.export_to_xml()

Step 6: Run simulation

openmc.run()

Have you tried to run using the same JEFF-3.3 nuclear data library?
I ran your input with ENDF VII.1 and I got k-eff 1.090xx, and sorry I didn’t try to run it with the JEFF 3.3 lib even though we can download it from Other Data Libraries | OpenMC.
I think your openmc model is consistent even though you use 100 cm height reflective BC, but I have tried to run without it and it was still around 1.090. I also checked my endf lib, and I didn’t find any s(alpha,beta) for MgO.

I hope other members can give their recommendations on this code-to-code case.