Fixed bug in recombination calculation and activated offsets.

This commit is contained in:
Christian
2019-11-11 14:10:22 +01:00
parent ae1281b2e5
commit dcef2b811a
11 changed files with 15 additions and 14 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ inline InteractionOut T2Ie_DissExc::do_Interaction (Particle *interPart) {
Particle TI = Particle_Builder::create_TI(loc_m, vTI_ms, -1, interPart->get_Id());
res.add_new_particle(TI);
double E_eV = calc_E_eV_from_v_ms(Population->roll_v_ms(interPart->get_x_m()), me_eV); // should be computed properly using chances.
//Population->decrease_denisty(loc_m, E_eV);
Population->decrease_denisty(loc_m, E_eV);
return res;
}
+2 -2
View File
@@ -25,10 +25,10 @@ public:
inline InteractionOut T2Ie_Recombination::do_Interaction (Particle *interPart) {
InteractionOut res;
res.set_delete_current(true);
/*
double E_eV = calc_E_eV_from_v_ms(Population->roll_v_ms(interPart->get_x_m()), me_eV); // should be computed properly using chances.
Population->decrease_denisty(interPart->get_x_m(), E_eV);
*/
return res;
}
+1 -1
View File
@@ -30,7 +30,7 @@ inline InteractionOut T3Ie_DissExc::do_Interaction (Particle *interPart) {
Particle TI = Particle_Builder::create_TI(loc_m, vTI_ms, -1, interPart->get_Id());
res.add_new_particle(TI);
double E_eV = calc_E_eV_from_v_ms(Population->roll_v_ms(interPart->get_x_m()), me_eV); // should be computed properly using chances.
//Population->decrease_denisty(loc_m, E_eV);
Population->decrease_denisty(loc_m, E_eV);
return res;
}
+2 -2
View File
@@ -24,10 +24,10 @@ public:
inline InteractionOut T3Ie_Recombination::do_Interaction (Particle *interPart) {
InteractionOut res;
res.set_delete_current(true);
/*
double E_eV = calc_E_eV_from_v_ms(Population->roll_v_ms(interPart->get_x_m()), me_eV); // should be computed properly using chances.
Population->decrease_denisty(interPart->get_x_m(), E_eV);
*/
return res;
}
+2 -2
View File
@@ -28,10 +28,10 @@ public:
inline InteractionOut T5Ie_Recombination::do_Interaction (Particle *interPart) {
InteractionOut res;
res.set_delete_current(true);
/*
double E_eV = calc_E_eV_from_v_ms(Population->roll_v_ms(interPart->get_x_m()), me_eV); // should be computed properly using chances.
Population->decrease_denisty(interPart->get_x_m(), E_eV);
*/
return res;
}
+1 -1
View File
@@ -25,7 +25,7 @@ inline InteractionOut eT2I_DissExc::do_Interaction (Particle *interPart) {
InteractionOut res = Excitation_Base::do_Interaction(interPart);
vec3 loc_m = interPart->get_x_m();
//Population->decrease_denisty(interPart->get_x_m(), 0); // dummy since thermal population
Population->decrease_denisty(interPart->get_x_m(), 0); // dummy since thermal population
vec3 vTI_ms = Population->roll_v_ms(loc_m);
Particle TI = Particle_Builder::create_TI(loc_m, vTI_ms, -1, interPart->get_Id());
+1 -1
View File
@@ -27,7 +27,7 @@ inline InteractionOut eT2I_Recombination::do_Interaction (Particle *interPart) {
InteractionOut res;
res.set_delete_current(true);
//std::cout<<"eT2I:\t"<<*interPart<<"\n";
//Population->decrease_denisty(interPart->get_x_m(), 0);
Population->decrease_denisty(interPart->get_x_m(), 0);
return res;
}
+1 -1
View File
@@ -24,7 +24,7 @@ public:
inline InteractionOut eT3I_DissExc::do_Interaction (Particle *interPart) {
InteractionOut res = Excitation_Base::do_Interaction(interPart);
vec3 loc_m = interPart->get_x_m();
//Population->decrease_denisty(loc_m, 0); // dummy since thermal population
Population->decrease_denisty(loc_m, 0); // dummy since thermal population
vec3 vTI_ms = Population->roll_v_ms(loc_m);
Particle TI = Particle_Builder::create_TI(loc_m, vTI_ms, -1, interPart->get_Id());
+1 -1
View File
@@ -25,7 +25,7 @@ inline InteractionOut eT3I_Recombination::do_Interaction (Particle *interPart) {
InteractionOut res;
res.set_delete_current(true);
//std::cout<<"eT3I:\t"<<*interPart<<"\n";
//Population->decrease_denisty(interPart->get_x_m(), 0);
Population->decrease_denisty(interPart->get_x_m(), 0);
return res;
}
+1 -1
View File
@@ -27,7 +27,7 @@ inline InteractionOut eT5I_Recombination::do_Interaction (Particle *interPart) {
InteractionOut res;
//std::cout<<"eT5I:\t"<<*interPart<<"\n";
res.set_delete_current(true);
//Population->decrease_denisty(interPart->get_x_m(), 0);
Population->decrease_denisty(interPart->get_x_m(), 0);
return res;
}
+2 -1
View File
@@ -86,7 +86,8 @@ inline double Sub_Interaction_Base::get_macroSigma_m_kinetic(const Particle &int
vec3 loc_m = interPart.get_x_m();
Content cont;
double macro_Sigma_m2 = 0;
for (int E_bin = 0; E_bin< bounds.num_E_bins; E_bin++) {
for (int E_bin = 0; E_bin<bounds.num_E_bins; E_bin++) {
cont = Population->get_density_m3(E_bin, bounds.loc_bins);
macro_Sigma_m2 += get_microSigma_m2(cont.E_eV, loc_m) * cont.n_m3;
}
return macro_Sigma_m2;