|
Kariba
|
#include <Powerlaw.hpp>
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 |
Class for non-thermal particles, inherited from the generic Particles class in Particles.hpp note: ndens is number density per unit momentum
| kariba::Powerlaw::Powerlaw | ( | size_t | size | ) |
Class constructor to initialize object.
| void kariba::Powerlaw::check_secondary_charged_syn | ( | double | bfield, |
| double | gpmax | ||
| ) |
| 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
|
inline |
| 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
| 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 | ||
| ) |
| 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
| 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 | ||
| ) |
| void kariba::Powerlaw::set_gdens | ( | double & | plfrac_p, |
| double | Up, | ||
| double | protdens | ||
| ) |
| 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
| void kariba::Powerlaw::set_gdens_pdens | ( | double | r, |
| double | beta, | ||
| double | Ljet, | ||
| double | ep, | ||
| double | pspec, | ||
| double & | protdens | ||
| ) |
| void kariba::Powerlaw::set_ndens | ( | ) |
Method to set differential electron number density from known pspec, normalization, and momentum array
| void kariba::Powerlaw::set_norm | ( | double | n | ) |
| double kariba::Powerlaw::set_normprot | ( | double | nprot | ) |
| void kariba::Powerlaw::set_p | ( | double | min, |
| double | gmax | ||
| ) |
| void kariba::Powerlaw::set_p | ( | double | min, |
| double | ucom, | ||
| double | bfield, | ||
| double | betaeff, | ||
| double | r, | ||
| double | fsc | ||
| ) |
Methods to set momentum/energy arrays.
| 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
| 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
| void kariba::Powerlaw::set_pspec | ( | double | s1 | ) |
methods to set the slope and normalization
| double kariba::Powerlaw::sigma_pp | ( | double | Ep | ) |
| void kariba::Powerlaw::test | ( | ) |
simple method to check quantities.
|
protected |
Proton acceleration.
|
protected |
|
protected |
|
protected |
|
protected |