Files
katrin-plasma/src/mc_electron/thermalPop_container.cpp
T
Christian 4b744769c6 Added Ionization Channels for e+T2 -> now 3 Processes from Janev are available:
eT2_T2I_Ionization_Janev_(label)
1. non dissoziative labeled as ndiss
2. dissoziative via X2 Sigma^+_g labeled as diss_g
3. dissoziative via B2 Sigma^+_u labeled as diss_u

Added more Excitation Channels e + T2 from Janev
2019-07-04 10:24:36 +02:00

54 lines
1.6 KiB
C++

//
// thermalPop_container.cpp
// mc_electron
//
// Created by Christian Reiling on 15.05.19.
// Copyright © 2019 Christian Reiling. All rights reserved.
//
#include "thermalPop_container.hpp"
using namespace std;
void ThermalPop_Container::set_Map() {
vector<vec3> bins = get_bins();
for (vector<vec3>::iterator Itr = bins.begin(); Itr!=bins.end(); Itr++) {
addPoint(ddeque{(*Itr)[0], (*Itr)[1], (*Itr)[2], 0});
}
}
double ThermalPop_Container::getDensity_m3(const vec3 &locXYZ_m, double physTime_s) {
check_In_Container(locXYZ_m, xyz);
vec3 zrphiCords = transformTo_zrphiCords(locXYZ_m, xyz);
double V_m3 = get_V_m3(zrphiCords[1]);
double cumTime_s = get_value(ddeque{zrphiCords[0], zrphiCords[1], zrphiCords[2]}, Lower_bound) ;
return cumTime_s/physTime_s/V_m3;
}
void ThermalPop_Container::upDensity (const Particle &upParticle, const vec3 &oldLocXYZ_m) {
check_In_Container(oldLocXYZ_m, xyz);
vec3 zrphiOld_m = transformTo_zrphiCords(oldLocXYZ_m, xyz);
vec3 zrphiNew_m = upParticle.get_Location_m();
check_In_Container(zrphiNew_m, zrphi);
// Check r and phi not changing, only valid for drift approximation....
double z_min_m = zrphiOld_m[0];
double z_max_m = zrphiNew_m[0];
if (z_max_m<z_min_m) {
swap (z_min_m, z_max_m);
}
double r_m = zrphiOld_m[1];
double phi = zrphiOld_m[2];
double l_m = get_l_m();
double vAbs_ms = upParticle.get_SpeedAbs_ms();
dim3Map::iterator zItr_min = Map.lower_bound(z_min_m);
dim3Map::iterator zItr_max = Map.lower_bound(z_max_m);
for (dim3Map::iterator Itr = zItr_min;Itr != zItr_max;Itr++) {
Itr->second.lower_bound(r_m)->second.lower_bound(phi)->second += l_m/vAbs_ms;
}
}