Changes to cluster formation;
T2p + T2 -> T3p + T is now considered a tertiary process and no longer a radiative one (might change again in the future); tertiary association now conserves (kinetic) energy and momentum in the center of mass frame (any energy released by the reaction or transferred into excitations are not accounted for); radiative association also conserves momentum in the center of mass frame, where the momentum of the photon is negelected however.
This commit is contained in:
@@ -10,21 +10,20 @@ class Specie;
|
|||||||
|
|
||||||
namespace interaction {
|
namespace interaction {
|
||||||
|
|
||||||
// class for (radiative) cluster formation interactions (A + B --> AB) 7
|
// class for (radiative) cluster formation interactions (A + B --> AB)
|
||||||
// or (A + BC --> AB + C)
|
|
||||||
class ClusterFormation : public Interaction {
|
class ClusterFormation : public Interaction {
|
||||||
public:
|
public:
|
||||||
ClusterFormation(std::function<double(double)> cross_section,
|
ClusterFormation(std::function<double(double)> cross_section,
|
||||||
std::shared_ptr<species::Specie> target,
|
std::shared_ptr<species::Specie> target,
|
||||||
std::shared_ptr<species::TrackedSpecie> product);
|
std::shared_ptr<species::TrackedSpecie> product);
|
||||||
InteractionOutput performInteraction(particle::Particle& particle,
|
virtual InteractionOutput performInteraction(particle::Particle& particle,
|
||||||
RandomNumbers* generator);
|
RandomNumbers* generator);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::shared_ptr<species::TrackedSpecie> product_;
|
std::shared_ptr<species::TrackedSpecie> product_;
|
||||||
};
|
};
|
||||||
|
|
||||||
// class for tertiary association (A + B + B --> AB + B)
|
// class for tertiary association (A + B + B --> AB + B or A + B2 -> AB + B)
|
||||||
class ClusterFormationTertiary : public ClusterFormation {
|
class ClusterFormationTertiary : public ClusterFormation {
|
||||||
public:
|
public:
|
||||||
// Constructor: takes the function describing the cross section (dependent on the energy of the incident particle)
|
// Constructor: takes the function describing the cross section (dependent on the energy of the incident particle)
|
||||||
@@ -32,12 +31,21 @@ class ClusterFormationTertiary : public ClusterFormation {
|
|||||||
// and a shared_ptr to the TrackedSpecie that is the product of the interaction
|
// and a shared_ptr to the TrackedSpecie that is the product of the interaction
|
||||||
ClusterFormationTertiary(std::function<double(double)> cross_section,
|
ClusterFormationTertiary(std::function<double(double)> cross_section,
|
||||||
std::shared_ptr<species::Specie> target,
|
std::shared_ptr<species::Specie> target,
|
||||||
std::shared_ptr<species::TrackedSpecie> product);
|
std::shared_ptr<species::TrackedSpecie> product,
|
||||||
|
bool rate_coefficient = true);
|
||||||
|
|
||||||
// due to only the rate coefficients being available the cross section is
|
// due to only the rate coefficients being available the cross section is
|
||||||
// approximated as sigma = rate_coefficient * density / velocity
|
// approximated as sigma = rate_coefficient * density / velocity
|
||||||
// (units of the tertiary rate coefficient m^6/s)
|
// (units of the tertiary rate coefficient m^6/s)
|
||||||
double microscopicCrossSection(double energy_eV, const Coordinate& position);
|
double microscopicCrossSection(double energy_eV, const Coordinate& position);
|
||||||
|
|
||||||
|
InteractionOutput performInteraction(particle::Particle& particle,
|
||||||
|
RandomNumbers* generator);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// flag whether the "cross_section_" function is in truth calculated using a
|
||||||
|
// three body association rate
|
||||||
|
bool rate_coefficient_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -238,8 +238,15 @@ void addInteractions(
|
|||||||
"that the cross section function is scaled by the density "
|
"that the cross section function is scaled by the density "
|
||||||
"of the target specie at the position of the interaction "
|
"of the target specie at the position of the interaction "
|
||||||
"(cross section function assumed to have the units m^5)");
|
"(cross section function assumed to have the units m^5)");
|
||||||
specie->addInteraction(std::shared_ptr<interaction::Interaction>(
|
|
||||||
new interaction::ClusterFormationTertiary(cross_section, target, product)));
|
if(json_string(json_object_by_path(value, {"CrossSection", "PredefinedFunction"}))
|
||||||
|
== "T2pT2_clustering_janev") {
|
||||||
|
specie->addInteraction(std::shared_ptr<interaction::Interaction>(
|
||||||
|
new interaction::ClusterFormationTertiary(cross_section, target, product, false)));
|
||||||
|
} else {
|
||||||
|
specie->addInteraction(std::shared_ptr<interaction::Interaction>(
|
||||||
|
new interaction::ClusterFormationTertiary(cross_section, target, product)));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ERROR("ClusteringType " + clustering_type +
|
ERROR("ClusteringType " + clustering_type +
|
||||||
": not known, choose either 'radiative' or 'tertiary'.");
|
": not known, choose either 'radiative' or 'tertiary'.");
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ InteractionOutput ClusterFormation::performInteraction(
|
|||||||
// target_->velocityDistribution()
|
// target_->velocityDistribution()
|
||||||
// ->rollVelocity(x_impact, generator->engine())
|
// ->rollVelocity(x_impact, generator->engine())
|
||||||
// .cartesianEntries();
|
// .cartesianEntries();
|
||||||
|
/*****************************************************************************
|
||||||
const double energy_eV =
|
const double energy_eV =
|
||||||
kinematic::kineticEnergy(target_velocity_.cartesianEntries(), target_->mass_kg()) *
|
kinematic::kineticEnergy(target_velocity_.cartesianEntries(), target_->mass_kg()) *
|
||||||
UnitConversion::JouleToeV;
|
UnitConversion::JouleToeV;
|
||||||
@@ -35,6 +36,15 @@ InteractionOutput ClusterFormation::performInteraction(
|
|||||||
target_velocity_.cartesianEntries() / kinematic::norm(target_velocity_.cartesianEntries());
|
target_velocity_.cartesianEntries() / kinematic::norm(target_velocity_.cartesianEntries());
|
||||||
// product inherits weight of the main particle (not the target, which is
|
// product inherits weight of the main particle (not the target, which is
|
||||||
// assumed to be just a density, i.e. has no weight of its own)
|
// assumed to be just a density, i.e. has no weight of its own)
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
// neglect the momentum of the photon -> the cluster moves with the CoM velocity
|
||||||
|
// after the collision
|
||||||
|
blitz::TinyVector<double, 3> v_cluster =
|
||||||
|
(particle.mass_kg()*particle.velocity().cartesianEntries() +
|
||||||
|
target_->mass_kg()*target_velocity_.cartesianEntries()) /
|
||||||
|
(particle.mass_kg() + target_->mass_kg());
|
||||||
|
|
||||||
particle::Particle cluster(product_, x_impact, CartesianVector(v_cluster),
|
particle::Particle cluster(product_, x_impact, CartesianVector(v_cluster),
|
||||||
particle.timeAlive(), particle.weight());
|
particle.timeAlive(), particle.weight());
|
||||||
|
|
||||||
@@ -53,15 +63,107 @@ InteractionOutput ClusterFormation::performInteraction(
|
|||||||
ClusterFormationTertiary::ClusterFormationTertiary(
|
ClusterFormationTertiary::ClusterFormationTertiary(
|
||||||
std::function<double(double)> cross_section,
|
std::function<double(double)> cross_section,
|
||||||
std::shared_ptr<species::Specie> target,
|
std::shared_ptr<species::Specie> target,
|
||||||
std::shared_ptr<species::TrackedSpecie> product) :
|
std::shared_ptr<species::TrackedSpecie> product,
|
||||||
ClusterFormation(cross_section, target, product) {}
|
bool rate_coefficient) :
|
||||||
|
ClusterFormation(cross_section, target, product), rate_coefficient_(rate_coefficient) {}
|
||||||
|
|
||||||
double ClusterFormationTertiary::microscopicCrossSection(double energy_eV,
|
double ClusterFormationTertiary::microscopicCrossSection(double energy_eV,
|
||||||
const Coordinate& position) {
|
const Coordinate& position) {
|
||||||
// SIM_INFO("Tertiary cross section.");
|
// SIM_INFO("Tertiary cross section.");
|
||||||
|
if(!rate_coefficient_) {
|
||||||
|
return cross_section_(energy_eV);
|
||||||
|
}
|
||||||
const double rate_over_velocity = cross_section_(energy_eV);
|
const double rate_over_velocity = cross_section_(energy_eV);
|
||||||
auto density = target_->densityField()->density(position);
|
auto density = target_->densityField()->density(position);
|
||||||
return rate_over_velocity * density;
|
return rate_over_velocity * density;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InteractionOutput ClusterFormationTertiary::performInteraction(
|
||||||
|
particle::Particle& particle,
|
||||||
|
RandomNumbers* generator) {
|
||||||
|
#ifdef debug_level3
|
||||||
|
DEBUG_LEVEL_3("Perform cluster formation.");
|
||||||
|
#endif
|
||||||
|
const auto x_impact = particle.cartesianPosition();
|
||||||
|
/******************************************************************
|
||||||
|
// const blitz::TinyVector<double, 3> v_target =
|
||||||
|
// target_->driftVelocity()->driftVelocity(x_impact).cartesianEntries() +
|
||||||
|
// target_->velocityDistribution()
|
||||||
|
// ->rollVelocity(x_impact, generator->engine())
|
||||||
|
// .cartesianEntries();
|
||||||
|
const double energy_eV =
|
||||||
|
kinematic::kineticEnergy(target_velocity_.cartesianEntries(), target_->mass_kg()) *
|
||||||
|
UnitConversion::JouleToeV;
|
||||||
|
const blitz::TinyVector<double, 3> v_cluster =
|
||||||
|
kinematic::velocity(energy_eV, product_->mass_kg()) *
|
||||||
|
target_velocity_.cartesianEntries() / kinematic::norm(target_velocity_.cartesianEntries());
|
||||||
|
// product inherits weight of the main particle (not the target, which is
|
||||||
|
// assumed to be just a density, i.e. has no weight of its own)
|
||||||
|
particle::Particle cluster(product_, x_impact, CartesianVector(v_cluster),
|
||||||
|
particle.timeAlive(), particle.weight());
|
||||||
|
*****************************************************************/
|
||||||
|
|
||||||
|
// strictly speaking only correct for the reaction T2+ + T2 -> T3+ + T
|
||||||
|
// (otherwise missing momentum component of actual third body)
|
||||||
|
blitz::TinyVector<double, 3> v_com = particle.mass_kg()*particle.velocity().cartesianEntries() +
|
||||||
|
target_->mass_kg()*target_velocity_.cartesianEntries();
|
||||||
|
|
||||||
|
double E0_com = 0;
|
||||||
|
double total_mass = target_->mass_kg() + particle.mass_kg();
|
||||||
|
|
||||||
|
// differentiate between T+ + 2T2 and T2+ + T2 (probably not ideal if new types
|
||||||
|
// were to be implemented)
|
||||||
|
if(particle.specie()->type() == species::ImplementedSpecies::Tplus &&
|
||||||
|
target_->type() == species::ImplementedSpecies::T2) {
|
||||||
|
// ignore any bulk movement of third interaction partner
|
||||||
|
blitz::TinyVector<double, 3> v3 = target_->velocityDistribution()
|
||||||
|
->rollVelocity(x_impact, generator->engine()).cartesianEntries();
|
||||||
|
total_mass += target_->mass_kg();
|
||||||
|
v_com += target_->mass_kg()*v3;
|
||||||
|
v_com /= particle.mass_kg() + 2*target_->mass_kg();
|
||||||
|
E0_com += 0.5*target_->mass_kg()*blitz::dot(v3 - v_com, v3 - v_com);
|
||||||
|
} else {
|
||||||
|
v_com /= total_mass;
|
||||||
|
}
|
||||||
|
blitz::TinyVector<double, 3> vi_com = particle.velocity().cartesianEntries() - v_com;
|
||||||
|
blitz::TinyVector<double, 3> vt_com = target_velocity_.cartesianEntries() - v_com;
|
||||||
|
|
||||||
|
E0_com += 0.5*particle.mass_kg()*blitz::dot(vi_com, vi_com) +
|
||||||
|
0.5*target_->mass_kg()*blitz::dot(vt_com, vt_com);
|
||||||
|
|
||||||
|
double cluster_mass = product_->mass_kg();
|
||||||
|
double rest_mass = total_mass - cluster_mass;
|
||||||
|
double reduced_mass = 1/(1/cluster_mass + 1/rest_mass);
|
||||||
|
|
||||||
|
// momentum of the scattered particles in the CoM frame
|
||||||
|
double norm_pnew_com = std::sqrt(2*reduced_mass*E0_com);
|
||||||
|
|
||||||
|
double phi = generator->rollUniform(0,1)*M_PI*2;
|
||||||
|
double theta = std::acos(1 - 2*generator->rollUniform(0,1));
|
||||||
|
|
||||||
|
// assume isotropic distribution of the scattered momenta in the CoM frame
|
||||||
|
// (removes the need to rotate wrt the incoming velocity)
|
||||||
|
// if a more general approach is needed, use the same calculation as in elastic scattering
|
||||||
|
|
||||||
|
blitz::TinyVector<double, 3> p_cluster_com(std::sin(theta)*std::cos(phi),
|
||||||
|
std::sin(theta)*std::sin(phi),
|
||||||
|
std::cos(theta));
|
||||||
|
p_cluster_com *= norm_pnew_com;
|
||||||
|
blitz::TinyVector<double, 3> v_cluster = (p_cluster_com/cluster_mass) + v_com;
|
||||||
|
|
||||||
|
particle::Particle cluster(product_, x_impact, CartesianVector(v_cluster),
|
||||||
|
particle.timeAlive(), particle.weight());
|
||||||
|
|
||||||
|
InteractionOutput output;
|
||||||
|
output.add(cluster);
|
||||||
|
output.deleteCurrentParticle(true);
|
||||||
|
|
||||||
|
if (particle.specie()->deletionLogger()) {
|
||||||
|
particle.specie()->deletionLogger()->logDeletion(
|
||||||
|
x_impact, DeletionType::cluster_formation);
|
||||||
|
}
|
||||||
|
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace interaction
|
} // namespace interaction
|
||||||
|
|||||||
Reference in New Issue
Block a user