GyotoPowerLawSynchrotronSpectrum.h
Go to the documentation of this file.
/*
Copyright 2018 Frederic Vincent, Thibaut Paumard
This file is part of Gyoto.
Gyoto is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gyoto is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GyotoPowerLawSynchrotronSpectrum_H_
#define __GyotoPowerLawSynchrotronSpectrum_H_
#include "GyotoSpectrum.h"
#include <GyotoBlackBodySpectrum.h>
namespace Gyoto {
namespace Spectrum {
class PowerLawSynchrotron;
}
}
class Gyoto::Spectrum::PowerLawSynchrotron : public Gyoto::Spectrum::Generic {
friend class Gyoto::SmartPointer<Gyoto::Spectrum::PowerLawSynchrotron>;
protected:
SmartPointer<Spectrum::BlackBody> spectrumBB_;
double numberdensityCGS_;
double angle_B_pem_;
double cyclotron_freq_;
double PLindex_;
bool angle_averaged_;
double gamma_min_;
double gamma_max_;
public:
GYOTO_OBJECT;
PowerLawSynchrotron();
PowerLawSynchrotron(const PowerLawSynchrotron &);
virtual PowerLawSynchrotron * clone() const;
using Gyoto::Spectrum::Generic::operator();
virtual double operator()(double nu) const;
#ifndef GYOTO_SWIGIMPORTED
virtual double operator()(double nu,double ,double ds) const;
#endif
// NB: the second argument, opacity in the Spectrum API
// is useless here
double numberdensityCGS() const;
void numberdensityCGS(double rho);
double angle_B_pem() const;
void angle_B_pem(double rho);
double cyclotron_freq() const;
void cyclotron_freq(double rho);
double PLindex() const;
void PLindex(double ind);
bool angle_averaged() const;
void angle_averaged(bool ang);
double gamma_min() const;
void gamma_min(double gmin);
double gamma_max() const;
void gamma_max(double gmax);
double jnuCGS(double nu) const;
double jQnuCGS(double nu) const;
double jUnuCGS(double nu) const;
double jVnuCGS(double nu) const;
double alphanuCGS(double nu) const;
double alphaQnuCGS(double nu) const;
double alphaUnuCGS(double nu) const;
double alphaVnuCGS(double nu) const;
double rQnuCGS(double nu) const;
double rUnuCGS(double nu) const;
double rVnuCGS(double nu) const;
void radiativeQ(double jnu[], // output
double anu[], // output
double const nu_ems[],
size_t nbnu
) ;
void radiativeQ(double jInu[], double jQnu[], double jUnu[], double jVnu[],
double aInu[], double aQnu[], double aUnu[], double aVnu[],
double rQnu[], double rUnu[], double rVnu[],
double const nu_ems[],
size_t nbnu );
};
#endif
GyotoBlackBodySpectrum.h
I_nu(nu, T) = cst_*2*h*nu^3/c^2/(exp(h*nu/k*T)-1.);.
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties().
Definition GyotoObject.h:84
GyotoSpectrum.h
Spectrum of a simple object (e.g. Star).
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Spectrum::Generic
Spectrum emitted by an Astrobj.
Definition GyotoSpectrum.h:137
Gyoto::Spectrum::PowerLawSynchrotron
Powerlaw synchrotron spectrum.
Definition GyotoPowerLawSynchrotronSpectrum.h:49
Gyoto::Spectrum::PowerLawSynchrotron::spectrumBB_
SmartPointer< Spectrum::BlackBody > spectrumBB_
blackbody emission
Definition GyotoPowerLawSynchrotronSpectrum.h:52
Gyoto::Spectrum::PowerLawSynchrotron::jQnuCGS
double jQnuCGS(double nu) const
Gyoto::Spectrum::PowerLawSynchrotron::angle_averaged_
bool angle_averaged_
Boolean for angle averaging.
Definition GyotoPowerLawSynchrotronSpectrum.h:57
Gyoto::Spectrum::PowerLawSynchrotron::PLindex_
double PLindex_
Power law index: electron spectrum \propto gamma^-PLindex_.
Definition GyotoPowerLawSynchrotronSpectrum.h:56
Gyoto::Spectrum::PowerLawSynchrotron::alphanuCGS
double alphanuCGS(double nu) const
Gyoto::Spectrum::PowerLawSynchrotron::alphaUnuCGS
double alphaUnuCGS(double nu) const
Gyoto::Spectrum::PowerLawSynchrotron::rVnuCGS
double rVnuCGS(double nu) const
Gyoto::Spectrum::PowerLawSynchrotron::angle_B_pem_
double angle_B_pem_
Angle between Bfield and emission direction (rad).
Definition GyotoPowerLawSynchrotronSpectrum.h:54
Gyoto::Spectrum::PowerLawSynchrotron::numberdensityCGS_
double numberdensityCGS_
Number density in CGS UNITS (careful).
Definition GyotoPowerLawSynchrotronSpectrum.h:53
Gyoto::Spectrum::PowerLawSynchrotron::jnuCGS
double jnuCGS(double nu) const
Gyoto::Spectrum::PowerLawSynchrotron::jVnuCGS
double jVnuCGS(double nu) const
Gyoto::Spectrum::PowerLawSynchrotron::rQnuCGS
double rQnuCGS(double nu) const
Gyoto::Spectrum::PowerLawSynchrotron::clone
virtual PowerLawSynchrotron * clone() const
Cloner.
Gyoto::Spectrum::PowerLawSynchrotron::alphaQnuCGS
double alphaQnuCGS(double nu) const
Gyoto::Spectrum::PowerLawSynchrotron::jUnuCGS
double jUnuCGS(double nu) const
Gyoto::Spectrum::PowerLawSynchrotron::radiativeQ
void radiativeQ(double jnu[], double anu[], double const nu_ems[], size_t nbnu)
Gyoto::Spectrum::PowerLawSynchrotron::cyclotron_freq_
double cyclotron_freq_
Cyclotron frequency (e*B / 2*pi*me*c).
Definition GyotoPowerLawSynchrotronSpectrum.h:55
Gyoto::Spectrum::PowerLawSynchrotron::rUnuCGS
double rUnuCGS(double nu) const
Gyoto::Spectrum::PowerLawSynchrotron::alphaVnuCGS
double alphaVnuCGS(double nu) const
Gyoto::Spectrum
Spectrum of a simple object (e.g. a Gyoto::Astrobj::Star).
Definition GyotoBlackBodySpectrum.h:35
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44