Changes to Interaction Processor, making possible to add infinite Interactions for all kind of Particles
This commit is contained in:
+42
-52
@@ -10,8 +10,7 @@
|
||||
#define katrin_hpp
|
||||
|
||||
#include "constants.hpp"
|
||||
#include "logger.hpp"
|
||||
#include "electron.hpp"
|
||||
|
||||
#include "density_container.hpp"
|
||||
|
||||
#include "blitz/tinyvec2.h"
|
||||
@@ -20,68 +19,59 @@
|
||||
#include <random/normal.h>
|
||||
|
||||
|
||||
class Katrin {
|
||||
|
||||
class Katrin : public RNG_Base{
|
||||
public:
|
||||
Katrin() {};
|
||||
Katrin(UniRNG *rngUni, NormalRNG *rngNormal) : RNG_Base(rngUni, rngNormal) {
|
||||
check_Properties ();
|
||||
};
|
||||
|
||||
// Katrin Properties
|
||||
private:
|
||||
void check_Properties();
|
||||
// Geometrics
|
||||
public:
|
||||
vec3 getMagField_T(vec3 loc_m);
|
||||
vec3 getElField_Vm(vec3 loc_m);
|
||||
double getTritiumDensity_m3(vec3 loc_m);
|
||||
double get_z_RW_m() const {return(rearwallZ_m);};
|
||||
double get_z_WGTSstart_m() const {return(wgtsStartZ_m);};
|
||||
double get_z_WGTSend_m() const {return(wgtsEndZ_m);};
|
||||
double get_radius_m() const {return(wgtsRadius_m);};
|
||||
|
||||
vec3 getTotSpeedT2_ms(vec3 loc_m, ranlib::Uniform<double> *rngUni, ranlib::NormalUnit<double> *rngNormal);
|
||||
vec3 getFlowSpeedT2_ms(vec3 loc_m);
|
||||
vec3 getTempSpeedT2_ms(vec3 loc_m, ranlib::Uniform<double> *rngUni, ranlib::NormalUnit<double> *rngNormal);
|
||||
bool outside(vec3 loc_m) const;
|
||||
private:
|
||||
double wgtsLength_m() const {return (get_z_WGTSend_m() - get_z_WGTSstart_m());};
|
||||
|
||||
static const double rearwallZ_m;
|
||||
static const double wgtsStartZ_m;
|
||||
static const double wgtsEndZ_m;
|
||||
static const double wgtsRadius_m;
|
||||
|
||||
|
||||
// EM-Fields
|
||||
public:
|
||||
vec3 getMagField_T(vec3 loc_m) const { return (vec3(0,0,wgtsMagField_T)); };
|
||||
vec3 getElField_Vm(vec3 loc_m) const {return (vec3(0,0,0));};
|
||||
private:
|
||||
static const double wgtsMagField_T;
|
||||
static const double wgtsLength_m;
|
||||
static const double wgtsRadius_m;
|
||||
|
||||
|
||||
//Particle Densities
|
||||
public:
|
||||
double getTritiumDensity_m3(vec3 loc_m);
|
||||
|
||||
// Maxwell Boltzmann Part
|
||||
public:
|
||||
vec3 roll_totEqSpeed_ms(vec3 loc_m);
|
||||
vec3 get_flowEqSpeed_ms(vec3 loc_m);
|
||||
vec3 roll_thermEqSpeed_ms(vec3 loc_m);
|
||||
private:
|
||||
static const double wgtsT2MaxDensity_m3;
|
||||
static const double wgtsTemp_K;
|
||||
static const double wgtsT2FlowSpeed_ms;
|
||||
|
||||
// Electron Injection
|
||||
public:
|
||||
Electron injectElectron(int newId, ranlib::Uniform<double> *rngUni, ranlib::NormalUnit<double> *rngNormal);
|
||||
private:
|
||||
double roll_FermiEnergy_eV(ranlib::Uniform<double> *rngUni);
|
||||
double get_FermiDecaySpectrumDensity(double Ekin_eV);
|
||||
double get_FermiFunction(double Z, double Ekin_eV);
|
||||
|
||||
static const int injectionMethod;
|
||||
static const double injectionEnergy_eV;
|
||||
|
||||
// Move Electrons
|
||||
public:
|
||||
double get_MFP_m(Electron *moveElectron);
|
||||
void do_BorisPushMovement(Electron *moveElectron, double distance_m, H5_Logger *Log);
|
||||
void do_DriftApproximationMovement(Electron *moveElectron, double distance_m, H5_Logger *Log);
|
||||
private:
|
||||
double getDrift_znew_m(double MFP_m, Electron *moveElectron);
|
||||
void doDrift_WallInteraction(vec3 *oldLoc_m, double *znew_m, Electron *moveElectron, H5_Logger *Log);
|
||||
void doBoris_WallInteraction(Electron *moveElectron);
|
||||
void doBoris_LogzDirChange(Electron *moveElectron, double *oldzDir, vec3 *oldLoc_m, H5_Logger *Log);
|
||||
|
||||
static const double dt_s;
|
||||
|
||||
|
||||
// Terminate Electrons
|
||||
public:
|
||||
bool check_Termination(Electron checkElectron);
|
||||
private:
|
||||
bool check_EnergyTermination(double Ekin_eV);
|
||||
bool check_EnergyTermination(Electron checkElectron);
|
||||
bool check_WallTermination(vec3 loc_m);
|
||||
bool check_WallTermination(Electron checkElectron);
|
||||
|
||||
static const double cutoffEnergy_eV;
|
||||
|
||||
|
||||
// Ions
|
||||
public:
|
||||
private:
|
||||
//Skalar_WGTS_Container Ion_Container = Skalar_WGTS_Container(0, wgtsLength_m, wgtsRadius_m, vec3(10,10,12));
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* katrin_hpp */
|
||||
|
||||
Reference in New Issue
Block a user