Skip to content

Commit

Permalink
Ensure that number of OpenMC cells tracked in the surrogate mapping i…
Browse files Browse the repository at this point in the history
…n the pellet region matches the number of total fissionable cells. Refs enrico-dev#55
  • Loading branch information
aprilnovak committed Aug 5, 2019
1 parent 6ad771b commit 81189ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/openmc_heat_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ void OpenmcHeatDriver::init_mappings()
// TODO: Don't hardcode number of azimuthal segments
int n_azimuthal = 4;

int n_fissionable_mapped = 0;

for (int i = 0; i < heat_driver_->n_pins_; ++i) {
// Get coordinate of pin center
double x_center = heat_driver_->pin_centers_(i, 0);
Expand Down Expand Up @@ -87,6 +89,9 @@ void OpenmcHeatDriver::init_mappings()
if (tracked.find(c) == tracked.end()) {
openmc_driver_->cells_.push_back(c);
tracked[c] = openmc_driver_->cells_.size() - 1;

if (k < heat_driver_->n_fuel_rings_)
n_fissionable_mapped++;
}

// ensure that the cell being mapped for the pellet region contains
Expand All @@ -113,6 +118,12 @@ void OpenmcHeatDriver::init_mappings()
}
}

// check that all fissionable cells have been mapped to the T/H model.
// Note that this does not check for distortions in the model, just that
// the surrogate T/H model is sufficiently fine in the pellet region to
// capture all fissionable cells in OpenMC.
Ensures(openmc_driver_->n_fissionable_cells_ == n_fissionable_mapped);

if (openmc_driver_->active()) {
n_materials_ = openmc_driver_->cells_.size();
}
Expand Down

0 comments on commit 81189ab

Please sign in to comment.