Reworked Katrin Geometrics.
Added creation of T3+ clusters. Added diss. recombination fo T3+ + e-
This commit is contained in:
@@ -9,40 +9,40 @@
|
||||
#include "read_system.h"
|
||||
|
||||
#include "injector.hpp"
|
||||
#include "katrin_geo.hpp"
|
||||
#include "katrin_geo.h"
|
||||
|
||||
const int Injector::injectionMethod = load_parameter("injectionMethod");
|
||||
const double Injector::injectionEnergy_eV = load_parameter("injectionEnergy_eV");
|
||||
|
||||
Particle Injector::injectElectron (const int &newId) {
|
||||
double r_m = Katrin_Geo::get_radius_m()*sqrt(rngUni->random());
|
||||
double r_m = r_WGTS_m*sqrt(rngUni->random());
|
||||
double phi = rngUni->random()*2*pi;
|
||||
|
||||
double z_WGTSstart_m = Katrin_Geo::get_z_WGTSstart_m();
|
||||
double wgtsLength_m = Katrin_Geo::get_wgtsLength_m();
|
||||
double z_WGTSstart_m = z_WGTS_start_m;
|
||||
double wgtsLength_m = l_WGTS_m;
|
||||
|
||||
double z_WGTS_start_to_half_pos_m = sqrt(rngUni->random())*wgtsLength_m/2;
|
||||
double z_m = (rngUni->random()<0.5) ? z_WGTS_start_to_half_pos_m : wgtsLength_m - z_WGTS_start_to_half_pos_m;
|
||||
z_m += z_WGTSstart_m;
|
||||
|
||||
vec3 loc_m = vec3 (r_m*cos(phi),r_m*sin(phi),z_m);
|
||||
double Ekin_eV;
|
||||
double E_eV;
|
||||
switch(injectionMethod) {
|
||||
case 0: // Fermi
|
||||
Ekin_eV = roll_FermiEnergy_eV();
|
||||
E_eV = roll_FermiEnergy_eV();
|
||||
break;
|
||||
case 1: //Delta
|
||||
Ekin_eV = injectionEnergy_eV;
|
||||
E_eV = injectionEnergy_eV;
|
||||
break;
|
||||
case 2: //Maxwell Boltzman
|
||||
Ekin_eV = roll_MBEnergy(injectionEnergy_eV/kb_eVK,me_eV, rngNormal);
|
||||
E_eV = roll_MBEnergy(injectionEnergy_eV/kb_eVK,me_eV, rngNormal);
|
||||
break;
|
||||
default:
|
||||
throw MyException("Katrin::injectElectron: Invalid Injection Method.");
|
||||
break;
|
||||
}
|
||||
vec3 speed_ms = roll_uniform_direction(rngUni) * calc_Speed_from_Ekin_eV(Ekin_eV,me_eV);
|
||||
return PartFac.createElectron(loc_m, speed_ms,newId,newId);
|
||||
vec3 v_ms = roll_uniform_direction(rngUni) * calc_v_ms_from_E_eV(E_eV,me_eV);
|
||||
return PartFac.create_e(loc_m, v_ms, newId, newId);
|
||||
}
|
||||
|
||||
double Injector::roll_FermiEnergy_eV() {
|
||||
@@ -58,17 +58,17 @@ double Injector::roll_FermiEnergy_eV() {
|
||||
return Ecan_eV;
|
||||
}
|
||||
|
||||
double Injector::get_FermiDecaySpectrumDensity(const double &Ekin_eV) {
|
||||
if (Ekin_eV>TritiumDecayEndpoint_eV) {
|
||||
double Injector::get_FermiDecaySpectrumDensity(const double &E_eV) {
|
||||
if (E_eV>TritiumDecayEndpoint_eV) {
|
||||
return 0;
|
||||
} else{
|
||||
double p_eV = sqrt(Ekin_eV*Ekin_eV + 2 * Ekin_eV * me_eV);
|
||||
return BetaDecayConst*get_FermiFunction(2, Ekin_eV)*p_eV*(Ekin_eV+me_eV)*pow(TritiumDecayEndpoint_eV-Ekin_eV,2);
|
||||
double p_eV = sqrt(E_eV*E_eV + 2 * E_eV * me_eV);
|
||||
return BetaDecayConst*get_FermiFunction(2, E_eV)*p_eV*(E_eV+me_eV)*pow(TritiumDecayEndpoint_eV-E_eV,2);
|
||||
}
|
||||
}
|
||||
|
||||
double Injector::get_FermiFunction(const double &Z, const double &Ekin_eV) {
|
||||
double gamma = 1+ Ekin_eV/me_eV;
|
||||
double Injector::get_FermiFunction(const double &Z, const double &E_eV) {
|
||||
double gamma = 1+ E_eV/me_eV;
|
||||
double beta = sqrt(1 - pow(gamma,-2));
|
||||
double eta =Z/beta/137.;
|
||||
return 2*pi*eta/(1-exp(-2*pi*eta));
|
||||
|
||||
Reference in New Issue
Block a user