98 if (
star1.is_relativistic()) {
100 assert(
star2.is_relativistic() ) ;
104 for (
int i=0; i<=1; i++) {
106 const Cmp& a2 = (
et[i]->get_a_car())() ;
107 const Cmp& ee = (
et[i]->get_ener_euler())() ;
108 const Cmp& ak2_auto = (
et[i]->get_akcar_auto())() ;
109 const Cmp& ak2_comp = (
et[i]->get_akcar_comp())() ;
111 Cmp source =
pow(a2, 1.25) * ee
112 +
pow(a2, 0.25) * (ak2_auto + ak2_comp) / (4.*qpig) ;
147 if (
star1.is_relativistic()) {
149 assert(
star2.is_relativistic() ) ;
153 for (
int i=0; i<=1; i++) {
155 const Cmp& lapse = (
et[i]->get_nnn())() ;
156 const Cmp& a2 = (
et[i]->get_a_car())() ;
157 const Cmp& ee = (
et[i]->get_ener_euler())() ;
158 const Cmp& se = (
et[i]->get_s_euler())() ;
159 const Cmp& ak2_auto = (
et[i]->get_akcar_auto())() ;
160 const Cmp& ak2_comp = (
et[i]->get_akcar_comp())() ;
162 const Tenseur& dnu_auto =
et[i]->get_d_logn_auto() ;
163 const Tenseur& dnu_comp =
et[i]->get_d_logn_comp() ;
164 const Tenseur& dbe_auto =
et[i]->get_d_beta_auto() ;
165 const Tenseur& dbe_comp =
et[i]->get_d_beta_comp() ;
168 dbe_auto + dbe_comp) ;
170 dnu_auto + dnu_comp) ;
172 Cmp source = lapse * ( a2 * (ee + se)
173 + (ak2_auto + ak2_comp)/qpig
174 - dndb()/qpig + dndn()/qpig ) ;
209 for (
int i=0; i<=1; i++) {
211 const Map& mp =
et[i]->get_mp() ;
221 const Cmp& vx = (
et[i]->get_u_euler())(0) ;
222 const Cmp& vy = (
et[i]->get_u_euler())(1) ;
223 const Cmp& vz = (
et[i]->get_u_euler())(2) ;
227 if (
et[i]->is_relativistic() ) {
228 const Cmp& a2 = (
et[i]->get_a_car())() ;
229 const Cmp& ee = (
et[i]->get_ener_euler())() ;
230 const Cmp& pp = (
et[i]->get_press())() ;
231 rho =
pow(a2, 2.5) * (ee + pp) ;
234 rho = (
et[i]->get_nbar())() ;
238 Base_val** base = (
et[i]->get_mp()).get_mg()->std_base_vect_cart() ;
243 Cmp source = rho * ( yy * vz - zz * vy ) ;
245 (source.
va).set_base( *(base[2]) ) ;
254 source = rho * ( zz * vx - xx * vz ) ;
256 (source.
va).set_base( *(base[2]) ) ;
265 source = rho * ( xx * vy - yy * vx ) ;
298 if (
star1.is_relativistic()) {
301 assert(
star2.is_relativistic() ) ;
311 for (
int i=0; i<=1; i++) {
313 const Cmp e_int = (
et[i]->get_ener())()
314 - (
et[i]->get_nbar())() ;
316 const Cmp& rho = (
et[i]->get_nbar())() ;
319 const Tenseur& vit =
et[i]->get_u_euler() ;
324 const Cmp nu = (
et[i]->get_logn_auto())()
325 + (
et[i]->get_logn_comp())() ;
327 Cmp source = e_int + .5 * rho * vit2 + .5 * rho * nu ;
354 if (
star1.is_relativistic()) {
357 assert(
star2.is_relativistic() ) ;
369 double vir_grav = 0 ;
371 for (
int i=0; i<=1; i++) {
373 const Cmp& pp = (
et[i]->get_press())() ;
375 const Cmp& rho = (
et[i]->get_nbar())() ;
378 const Tenseur& vit =
et[i]->get_u_euler() ;
383 const Cmp nu = (
et[i]->get_logn_auto())()
384 + (
et[i]->get_logn_comp())() ;
386 Cmp source = 3*pp + rho * vit2 ;
390 source = .5 * rho * nu ;
396 *
p_virial = ( vir_mat + vir_grav ) / fabs(vir_grav) ;
419 if (
star1.is_relativistic()) {
422 assert(
star2.is_relativistic() ) ;
426 double vir_pres = 0. ;
427 double vir_extr = 0. ;
428 double vir_grav = 0. ;
430 for (
int i=0; i<=1; i++) {
432 const Cmp& a2 = (
et[i]->get_a_car())() ;
433 const Cmp& se = (
et[i]->get_s_euler())() ;
434 const Cmp& ak2_auto = (
et[i]->get_akcar_auto())() ;
435 const Cmp& ak2_comp = (
et[i]->get_akcar_comp())() ;
437 const Tenseur& dnu_auto =
et[i]->get_d_logn_auto() ;
438 const Tenseur& dnu_comp =
et[i]->get_d_logn_comp() ;
439 const Tenseur& dbe_auto =
et[i]->get_d_beta_auto() ;
440 const Tenseur& dbe_comp =
et[i]->get_d_beta_comp() ;
445 Cmp source = 2. * a2 * a1 * se ;
448 source = 1.5 * a1 * (ak2_auto + ak2_comp) / qpig ;
456 source = a1 * ( sprod1() - sprod2() - 2.*sprod3() )/qpig ;
492 if (
star1.is_relativistic()) {
495 assert(
star2.is_relativistic() ) ;
499 double vir_pres = 0. ;
500 double vir_extr = 0. ;
501 double vir_grav = 0. ;
503 for (
int i=0; i<=1; i++) {
505 const Cmp& lapse = (
et[i]->get_nnn())() ;
506 const Cmp& a2 = (
et[i]->get_a_car())() ;
507 const Cmp& se = (
et[i]->get_s_euler())() ;
508 const Cmp& ak2_auto = (
et[i]->get_akcar_auto())() ;
509 const Cmp& ak2_comp = (
et[i]->get_akcar_comp())() ;
511 const Tenseur& dnu_auto =
et[i]->get_d_logn_auto() ;
512 const Tenseur& dnu_comp =
et[i]->get_d_logn_comp() ;
513 const Tenseur& dbe_auto =
et[i]->get_d_beta_auto() ;
514 const Tenseur& dbe_comp =
et[i]->get_d_beta_comp() ;
519 Cmp source = 2. * lapse * a2 * a1 * se ;
522 source = 1.5 * lapse * a1 * (ak2_auto + ak2_comp) / qpig ;
528 source = lapse * a1 * sprod() / qpig ;
Bases of the spectral expansions.
Tbl * p_angu_mom
Total angular momentum of the system.
double * p_virial_gb
Virial theorem error by E.Gourgoulhon and S.Bonazzola.
double mass_adm() const
Total ADM mass.
double virial_gb() const
Estimates the relative error on the virial theorem calculated by E.Gourgoulhon and S....
Etoile_bin * et[2]
Array of the two stars (to perform loops on the stars): {\tt et[0]} contains the address of {\tt star...
const Tbl & angu_mom() const
Total angular momentum.
double * p_mass_adm
Total ADM mass of the system.
double * p_total_ener
Total energy of the system.
double * p_virial
Virial theorem error.
Etoile_bin star2
Second star of the system.
double mass_kom() const
Total Komar mass.
double * p_mass_kom
Total Komar mass of the system.
double virial() const
Estimates the relative error on the virial theorem (for a relativistic one, it returns $|1 - M_{\rm K...
double * p_virial_fus
Virial theorem error by J.L.Friedman, K.Uryu, and M.Shibata.
Etoile_bin star1
First star of the system.
double total_ener() const
Total energy (excluding the rest mass energy).
double virial_fus() const
Estimates the relative error on the virial theorem calculated by J.L.Friedman, K.Uryu,...
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Valeur va
The numerical value of the Cmp.
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
double integrale() const
Computes the integral over all space of *this .
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Cmp sqrt(const Cmp &)
Square root.
Cmp pow(const Cmp &, int)
Power .
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...
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Standard units of space, time and mass.