mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Merge pull request #1336 from paulromano/incoherent-elastic-fix
Fix reading of Debye-Waller for incoherent elastic
This commit is contained in:
commit
251ecba60b
3 changed files with 3 additions and 18 deletions
|
|
@ -76,11 +76,6 @@ private:
|
|||
std::unique_ptr<AngleEnergy> distribution; //!< Secondary angle-energy distribution
|
||||
};
|
||||
|
||||
//! Upper threshold for incoherent inelastic scattering (usually ~4 eV)
|
||||
double threshold_inelastic_;
|
||||
//! Upper threshold for coherent/incoherent elastic scattering
|
||||
double threshold_elastic_ {0.0};
|
||||
|
||||
// Inelastic scattering data
|
||||
Reaction elastic_;
|
||||
Reaction inelastic_;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ CoherentElasticAE::sample(double E_in, double& E_out, double& mu) const
|
|||
|
||||
IncoherentElasticAE::IncoherentElasticAE(hid_t group)
|
||||
{
|
||||
read_attribute(group, "debye_waller", debye_waller_);
|
||||
read_dataset(group, "debye_waller", debye_waller_);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -210,22 +210,15 @@ ThermalData::ThermalData(hid_t group)
|
|||
if (temp == "coherent_elastic") {
|
||||
auto xs = dynamic_cast<CoherentElasticXS*>(elastic_.xs.get());
|
||||
elastic_.distribution = std::make_unique<CoherentElasticAE>(*xs);
|
||||
|
||||
// Set threshold energy
|
||||
threshold_elastic_ = xs->bragg_edges().back();
|
||||
|
||||
} else {
|
||||
auto xs = dynamic_cast<Tabulated1D*>(elastic_.xs.get());
|
||||
if (temp == "incoherent_elastic") {
|
||||
elastic_.distribution = std::make_unique<IncoherentElasticAE>(dgroup);
|
||||
} else if (temp == "incoherent_elastic_discrete") {
|
||||
auto xs = dynamic_cast<Tabulated1D*>(elastic_.xs.get());
|
||||
elastic_.distribution = std::make_unique<IncoherentElasticAEDiscrete>(
|
||||
dgroup, xs->x()
|
||||
);
|
||||
}
|
||||
|
||||
// Set threshold energy
|
||||
threshold_elastic_ = xs->x().back();
|
||||
}
|
||||
|
||||
close_group(elastic_group);
|
||||
|
|
@ -239,10 +232,6 @@ ThermalData::ThermalData(hid_t group)
|
|||
// Read inelastic cross section
|
||||
inelastic_.xs = read_function(inelastic_group, "xs");
|
||||
|
||||
// Set inelastic threshold
|
||||
auto xs = dynamic_cast<Tabulated1D*>(inelastic_.xs.get());
|
||||
threshold_inelastic_ = xs->x().back();
|
||||
|
||||
// Read angle-energy distribution
|
||||
hid_t dgroup = open_group(inelastic_group, "distribution");
|
||||
std::string temp;
|
||||
|
|
@ -250,6 +239,7 @@ ThermalData::ThermalData(hid_t group)
|
|||
if (temp == "incoherent_inelastic") {
|
||||
inelastic_.distribution = std::make_unique<IncoherentInelasticAE>(dgroup);
|
||||
} else if (temp == "incoherent_inelastic_discrete") {
|
||||
auto xs = dynamic_cast<Tabulated1D*>(inelastic_.xs.get());
|
||||
inelastic_.distribution = std::make_unique<IncoherentInelasticAEDiscrete>(
|
||||
dgroup, xs->x()
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue