hub::scattering namespace

Contents

namespace for scattering

Functions

template<typename Scalar>
auto critical_vel(Scalar m1, Scalar m2, Scalar E1_inner, Scalar E2_inner) -> auto
Calculate the critical velocity of the scattering between two clusters(can be single particle).
template<typename Cluster1, typename Cluster2>
auto critical_vel(Cluster1 const& stay_cluster, Cluster2 const& incident_cluster) -> auto
Calculate the critical velocity of the scattering between two clusters(can be single particle).
template<typename Scalar>
auto incident_orbit(Scalar m_stay, Scalar m_incident, Scalar v_inf, Scalar b_max, Scalar r) -> auto
Randomly create an incident orbit that its infinity incident end is uniformly distributed in a circle area with radius b_max.
template<typename Cluster1, typename Cluster2, typename Scalar>
auto incident_orbit(Cluster1 const& stay_cluster, Cluster2 const& incident_cluster, Scalar v_inf, Scalar tidal_factor) -> auto deprecated
Randomly create an incident orbit that its infinity incident end is uniformly distributed in a circle area with radius b_max.

Function documentation

template<typename Scalar>
auto hub::scattering::critical_vel(Scalar m1, Scalar m2, Scalar E1_inner, Scalar E2_inner)

Calculate the critical velocity of the scattering between two clusters(can be single particle).

Template parameters
Scalar Floating point like type.
Parameters
m1 in Mass of the first cluster.
m2 in Mass of the second cluster.
E1_inner in The inner mechanical energy(mechanical energy in its own centre of mass frame) of the first cluster.
E2_inner in The inner mechanical energy(mechanical energy in its own centre of mass frame) of the second cluster.
Returns The critical velocity.

template<typename Cluster1, typename Cluster2>
auto hub::scattering::critical_vel(Cluster1 const& stay_cluster, Cluster2 const& incident_cluster)

Calculate the critical velocity of the scattering between two clusters(can be single particle).

Template parameters
Cluster1 std::ranges(Container) with element type has public member mass(Scalar), pos(Vector) and vel(Vector)./Type of single particle.
Cluster2 std::ranges(Container) with element type has public member mass(Scalar), pos(Vector) and vel(Vector)./Type of single particle.
Parameters
stay_cluster in The scattered cluster/scattered single particle.
incident_cluster in The incident cluster/incident single particle.
Returns The critical velocity.

template<typename Scalar>
auto hub::scattering::incident_orbit(Scalar m_stay, Scalar m_incident, Scalar v_inf, Scalar b_max, Scalar r)

Randomly create an incident orbit that its infinity incident end is uniformly distributed in a circle area with radius b_max.

Template parameters
Scalar Floating point like type.
Parameters
m_stay in The mass of the scattered object.
m_incident in The mass of the incident object.
v_inf in The relative velocity at infinity between scattering objects.
b_max in The max impact parameter.
in The relative distance between the centre of mass between two objects. Used to generate the phase (true anomaly of the orbit). The incident object will launch at this distance.
Returns The incident hyperbolic orbit.

template<typename Cluster1, typename Cluster2, typename Scalar>
auto hub::scattering::incident_orbit(Cluster1 const& stay_cluster, Cluster2 const& incident_cluster, Scalar v_inf, Scalar tidal_factor)

Randomly create an incident orbit that its infinity incident end is uniformly distributed in a circle area with radius b_max.

Template parameters
Cluster1 std::ranges(Container) with element type has public member mass(Scalar), pos(Vector) and vel(Vector)./Type of single particle.
Cluster2 std::ranges(Container) with element type has public member mass(Scalar), pos(Vector) and vel(Vector)./Type of single particle.
Scalar Floating point like type.
Parameters
stay_cluster in The scattered cluster/scattered single particle.
incident_cluster in The incident cluster/incident single particle.
v_inf in The relative velocity at infinity between scattering objects.
tidal_factor in Tidal factor between two clusters. Used to generate the phase (true anomaly of the orbit). The incident object will launch at the corresponding distance of this tidal factor.
Returns The incident hyperbolic orbit. TODO : b_max selection is implicit, need to be changed.