65 #include "utilitaires.h" 68 double funct_star_rot_isco(
double,
const Param& ) ;
112 Scalar ucor_plus = (r2 * bsn * dnphi +
113 sqrt ( r2 * r2 * bsn *bsn * dnphi * dnphi +
114 4 * r2 * bdlog * ndlog + 4 * r * ndlog) ) /
115 2 / (1 + r * bdlog ) ;
117 Scalar factor_u2 = r2 * (2 * ddbbb /
bbb - 2 * bdlog * bdlog +
118 4 * bdlog * ndlog ) +
119 2 * r2 * r2 * bsn * bsn * dnphi * dnphi +
120 4 * r * ( ndlog - bdlog ) - 6 ;
122 Scalar factor_u1 = 2 * r * r2 * bsn * ( 2 * ( ndlog - bdlog ) *
125 Scalar factor_u0 = - r2 * ( 2 * ddnnn /
nn - 2 * ndlog * ndlog +
126 4 * bdlog * ndlog ) ;
129 Scalar orbit = factor_u2 * ucor_plus * ucor_plus +
130 factor_u1 * ucor_plus + factor_u0 ;
136 double r_ms, theta_ms, phi_ms, xi_ms,
137 xi_min = -1, xi_max = 1;
139 bool find_status = false ;
141 const Valeur& vorbit = orbit.get_spectral_va() ;
143 for(l =
nzet; l <= nzm1; l++) {
147 theta_ms = M_PI / 2. ;
154 double xi_f = xi_min;
156 double resloc = vorbit.
val_point(l, xi_min, theta_ms, phi_ms) ;
158 for (
int iloc=0; iloc<200; iloc++) {
160 resloc_old = resloc ;
161 resloc = vorbit.
val_point(l, xi_f, theta_ms, phi_ms) ;
162 if ( resloc * resloc_old <
double(0) ) {
163 xi_min = xi_f - 0.01 ;
180 double precis_ms = 1.e-12 ;
182 int nitermax_ms = 100 ;
185 xi_ms =
zerosec(funct_star_rot_isco, par_ms, xi_min, xi_max,
186 precis_ms, nitermax_ms, niter) ;
189 " number of iterations used in zerosec to locate the ISCO : " 191 *ost <<
" zero found at xi = " << xi_ms << endl ;
194 r_ms =
mp.
val_r(l_ms, xi_ms, theta_ms, phi_ms) ;
213 double ucor_msplus = (ucor_plus.
get_spectral_va()).val_point(l_ms, xi_ms, theta_ms,
215 double nobrs = (bsn.get_spectral_va()).val_point(l_ms, xi_ms, theta_ms, phi_ms) ;
218 p_f_isco =
new double ( ( ucor_msplus / nobrs / r_ms + nphirs ) /
219 (
double(2) * M_PI) ) ;
228 p_espec_isco=
new double (( 1./nobrs / r_ms / ucor_msplus + nphirs) *
229 (ucor_msplus/
sqrt(1.-ucor_msplus*ucor_msplus)*
236 double ucor_eqplus = (ucor_plus.
get_spectral_va()).val_point(l_ms, -1, theta_ms,phi_ms)
238 double nobeq = (bsn.get_spectral_va()).val_point(l_ms, -1, theta_ms, phi_ms) ;
241 p_f_eq =
new double ( ( ucor_eqplus / nobeq /
ray_eq() + nphieq ) /
242 (
double(2) * M_PI) ) ;
329 double funct_star_rot_isco(
double xi,
const Param& par){
337 double theta = M_PI / 2. ;
339 return vorbit.
val_point(l_ms, xi, theta, phi) ;
void annule_domain(int l)
Sets the Tensor to zero in a given domain.
virtual double lspec_isco() const
Angular momentum of a particle on the ISCO.
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
Map & mp
Mapping associated with the star.
double * p_lspec_isco
Specific angular momentum of a particle on the ISCO.
double * p_r_isco
Circumferential radius of the ISCO.
double * p_f_eq
Orbital frequency at the equator.
Cmp sqrt(const Cmp &)
Square root.
virtual double f_eq() const
Orbital frequency at the equator.
Scalar bbb
Metric factor B.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
double * p_f_isco
Orbital frequency of the ISCO.
Tensor field of valence 0 (or component of a tensorial field).
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
Values and coefficients of a (real-value) function.
double zerosec(double(*f)(double, const Param &), const Param &par, double a, double b, double precis, int nitermax, int &niter, bool abort=true)
Finding the zero a function.
int nzet
Number of domains of *mp occupied by the star.
virtual double r_isco(ostream *ost=0x0) const
Circumferential radius of the innermost stable circular orbit (ISCO).
Scalar nphi
Metric coefficient .
virtual double espec_isco() const
Energy of a particle on the ISCO.
const Scalar & get_scalar(int position=0) const
Returns the reference of a Scalar stored in the list.
virtual double val_r(int l, double xi, double theta, double pphi) const =0
Returns the value of the radial coordinate r for a given in a given domain.
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
double val_point(int l, double x, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point, by means of the spectral ...
double * p_espec_isco
Specific energy of a particle on the ISCO.
virtual double f_isco() const
Orbital frequency at the innermost stable circular orbit (ISCO).
int get_nzone() const
Returns the number of domains.
void add_scalar(const Scalar &ti, int position=0)
Adds the address of a new Scalar to the list.
Scalar nn
Lapse function N .
double ray_eq() const
Coordinate radius at , [r_unit].
const Scalar & dsdr() const
Returns of *this .
const Valeur & get_spectral_va() const
Returns va (read only version)
Coord r
r coordinate centered on the grid