31 char star_rot_isco_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Star/star_rot_isco.C,v 1.5 2014/10/13 08:53:39 j_novak Exp $" ;
62 #include "utilitaires.h"
65 double funct_star_rot_isco(
double,
const Param& ) ;
109 Scalar ucor_plus = (r2 * bsn * dnphi +
110 sqrt ( r2 * r2 * bsn *bsn * dnphi * dnphi +
111 4 * r2 * bdlog * ndlog + 4 * r * ndlog) ) /
112 2 / (1 + r * bdlog ) ;
114 Scalar factor_u2 = r2 * (2 * ddbbb /
bbb - 2 * bdlog * bdlog +
115 4 * bdlog * ndlog ) +
116 2 * r2 * r2 * bsn * bsn * dnphi * dnphi +
117 4 * r * ( ndlog - bdlog ) - 6 ;
119 Scalar factor_u1 = 2 * r * r2 * bsn * ( 2 * ( ndlog - bdlog ) *
122 Scalar factor_u0 = - r2 * ( 2 * ddnnn /
nn - 2 * ndlog * ndlog +
123 4 * bdlog * ndlog ) ;
126 Scalar orbit = factor_u2 * ucor_plus * ucor_plus +
127 factor_u1 * ucor_plus + factor_u0 ;
133 double r_ms, theta_ms, phi_ms, xi_ms,
134 xi_min = -1, xi_max = 1;
136 bool find_status = false ;
138 const Valeur& vorbit = orbit.get_spectral_va() ;
140 for(l =
nzet; l <= nzm1; l++) {
144 theta_ms = M_PI / 2. ;
151 double xi_f = xi_min;
153 double resloc = vorbit.
val_point(l, xi_min, theta_ms, phi_ms) ;
155 for (
int iloc=0; iloc<200; iloc++) {
157 resloc_old = resloc ;
158 resloc = vorbit.
val_point(l, xi_f, theta_ms, phi_ms) ;
159 if ( resloc * resloc_old <
double(0) ) {
160 xi_min = xi_f - 0.01 ;
177 double precis_ms = 1.e-12 ;
179 int nitermax_ms = 100 ;
182 xi_ms =
zerosec(funct_star_rot_isco, par_ms, xi_min, xi_max,
183 precis_ms, nitermax_ms, niter) ;
186 " number of iterations used in zerosec to locate the ISCO : "
188 *ost <<
" zero found at xi = " << xi_ms << endl ;
191 r_ms =
mp.
val_r(l_ms, xi_ms, theta_ms, phi_ms) ;
210 double ucor_msplus = (ucor_plus.
get_spectral_va()).val_point(l_ms, xi_ms, theta_ms,
212 double nobrs = (bsn.
get_spectral_va()).val_point(l_ms, xi_ms, theta_ms, phi_ms) ;
215 p_f_isco =
new double ( ( ucor_msplus / nobrs / r_ms + nphirs ) /
216 (
double(2) * M_PI) ) ;
225 p_espec_isco=
new double (( 1./nobrs / r_ms / ucor_msplus + nphirs) *
226 (ucor_msplus/
sqrt(1.-ucor_msplus*ucor_msplus)*
233 double ucor_eqplus = (ucor_plus.
get_spectral_va()).val_point(l_ms, -1, theta_ms,phi_ms)
235 double nobeq = (bsn.
get_spectral_va()).val_point(l_ms, -1, theta_ms, phi_ms) ;
238 p_f_eq =
new double ( ( ucor_eqplus / nobeq /
ray_eq() + nphieq ) /
239 (
double(2) * M_PI) ) ;
326 double funct_star_rot_isco(
double xi,
const Param& par){
334 double theta = M_PI / 2. ;
336 return vorbit.
val_point(l_ms, xi, theta, phi) ;
Coord r
r coordinate centered on the grid
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
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.
int get_nzone() const
Returns the number of domains.
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
const Scalar & get_scalar(int position=0) const
Returns the reference of a Scalar stored in the list.
void add_scalar(const Scalar &ti, int position=0)
Adds the address of a new Scalar to the list.
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
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.
const Scalar & dsdr() const
Returns of *this .
const Valeur & get_spectral_va() const
Returns va (read only version)
virtual double lspec_isco() const
Angular momentum of a particle on the ISCO.
double * p_r_isco
Circumferential radius of the ISCO.
virtual double espec_isco() const
Energy of a particle on the ISCO.
virtual double r_isco(ostream *ost=0x0) const
Circumferential radius of the innermost stable circular orbit (ISCO).
double * p_lspec_isco
Specific angular momentum of a particle on the ISCO.
Scalar bbb
Metric factor B.
Scalar nphi
Metric coefficient .
double * p_f_isco
Orbital frequency of the ISCO.
virtual double f_isco() const
Orbital frequency at the innermost stable circular orbit (ISCO).
double * p_espec_isco
Specific energy of a particle on the ISCO.
double * p_f_eq
Orbital frequency at the equator.
virtual double f_eq() const
Orbital frequency at the equator.
Scalar nn
Lapse function N .
double ray_eq() const
Coordinate radius at , [r_unit].
Map & mp
Mapping associated with the star.
int nzet
Number of domains of *mp occupied by the star.
Values and coefficients of a (real-value) function.
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 ...
Cmp sqrt(const Cmp &)
Square root.
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.
void annule_domain(int l)
Sets the Tensor to zero in a given domain.