Temperature transfer using an OpenMC temperature field - #1415
Temperature transfer using an OpenMC temperature field#1415JoffreyDorville wants to merge 13 commits into
Conversation
…field values for testing purpose
|
Job Precheck, step Clang format on d824fa5 wanted to post the following: Your code requires style changes. A patch was auto generated and copied here
Alternatively, with your repository up to date and in the top level of your repository:
|
|
Thanks @JoffreyDorville! Since this data transfer is not using anything about cell averages, it might be time to make another derived class of |
|
Something to think about if we're creating a new OpenMC problem class is that tallies and filters are entirely handled through the |
Hi everyone!
This PR adds a mode to transfer temperature to OpenMC via the upcoming OpenMC temperature field (openmc-dev/openmc#3734).
Because this PR needs OpenMC PR 3734 to be merged to actually work, it will remain a draft PR for the moment.
Context
I am using Cardinal to transfer temperatures to OpenMC with a custom temperature field (regular mesh + vector of temperature values) on the OpenMC side. The multiphysics coupling seems to work well with my local prototype so I am working on cleaning the different features I have to submit them as PRs:
1. OpenMC initialization action (#1302)
2. OpenMC mesh generator (#1365)
3. Temperature transfer to OpenMC temperature field (this PR)
Implementation
A new way to send temperature from the elements of the MOOSE mirror mesh to an OpenMC temperature field has been implemented. This transfer happens in
OpenMCCellAverageProblemand relies on the C API functionopenmc_temperature_field_set_temperature()to transfer the temperature values to OpenMC. A new parameter namedtemperature_field_transferhas been added toOpenMCCellAverageProblemto trigger this new transfer mode when needed.This implementation relies on a naive mapping approach (same cell ordering between MOOSE and OpenMC mesh elements) and restrictions are still needed to be implemented to guarantee temperature transfer consistency.
Limitations
It is currently limited to the regular mesh type of OpenMC.