Skip to content

Add cell densities #2900

@lewisgross1296

Description

@lewisgross1296

Description

The current paradigm for temperatures and densities in OpenMC is that temperatures are set on cells and densities are set on materials. For those wishing to couple OpenMC into multiphysics simulations (for me specifically to Cardinal), it would be useful to have cell densities.

To model temperature-density-neutronic feedback, each cell currently needs a temperature AND a unique openmc.Material object to update after multiphysics iteration. Getting unique openmc.Material object everywhere needed isn't always clean, for example, when using a 3D Lattice. Additionally, it increases the size of materials.xml and possibly complicates understanding geometry.xml in the case of a very large system needing very fine feedback. (e.g. most reactor models)

If cells could keep track of density, then only one openmc.Material would be needed to provide number density and nuclide data, while each cell could receive independent density information. Having both a cell temperature and density would enhance the power of distributed cells. This feature could be useful outside of multiphysics situations as well.

Alternatives

For the case mentioned above, a set of 2D HexLattices filled into stacked cells with the proper .clone() scheme can achieve the same goal as cell densities, but it does add cognitive burden to writing/understanding code. As long as you can create and assign enough unique openmc.Material objects, you can do the above without cell densities.

Compatibility

According to @gridley, this is little more than a copy-paste from the sqrtkT code. It would also eliminate the need for some error checking in Cardinal, which I'm sure @aprilnovak would be happy about.

I will make a PR to start this. If anyone wants to link relevant commits/issues/PRs, that would be great! I've already found a few (5b0d8ed, #1224, #1286 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions