2018-08-08 07:00:48 -05:00
|
|
|
//! \file secondary_nbody.h
|
|
|
|
|
//! N-body phase space distribution
|
|
|
|
|
|
2018-07-09 23:26:05 -05:00
|
|
|
#ifndef OPENMC_SECONDARY_NBODY_H
|
|
|
|
|
#define OPENMC_SECONDARY_NBODY_H
|
|
|
|
|
|
|
|
|
|
#include "hdf5.h"
|
|
|
|
|
|
2018-08-20 14:40:32 -05:00
|
|
|
#include "openmc/angle_energy.h"
|
2018-07-09 23:26:05 -05:00
|
|
|
|
|
|
|
|
namespace openmc {
|
|
|
|
|
|
2018-08-08 07:00:48 -05:00
|
|
|
//==============================================================================
|
|
|
|
|
//! Angle-energy distribution for particles emitted from neutron and
|
|
|
|
|
//! charged-particle reactions. This corresponds to ACE law 66 and ENDF File 6,
|
|
|
|
|
//! LAW=6.
|
|
|
|
|
//==============================================================================
|
|
|
|
|
|
2018-07-09 23:26:05 -05:00
|
|
|
class NBodyPhaseSpace : public AngleEnergy {
|
|
|
|
|
public:
|
|
|
|
|
explicit NBodyPhaseSpace(hid_t group);
|
2018-08-08 07:00:48 -05:00
|
|
|
|
|
|
|
|
//! Sample distribution for an angle and energy
|
|
|
|
|
//! \param[in] E_in Incoming energy in [eV]
|
|
|
|
|
//! \param[out] E_out Outgoing energy in [eV]
|
|
|
|
|
//! \param[out] mu Outgoing cosine with respect to current direction
|
2019-12-05 19:50:31 +00:00
|
|
|
//! \param[inout] seed Pseudorandom seed pointer
|
2019-12-04 16:35:01 +00:00
|
|
|
void sample(
|
|
|
|
|
double E_in, double& E_out, double& mu, uint64_t* seed) const override;
|
2021-08-11 11:41:49 -05:00
|
|
|
|
2026-03-14 23:58:17 +02:00
|
|
|
//! Sample an outgoing energy from the N-body phase space distribution
|
|
|
|
|
//! \param[in] E_in Incoming energy in [eV]
|
|
|
|
|
//! \param[inout] seed Pseudorandom seed pointer
|
|
|
|
|
//! \return Sampled outgoing energy in [eV]
|
|
|
|
|
double sample_energy(double E_in, uint64_t* seed) const;
|
|
|
|
|
|
|
|
|
|
//! Sample an outgoing energy and evaluate the angular PDF
|
|
|
|
|
//! \param[in] E_in Incoming energy in [eV]
|
|
|
|
|
//! \param[in] mu Scattering cosine with respect to current direction
|
|
|
|
|
//! \param[out] E_out Outgoing energy in [eV]
|
|
|
|
|
//! \param[inout] seed Pseudorandom seed pointer
|
|
|
|
|
//! \return Probability density for the scattering cosine
|
|
|
|
|
double sample_energy_and_pdf(
|
|
|
|
|
double E_in, double mu, double& E_out, uint64_t* seed) const override;
|
|
|
|
|
|
2018-07-09 23:26:05 -05:00
|
|
|
private:
|
2018-08-08 07:00:48 -05:00
|
|
|
int n_bodies_; //!< Number of particles distributed
|
|
|
|
|
double mass_ratio_; //!< Total mass of particles [neutron mass]
|
|
|
|
|
double A_; //!< Atomic weight ratio
|
|
|
|
|
double Q_; //!< Reaction Q-value [eV]
|
2018-07-09 23:26:05 -05:00
|
|
|
};
|
|
|
|
|
|
2018-08-08 07:00:48 -05:00
|
|
|
} // namespace openmc
|
2018-07-09 23:26:05 -05:00
|
|
|
|
|
|
|
|
#endif // OPENMC_SECONDARY_NBODY_H
|