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

#include <Powerlaw.hpp>

Inheritance diagram for kariba::Powerlaw:
kariba::Particles

Public Member Functions

 Powerlaw (size_t size)
 Class constructor to initialize object.
 
void set_p (double min, double ucom, double bfield, double betaeff, double r, double fsc)
 Methods to set momentum/energy arrays.
 
void set_p (double min, double gmax)
 
void set_ndens ()
 
void set_pspec (double s1)
 methods to set the slope and normalization
 
void set_norm (double n)
 
bool get_Efficiency () const
 
void cooling_steadystate (double ucom, double n0, double bfield, double r, double tshift)
 
double max_p (double ucom, double bfield, double betaeff, double r, double fsc)
 
void set_energy (double gpmin, double fsc, double f_beta, double bfield, double r_g, double z, double r, int infosw, double protdens, double nwind, double Uradjet, const std::string &outputConfiguration, const std::string &source)
 
void check_secondary_charged_syn (double bfield, double gpmax)
 
void ProtonTimescales (double &logdgp, double fsc, double f_beta, double bfield, double gpmin, double &gpmax, double r_g, double z, double r, int infosw, double nwind, double Uradjet, const std::string &outputConfiguration, const std::string &source)
 
double sigma_pp (double Ep)
 
double set_normprot (double nprot)
 
void set_gdens (double &plfrac_p, double Up, double protdens)
 
void set_gdens (double r, double protdens, double nwind, double bfield, double plfrac, double Urad)
 
void set_gdens_pdens (double r, double beta, double Ljet, double ep, double pspec, double &protdens)
 
void set_pp_elecs (gsl_interp_accel *acc_Jp, gsl_spline *spline_Jp, double ntot_prot, double nwind, double plfrac, double gammap_min, double gammap_max, double bfield, double r)
 Function that produces the secondary electrons from pp.
 
void set_pg_electrons (const std::vector< double > &energy, const std::vector< double > &density, double f_beta, double r, double vol, double B)
 
void Qggeefunction (double r, double vol, double bfield, size_t phot_number, const std::vector< double > &en_perseg, const std::vector< double > &lum_perseg, double gmax)
 
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 pspec
 
double plnorm
 
double pmin
 
double pmax
 
bool isEfficient
 Proton acceleration.
 
- 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
 

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

◆ Powerlaw()

kariba::Powerlaw::Powerlaw ( size_t  size)

Class constructor to initialize object.

Member Function Documentation

◆ check_secondary_charged_syn()

void kariba::Powerlaw::check_secondary_charged_syn ( double  bfield,
double  gpmax 
)

◆ cooling_steadystate()

void kariba::Powerlaw::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

◆ get_Efficiency()

bool kariba::Powerlaw::get_Efficiency ( ) const
inline

◆ max_p()

double kariba::Powerlaw::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

◆ ProtonTimescales()

void kariba::Powerlaw::ProtonTimescales ( double &  logdgp,
double  fsc,
double  f_beta,
double  bfield,
double  gpmin,
double &  gpmax,
double  r_g,
double  z,
double  r,
int  infosw,
double  nwind,
double  Uradjet,
const std::string &  outputConfiguration,
const std::string &  source 
)

◆ Qggeefunction()

void kariba::Powerlaw::Qggeefunction ( double  r,
double  vol,
double  bfield,
size_t  phot_number,
const std::vector< double > &  en_perseg,
const std::vector< double > &  lum_perseg,
double  gmax 
)

Function that produces the secondary electrons from photon-photon annihilation

◆ set_energy()

void kariba::Powerlaw::set_energy ( double  gpmin,
double  fsc,
double  f_beta,
double  bfield,
double  r_g,
double  z,
double  r,
int  infosw,
double  protdens,
double  nwind,
double  Uradjet,
const std::string &  outputConfiguration,
const std::string &  source 
)

◆ set_gdens() [1/2]

void kariba::Powerlaw::set_gdens ( double &  plfrac_p,
double  Up,
double  protdens 
)

◆ set_gdens() [2/2]

void kariba::Powerlaw::set_gdens ( double  r,
double  protdens,
double  nwind,
double  bfield,
double  plfrac,
double  Uradjet 
)

Method to set differential proton number density per γ from known pspec, normalization and γ array

◆ set_gdens_pdens()

void kariba::Powerlaw::set_gdens_pdens ( double  r,
double  beta,
double  Ljet,
double  ep,
double  pspec,
double &  protdens 
)

◆ set_ndens()

void kariba::Powerlaw::set_ndens ( )

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

◆ set_norm()

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

◆ set_normprot()

double kariba::Powerlaw::set_normprot ( double  nprot)

◆ set_p() [1/2]

void kariba::Powerlaw::set_p ( double  min,
double  gmax 
)

◆ set_p() [2/2]

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

Methods to set momentum/energy arrays.

◆ set_pg_electrons()

void kariba::Powerlaw::set_pg_electrons ( const std::vector< double > &  energy,
const std::vector< double > &  density,
double  f_beta,
double  r,
double  vol,
double  B 
)

The method to set the secondary electrons from pg (I have called the Neutrino object first because I have all the tables from KA09 in this class/file

◆ set_pp_elecs()

void kariba::Powerlaw::set_pp_elecs ( gsl_interp_accel *  acc_Jp,
gsl_spline *  spline_Jp,
double  ntot_prot,
double  nwind,
double  plfrac,
double  gammap_min,
double  gammap_max,
double  bfield,
double  r 
)

Function that produces the secondary electrons from pp.

1.5

◆ set_pspec()

void kariba::Powerlaw::set_pspec ( double  s1)

methods to set the slope and normalization

◆ sigma_pp()

double kariba::Powerlaw::sigma_pp ( double  Ep)

◆ test()

void kariba::Powerlaw::test ( )

simple method to check quantities.

Member Data Documentation

◆ isEfficient

bool kariba::Powerlaw::isEfficient
protected

Proton acceleration.

◆ plnorm

double kariba::Powerlaw::plnorm
protected

◆ pmax

double kariba::Powerlaw::pmax
protected

◆ pmin

double kariba::Powerlaw::pmin
protected

◆ pspec

double kariba::Powerlaw::pspec
protected

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