Nuclear-thermal coupling

If I want to perform nuclear-thermal coupling with OpenMC and other programs, how can I transfer the grid-based data output from other programs to OpenMC? In other words, how does OpenMC read temperature and density information in grid form?Thanks

Hi @Lishuaishuai,

You need to implement an algorithm called mesh mirror. I’m assuming that the other physics module you want to couple with is deterministic (with a grid mesh), whereas the OpenMC model uses a CSG representation. Your task is to transfer grid-averaged data to any OpenMC cell.

The possible steps are as follows:

  1. Create a mesh for the physics module(I’ll refer to it as the heat conduction module for now, but it could be any physics module). Run the problem and store the solution in the mesh.

  2. Develop a mesh mirror program to map grid points in your heat conduction problem to corresponding OpenMC cells. Compute the average value of the results (e.g., temperature) for the grid points within each cell.

  3. Now, you have an average temperature value for each cell. Repeat this process for all other OpenMC cells.

  4. Update the temperature input for each respective cell in OpenMC’s materials.xml input file. This step can be avoided by using the C++ API or Python API of OpenMC, allowing you to handle everything programmatically. (Using the Python API may require some tricky programming.)

  5. Run the OpenMC simulation.

This approach describes a one-way coupling process. For two-way coupling, the idea remains the same, except you also retrieve data from OpenMC and translate it from cells back to grid points.

There is a multi physics program called Cardinal (https://cardinal.cels.anl.gov/) that already performs the kind of coupling you’re describing. Check out the file OpenMCCellAverageProblem.C in Cardinal’s GitHub repository for more insights: Cardinal GitHub.

My apologies for just seeing your reply, thank you for your patience. I will follow the steps to try and succeed. Wishing you good luck.Best wishes to you!