mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Merge pull request #3 from paulromano/mixed_ncrystal_const
Change ncrystal_max_energy to be a global constant
This commit is contained in:
commit
93aaa32d4d
5 changed files with 5 additions and 5 deletions
|
|
@ -20,6 +20,9 @@ namespace openmc {
|
|||
|
||||
extern "C" const bool NCRYSTAL_ENABLED;
|
||||
|
||||
//! Energy in [eV] to switch between NCrystal and ENDF
|
||||
constexpr double NCRYSTAL_MAX_ENERGY {5.0};
|
||||
|
||||
//==============================================================================
|
||||
// Wrapper class an NCrystal material
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -91,8 +91,6 @@ extern int n_log_bins; //!< number of bins for logarithmic energy grid
|
|||
extern int n_batches; //!< number of (inactive+active) batches
|
||||
extern int n_max_batches; //!< Maximum number of batches
|
||||
extern int max_tracks; //!< Maximum number of particle tracks written to file
|
||||
extern double
|
||||
ncrystal_max_energy; //!< Energy in eV to switch between NCrystal and ENDF
|
||||
extern ResScatMethod res_scat_method; //!< resonance upscattering method
|
||||
extern double res_scat_energy_min; //!< Min energy in [eV] for res. upscattering
|
||||
extern double res_scat_energy_max; //!< Max energy in [eV] for res. upscattering
|
||||
|
|
|
|||
|
|
@ -801,7 +801,7 @@ void Material::calculate_neutron_xs(Particle& p) const
|
|||
|
||||
// Calculate NCrystal cross section
|
||||
double ncrystal_xs = -1.0;
|
||||
if (ncrystal_mat_ && p.E() < settings::ncrystal_max_energy) {
|
||||
if (ncrystal_mat_ && p.E() < NCRYSTAL_MAX_ENERGY) {
|
||||
ncrystal_xs = ncrystal_mat_.xs(p);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ void sample_neutron_reaction(Particle& p)
|
|||
// Sample a scattering reaction and determine the secondary energy of the
|
||||
// exiting neutron
|
||||
const auto& ncrystal_mat = model::materials[p.material()]->ncrystal_mat();
|
||||
if (ncrystal_mat && p.E() < settings::ncrystal_max_energy) {
|
||||
if (ncrystal_mat && p.E() < NCRYSTAL_MAX_ENERGY) {
|
||||
ncrystal_mat.scatter(p);
|
||||
} else {
|
||||
scatter(p, i_nuclide);
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ int n_batches;
|
|||
int n_max_batches;
|
||||
int max_splits {1000};
|
||||
int max_tracks {1000};
|
||||
double ncrystal_max_energy {5.0};
|
||||
ResScatMethod res_scat_method {ResScatMethod::rvs};
|
||||
double res_scat_energy_min {0.01};
|
||||
double res_scat_energy_max {1000.0};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue