diff --git a/include/openmc/photon.h b/include/openmc/photon.h index 902d242321..0fbdbc0c9e 100644 --- a/include/openmc/photon.h +++ b/include/openmc/photon.h @@ -67,6 +67,7 @@ public: xt::xtensor pair_production_total_; xt::xtensor pair_production_electron_; xt::xtensor pair_production_nuclear_; + xt::xtensor heating_; // Form factors Tabulated1D incoherent_form_factor_; diff --git a/src/photon.cpp b/src/photon.cpp index 79345b90e0..86bf4390ac 100644 --- a/src/photon.cpp +++ b/src/photon.cpp @@ -96,6 +96,11 @@ PhotonInteraction::PhotonInteraction(hid_t group, int i_element) read_dataset(rgroup, "xs", photoelectric_total_); close_group(rgroup); + // Read heating + rgroup = open_group(group, "heating"); + read_dataset(rgroup, "xs", heating_); + close_group(rgroup); + // Read subshell photoionization cross section and atomic relaxation data rgroup = open_group(group, "subshells"); std::vector designators; @@ -280,6 +285,7 @@ PhotonInteraction::PhotonInteraction(hid_t group, int i_element) xt::log(photoelectric_total_), -500.0); pair_production_total_ = xt::where(pair_production_total_ > 0.0, xt::log(pair_production_total_), -500.0); + heating_ = xt::where(heating_ > 0.0, xt::log(heating_), -500.0); } void PhotonInteraction::compton_scatter(double alpha, bool doppler,