OpenMC Guide
Multi-physics Coupling in OpenMC
Introduction to Multi-physics
While OpenMC excels at neutron transport calculations, real nuclear systems involve multiple interacting physical phenomena. Building on our understanding of transport physics and tallies, we can now explore how to couple OpenMC with other physics solvers.
Key Physics Interactions
- Neutronics → Heat Generation
- Temperature → Cross Sections
- Density → Moderation
- Deformation → Geometry
Common Applications
- Fuel temperature feedback
- Coolant density effects
- Material deformation
- Fuel performance
Temperature Feedback
The most common coupling is temperature feedback. We'll build on our knowledge of materials and cross sections to implement this:
Basic Temperature Treatment
python
# Create material (from Materials section)
fuel = openmc.Material(name='UO2')
fuel.set_density('g/cm3', 10.4)
fuel.add_nuclide('U235', 0.04)
fuel.add_nuclide('U238', 0.96)
fuel.add_element('O', 2.0)
# Add temperature (new for multi-physics)
fuel.temperature = 900.0 # K
# Configure temperature treatment
settings = openmc.Settings()
settings.temperature = {
'method': 'interpolation',
'range': (294.0, 1500.0),
'multipole': True # Use multipole method when available
}Per-Region Temperatures
python
# Assign different temperatures by cell (after building geometry)
temperature_map = {
fuel_cell.id: 1200.0,
clad_cell.id: 700.0,
water_cell.id: 580.0,
}
all_cells = geometry.get_all_cells()
for cell_id, temp in temperature_map.items():
all_cells[cell_id].temperature = tempCoupling Patterns
Using our knowledge of tallies and results processing, we can implement different coupling approaches:
Operator Splitting
- Run neutronics (OpenMC)
- Extract power distribution
- Run coupled physics
- Update temperatures
- Repeat until converged
Tight Coupling
- Direct API integration
- Shared memory access
- Common time stepping
- Consistent convergence
Basic Coupling Example
python
# Coupling iteration loop
for i in range(max_iterations):
# 1. Run OpenMC
openmc.run()
# 2. Get power distribution
sp = openmc.StatePoint('statepoint.h5')
power_tally = sp.get_tally(name='power')
power_density = power_tally.mean
# 3. Run thermal model
temperatures = calculate_temperatures(power_density)
# 4. Update OpenMC materials
update_temperatures(materials, temperatures)
# 5. Check convergence
if check_convergence():
breakAvailable Frameworks
MOOSE Framework
- Full multi-physics support
- Finite element based
- Parallel execution
- Advanced solvers
ENRICO
- OpenMC + Nek5000/NekRS
- High-fidelity CFD
- MPI parallelization
- Automated coupling
Note: The choice of coupling framework depends on your specific needs:
- Computational requirements
- Physics fidelity needs
- Available computing resources
- Development time constraints