57 #include "et_bin_bhns_extr.h" 68 Cmp raccord_c1(
const Cmp& uu,
int l1) ;
72 int mermax,
double precis,
82 cout <<
"Etoile_bin::velocity_pot_extr" << endl ;
83 cout <<
"The code has not prepared for this kind of EOS!!!" 115 for (
int i=0; i<3; i++) {
116 v_orb.set(i) = www(i)(0, 0, 0, 0) ;
120 v_orb.set_std_base() ;
131 r_bh.
set() =
pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ;
135 msr = ggrav * mass / r_bh ;
139 lapse_bh2 = 1. / (1.+2.*msr) ;
143 lapse_bh3 = 1./
pow(1.+2.*msr, 1.5) ;
148 xx_con.set(0) = xx + sepa ;
151 xx_con.set_std_base() ;
154 xsr_con = xx_con / r_bh ;
159 xx_cov.set(0) = xx + sepa ;
162 xx_cov.set_std_base() ;
165 xsr_cov = xx_cov / r_bh ;
177 rr_spher_cov.set(0) = rr + sepa*st*cp ;
178 rr_spher_cov.
set(1) = sepa*ct*cp ;
179 rr_spher_cov.
set(2) = - sepa*sp ;
180 rr_spher_cov.set_std_base() ;
183 xsr_spher_cov = rr_spher_cov / r_bh ;
208 for (
int l=
nzet; l <= nzm1; l++) {
209 dndh_log.
set(l) = 1 ;
221 - 2.*lapse_bh2 * msr * ldent
224 - 2.*lapse_bh2 * msr * ldbeta
226 -
unsurc2 * 2. * zeta_h * lapse_bh2 * lapse_bh2 * msr / r_bh
227 * (1.+4.*msr) * xsr_spher_cov ;
238 * (lapse_bh2*msr*(ldldpsi0
241 - lapse_bh2 * (1.+4.*msr) / r_bh))
273 Cmp oper = zeta_h() *
psi0().laplacien() + bb_dpsi0() ;
277 erreur =
diffrel(oper, source())(0) ;
279 cout <<
"Check of the resolution of the continuity equation : " 281 cout <<
"norme(source) : " <<
norme(source())(0)
282 <<
" diff oper/source : " << erreur << endl ;
294 for (
int i=0; i<3; i++) {
305 for (
int i=0; i<3; i++) {
323 cout <<
"Etoile_bin::velocity_pot_extr" << endl ;
324 cout <<
"The code has not prepared for this kind of EOS!!!" 356 for (
int i=0; i<3; i++) {
357 v_orb.set(i) = www(i)(0, 0, 0, 0) ;
361 v_orb.set_std_base() ;
372 r_bh.
set() =
pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ;
376 msr = ggrav * mass / r_bh ;
381 xx_cov.set(0) = xx + sepa ;
384 xx_cov.set_std_base() ;
395 rr_spher_cov.set(0) = rr + sepa*st*cp ;
396 rr_spher_cov.
set(1) = sepa*ct*cp ;
397 rr_spher_cov.
set(2) = - sepa*sp ;
398 rr_spher_cov.set_std_base() ;
401 tmp_bh = 0.5 * msr * msr / (1.-0.25*msr*msr) / r_bh / r_bh ;
414 for (
int l=
nzet; l <= nzm1; l++) {
415 dndh_log.
set(l) = 1 ;
428 + tmp_bh * rr_spher_cov) ;
466 Cmp oper = zeta_h() *
psi0().laplacien() + bb_dpsi0() ;
470 erreur =
diffrel(oper, source())(0) ;
472 cout <<
"Check of the resolution of the continuity equation : " 474 cout <<
"norme(source) : " <<
norme(source())(0)
475 <<
" diff oper/source : " << erreur << endl ;
487 for (
int i=0; i<3; i++) {
498 for (
int i=0; i<3; i++) {
void annule(int l)
Sets the Tenseur to zero in a given domain.
const Base_vect & ref_triad
Reference triad ("absolute frame"), with respect to which the components of all the member Tenseur 's...
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Cmp exp(const Cmp &)
Exponential.
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
const Tenseur & gradient_spher() const
Returns the gradient of *this (Spherical coordinates) (scalar field only).
void ylm_i()
Inverse of ylm()
void set_triad(const Base_vect &new_triad)
Assigns a new vectorial basis (triad) of decomposition.
Cmp der_nbar_ent(const Cmp &ent, int nzet, int l_min=0, Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy and extra parameters.
void set_std_base()
Set the standard spectal basis of decomposition for each component.
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
Standard units of space, time and mass.
void ylm()
Computes the coefficients of *this.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
Tenseur flat_scalar_prod(const Tenseur &t1, const Tenseur &t2)
Scalar product of two Tenseur when the metric is : performs the contraction of the last index of t1 w...
virtual void poisson_compact(const Cmp &source, const Cmp &aa, const Tenseur &bb, const Param &par, Cmp &psi) const =0
Resolution of the elliptic equation in the case where the stellar interior is covered by a single do...
double unsurc2
: unsurc2=1 for a relativistic star, 0 for a Newtonian one.
bool kerrschild
Indicator of the background metric: true for the Kerr-Shild metric, false for the conformally flat on...
void set(const Map *mp, Mtbl *(*construct)(const Map *))
Semi-constructor from a mapping and a method.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Tenseur psi0
Scalar potential of the non-translational part of fluid 4-velocity (in the irrotational case) ...
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
double velocity_pot_extr(const double &mass, const double &sepa, int mermax, double precis, double relax)
Computes the non-translational part of the velocity scalar potential by solving the continuity equat...
Tenseur bsn
3-vector shift, divided by N , of the rotating coordinates, .
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
Tenseur gam_euler
Lorentz factor between the fluid and Eulerian observers.
Map & mp
Mapping associated with the star.
int get_nzone() const
Returns the number of domains.
const Eos & eos
Equation of state of the stellar matter.
int get_etat() const
Returns the logical state.
Cmp pow(const Cmp &, int)
Power .
Active physical coordinates and mapping derivatives.
int nzet
Number of domains of *mp occupied by the star.
Tenseur a_car
Total conformal factor .
Tbl & set(int l)
Read/write of the value in a given domain.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case)
Coord y
y coordinate centered on the grid
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
Coord x
x coordinate centered on the grid
Tenseur beta_auto
Logarithm of the part of the product AN generated principaly by by the star.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Coord z
z coordinate centered on the grid
Valeur va
The numerical value of the Cmp.
Tensor handling *** DEPRECATED : use class Tensor instead ***.
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
Coord r
r coordinate centered on the grid
Tenseur d_psi
Gradient of (in the irrotational case) (Cartesian components with respect to ref_triad ) ...