Added recombination on T3+ side.
Reworked minor changes in structure and integration over energetic population container.
This commit is contained in:
@@ -16,19 +16,10 @@
|
||||
class T2IT2_Cluster : public Sub_Interaction_Base {
|
||||
public:
|
||||
T2IT2_Cluster(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni) {}
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
double get_microSigma_m2(const double &E_eV) {return Janev_T2IT2_Cluster::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline double T2IT2_Cluster::get_macroSigma_m2(const Particle &interPart) {
|
||||
double E_eV = interPart.get_E_eV();
|
||||
double microSigma_m2 = Janev_T2IT2_Cluster::get_TCS(E_eV);
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
double nT2_m3 = Population->get_density_m3(loc_m);
|
||||
return microSigma_m2*nT2_m3;
|
||||
}
|
||||
|
||||
inline InteractionOut T2IT2_Cluster::do_Interaction (Particle *interPart) {
|
||||
InteractionOut InterOut;
|
||||
vec3 loc_m = interPart->get_x_m();
|
||||
|
||||
@@ -16,19 +16,11 @@
|
||||
class T2IT2_CX : public Sub_Interaction_Base {
|
||||
public:
|
||||
T2IT2_CX(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni) {}
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
double get_microSigma_m2(const double &E_eV) {return Janev_T2IT2_CX::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline double T2IT2_CX::get_macroSigma_m2(const Particle &interPart) {
|
||||
double E_eV = interPart.get_E_eV();
|
||||
double microSigma_m2 = Janev_T2IT2_CX::get_TCS(E_eV);
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
double nT2_m3 = Population->get_density_m3(loc_m);
|
||||
return microSigma_m2*nT2_m3;
|
||||
}
|
||||
|
||||
inline InteractionOut T2IT2_CX::do_Interaction (Particle *interPart) {
|
||||
vec3 loc_m = interPart->get_x_m();
|
||||
vec3 v2_ms = Population->roll_v_ms(loc_m);
|
||||
|
||||
@@ -16,19 +16,11 @@ class eT2I_Recombination : public Sub_Interaction_Base {
|
||||
public:
|
||||
eT2I_Recombination(Population_Base *T2IPopulation, UniRNG *rngUni) : Sub_Interaction_Base(T2IPopulation, rngUni) {}
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
double get_microSigma_m2(const double &E_eV) {return Janev_eT2I_Recombination::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline double eT2I_Recombination::get_macroSigma_m2(const Particle &interPart) {
|
||||
double E_eV = interPart.get_E_eV();
|
||||
double microSigma_m2 = Janev_eT2I_Recombination::get_TCS(E_eV);
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
double nT2I_m3 = Population->get_density_m3(loc_m);
|
||||
return microSigma_m2*nT2I_m3;
|
||||
}
|
||||
|
||||
inline InteractionOut eT2I_Recombination::do_Interaction (Particle *interPart) {
|
||||
InteractionOut res;
|
||||
res.set_delete_current(true);
|
||||
|
||||
@@ -29,19 +29,10 @@ public:
|
||||
this->dcs_gen = dcs_gen;
|
||||
}
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
double get_microSigma_m2(const double &E_eV) {return tcs_data.get_value(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline double eT2_Elastic::get_macroSigma_m2(const Particle &interPart) {
|
||||
double E_eV = interPart.get_E_eV();
|
||||
double microSigma_m2 = tcs_data.get_value(E_eV);
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
double nT2_m3 = Population->get_density_m3(loc_m);
|
||||
return microSigma_m2*nT2_m3;
|
||||
}
|
||||
|
||||
inline InteractionOut eT2_Elastic::do_Interaction (Particle *interPart) {
|
||||
// Here theta and phi are COM-Angles.... prob not correct. For m1 << m2 COM - Angle ~ Lab Angle
|
||||
vec3 v1_ms = interPart->get_v_ms();
|
||||
@@ -68,19 +59,11 @@ public:
|
||||
kinematics = Elastic_Kinematic_Base(me_eV, 2*mT_eV);
|
||||
};
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
double get_microSigma_m2(const double &E_eV) {return Uehara_eT2_ElasticScattering::calc_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline double eT2_Elastic_Analytic::get_macroSigma_m2(const Particle &interPart) {
|
||||
double E_eV = interPart.get_E_eV();
|
||||
double microSigma_m2 = Uehara_eT2_ElasticScattering::calc_TCS(E_eV);
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
double nT2_m3 = Population->get_density_m3(loc_m);
|
||||
return microSigma_m2*nT2_m3;
|
||||
}
|
||||
|
||||
inline InteractionOut eT2_Elastic_Analytic::do_Interaction (Particle *interPart) {
|
||||
// Here theta and phi are COM-Angles.... prob not correct. For m1 << m2 COM - Angle ~ Lab Angle
|
||||
vec3 v1_ms = interPart->get_v_ms();
|
||||
|
||||
@@ -26,10 +26,8 @@ public:
|
||||
this->deltaE_eV = deltaE_eV;
|
||||
};
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
protected:
|
||||
virtual double calc_microSigma(const double &T_eV) = 0;
|
||||
|
||||
private:
|
||||
virtual double get_microSigma_m2(const double &E_eV) = 0;
|
||||
public:
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
protected:
|
||||
@@ -75,15 +73,6 @@ inline InteractionOut eT2_T2I_Ionization_Base::do_Interaction (Particle *interPa
|
||||
return InterOut;
|
||||
}
|
||||
|
||||
inline double eT2_T2I_Ionization_Base::get_macroSigma_m2(const Particle &interPart) {
|
||||
double T_eV = interPart.get_E_eV();
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
|
||||
double microSigma_m2 = calc_microSigma(T_eV);
|
||||
double nT2_m3 = Population->get_density_m3(loc_m);
|
||||
return microSigma_m2*nT2_m3;
|
||||
}
|
||||
|
||||
inline vec3 eT2_T2I_Ionization_Base::roll_vLab_ms(const Particle &interPart) {
|
||||
vec3 v_ms = interPart.get_v_ms();
|
||||
vec3 vT2_ms = Population->roll_v_ms(interPart.get_x_m());
|
||||
@@ -133,7 +122,7 @@ public:
|
||||
eT2_T2I_Ionization_BED_Base(Population_Base *T2Population, UniRNG *rngUni) : eT2_T2I_Ionization_Base(T2Population, rngUni, EionT2_eV){};
|
||||
|
||||
protected:
|
||||
virtual double calc_microSigma(const double &T_eV) = 0;
|
||||
virtual double get_microSigma_m2(const double &T_eV) = 0;
|
||||
|
||||
protected:
|
||||
void add_Tritiums(InteractionOut *InterOut, const Particle &interPart) {
|
||||
@@ -150,8 +139,8 @@ public:
|
||||
eT2_T2I_Ionization_BED_Analytic(Population_Base *T2Population, UniRNG *rngUni) : eT2_T2I_Ionization_BED_Base(T2Population, rngUni) {};
|
||||
|
||||
protected:
|
||||
double calc_microSigma(const double &T_eV) {
|
||||
return BED_eT2_Ionization::calc_TCS(T_eV);
|
||||
double get_microSigma_m2(const double &E_eV) {
|
||||
return BED_eT2_Ionization::calc_TCS(E_eV);
|
||||
}
|
||||
double roll_ionW_eV(const double &T_eV) {
|
||||
double pmax, Wmin_eV, Wmax_eV, Wcan_eV,eta1,eta2;
|
||||
@@ -181,8 +170,8 @@ public:
|
||||
{};
|
||||
|
||||
protected:
|
||||
double calc_microSigma(const double &T_eV) {
|
||||
return tcs_data.get_value(T_eV);
|
||||
double get_microSigma_m2(const double &E_eV) {
|
||||
return tcs_data.get_value(E_eV);
|
||||
}
|
||||
double roll_ionW_eV(const double &T_eV) {
|
||||
return dcs_data.roll_value(T_eV, rngUni);
|
||||
@@ -198,8 +187,8 @@ public:
|
||||
eT2_T2I_Ionization_Janev_ndiss(Population_Base *T2Population, UniRNG *rngUni) : eT2_T2I_Ionization_Base(T2Population, rngUni, Janev_eT2_Ionization_ndiss::get_deltaE_eV()), dcs_data(Janev_eT2_Ionization_ndiss::get_deltaE_eV(), scale_end, 100, 50, (get_data_path() + "eT2_ion_DCS.dat")) {};
|
||||
|
||||
protected:
|
||||
double calc_microSigma(const double &T_eV) {
|
||||
return Janev_eT2_Ionization_ndiss::get_TCS_m2(T_eV);
|
||||
double get_microSigma_m2(const double &E_eV) {
|
||||
return Janev_eT2_Ionization_ndiss::get_TCS_m2(E_eV);
|
||||
}
|
||||
|
||||
double roll_ionW_eV(const double &T_eV) {
|
||||
@@ -222,8 +211,8 @@ public:
|
||||
eT2_T2I_Ionization_Janev_diss_g(Population_Base *T2Population, UniRNG *rngUni) : eT2_T2I_Ionization_Base(T2Population, rngUni, Janev_eT2_Ionization_diss_g::get_deltaE_eV()), dcs_data(Janev_eT2_Ionization_diss_g::get_deltaE_eV(), scale_end, 100, 50, (get_data_path() + "eT2_ion_DCS.dat")) {};
|
||||
|
||||
protected:
|
||||
double calc_microSigma(const double &T_eV) {
|
||||
return Janev_eT2_Ionization_diss_g::get_TCS_m2(T_eV);
|
||||
double get_microSigma_m2(const double &E_eV) {
|
||||
return Janev_eT2_Ionization_diss_g::get_TCS_m2(E_eV);
|
||||
}
|
||||
|
||||
double roll_ionW_eV(const double &T_eV) {
|
||||
@@ -251,8 +240,8 @@ public:
|
||||
eT2_T2I_Ionization_Janev_diss_u(Population_Base *T2Population, UniRNG *rngUni) : eT2_T2I_Ionization_Base(T2Population, rngUni, Janev_eT2_Ionization_diss_u::get_deltaE_eV()), dcs_data(Janev_eT2_Ionization_diss_u::get_deltaE_eV(), scale_end, 100, 50, (get_data_path() + "eT2_ion_DCS.dat")) {};
|
||||
|
||||
protected:
|
||||
double calc_microSigma(const double &T_eV) {
|
||||
return Janev_eT2_Ionization_diss_u::get_TCS_m2(T_eV);
|
||||
double get_microSigma_m2(const double &E_eV) {
|
||||
return Janev_eT2_Ionization_diss_u::get_TCS_m2(E_eV);
|
||||
}
|
||||
|
||||
double roll_ionW_eV(const double &T_eV) {
|
||||
|
||||
@@ -16,19 +16,11 @@ class eT3I_Recombination : public Sub_Interaction_Base {
|
||||
public:
|
||||
eT3I_Recombination(Population_Base *T3IPopulation, UniRNG *rngUni) : Sub_Interaction_Base(T3IPopulation, rngUni) {}
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
double get_microSigma_m2(const double &E_eV) {return Janev_eT3I_Recombination::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline double eT3I_Recombination::get_macroSigma_m2(const Particle &interPart) {
|
||||
double E_eV = interPart.get_E_eV();
|
||||
double microSigma_m2 = Janev_eT3I_Recombination::get_TCS(E_eV);
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
double nT2I_m3 = Population->get_density_m3(loc_m);
|
||||
return microSigma_m2*nT2I_m3;
|
||||
}
|
||||
|
||||
inline InteractionOut eT3I_Recombination::do_Interaction (Particle *interPart) {
|
||||
InteractionOut res;
|
||||
res.set_delete_current(true);
|
||||
|
||||
@@ -21,21 +21,11 @@ public:
|
||||
this->dcs_gen = dcs_gen;
|
||||
}
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
private:
|
||||
virtual double get_microSigma_m2(const double &Ekin_EV) = 0;
|
||||
};
|
||||
|
||||
|
||||
inline double Excitation_Base::get_macroSigma_m2(const Particle &interPart) {
|
||||
double E_eV = interPart.get_E_eV();
|
||||
double microSigma_m2 = get_microSigma_m2(E_eV);
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
double n_m3 = Population->get_density_m3(loc_m);
|
||||
return microSigma_m2*n_m3;
|
||||
}
|
||||
|
||||
inline InteractionOut Excitation_Base::do_Interaction (Particle *interPart) {
|
||||
vec3 vOff_ms = get_vOff_ms(*interPart, deltaE_eV);
|
||||
vec3 vLab_ms = interPart->get_v_ms() - vOff_ms;
|
||||
|
||||
@@ -31,7 +31,6 @@ public:
|
||||
|
||||
InteractionOut do_Interaction(Particle *interPart);
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
|
||||
};
|
||||
|
||||
inline InteractionOut Interaction_Base::do_Interaction(Particle *interPart) {
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "T2IT2_cluster.h"
|
||||
#include "T2IT2_cx.h"
|
||||
|
||||
// T3I impact
|
||||
#include "T3Ie_recombination.h"
|
||||
|
||||
const int Interaction_Builder::e_direction = load_parameter("e_direction");
|
||||
|
||||
@@ -157,5 +159,7 @@ Interaction_Base* Interaction_Builder::build_tritium2I(Population_Manager *Popul
|
||||
|
||||
Interaction_Base* Interaction_Builder::build_tritium3I(Population_Manager *Populations, UniRNG *rngUni) {
|
||||
Interaction_Base *TI3_Interaction = new Interaction_Base(tritium3I, rngUni);
|
||||
Population_Base *ePopulation = Populations->find(electron);
|
||||
TI3_Interaction->add(new T3Ie_Recombination(ePopulation, rngUni));
|
||||
return TI3_Interaction ;
|
||||
}
|
||||
|
||||
@@ -47,6 +47,11 @@ private:
|
||||
vec3 get_average_v_ms (const vec3 &loc_m);
|
||||
vec3 roll_thermSpeed_ms(const vec3 &loc_m);
|
||||
|
||||
public:
|
||||
int get_number_E_bins();
|
||||
double get_E_eV (const int &E_bin);
|
||||
double get_density_m3(const vec3 &loc_m, const int &E_bin);
|
||||
|
||||
public:
|
||||
meta_vec get_bins_meta_info();
|
||||
bin_content_vec get_bins_content();
|
||||
@@ -146,6 +151,28 @@ inline vec3 Kinetic_Population::roll_v_ms(const vec3 &loc_m) {
|
||||
}
|
||||
|
||||
|
||||
inline int Kinetic_Population::get_number_E_bins() {
|
||||
return cumulated_times_s.get_num_E_bins();
|
||||
}
|
||||
inline double Kinetic_Population::get_E_eV (const int &E_bin) {
|
||||
return cumulated_times_s.get_E_scale().get_bin_mid(E_bin);
|
||||
}
|
||||
inline double Kinetic_Population::get_density_m3(const vec3 &loc_m, const int &E_bin) {
|
||||
double physical_time_s = timer->get_physTime_s();
|
||||
double bin_size_m3 = bin_sizes.get_cell_volume_m3(loc_m);
|
||||
|
||||
loc_bins loc_bin = cumulated_times_s.get_loc_bins(loc_m);
|
||||
int z_bin = loc_bin.z_bin;
|
||||
int r_bin = loc_bin.r_bin;
|
||||
int phi_bin = loc_bin.phi_bin;
|
||||
double cumulated_time_s = cumulated_times_s.get_value_by_bin(z_bin, r_bin, phi_bin, E_bin);
|
||||
double offset = number_annhilated.get_value_by_bin(z_bin, r_bin, phi_bin, E_bin);
|
||||
double density_m3 = cumulated_time_s/physical_time_s/bin_size_m3 - offset;
|
||||
density_m3 = (density_m3<0) ? 0 : density_m3;
|
||||
return density_m3;
|
||||
}
|
||||
|
||||
|
||||
inline meta_vec Kinetic_Population::get_bins_meta_info() {
|
||||
Lin_Scale z_scale = get_z_scale();
|
||||
Lin_Scale r_scale = get_r_scale();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <ctime>
|
||||
|
||||
#include "simulation_serial.hpp"
|
||||
|
||||
#include "T3Ie_recombination.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
class Particle_Logger_Base : public Process_Base {
|
||||
protected:
|
||||
bool logging;
|
||||
bool logging = true;
|
||||
public:
|
||||
Particle_Logger_Base(species this_species) : Process_Base(this_species) {};
|
||||
virtual void log(const Particle &logPart, const vec3 &oldLoc_m) = 0;
|
||||
|
||||
@@ -61,11 +61,18 @@ public:
|
||||
virtual vec3 get_average_v_ms (const vec3 &loc_m) = 0;
|
||||
virtual vec3 roll_v_ms (const vec3 &loc_m) = 0;
|
||||
|
||||
// For integrating over energy
|
||||
virtual int get_number_E_bins() = 0;
|
||||
virtual double get_E_eV (const int &E_bin) = 0;
|
||||
virtual double get_density_m3(const vec3 &loc_m, const int &E_bin) = 0;
|
||||
|
||||
// For logging
|
||||
virtual meta_vec get_bins_meta_info() = 0;
|
||||
virtual bin_content_vec get_bins_content() = 0;
|
||||
virtual bin_count4 get_bin_count4() = 0;
|
||||
virtual void set_bins(bin_count4 bin_counts, bin_content_vec bin_contents) = 0;
|
||||
|
||||
// For synchronizing with other cpus
|
||||
virtual int get_array_length() = 0;
|
||||
virtual double *get_cumulated_time_s_array() = 0;
|
||||
virtual double *get_offset_array() = 0;
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
Population_Manager Population_Builder::build(Timer *timer,UniRNG *rngUni, NormalRNG *rngNormal) {
|
||||
Population_Manager Populations;
|
||||
int num_z_bins = 10;
|
||||
int num_z_bins = 20;
|
||||
int num_r_bins = 10;
|
||||
int num_phi_bins = 20;
|
||||
int num_E_bins = 20;
|
||||
int num_phi_bins = 12;
|
||||
int num_E_bins = 30;
|
||||
|
||||
Populations.add(new Kinetic_Population(electron, timer, rngUni, rngNormal, num_z_bins, num_r_bins, num_phi_bins, num_E_bins));
|
||||
Populations.add(new Thermal_Population(tritium, timer, rngUni, rngNormal, num_z_bins, num_r_bins, num_phi_bins));
|
||||
|
||||
@@ -54,28 +54,67 @@ public:
|
||||
this->rngUni = rngUni;
|
||||
};
|
||||
|
||||
virtual double get_macroSigma_m2(const Particle &interPart) = 0;
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
private:
|
||||
virtual double get_microSigma_m2(const double &E_eV) = 0;
|
||||
double get_macroSigma_m2_thermal(const Particle &interPart);
|
||||
double get_macroSigma_m2_kinetic(const Particle &interPart);
|
||||
|
||||
public:
|
||||
virtual InteractionOut do_Interaction (Particle *interPart) = 0;
|
||||
|
||||
|
||||
protected:
|
||||
vec3 get_vOff_ms(const Particle &interPart, const double &minE_eV) {
|
||||
double m_eV = interPart.get_m_eV();
|
||||
vec3 v1_ms = interPart.get_v_ms();
|
||||
vec3 v2_ms = Population->roll_v_ms(interPart.get_x_m());
|
||||
vec3 v1Lab_ms = v1_ms - v2_ms;
|
||||
double T_eV = calc_E_eV_from_v_ms(v1Lab_ms, m_eV);
|
||||
if (T_eV < minE_eV) {
|
||||
T_eV = calc_E_eV_from_v_ms(v1_ms, m_eV);
|
||||
if (T_eV < minE_eV) {
|
||||
std::stringstream ss;
|
||||
ss<<"Sub_Interaction_Base::get_vOff_ms: T_eV < minE_eV.\nT_eV= "<< T_eV<<"\t minE_eV= "<<minE_eV<<"\n";
|
||||
throw MyException (ss.str());
|
||||
}
|
||||
return vec3(0,0,0);
|
||||
}
|
||||
return v2_ms;
|
||||
}
|
||||
vec3 get_vOff_ms(const Particle &interPart, const double &minE_eV);
|
||||
};
|
||||
|
||||
inline double Sub_Interaction_Base::get_macroSigma_m2(const Particle &interPart) {
|
||||
int number_E_bins = Population->get_number_E_bins();
|
||||
if (number_E_bins == 0) {
|
||||
return get_macroSigma_m2_thermal(interPart);
|
||||
} else {
|
||||
return get_macroSigma_m2_kinetic(interPart);
|
||||
}
|
||||
}
|
||||
|
||||
inline double Sub_Interaction_Base::get_macroSigma_m2_thermal(const Particle &interPart) {
|
||||
double E_eV = interPart.get_E_eV();
|
||||
double microSigma_m2 = get_microSigma_m2(E_eV);
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
double nT2_m3 = Population->get_density_m3(loc_m);
|
||||
return microSigma_m2*nT2_m3;
|
||||
}
|
||||
|
||||
inline double Sub_Interaction_Base::get_macroSigma_m2_kinetic(const Particle &interPart) {
|
||||
// integrate over all energy bins, consider T3+ fixed and e- energetic.
|
||||
int num_E_bins = Population->get_number_E_bins();
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
double macro_Sigma_m2 = 0;
|
||||
double E_eV, micro_Sigma_m2, ne_m3;
|
||||
for (int E_bin = 0; E_bin< num_E_bins; E_bin++) {
|
||||
E_eV = Population->get_E_eV(E_bin);
|
||||
micro_Sigma_m2 = get_microSigma_m2(E_eV);
|
||||
ne_m3 = Population->get_density_m3(loc_m, E_bin);
|
||||
macro_Sigma_m2 += micro_Sigma_m2*ne_m3;
|
||||
}
|
||||
return macro_Sigma_m2;
|
||||
}
|
||||
|
||||
inline vec3 Sub_Interaction_Base::get_vOff_ms(const Particle &interPart, const double &minE_eV) {
|
||||
double m_eV = interPart.get_m_eV();
|
||||
vec3 v1_ms = interPart.get_v_ms();
|
||||
vec3 v2_ms = Population->roll_v_ms(interPart.get_x_m());
|
||||
vec3 v1Lab_ms = v1_ms - v2_ms;
|
||||
double T_eV = calc_E_eV_from_v_ms(v1Lab_ms, m_eV);
|
||||
if (T_eV < minE_eV) {
|
||||
T_eV = calc_E_eV_from_v_ms(v1_ms, m_eV);
|
||||
if (T_eV < minE_eV) {
|
||||
std::stringstream ss;
|
||||
ss<<"Sub_Interaction_Base::get_vOff_ms: T_eV < minE_eV.\nT_eV= "<< T_eV<<"\t minE_eV= "<<minE_eV<<"\n";
|
||||
throw MyException (ss.str());
|
||||
}
|
||||
return vec3(0,0,0);
|
||||
}
|
||||
return v2_ms;
|
||||
}
|
||||
#endif /* sub_interaction_base_h */
|
||||
|
||||
@@ -49,6 +49,11 @@ private:
|
||||
vec3 get_average_v_ms (const vec3 &loc_m);
|
||||
vec3 roll_thermSpeed_ms(const vec3 &loc_m);
|
||||
|
||||
public:
|
||||
int get_number_E_bins() {return 0;}
|
||||
double get_E_eV (const int &E_bin) {throw MyException("Not implemented \n");}
|
||||
double get_density_m3(const vec3 &loc_m, const int &E_bin) {throw MyException("Not implemented \n");};
|
||||
|
||||
public:
|
||||
meta_vec get_bins_meta_info();
|
||||
bin_content_vec get_bins_content();
|
||||
|
||||
@@ -43,6 +43,11 @@ private:
|
||||
vec3 get_average_v_ms (const vec3 &loc_m);
|
||||
vec3 roll_thermSpeed_ms(const vec3 &loc_m);
|
||||
|
||||
public:
|
||||
int get_number_E_bins() {return 0;}
|
||||
double get_E_eV (const int &E_bin) {throw MyException("Not implemented \n");}
|
||||
double get_density_m3(const vec3 &loc_m, const int &E_bin) {throw MyException("Not implemented \n");};
|
||||
|
||||
public:
|
||||
meta_vec get_bins_meta_info();
|
||||
bin_content_vec get_bins_content();
|
||||
|
||||
Reference in New Issue
Block a user