Added some recombination and cluster formation channels.

Changed Parameter names to be more consistent.
This commit is contained in:
Christian
2019-10-14 15:37:45 +02:00
parent fe06550c8d
commit 3ddf92fd75
55 changed files with 543 additions and 355 deletions
+12 -11
View File
@@ -51,11 +51,11 @@ public:
this->rngUni = rngUni;
};
double get_macroSigma_m2(const Particle &interPart);
double get_macroSigma_m(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, const Sum_bounds &bounds);
virtual double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) = 0;
double get_macroSigma_m_thermal(const Particle &interPart);
double get_macroSigma_m_kinetic(const Particle &interPart, const Sum_bounds &bounds);
public:
virtual InteractionOut do_Interaction (Particle *interPart) = 0;
@@ -64,30 +64,31 @@ protected:
vec3 get_vOff_ms(const Particle &interPart, const double &minE_eV);
};
inline double Sub_Interaction_Base::get_macroSigma_m2(const Particle &interPart) {
inline double Sub_Interaction_Base::get_macroSigma_m(const Particle &interPart) {
Sum_bounds bounds = Population->get_sumation_bounds(interPart.get_x_m());
if (bounds.num_E_bins <= 1) { //thermal
return get_macroSigma_m2_thermal(interPart);
return get_macroSigma_m_thermal(interPart);
} else { //kinetic
return get_macroSigma_m2_kinetic(interPart, bounds);
return get_macroSigma_m_kinetic(interPart, bounds);
}
}
inline double Sub_Interaction_Base::get_macroSigma_m2_thermal(const Particle &interPart) {
inline double Sub_Interaction_Base::get_macroSigma_m_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 microSigma_m2 = get_microSigma_m2(E_eV, loc_m);
double n_target_m3 = Population->get_density_m3(loc_m);
return microSigma_m2*n_target_m3;
}
inline double Sub_Interaction_Base::get_macroSigma_m2_kinetic(const Particle &interPart, const Sum_bounds &bounds) {
inline double Sub_Interaction_Base::get_macroSigma_m_kinetic(const Particle &interPart, const Sum_bounds &bounds) {
// integrate over all energy bins, consider interPart.E_eV << E_eV.
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++) {
cont = Population->get_density_m3(E_bin, bounds.loc_bins);
macro_Sigma_m2 += get_microSigma_m2(cont.E_eV) * cont.n_m3;
macro_Sigma_m2 += get_microSigma_m2(cont.E_eV, loc_m) * cont.n_m3;
}
return macro_Sigma_m2;
}