60 #include "binary_xcts.h" 62 #include "utilitaires.h" 63 #include "graphique.h" 83 : star1(mp1, nzet1, eos1, irrot1),
84 star2(mp2, nzet2, eos2, irrot2)
119 : star1(mp1, eos1, fich),
120 star2(mp2, eos2, fich)
227 ost <<
"Binary neutron stars" << endl ;
228 ost <<
"=============" << endl ;
230 "Orbital angular velocity : " <<
omega * f_unit <<
" rad/s" << endl ;
232 "Coordinate separation between the two stellar centers : " 235 "Absolute coordinate X of the rotation axis : " <<
x_axe / km
237 ost << endl <<
"Star 1 : " << endl ;
238 ost <<
"====== " << endl ;
239 ost <<
star1 << endl ;
240 ost <<
"Star 2 : " << endl ;
241 ost <<
"====== " << endl ;
242 ost <<
star2 << endl ;
256 if (p_eos_poly != 0x0) {
260 double kappa = p_eos_poly->
get_kap() ;
261 double gamma = p_eos_poly->
get_gam() ; ;
262 double kap_ns2 =
pow( kappa, 0.5 /(gamma-1) ) ;
265 double r_poly = kap_ns2 /
sqrt(ggrav) ;
268 double t_poly = r_poly ;
271 double m_poly = r_poly / ggrav ;
274 double j_poly = r_poly * r_poly / ggrav ;
277 ost << endl <<
"Quantities in polytropic units : " << endl ;
278 ost <<
"==============================" << endl ;
279 ost <<
" ( r_poly = " << r_poly / km <<
" km )" << endl ;
280 ost <<
" d_e_max : " <<
separation() / r_poly << endl ;
284 ost <<
" Omega : " <<
omega * t_poly << endl ;
285 ost <<
" J : " <<
angu_mom()(2) / j_poly << endl ;
286 ost <<
" M_ADM : " <<
mass_adm() / m_poly << endl ;
287 ost <<
" M_Komar : " <<
mass_kom() / m_poly << endl ;
288 ost <<
" M_bar(star 1) : " <<
star1.
mass_b() / m_poly << endl ;
289 ost <<
" M_bar(star 2) : " <<
star2.
mass_b() / m_poly << endl ;
290 ost <<
" R_0(star 1) : " <<
292 ost <<
" R_0(star 2) : " <<
310 double chi1 = fabs( dent1_eq / dent1_pole ) ;
314 double chi2 = fabs( dent2_eq / dent2_pole ) ;
317 ost <<
"# Grid 1 : " << nz1 <<
"x" 319 <<
" R_out(l) [km] : " ;
320 for (
int l=0; l<nz1; l++) {
321 ost <<
" " << mp1.
val_r(l, 1., M_PI/2, 0) / km ;
325 ost <<
"# VE(M) VE(M) [vol]" << endl ;
328 ost.setf(ios::scientific) ;
337 <<
" M_ADM_vol [M_sol] " 338 <<
" M_Komar [M_sol] " 339 <<
" M_Komar_vol [M_sol] " 340 <<
" J [G M_sol^2/c] " << endl ;
347 ost <<
omega / (2*M_PI)* f_unit ; ost.width(22) ;
348 ost <<
mass_adm() / msol ; ost.width(22) ;
350 ost <<
mass_kom() / msol ; ost.width(22) ;
352 ost <<
angu_mom()(2)/ ( qpig / (4* M_PI) * msol*msol) << endl ;
354 ost <<
"# H_c(1)[c^2] " 355 <<
" e_c(1)[rho_nuc] " 356 <<
" M_B(1) [M_sol] " 360 <<
" chi1 " << endl ;
369 ost << chi1 << endl ;
371 ost <<
"# H_c(2)[c^2] " 372 <<
" e_c(2)[rho_nuc] " 373 <<
" M_B(2) [M_sol] " 377 <<
" chi2 " << endl ;
387 ost << chi2 << endl ;
396 double kappa = p_eos_poly->
get_kap() ;
397 double gamma = p_eos_poly->
get_gam() ; ;
398 double kap_ns2 =
pow( kappa, 0.5 /(gamma-1.) ) ;
401 double r_poly = kap_ns2 /
sqrt(ggrav) ;
404 double t_poly = r_poly ;
407 double m_poly = r_poly / ggrav ;
410 double j_poly = r_poly * r_poly / ggrav ;
418 <<
" M_B(2) [poly] " << endl ;
421 ost <<
separation() / r_poly ; ost.width(22) ;
423 ost <<
omega * t_poly ; ost.width(22) ;
424 ost <<
mass_adm() / m_poly ; ost.width(22) ;
425 ost <<
angu_mom()(2) / j_poly ; ost.width(22) ;
443 return sqrt( dx*dx + dy*dy + dz*dz ) ;
void display_poly(ostream &) const
Display in polytropic units.
ostream & operator>>(ostream &) const
Operator >> (function called by the operator <<).
Map & mp
Mapping associated with the star.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Cmp sqrt(const Cmp &)
Square root.
Star_bin_xcts * et[2]
Array of the two stars (to perform loops on the stars): et[0] contains the address of star1 and et[1]...
double get_ori_y() const
Returns the y coordinate of the origin.
Binary systems in eXtended Conformal Thin Sandwich formulation.
Standard units of space, time and mass.
Equation of state base class.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
void write_global(ostream &) const
Write global quantities in a formatted file.
const Scalar & get_ener() const
Returns the proper total energy density.
Base class for coordinate mappings.
double get_ori_x() const
Returns the x coordinate of the origin.
double separation() const
Returns the coordinate separation of the two stellar centers [r_unit].
const Map & get_mp() const
Returns the mapping.
Binary_xcts(Map &mp1, int nzet1, const Eos &eos1, int irrot1, Map &mp2, int nzet2, const Eos &eos2, int irrot2)
Standard constructor.
double get_gam() const
Returns the adiabatic index (cf. Eq. (3))
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
Tbl * p_angu_mom
Total angular momentum of the system.
virtual void sauve(FILE *) const
Save in a file.
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.
double x_axe
Absolute X coordinate of the rotation axis.
double get_kap() const
Returns the pressure coefficient (cf.
double ray_eq_pis2() const
Coordinate radius at , [r_unit].
Star_bin_xcts star2
Second star of the system.
const Tbl & angu_mom() const
Total angular momentum.
Polytropic equation of state (relativistic case).
double mass_adm() const
Total ADM mass.
double * p_mass_kom
Total Komar mass of the system.
int get_nzone() const
Returns the number of domains.
double ray_eq_pi() const
Coordinate radius at , [r_unit].
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
double omega
Angular velocity with respect to an asymptotically inertial observer.
Cmp pow(const Cmp &, int)
Power .
double ray_pole() const
Coordinate radius at [r_unit].
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
double mass_kom_vol() const
Total Komar mass (computed by a volume integral)
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
~Binary_xcts()
Destructor.
double * p_total_ener
Total energy of the system.
Star_bin_xcts star1
First star of the system.
const Scalar & get_ent() const
Returns the enthalpy field.
double virial_vol() const
Estimates the relative error on the virial theorem (volume version)
void del_deriv() const
Deletes all the derived quantities.
double ray_eq() const
Coordinate radius at , [r_unit].
virtual double xa_barycenter() const
Absolute coordinate X of the barycenter of the baryon density,.
double * p_virial
Virial theorem error.
virtual double mass_b() const
Baryon mass.
double get_ori_z() const
Returns the z coordinate of the origin.
double mass_kom() const
Total Komar mass.
const Eos & get_eos() const
Returns the equation of state.
double mass_adm_vol() const
Total ADM mass (computed by a volume integral)
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
double * p_mass_adm
Total ADM mass of the system.
double * p_virial_vol
Virial theorem error (volume version)
void operator=(const Binary_xcts &)
Assignment to another Binary_xcts.
void sauve(FILE *) const
Save in a file.
Tbl * p_lin_mom
Total linear momentum of the system.
double virial() const
Estimates the relative error on the virial theorem.