GyotoFlaredDiskSynchrotron.h
Go to the documentation of this file.
/*
Copyright 2019-2021 Frederic Vincent, Thibaut Paumard, Nicolas Aimar
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 __GyotoFlaredDiskSynchrotron_H_
#define __GyotoFlaredDiskSynchrotron_H_
#include <iostream>
#include <fstream>
#include <iomanip>
namespace Gyoto{
namespace Astrobj { class FlaredDiskSynchrotron; }
class GridData2D;
}
#include <GyotoStandardAstrobj.h>
#include <GyotoGridData2D.h>
#include <GyotoKappaDistributionSynchrotronSpectrum.h>
class Gyoto::Astrobj::FlaredDiskSynchrotron
: public Astrobj::Standard,
public GridData2D,
public Hook::Listener
{
friend class Gyoto::SmartPointer<Gyoto::Astrobj::FlaredDiskSynchrotron>;
private:
SmartPointer<Spectrum::KappaDistributionSynchrotron> spectrumKappaSynch_;
std::string filename_;
double hoverR_;
double numberDensityMax_cgs_;
double temperatureMax_;
double BMax_cgs_;
double beta_;
double * density_;
double * velocity_;
double * Bvector_;
double * time_array_;
double magnetizationParameter_;
double deltat_;
double gamm1_;
bool flag_;
public:
GYOTO_OBJECT;
GYOTO_OBJECT_THREAD_SAFETY;
// Constructors - Destructor
// -------------------------
FlaredDiskSynchrotron();
FlaredDiskSynchrotron(const FlaredDiskSynchrotron& ) ;
virtual FlaredDiskSynchrotron* clone () const;
virtual ~FlaredDiskSynchrotron() ;
// Accessors
// ---------
public:
void file(std::string const &f) ;
std::string file() const;
void hoverR(double const hor) ;
double hoverR() const;
/*
timeTranslation shifts the value of GridData2D::tmin_ and tmax_,
allowing to scan the full simulation without having to change
the value of the Screen observation time (which is typically
not provided in M unit in the XML).
Choosing a negative timeTranslation, i.e. performing tmin_,tmax_-=dt,
amounts to increasing the Screen observation time by the same value,
tobs+=dt.
*/
void timeTranslation_inMunit(double const dt) ;
double timeTranslation_inMunit() const ;
void magnetizationParameter(double rr);
double magnetizationParameter() const;
void kappaIndex(double index);
double kappaIndex()const;
double numberDensityMax() const;
double numberDensityMax(std::string const &unit) const;
void numberDensityMax(double dens) ;
void numberDensityMax(double dens, std::string const &unit);
void temperatureMax(double tt);
double temperatureMax() const;
void polytropicIndex(double gamma);
double polytropicIndex() const;
void betaAtMax(double beta);
double betaAtMax() const;
void copyDensity(double const *const density,
size_t const naxes[3]);
double const * getDensity() const;
void copyVelocity(double const *const velocity,
size_t const naxes[3]);
double const * getVelocity() const;
void copyBvector(double const *const Bvector,
size_t const naxes[3]);
double const * getBvector() const;
void copyTimeArray(double const *const time_array, size_t const ntimes);
double const * getTimeArray() const;
public:
using Generic::metric;
std::vector<size_t> fitsRead(std::string filename) ;
virtual double operator()(double const coord[4]) ;
virtual void radiativeQ(double Inu[],
double Taunu[],
double const nu_ems[], size_t nbnu,
double dsem,
state_t const &coord_ph,
double const coord_obj[8]) const;
virtual void getVelocity(double const pos[4], double vel[4]) ;
};
#endif
GyotoGridData2D.h
Base class for reading 2D gridded data.
GyotoKappaDistributionSynchrotronSpectrum.h
Powerlaw synchrotron spectrum.
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties().
Definition GyotoObject.h:84
GyotoStandardAstrobj.h
Astronomical objects defined bya a potential/distance.
Gyoto::Astrobj::FlaredDiskSynchrotron
Definition GyotoFlaredDiskSynchrotron.h:50
Gyoto::Astrobj::FlaredDiskSynchrotron::deltat_
double deltat_
time translation
Definition GyotoFlaredDiskSynchrotron.h:75
Gyoto::Astrobj::FlaredDiskSynchrotron::flag_
bool flag_
polytropic index - 1
Definition GyotoFlaredDiskSynchrotron.h:77
Gyoto::Astrobj::FlaredDiskSynchrotron::radiativeQ
virtual void radiativeQ(double Inu[], double Taunu[], double const nu_ems[], size_t nbnu, double dsem, state_t const &coord_ph, double const coord_obj[8]) const
emission and transmission together
Gyoto::Astrobj::FlaredDiskSynchrotron::density_
double * density_
Surface density (ν, r, φ).
Definition GyotoFlaredDiskSynchrotron.h:65
Gyoto::Astrobj::FlaredDiskSynchrotron::filename_
std::string filename_
Optional FITS file name containing the arrays.
Definition GyotoFlaredDiskSynchrotron.h:54
Gyoto::Astrobj::FlaredDiskSynchrotron::BMax_cgs_
double BMax_cgs_
Maximun strenght of the 3 veceor magnetic field, defined by numberDensityMax_cgs_,...
Definition GyotoFlaredDiskSynchrotron.h:58
Gyoto::Astrobj::FlaredDiskSynchrotron::magnetizationParameter_
double magnetizationParameter_
1D Vector containing the times values of each time steps (dt not constant)
Definition GyotoFlaredDiskSynchrotron.h:74
Gyoto::Astrobj::FlaredDiskSynchrotron::clone
virtual FlaredDiskSynchrotron * clone() const
Cloner.
Gyoto::Astrobj::FlaredDiskSynchrotron::temperatureMax_
double temperatureMax_
Maximum temperature in K.
Definition GyotoFlaredDiskSynchrotron.h:57
Gyoto::Astrobj::FlaredDiskSynchrotron::numberDensityMax_cgs_
double numberDensityMax_cgs_
Maximum cgs value of number density.
Definition GyotoFlaredDiskSynchrotron.h:56
Gyoto::Astrobj::FlaredDiskSynchrotron::Bvector_
double * Bvector_
4vector of the magnetic field
Definition GyotoFlaredDiskSynchrotron.h:72
Gyoto::Astrobj::FlaredDiskSynchrotron::velocity_
double * velocity_
velocity(r, φ)
Definition GyotoFlaredDiskSynchrotron.h:71
Gyoto::Astrobj::FlaredDiskSynchrotron::FlaredDiskSynchrotron
FlaredDiskSynchrotron()
Standard constructor.
Gyoto::Astrobj::FlaredDiskSynchrotron::hoverR_
double hoverR_
Value of aspect ratio H/R of flared disk, where R is the radius projected in the equatorial plane and...
Definition GyotoFlaredDiskSynchrotron.h:55
Gyoto::Astrobj::Generic::metric
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
Gyoto::Astrobj::Standard
Astronomical objects defined bya a potential/distance.
Definition GyotoStandardAstrobj.h:87
Gyoto::GridData2D
Class for reading data stored in a 2D grid.
Definition GyotoGridData2D.h:52
Gyoto::GridData2D::GridData2D
GridData2D()
Constructor.
Gyoto::Hook::Listener
I might listen to a Teller.
Definition GyotoHooks.h:64
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Astrobj
Access to astronomical objects.
Definition GyotoAstrobj.h:49
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44