Reworked Katrin Geometrics.
Added creation of T3+ clusters. Added diss. recombination fo T3+ + e-
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#define energetic_base_h
|
||||
|
||||
|
||||
#include "katrin_geo.hpp"
|
||||
#include "katrin_geo.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
@@ -42,9 +42,9 @@ public:
|
||||
void decrease_denisty (const vec3 &loc_m, const double &energy_eV);
|
||||
|
||||
public:
|
||||
vec3 get_average_speed_ms (const vec3 &loc_m);
|
||||
vec3 roll_speed_ms (const vec3 &loc_m);
|
||||
vec3 roll_v_ms (const vec3 &loc_m);
|
||||
private:
|
||||
vec3 get_average_v_ms (const vec3 &loc_m);
|
||||
vec3 roll_thermSpeed_ms(const vec3 &loc_m);
|
||||
|
||||
public:
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
private:
|
||||
Lin_Scale get_z_scale();
|
||||
Lin_Scale get_r_scale();
|
||||
Lin_Scale get_phi_scale();
|
||||
Lin_Scale calc_phi_scale();
|
||||
Log_Scale get_E_scale();
|
||||
};
|
||||
|
||||
@@ -76,7 +76,11 @@ void Kinetic_Population::init_containers(int num_z_bins, int num_r_bins, int num
|
||||
}
|
||||
*/
|
||||
inline double Kinetic_Population::get_density_m3(const vec3 &loc_m) {
|
||||
//Katrin_Geo::check_inKatrin(loc_m);
|
||||
if (!in_Katrin(loc_m)) {
|
||||
std::stringstream ss;
|
||||
ss<<"Kinetic_Population::get_density_m3: loc_m outside of Katrin.\n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
double physical_time_s = timer->get_physTime_s();
|
||||
int num_E_bins = cumulated_times_s.get_num_E_bins();
|
||||
double *cumulated_time_s = cumulated_times_s.get_E_bins(loc_m);
|
||||
@@ -94,9 +98,9 @@ inline double Kinetic_Population::get_density_m3(const vec3 &loc_m) {
|
||||
}
|
||||
|
||||
inline void Kinetic_Population::increase_density(const Particle &upPart, const vec3 &oldLoc_m) {
|
||||
double cell_time_s = bin_sizes.get_cell_length_m()/upPart.get_SpeedAbs_ms();
|
||||
double energy_eV = upPart.get_EKin_eV();
|
||||
cumulated_times_s.increase_value(cell_time_s, upPart.get_Location_m(), oldLoc_m, energy_eV);
|
||||
double cell_time_s = bin_sizes.get_cell_length_m()/upPart.get_vAbs_ms();
|
||||
double energy_eV = upPart.get_E_eV();
|
||||
cumulated_times_s.increase_value(cell_time_s, upPart.get_x_m(), oldLoc_m, energy_eV);
|
||||
}
|
||||
|
||||
inline void Kinetic_Population::decrease_denisty (const vec3 &loc_m, const double &energy_eV) {
|
||||
@@ -104,11 +108,11 @@ inline void Kinetic_Population::decrease_denisty (const vec3 &loc_m, const doubl
|
||||
}
|
||||
|
||||
|
||||
inline vec3 Kinetic_Population::get_average_speed_ms(const vec3 &loc_m) {
|
||||
inline vec3 Kinetic_Population::get_average_v_ms(const vec3 &loc_m) {
|
||||
return vec3(0,0,0);
|
||||
}
|
||||
|
||||
inline vec3 Kinetic_Population::roll_speed_ms(const vec3 &loc_m) {
|
||||
inline vec3 Kinetic_Population::roll_v_ms(const vec3 &loc_m) {
|
||||
double total = get_density_m3(loc_m);
|
||||
double target = rngUni->random() * total;
|
||||
|
||||
@@ -128,7 +132,7 @@ inline vec3 Kinetic_Population::roll_speed_ms(const vec3 &loc_m) {
|
||||
}
|
||||
}
|
||||
std::stringstream ss;
|
||||
ss<<"Kinetic_Population::roll_speed_ms: Overflow.\n";
|
||||
ss<<"Kinetic_Population::roll_v_ms: Overflow.\n";
|
||||
throw MyException (ss.str());
|
||||
}
|
||||
|
||||
@@ -136,7 +140,7 @@ inline vec3 Kinetic_Population::roll_speed_ms(const vec3 &loc_m) {
|
||||
inline meta_vec Kinetic_Population::get_bins_meta_info() {
|
||||
Lin_Scale z_scale = get_z_scale();
|
||||
Lin_Scale r_scale = get_r_scale();
|
||||
Lin_Scale phi_scale = get_phi_scale();
|
||||
Lin_Scale phi_scale = calc_phi_scale();
|
||||
Log_Scale E_scale = get_E_scale();
|
||||
|
||||
meta_vec res;
|
||||
@@ -173,7 +177,7 @@ inline meta_vec Kinetic_Population::get_bins_meta_info() {
|
||||
inline bin_content_vec Kinetic_Population::get_bins_content() {
|
||||
Lin_Scale z_scale = get_z_scale();
|
||||
Lin_Scale r_scale = get_r_scale();
|
||||
Lin_Scale phi_scale = get_phi_scale();
|
||||
Lin_Scale phi_scale = calc_phi_scale();
|
||||
Log_Scale E_scale = get_E_scale();
|
||||
|
||||
bin_content_vec res;
|
||||
@@ -201,7 +205,7 @@ inline bin_count4 Kinetic_Population::get_bin_count4() {
|
||||
bin_count4 res;
|
||||
res[0] = get_z_scale().get_number_bins();
|
||||
res[1] = get_r_scale().get_number_bins();
|
||||
res[2] = get_phi_scale().get_number_bins();
|
||||
res[2] = calc_phi_scale().get_number_bins();
|
||||
res[3] = get_E_scale().get_number_bins();
|
||||
return res;
|
||||
}
|
||||
@@ -241,8 +245,8 @@ inline Lin_Scale Kinetic_Population::get_r_scale() {
|
||||
|
||||
}
|
||||
|
||||
inline Lin_Scale Kinetic_Population::get_phi_scale() {
|
||||
return cumulated_times_s.get_phi_scale();
|
||||
inline Lin_Scale Kinetic_Population::calc_phi_scale() {
|
||||
return cumulated_times_s.calc_phi_scale();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user