Skip to content

Commit

Permalink
Add check that cell added for pellet region has fissile material. Refs
Browse files Browse the repository at this point in the history
  • Loading branch information
aprilnovak committed Aug 4, 2019
1 parent a829d53 commit 1e0ada0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/enrico/cell_instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ class CellInstance {
//! \return cell density in [g/cm^3]
double get_density() const;

//! Check if the cell is fissionable
//! \return whether the cell contains fissionable material
bool is_fissionable() const;

//! Check for equality
bool operator==(const CellInstance& other) const;

Expand Down
7 changes: 7 additions & 0 deletions src/cell_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ double CellInstance::get_density() const
return rho;
}

bool CellInstance::is_fissionable() const
{
bool fissionable;
err_chk(openmc_material_get_fissionable(material_index_, &fissionable));
return fissionable;
}

bool CellInstance::operator==(const CellInstance& other) const
{
return index_ == other.index_ && instance_ == other.instance_;
Expand Down
13 changes: 13 additions & 0 deletions src/openmc_heat_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@ void OpenmcHeatDriver::init_mappings()
tracked[c] = openmc_driver_->cells_.size() - 1;
}

// ensure that the cell being mapped for the pellet region contains
// a fissionable material as a way to check that the T/H geometry of the
// pellet region is sufficiently refined to account for all OpenMC cells.
// This check does not ensure that we have accounted for
// _all_ fissionable cells, just that the models line up in the pellet region,
// from which we can infer that the general geometry lines up (because otherwise
// we could be mapping fluid cells to the surrogate pins, etc.)
if (k < heat_driver_->n_fuel_rings_) {
Ensures(c.is_fissionable());
} else {
Ensures(!c.is_fissionable());
}

// Map OpenMC material to ring and vice versa
int32_t array_index = tracked[c];
cell_inst_to_ring_[array_index].push_back(ring_index);
Expand Down

0 comments on commit 1e0ada0

Please sign in to comment.