Fixed Bug in recombination formular and added logging of particles hitting the RW.
This commit is contained in:
@@ -18,7 +18,7 @@ public:
|
||||
Janev_eT2I_Recombination() {}
|
||||
|
||||
static double get_TCS(const double &E_eV) {
|
||||
double const1 = pow( pow(E_eV,0.665) * ( 1 + 1.1*pow(E_eV,0.512) + 0.011*pow(E_eV,3.10) ) , - 1);
|
||||
double const1 = pow( pow(E_eV,0.665) * (1 + 1.1*pow(E_eV,0.512) + 0.011*pow(E_eV,3.10)) , -1);
|
||||
double const2 = 0.133 * exp(-0.35*pow(E_eV-6.05,2));
|
||||
return 17.3e-20 * (const1+const2);
|
||||
}
|
||||
|
||||
@@ -17,10 +17,10 @@ public:
|
||||
Janev_eT3I_Recombination() {}
|
||||
|
||||
static double get_TCS(const double &E_eV) {
|
||||
double sigLDR = 3e-20*pow(E_eV, -0.725)/(1+pow(E_eV,1.2));
|
||||
double sigLDR = 3e-20*pow(E_eV, -0.725)/(1+4.45*pow(E_eV,1.2));
|
||||
double sig_small = 0.0646e-20 * pow(E_eV, 1.478);
|
||||
double sig_big = 634.22e-20 * pow(E_eV, -2.605);
|
||||
double sigHDR = 1/ (1/sig_small + 1/sig_big);
|
||||
double sigHDR = 1/(1/sig_small + 1/sig_big);
|
||||
return sigLDR + sigHDR;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -18,12 +18,18 @@
|
||||
Particle_Logger_Manager Particle_Logger_Builder::build(H5_File *h5f) {
|
||||
Particle_Logger_Manager ParticleLogger;
|
||||
H5_Particles *h5part = h5f->get_h5part();
|
||||
|
||||
double z_rw = z_RW_m;
|
||||
ParticleLogger.add(build_eLogger(h5part));
|
||||
ParticleLogger.add(new Off_Particle_Logger(tritium));
|
||||
ParticleLogger.add (new MultiZ_Particle_Logger(tritiumI, 1, &z_rw, h5part->get_h5g_z()));
|
||||
ParticleLogger.add (new MultiZ_Particle_Logger(tritium2I, 1, &z_rw, h5part->get_h5g_z()));
|
||||
ParticleLogger.add (new MultiZ_Particle_Logger(tritium3I, 1, &z_rw, h5part->get_h5g_z()));
|
||||
|
||||
/*
|
||||
ParticleLogger.add(new Off_Particle_Logger(tritiumI));
|
||||
ParticleLogger.add(new Off_Particle_Logger(tritium2I));
|
||||
ParticleLogger.add(new Off_Particle_Logger(tritium3I));
|
||||
*/
|
||||
return ParticleLogger;
|
||||
}
|
||||
|
||||
@@ -34,7 +40,7 @@ Particle_Logger_Base *Particle_Logger_Builder::build_eLogger(H5_Particles *h5par
|
||||
} else if(h5part->get_numberZBins() == -1){
|
||||
res = new SF_Particle_Logger(electron, h5part->get_h5g_z());
|
||||
} else {
|
||||
res = new MuliZ_Particle_Logger(electron, h5part->get_numberZBins(), h5part->get_zValues(), h5part->get_h5g_z());
|
||||
res = new MultiZ_Particle_Logger(electron, h5part->get_numberZBins(), h5part->get_zValues(), h5part->get_h5g_z());
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -12,18 +12,24 @@
|
||||
#include "particle_logger_base.h"
|
||||
|
||||
|
||||
class MuliZ_Particle_Logger : public Particle_Logger_Base {
|
||||
class MultiZ_Particle_Logger : public Particle_Logger_Base {
|
||||
H5TB_Particle_Interface *h5tb;
|
||||
|
||||
int numberZBins;
|
||||
double *zLogValues;
|
||||
|
||||
public:
|
||||
MuliZ_Particle_Logger(species this_species, const int &numberZBins, double *zLogValues, hid_t *h5g_z) : Particle_Logger_Base(this_species) {
|
||||
MultiZ_Particle_Logger(species this_species, const int &numberZBins, double *zLogValues, hid_t *h5g_z) : Particle_Logger_Base(this_species) {
|
||||
this->numberZBins = numberZBins;
|
||||
this->zLogValues = zLogValues;
|
||||
this->zLogValues = new double[numberZBins];
|
||||
for (int i = 0; i<numberZBins; i++) {
|
||||
this->zLogValues[i] = zLogValues[i];
|
||||
}
|
||||
create(h5g_z);
|
||||
}
|
||||
~MultiZ_Particle_Logger() {
|
||||
delete[] zLogValues;
|
||||
}
|
||||
private:
|
||||
void create(hid_t *h5g_z);
|
||||
|
||||
@@ -32,11 +38,11 @@ public:
|
||||
};
|
||||
|
||||
|
||||
inline void MuliZ_Particle_Logger::create(hid_t *h5g_z) {
|
||||
inline void MultiZ_Particle_Logger::create(hid_t *h5g_z) {
|
||||
std::string speciesName = get_species_string(get_species());
|
||||
if (numberZBins < 1) {
|
||||
std::stringstream ss;
|
||||
ss<<"MuliZ_Particle_Logger::create: numberZBins < 1.\n";
|
||||
ss<<"MultiZ_Particle_Logger::create: numberZBins < 1.\n";
|
||||
}
|
||||
h5tb = new H5TB_Particle_Interface[numberZBins];
|
||||
for (int i = 0; i < numberZBins; i++) {
|
||||
@@ -44,7 +50,7 @@ inline void MuliZ_Particle_Logger::create(hid_t *h5g_z) {
|
||||
}
|
||||
}
|
||||
|
||||
inline void MuliZ_Particle_Logger::log(const Particle &logPart, const vec3 &oldLoc_m) {
|
||||
inline void MultiZ_Particle_Logger::log(const Particle &logPart, const vec3 &oldLoc_m) {
|
||||
double zold = oldLoc_m[2];
|
||||
double znew = logPart.get_x_m()[2];
|
||||
double zmin = std::min(zold,znew);
|
||||
|
||||
Reference in New Issue
Block a user