Kariba
Loading...
Searching...
No Matches
kariba::Bknpower Class Reference

#include <Bknpower.hpp>

Inheritance diagram for kariba::Bknpower:
kariba::Particles

Public Member Functions

 Bknpower (size_t size)
 
void set_p (double min, double brk, double ucom, double bfield, double betaeff, double r, double fsc)
 Methods to set momentum/energy arrays.
 
void set_p (double min, double brk, double gmax)
 
void set_ndens ()
 
void set_pspec1 (double s1)
 methods to set the slopes, break and normalization
 
void set_pspec2 (double s2)
 
void set_brk (double brk)
 
void set_norm (double n)
 
void cooling_steadystate (double ucom, double n0, double bfield, double r, double betaeff)
 
double max_p (double ucom, double bfield, double bjet, double r, double fsc)
 
void test ()
 simple method to check quantities.
 
- Public Member Functions inherited from kariba::Particles
 Particles (size_t size)
 
void set_mass (double m)
 
void initialize_gdens ()
 
void initialize_pdens ()
 Same as above but the other way around.
 
void gdens_differentiate ()
 
const std::vector< double > & get_p () const
 
const std::vector< double > & get_pdens () const
 
const std::vector< double > & get_gamma () const
 
const std::vector< double > & get_gdens () const
 
const std::vector< double > & get_gdens_diff () const
 
double count_particles ()
 Simple numerical integrals /w trapeze method.
 
double count_particles_energy ()
 
double av_p ()
 
double av_gamma ()
 
double av_psq ()
 
double av_gammasq ()
 
void test_arrays ()
 simple method to check arrays; only meant for debugging
 

Protected Attributes

double pspec1
 
double pspec2
 
double norm
 
double pmin
 
double pbrk
 
double pmax
 
- Protected Attributes inherited from kariba::Particles
double mass_gr
 particle mass in grams
 
double mass_kev
 same as above but in keV, using electrons as "reference"
 
std::vector< double > p
 array of particle momenta
 
std::vector< double > ndens
 array of number density per unit volume, per unit momentum
 
std::vector< double > gamma
 array of particle kinetic energies for each momentum
 
std::vector< double > gdens
 array of number density per unit volume, per unit gamma
 
std::vector< double > gdens_diff
 

Friends

double norm_bkn_int (double x, void *p)
 Methods to calculate the normalization of the function.
 
double injection_bkn_int (double x, void *p)
 Injection function to be integrated in cooling.
 

Detailed Description

Class for non-thermal particles, inherited from the generic Particles class in Particles.hpp note: ndens is number density per unit momentum

Constructor & Destructor Documentation

◆ Bknpower()

kariba::Bknpower::Bknpower ( size_t  size)

Member Function Documentation

◆ cooling_steadystate()

void kariba::Bknpower::cooling_steadystate ( double  ucom,
double  n0,
double  bfield,
double  r,
double  betaeff 
)

Method to solve steady state continuity equation. NOTE: KN cross section not included in IC cooling

◆ max_p()

double kariba::Bknpower::max_p ( double  ucom,
double  bfield,
double  betaeff,
double  r,
double  fsc 
)

Method to calculate maximum momentum of non thermal particles based on acceleration and cooling timescales The estimate is identical to the old agnjet but in momentum space; see Lucchini et al. 2019 for the math of the old version

◆ set_brk()

void kariba::Bknpower::set_brk ( double  brk)

◆ set_ndens()

void kariba::Bknpower::set_ndens ( )

Method to set differential electron number density from known pspec, normalization, and momentum array

◆ set_norm()

void kariba::Bknpower::set_norm ( double  n)

◆ set_p() [1/2]

void kariba::Bknpower::set_p ( double  min,
double  brk,
double  gmax 
)

◆ set_p() [2/2]

void kariba::Bknpower::set_p ( double  min,
double  brk,
double  ucom,
double  bfield,
double  betaeff,
double  r,
double  fsc 
)

Methods to set momentum/energy arrays.

◆ set_pspec1()

void kariba::Bknpower::set_pspec1 ( double  s1)

methods to set the slopes, break and normalization

◆ set_pspec2()

void kariba::Bknpower::set_pspec2 ( double  s2)

◆ test()

void kariba::Bknpower::test ( )

simple method to check quantities.

Friends And Related Symbol Documentation

◆ injection_bkn_int

double injection_bkn_int ( double  x,
void *  p 
)
friend

Injection function to be integrated in cooling.

◆ norm_bkn_int

double norm_bkn_int ( double  x,
void *  p 
)
friend

Methods to calculate the normalization of the function.

Member Data Documentation

◆ norm

double kariba::Bknpower::norm
protected

◆ pbrk

double kariba::Bknpower::pbrk
protected

◆ pmax

double kariba::Bknpower::pmax
protected

◆ pmin

double kariba::Bknpower::pmin
protected

◆ pspec1

double kariba::Bknpower::pspec1
protected

◆ pspec2

double kariba::Bknpower::pspec2
protected

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