Removal of particles that fall below a certain energy threshold:
e-: E < 10eV, ions: E < 0.05eV; Ions from dissociative ionization are created with 9 eV; non-dissociative ionization does not create an ion
This commit is contained in:
@@ -39,7 +39,8 @@ class ElectronIonization : public Interaction {
|
||||
std::shared_ptr<species::TrackedSpecie> ion,
|
||||
std::shared_ptr<IonizationEnergyDistribution> distribution,
|
||||
std::shared_ptr<IonizationScatteringAngleDistribution> angle_distribution,
|
||||
double ionization_energy_eV);
|
||||
double ionization_energy_eV,
|
||||
double ion_energy);
|
||||
|
||||
InteractionOutput performInteraction(particle::Particle& particle,
|
||||
RandomNumbers* generator);
|
||||
@@ -48,6 +49,7 @@ class ElectronIonization : public Interaction {
|
||||
std::shared_ptr<IonizationEnergyDistribution> energy_distribution_;
|
||||
std::shared_ptr<IonizationScatteringAngleDistribution> angle_distribution_;
|
||||
const double ionization_energy_eV_;
|
||||
const double ion_energy_;
|
||||
|
||||
std::shared_ptr<species::TrackedSpecie> electron_;
|
||||
std::shared_ptr<species::TrackedSpecie> ion_;
|
||||
|
||||
@@ -83,6 +83,7 @@ void addInteractions(
|
||||
|
||||
std::string ionization_model =
|
||||
json_string(json_object_by_path(value, {"IonizationModel"}));
|
||||
|
||||
if (ionization_model == "JanevNonDiss") {
|
||||
std::function<double(double)> cross_section =
|
||||
interaction::totalCrossSection::eT2_ionization_janev_non_diss();
|
||||
@@ -108,7 +109,7 @@ void addInteractions(
|
||||
std::make_shared<interaction::ElectronIonization>(
|
||||
cross_section, target, electron, ion,
|
||||
ionization_energy_distribution, scattering_angle_distribution,
|
||||
ionization_energy_eV));
|
||||
ionization_energy_eV, 0.));
|
||||
} else if (ionization_model == "JanevDissToGround") {
|
||||
std::function<double(double)> cross_section =
|
||||
interaction::totalCrossSection::eT2_ionization_janev_diss_ground();
|
||||
@@ -134,7 +135,7 @@ void addInteractions(
|
||||
std::make_shared<interaction::ElectronIonization>(
|
||||
cross_section, target, electron, ion,
|
||||
ionization_energy_distribution, scattering_angle_distribution,
|
||||
ionization_energy_eV));
|
||||
ionization_energy_eV, 9.));
|
||||
} else if (ionization_model == "JanevDissToFirstExcited") {
|
||||
std::function<double(double)> cross_section =
|
||||
interaction::totalCrossSection::eT2_ionization_janev_diss_first();
|
||||
@@ -162,7 +163,7 @@ void addInteractions(
|
||||
std::make_shared<interaction::ElectronIonization>(
|
||||
cross_section, target, electron, ion,
|
||||
ionization_energy_distribution, scattering_angle_distribution,
|
||||
ionization_energy_eV));
|
||||
ionization_energy_eV, 9.));
|
||||
} else if (ionization_model == "JanevAtomic") {
|
||||
std::function<double(double)> cross_section =
|
||||
interaction::totalCrossSection::eT_ionization_from_ground_janev();
|
||||
@@ -186,7 +187,7 @@ void addInteractions(
|
||||
std::make_shared<interaction::ElectronIonization>(
|
||||
cross_section, target, electron, ion,
|
||||
ionization_energy_distribution, scattering_angle_distribution,
|
||||
ionization_energy_eV));
|
||||
ionization_energy_eV, 0.));
|
||||
} else {
|
||||
ERROR("This ionization model is not implemented: " + ionization_model);
|
||||
}
|
||||
|
||||
@@ -18,13 +18,14 @@ ElectronIonization::ElectronIonization(
|
||||
std::shared_ptr<species::TrackedSpecie> ion,
|
||||
std::shared_ptr<IonizationEnergyDistribution> distribution,
|
||||
std::shared_ptr<IonizationScatteringAngleDistribution> angle_distribution,
|
||||
double ionization_energy_eV)
|
||||
double ionization_energy_eV, double ion_energy)
|
||||
: Interaction(cross_section, target),
|
||||
electron_(electron),
|
||||
ion_(ion),
|
||||
energy_distribution_(distribution),
|
||||
angle_distribution_(angle_distribution),
|
||||
ionization_energy_eV_(ionization_energy_eV) {}
|
||||
ionization_energy_eV_(ionization_energy_eV),
|
||||
ion_energy_(ion_energy) {}
|
||||
|
||||
InteractionOutput ElectronIonization::performInteraction(
|
||||
particle::Particle& particle,
|
||||
@@ -114,6 +115,12 @@ InteractionOutput ElectronIonization::performInteraction(
|
||||
particle.velocity(v_impact_new);
|
||||
|
||||
|
||||
blitz::TinyVector<double, 3> v_ion = v_target;
|
||||
|
||||
if(ion_energy_ > 0) {
|
||||
v_ion *= std::sqrt(ion_energy_*UnitConversion::eVToJoule/(kinematic::kineticEnergy(v_target, ion_->mass_kg())));
|
||||
}
|
||||
|
||||
const double time_birth = particle.timeAlive();
|
||||
const double weight_parent = particle.weight();
|
||||
|
||||
@@ -121,8 +128,10 @@ InteractionOutput ElectronIonization::performInteraction(
|
||||
output.add(
|
||||
particle::Particle(electron_, x_impact, CartesianVector(v_ejected),
|
||||
time_birth, weight_parent));
|
||||
output.add(particle::Particle(ion_, x_impact, CartesianVector(v_target),
|
||||
time_birth, weight_parent));
|
||||
if(ion_energy_ > 0) {
|
||||
output.add(particle::Particle(ion_, x_impact, CartesianVector(v_ion),
|
||||
time_birth, weight_parent));
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ void CurrentCollector::collectLongitudinalMovement(
|
||||
if (bin_new(1) < bin_old(1)) {
|
||||
z_negative_crossings(bin_old(0), bin_new(1) + 1) += weight;
|
||||
#ifdef GENRICHCURRENT
|
||||
if(bin_new(1) == -1) {
|
||||
if(bin_new(1) == -1 && bin_new(0)*position_binning_.stepsize()(0) < 0.01) {
|
||||
int ebin = energy_binning_.bin(energy_eV);
|
||||
// #ifdef debug_genrich
|
||||
// // fprintf(stdout, "Energybin: %d, energy: %f\n", ebin, energy_eV);
|
||||
|
||||
@@ -169,7 +169,7 @@ void Simulation::start() {
|
||||
timer_->setDeltaT(delta_t);
|
||||
injector_->initInjectionTimeDistribution(delta_t);
|
||||
|
||||
timer_->increaseTimestep(delta_t);
|
||||
// timer_->increaseTimestep(delta_t);
|
||||
|
||||
while (timestep < number_timesteps) {
|
||||
#if defined(debug_level3)
|
||||
@@ -483,6 +483,14 @@ void Simulation::processUntilTermination(particle::Particle& particle) {
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
} else if ((particle.specie()->type() == species::ImplementedSpecies::electron) && (particle.kineticEnergy_eV() < 10.) ||
|
||||
(particle.kineticEnergy_eV() < 0.05)) {
|
||||
// delete electrons once they can definitely no longer ionize the background particles and delete ions once they fell into the thermal region
|
||||
if(particle.specie()->deletionLogger()) {
|
||||
// abuse the "max deletion" deletion type to count the number of particles that are deleted due to falling out of the energy region of interest
|
||||
particle.specie()->deletionLogger()->logDeletion(particle.cylinderPosition(), DeletionType::max_interactions);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ((!(particle.specie()->dynamicDensityField()->changedPositionBin(
|
||||
|
||||
Reference in New Issue
Block a user