mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Start converting TTB data/physics
This commit is contained in:
parent
1992ebc810
commit
ea1f2e426d
7 changed files with 368 additions and 93 deletions
44
include/openmc/bremsstrahlung.h
Normal file
44
include/openmc/bremsstrahlung.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef OPENMC_BREMSSTRAHLUNG_H
|
||||
#define OPENMC_BREMSSTRAHLUNG_H
|
||||
|
||||
#include "openmc/particle.h"
|
||||
|
||||
#include "xtensor/xtensor.hpp"
|
||||
|
||||
namespace openmc {
|
||||
|
||||
//==============================================================================
|
||||
// Bremsstrahlung classes
|
||||
//==============================================================================
|
||||
|
||||
class BremsstrahlungData {
|
||||
public:
|
||||
// Data
|
||||
xt::xtensor<double, 2> pdf; //!< Bremsstrahlung energy PDF
|
||||
xt::xtensor<double, 2> cdf; //!< Bremsstrahlung energy CDF
|
||||
xt::xtensor<double, 1> yield; //!< Photon yield
|
||||
};
|
||||
|
||||
class Bremsstrahlung {
|
||||
public:
|
||||
// Data
|
||||
BremsstrahlungData electron;
|
||||
BremsstrahlungData positron;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Global variables
|
||||
//==============================================================================
|
||||
|
||||
namespace data {
|
||||
|
||||
extern xt::xtensor<double, 1> ttb_e_grid; //! energy T of incident electron in [eV]
|
||||
extern xt::xtensor<double, 1> ttb_k_grid; //! reduced energy W/T of emitted photon
|
||||
|
||||
} // namespace data
|
||||
|
||||
void thick_target_bremsstrahlung(Particle& p, double* E_lost);
|
||||
|
||||
} // namespace openmc
|
||||
|
||||
#endif // OPENMC_BREMSSTRAHLUNG_H
|
||||
|
|
@ -1,11 +1,14 @@
|
|||
#ifndef OPENMC_MATERIAL_H
|
||||
#define OPENMC_MATERIAL_H
|
||||
|
||||
#include <memory> // for unique_ptr
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "pugixml.hpp"
|
||||
|
||||
#include "openmc/bremsstrahlung.h"
|
||||
#include "openmc/particle.h"
|
||||
|
||||
namespace openmc {
|
||||
|
||||
|
|
@ -38,9 +41,14 @@ public:
|
|||
//! A negative value indicates no default temperature was specified.
|
||||
double temperature_ {-1};
|
||||
|
||||
std::unique_ptr<Bremsstrahlung> ttb_;
|
||||
|
||||
Material() {};
|
||||
|
||||
explicit Material(pugi::xml_node material_node);
|
||||
|
||||
private:
|
||||
void init_bremsstrahlung();
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -119,8 +119,6 @@ struct ElementMicroXS {
|
|||
|
||||
std::pair<double, double> klein_nishina(double alpha);
|
||||
|
||||
void thick_target_bremsstrahlung(Particle& p, double* E_lost);
|
||||
|
||||
//==============================================================================
|
||||
// Global variables
|
||||
//==============================================================================
|
||||
|
|
@ -128,8 +126,6 @@ void thick_target_bremsstrahlung(Particle& p, double* E_lost);
|
|||
namespace data {
|
||||
|
||||
extern xt::xtensor<double, 1> compton_profile_pz; //! Compton profile momentum grid
|
||||
extern xt::xtensor<double, 1> ttb_e_grid; //! energy T of incident electron in [eV]
|
||||
extern xt::xtensor<double, 1> ttb_k_grid; //! reduced energy W/T of emitted photon
|
||||
|
||||
//! Photon interaction data for each element
|
||||
extern std::vector<PhotonInteraction> elements;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue