ARTEMIS
Public Member Functions | Private Types | Private Attributes | List of all members
NuclearFusionFunc Class Reference

This functor does binary nuclear fusions on a single cell. Particles of the two reacting species are paired with each other and for each pair we compute if a fusion event occurs. If so, we fill a mask (input parameter p_mask) with true so that product particles corresponding to a given pair can be effectively created in the particle creation functor. This functor also reads and contains the fusion multiplier. More...

#include <NuclearFusionFunc.H>

Public Member Functions

 NuclearFusionFunc ()=default
 Default constructor of the NuclearFusionFunc class. More...
 
 NuclearFusionFunc (const std::string collision_name, MultiParticleContainer const *const mypc, const bool isSameSpecies)
 Constructor of the NuclearFusionFunc class. More...
 
AMREX_GPU_HOST_DEVICE AMREX_INLINE void operator() (index_type const I1s, index_type const I1e, index_type const I2s, index_type const I2e, index_type const *AMREX_RESTRICT I1, index_type const *AMREX_RESTRICT I2, SoaData_type soa_1, SoaData_type soa_2, GetParticlePosition, GetParticlePosition, amrex::ParticleReal const, amrex::ParticleReal const, amrex::ParticleReal const m1, amrex::ParticleReal const m2, amrex::Real const dt, amrex::Real const dV, index_type const cell_start_pair, index_type *AMREX_RESTRICT p_mask, index_type *AMREX_RESTRICT p_pair_indices_1, index_type *AMREX_RESTRICT p_pair_indices_2, amrex::ParticleReal *AMREX_RESTRICT p_pair_reaction_weight, amrex::RandomEngine const &engine) const
 operator() of the NuclearFusionFunc class. Performs nuclear fusions at the cell level using the algorithm described in Higginson et al., Journal of Computational Physics 388, 439-453 (2019). Note that this function does not yet create the product particles, but instead fills an array p_mask that stores which collisions result in a fusion event. More...
 

Private Types

using ParticleType = WarpXParticleContainer::ParticleType
 
using ParticleBins = amrex::DenseBins< ParticleType >
 
using index_type = ParticleBins::index_type
 
using SoaData_type = WarpXParticleContainer::ParticleTileType::ParticleTileDataType
 

Private Attributes

amrex::ParticleReal m_fusion_multiplier
 
amrex::ParticleReal m_probability_threshold
 
amrex::ParticleReal m_probability_target_value
 
NuclearFusionType m_fusion_type
 
bool m_isSameSpecies
 

Detailed Description

This functor does binary nuclear fusions on a single cell. Particles of the two reacting species are paired with each other and for each pair we compute if a fusion event occurs. If so, we fill a mask (input parameter p_mask) with true so that product particles corresponding to a given pair can be effectively created in the particle creation functor. This functor also reads and contains the fusion multiplier.

Member Typedef Documentation

◆ index_type

◆ ParticleBins

◆ ParticleType

◆ SoaData_type

Constructor & Destructor Documentation

◆ NuclearFusionFunc() [1/2]

NuclearFusionFunc::NuclearFusionFunc ( )
default

Default constructor of the NuclearFusionFunc class.

◆ NuclearFusionFunc() [2/2]

NuclearFusionFunc::NuclearFusionFunc ( const std::string  collision_name,
MultiParticleContainer const *const  mypc,
const bool  isSameSpecies 
)
inline

Constructor of the NuclearFusionFunc class.

Parameters
[in]collision_namethe name of the collision
[in]mypcpointer to the MultiParticleContainer
[in]isSameSpecieswhether the two colliding species are the same

Member Function Documentation

◆ operator()()

AMREX_GPU_HOST_DEVICE AMREX_INLINE void NuclearFusionFunc::operator() ( index_type const  I1s,
index_type const  I1e,
index_type const  I2s,
index_type const  I2e,
index_type const *AMREX_RESTRICT  I1,
index_type const *AMREX_RESTRICT  I2,
SoaData_type  soa_1,
SoaData_type  soa_2,
GetParticlePosition  ,
GetParticlePosition  ,
amrex::ParticleReal const  ,
amrex::ParticleReal const  ,
amrex::ParticleReal const  m1,
amrex::ParticleReal const  m2,
amrex::Real const  dt,
amrex::Real const  dV,
index_type const  cell_start_pair,
index_type *AMREX_RESTRICT  p_mask,
index_type *AMREX_RESTRICT  p_pair_indices_1,
index_type *AMREX_RESTRICT  p_pair_indices_2,
amrex::ParticleReal *AMREX_RESTRICT  p_pair_reaction_weight,
amrex::RandomEngine const &  engine 
) const
inline

operator() of the NuclearFusionFunc class. Performs nuclear fusions at the cell level using the algorithm described in Higginson et al., Journal of Computational Physics 388, 439-453 (2019). Note that this function does not yet create the product particles, but instead fills an array p_mask that stores which collisions result in a fusion event.

Also note that there are three main differences between this implementation and the algorithm described in Higginson's paper:

  • 1) The transformation from the lab frame to the center of mass frame is nonrelativistic in Higginson's paper. Here, we implement a relativistic generalization.
  • 2) The behaviour when the estimated fusion probability is greater than one is not specified in Higginson's paper. Here, we provide an implementation using two runtime dependent parameters (fusion probability threshold and fusion probability target value). See documentation for more details.
  • 3) Here, we divide the weight of a particle by the number of times it is paired with other particles. This was not explicitly specified in Higginson's paper.
Parameters
[in]I1s,I2sis the start index for I1,I2 (inclusive).
[in]I1e,I2eis the stop index for I1,I2 (exclusive).
[in]I1,I2index arrays. They determine all elements that will be used.
[in]soa_1,soa_2contain the struct of array data of the two species
[in]m1,m2are masses.
[in]dtis the time step length between two collision calls.
[in]dVis the volume of the corresponding cell.
[in]cell_start_pairis the start index of the pairs in that cell.
[out]p_maskis a mask that will be set to true if a fusion event occurs for a given pair. It is only needed here to store information that will be used later on when actually creating the product particles.
[out]p_pair_indices_1,p_pair_indices_2arrays that store the indices of the particles of a given pair. They are only needed here to store information that will be used later on when actually creating the product particles.
[out]p_pair_reaction_weightstores the weight of the product particles. It is only needed here to store information that will be used later on when actually creating the product particles.
[in]enginethe random engine.

Member Data Documentation

◆ m_fusion_multiplier

amrex::ParticleReal NuclearFusionFunc::m_fusion_multiplier
private

◆ m_fusion_type

NuclearFusionType NuclearFusionFunc::m_fusion_type
private

◆ m_isSameSpecies

bool NuclearFusionFunc::m_isSameSpecies
private

◆ m_probability_target_value

amrex::ParticleReal NuclearFusionFunc::m_probability_target_value
private

◆ m_probability_threshold

amrex::ParticleReal NuclearFusionFunc::m_probability_threshold
private

The documentation for this class was generated from the following file: