Files
karl/include/interactions/cluster_formation.h
csendlinger 364191d92f 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.
2026-02-16 08:56:40 +01:00

55 lines
2.0 KiB
C++
Executable File

#ifndef CLUSTER_FORMATION_H
#define CLUSTER_FORMATION_H
#include <functional>
#include "simulation/interaction.h"
namespace species {
class Specie;
};
namespace interaction {
// class for (radiative) cluster formation interactions (A + B --> AB)
class ClusterFormation : public Interaction {
public:
ClusterFormation(std::function<double(double)> cross_section,
std::shared_ptr<species::Specie> target,
std::shared_ptr<species::TrackedSpecie> product);
virtual InteractionOutput performInteraction(particle::Particle& particle,
RandomNumbers* generator);
protected:
std::shared_ptr<species::TrackedSpecie> product_;
};
// class for tertiary association (A + B + B --> AB + B or A + B2 -> AB + B)
class ClusterFormationTertiary : public ClusterFormation {
public:
// Constructor: takes the function describing the cross section (dependent on the energy of the incident particle)
// and a shared_ptr to the Species that is the target in the interaction
// and a shared_ptr to the TrackedSpecie that is the product of the interaction
ClusterFormationTertiary(std::function<double(double)> cross_section,
std::shared_ptr<species::Specie> target,
std::shared_ptr<species::TrackedSpecie> product,
bool rate_coefficient = true);
// due to only the rate coefficients being available the cross section is
// approximated as sigma = rate_coefficient * density / velocity
// (units of the tertiary rate coefficient m^6/s)
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_;
};
}; // namespace interaction
#endif /* CLUSTER_FORMATION_H */