Gyoto
GyotoFlaredDiskSynchrotron.h
Go to the documentation of this file.
1
7/*
8 Copyright 2019-2021 Frederic Vincent, Thibaut Paumard, Nicolas Aimar
9
10 This file is part of Gyoto.
11
12 Gyoto is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
16
17 Gyoto is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
24 */
25
26#ifndef __GyotoFlaredDiskSynchrotron_H_
27#define __GyotoFlaredDiskSynchrotron_H_
28
29#include <iostream>
30#include <fstream>
31#include <iomanip>
32
33namespace Gyoto{
34 namespace Astrobj { class FlaredDiskSynchrotron; }
35 class GridData2D;
36}
37
39#include <GyotoGridData2D.h>
41
47: public Astrobj::Standard,
48 public GridData2D,
49 public Hook::Listener
50{
52 private:
53 SmartPointer<Spectrum::KappaDistributionSynchrotron> spectrumKappaSynch_;
54 std::string filename_;
55 double hoverR_;
58 double BMax_cgs_;
59 double beta_;
65 double * density_;
71 double * velocity_;
72 double * Bvector_;
73 double * time_array_;
75 double deltat_;
76 double gamm1_;
77 bool flag_;
78
79 public:
82
83 // Constructors - Destructor
84 // -------------------------
86
87 FlaredDiskSynchrotron(const FlaredDiskSynchrotron& ) ;
88 virtual FlaredDiskSynchrotron* clone () const;
89
91
92 // Accessors
93 // ---------
94 public:
95 void file(std::string const &f) ;
96 std::string file() const;
97 void hoverR(double const hor) ;
98 double hoverR() const;
99 /*
100 timeTranslation shifts the value of GridData2D::tmin_ and tmax_,
101 allowing to scan the full simulation without having to change
102 the value of the Screen observation time (which is typically
103 not provided in M unit in the XML).
104 Choosing a negative timeTranslation, i.e. performing tmin_,tmax_-=dt,
105 amounts to increasing the Screen observation time by the same value,
106 tobs+=dt.
107
108 */
109 void timeTranslation_inMunit(double const dt) ;
110 double timeTranslation_inMunit() const ;
111 void magnetizationParameter(double rr);
112 double magnetizationParameter() const;
113 void kappaIndex(double index);
114 double kappaIndex()const;
115 double numberDensityMax() const;
116 double numberDensityMax(std::string const &unit) const;
117 void numberDensityMax(double dens) ;
118 void numberDensityMax(double dens, std::string const &unit);
119 void temperatureMax(double tt);
120 double temperatureMax() const;
121 void polytropicIndex(double gamma);
122 double polytropicIndex() const;
123 void betaAtMax(double beta);
124 double betaAtMax() const;
125 void copyDensity(double const *const density,
126 size_t const naxes[3]);
127 double const * getDensity() const;
128 void copyVelocity(double const *const velocity,
129 size_t const naxes[3]);
130 double const * getVelocity() const;
131 void copyBvector(double const *const Bvector,
132 size_t const naxes[3]);
133 double const * getBvector() const;
134 void copyTimeArray(double const *const time_array, size_t const ntimes);
135 double const * getTimeArray() const;
136 public:
137 using Generic::metric;
138 std::vector<size_t> fitsRead(std::string filename) ;
139 virtual double operator()(double const coord[4]) ;
140 virtual void radiativeQ(double Inu[],
141 double Taunu[],
142 double const nu_ems[], size_t nbnu,
143 double dsem,
144 state_t const &coord_ph,
145 double const coord_obj[8]) const;
146 virtual void getVelocity(double const pos[4], double vel[4]) ;
147
148
149
150};
151
152#endif
Base class for reading 2D gridded data.
Powerlaw synchrotron spectrum.
#define GYOTO_OBJECT_THREAD_SAFETY
Declare virtual bool isThreadSafe() const.
Definition GyotoObject.h:99
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition GyotoObject.h:84
Astronomical objects defined bya a potential/distance.
Definition GyotoFlaredDiskSynchrotron.h:50
double deltat_
time translation
Definition GyotoFlaredDiskSynchrotron.h:75
bool flag_
polytropic index - 1
Definition GyotoFlaredDiskSynchrotron.h:77
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
double * density_
Surface density (ν, r, φ)
Definition GyotoFlaredDiskSynchrotron.h:65
std::string filename_
Optional FITS file name containing the arrays.
Definition GyotoFlaredDiskSynchrotron.h:54
double BMax_cgs_
Maximun strenght of the 3 veceor magnetic field, defined by numberDensityMax_cgs_,...
Definition GyotoFlaredDiskSynchrotron.h:58
double magnetizationParameter_
1D Vector containing the times values of each time steps (dt not constant)
Definition GyotoFlaredDiskSynchrotron.h:74
virtual FlaredDiskSynchrotron * clone() const
Cloner.
double temperatureMax_
Maximum temperature in K.
Definition GyotoFlaredDiskSynchrotron.h:57
double numberDensityMax_cgs_
Maximum cgs value of number density.
Definition GyotoFlaredDiskSynchrotron.h:56
double * Bvector_
4vector of the magnetic field
Definition GyotoFlaredDiskSynchrotron.h:72
double * velocity_
velocity(r, φ)
Definition GyotoFlaredDiskSynchrotron.h:71
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
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
Astronomical objects defined bya a potential/distance.
Definition GyotoStandardAstrobj.h:87
Class for reading data stored in a 2D grid.
Definition GyotoGridData2D.h:52
I might listen to a Teller.
Definition GyotoHooks.h:64
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44