#!/usr/bin/env python3

import openmc

## Monte Carlo Performance Benchmark, version 1.2, July 2011

fuel = openmc.Material(name="Fuel", material_id=1)
fuel.set_density('g/cm3', 10.062)
fuel.add_nuclide("U234", 4.9476e-6)
fuel.add_nuclide("U235", 4.8218e-4)
fuel.add_nuclide("U236", 9.0402e-5)
fuel.add_nuclide("U238", 2.1504e-2)
fuel.add_nuclide("Np237", 7.3733e-6)
fuel.add_nuclide("Pu238", 1.5148e-6)
fuel.add_nuclide("Pu239", 1.3955e-4)
fuel.add_nuclide("Pu240", 3.4405e-5)
fuel.add_nuclide("Pu241", 2.1439e-5)
fuel.add_nuclide("Pu242", 3.7422e-6)
fuel.add_nuclide("Am241", 4.5041e-7)
fuel.add_nuclide("Am242_m1", 9.2301e-9)
fuel.add_nuclide("Am243", 4.7878e-7)
fuel.add_nuclide("Cm242", 1.0485e-7)
fuel.add_nuclide("Cm243", 1.4268e-9)
fuel.add_nuclide("Cm244", 8.8756e-8)
fuel.add_nuclide("Cm245", 3.5285e-9)
fuel.add_nuclide("Mo95", 2.6497e-5)
fuel.add_nuclide("Tc99", 3.2772e-5)
fuel.add_nuclide("Ru101", 3.0742e-5)
fuel.add_nuclide("Ru103", 2.3505e-6)
fuel.add_nuclide("Ag109", 2.0009e-6)
fuel.add_nuclide("Xe135", 1.0801e-8)
fuel.add_nuclide("Cs133", 3.4612e-5)
fuel.add_nuclide("Nd143", 2.6078e-5)
fuel.add_nuclide("Nd145", 1.9898e-5)
fuel.add_nuclide("Sm147", 1.6128e-6)
fuel.add_nuclide("Sm149", 1.1627e-7)
fuel.add_nuclide("Sm150", 7.1727e-6)
fuel.add_nuclide("Sm151", 5.4947e-7)
fuel.add_nuclide("Sm152", 3.0221e-6)
fuel.add_nuclide("Eu153", 2.6209e-6)
fuel.add_nuclide("Gd155", 1.5369e-9)
fuel.add_nuclide("O16", 4.5737e-2)

clad = openmc.Material(name='Cladding', material_id=2)
clad.set_density('g/cm3', 5.77)
clad.add_element("Zr", 1.0)

cold_water = openmc.Material(name='Cold borated water', material_id=3)
cold_water.set_density("atom/b-cm", 0.07416)
cold_water.add_nuclide("H1", 2.0)
cold_water.add_nuclide("O16", 1.0)
cold_water.add_nuclide("B10", 6.490e-4)
cold_water.add_nuclide("B11", 2.689e-3)
cold_water.add_s_alpha_beta('c_H_in_H2O')

hot_water = openmc.Material(name='Hot borated water', material_id=4)
hot_water.set_density("atom/b-cm", 0.06614)
hot_water.add_nuclide("H1", 2.0)
hot_water.add_nuclide("O16", 1.0)
hot_water.add_nuclide("B10", 6.490e-4)
hot_water.add_nuclide("B11", 2.689e-3)
hot_water.add_s_alpha_beta('c_H_in_H2O')

rpv_steel = openmc.Material(name='Reactor pressure vessel steel',
                            material_id=5)
rpv_steel.set_density("g/cm3", 7.9)






lower_rad_ref = openmc.Material(name='Lower radial reflector',
                                material_id=6)
lower_rad_ref.set_density("g/cm3", 4.32)






upper_rad_ref = openmc.Material(name='Upper radial reflector /'
                                'Top plate region', material_id=7)
upper_rad_ref.set_density("g/cm3", 4.28)




bot_plate = openmc.Material(name='Bottom plate region', material_id=8)
bot_plate.set_density("g/cm3", 7.184)






bot_nozzle = openmc.Material(name='Bottom nozzle region', material_id=9)
bot_nozzle.set_density("g/cm3", 2.53)



top_nozzle = openmc.Material(name='Top nozzle region', material_id=10)
top_nozzle.set_density("g/cm3", 1.746)






top_fa = openmc.Material(name='Top of fuel assemblies', material_id=11)
top_fa.set_density("g/cm3", 3.044)





bot_fa = openmc.Material(name='Bottom of fuel assemblies', material_id=12)
bot_fa.set_density("g/cm3", 1.762)




# Define the materials file.
materials = openmc.Materials()
materials.default_xs = '71c'
materials += [fuel, , , , , , , , , , , , bot_fa]
materials.export_to_xml()


# Define surfaces.