28char bin_bhns_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Bin_bhns/bin_bhns.C,v 1.4 2014/10/13 08:52:41 j_novak Exp $" ;
60#include "utilitaires.h"
71 bool irrot_ns,
bool kerrschild_i,
72 bool bc_lapconf_nd,
bool bc_lapconf_fs,
bool irrot_bh,
74 :
ref_triad(0.,
"Absolute frame Cartesian basis"),
75 hole(mp_bh,kerrschild_i,bc_lapconf_nd,bc_lapconf_fs,irrot_bh, massbh),
76 star(mp_ns, nzet_i, eos_i, irrot_ns)
92 :
ref_triad(0.,
"Absolute frame Cartesian basis"),
109 :
ref_triad(0.,
"Absolute frame Cartesian basis"),
111 star(mp_ns, eos_i, fich)
236 ost <<
"BH-NS binary system" << endl ;
237 ost <<
"===================" << endl ;
240 <<
"Orbital angular velocity : "
241 <<
omega * f_unit <<
" [rad/s]" << endl ;
242 ost <<
"Coordinate separation between BH and NS : "
243 <<
separ / km <<
" [km]" << endl ;
244 ost <<
"Position of the rotation axis : "
245 <<
x_rot / km <<
" [km]" << endl ;
247 ost << endl <<
"Black hole : " ;
248 ost << endl <<
"========== " << endl ;
250 int nt = (
hole.get_mp()).get_mg()->get_nt(1) ;
252 ost <<
"Irreducible mass of BH : "
253 <<
hole.mass_irr_bhns() / msol <<
" [Mo]" << endl ;
254 ost <<
"Mass in the background : "
255 <<
hole.get_mass_bh() / msol <<
" [Mo]" << endl ;
256 ost <<
"Radius of the apparent horison : "
257 <<
hole.rad_ah() / km <<
" [km]" << endl ;
258 ost <<
"Lapse function on the AH : "
259 << (
hole.get_lapse_tot()).val_grid_point(1,0,nt-1,0) << endl ;
260 ost <<
"Conformal factor on the AH : "
261 << (
hole.get_confo_tot()).val_grid_point(1,0,nt-1,0) << endl ;
262 ost <<
"shift(1) on the AH : "
263 << (
hole.get_shift_tot()(1)).val_grid_point(1,0,nt-1,0) << endl ;
264 ost <<
"shift(2) on the AH : "
265 << (
hole.get_shift_tot()(2)).val_grid_point(1,0,nt-1,0) << endl ;
266 ost <<
"shift(3) on the AH : "
267 << (
hole.get_shift_tot()(3)).val_grid_point(1,0,nt-1,0) << endl ;
269 ost << endl <<
"Neutron star : " ;
270 ost << endl <<
"============ " << endl ;
272 ost <<
"Baryon mass of NS in isolation : "
273 <<
star.mass_b()/msol <<
" [Mo]" << endl ;
274 ost <<
"Gravitational mass of NS : "
275 <<
star.mass_g_bhns()/msol <<
" [Mo]" << endl ;
276 ost <<
"Baryon mass of NS in BH bg. : "
279 ost <<
"Coordinate radius R_eq_tow : "
280 <<
star.ray_eq_pi() / km <<
" [km]" << endl ;
281 ost <<
"Coordinate radius R_eq_opp : "
282 <<
star.ray_eq() / km <<
" [km]" << endl ;
283 ost <<
"Coordinate radius R_eq_orb : "
284 <<
star.ray_eq_pis2() / km <<
" [km]" << endl ;
285 ost <<
"Coordinate radius R_eq_orb_opp : "
286 <<
star.ray_eq_3pis2() / km <<
" [km]" << endl ;
287 ost <<
"Coordinate radius R_pole : "
288 <<
star.ray_pole() / km <<
" [km]" << endl ;
289 ost <<
"Central enthalpy H_ent : "
290 << (
star.get_ent()).val_grid_point(0,0,0,0) << endl ;
291 ost <<
"Lapse function at the center of NS : "
292 << (
star.get_lapse_tot()).val_grid_point(0,0,0,0) << endl ;
293 ost <<
"Conformal factor at the center of NS : "
294 << (
star.get_confo_tot()).val_grid_point(0,0,0,0) << endl ;
295 ost <<
"shift(1) at the center of NS : "
296 << (
star.get_shift_tot()(1)).val_grid_point(0,0,0,0) << endl ;
297 ost <<
"shift(2) at the center of NS : "
298 << (
star.get_shift_tot()(2)).val_grid_point(0,0,0,0) << endl ;
299 ost <<
"shift(3) at the center of NS : "
300 << (
star.get_shift_tot()(3)).val_grid_point(0,0,0,0) << endl ;
313 const Eos* p_eos = &(
star.get_eos() ) ;
316 if (p_eos_poly != 0x0) {
318 double kappa = p_eos_poly->
get_kap() ;
319 double gamma = p_eos_poly->
get_gam() ;
320 double kap_ns2 =
pow( kappa, 0.5 /(gamma-1) ) ;
323 double r_poly = kap_ns2 /
sqrt(ggrav) ;
326 double t_poly = r_poly ;
329 double m_poly = r_poly / ggrav ;
334 double r0 = 0.5 * (
star.ray_eq() +
star.ray_eq_pi() ) ;
339 double y_ns =
star.get_mp().get_ori_y() ;
343 ost << endl <<
"Quantities in polytropic units : " ;
344 ost << endl <<
"==============================" << endl ;
345 ost <<
" ( r_poly = " << r_poly / km <<
" km )" << endl ;
346 ost <<
" d_separ : " <<
separ / r_poly << endl ;
347 ost <<
" d_coord : " << d_coord / r_poly << endl ;
348 ost <<
" Omega : " <<
omega * t_poly << endl ;
349 ost <<
" Omega M_irr : "
350 <<
omega * t_poly *
hole.mass_irr_bhns() / m_poly << endl ;
351 ost <<
" Omega_spin : " <<
hole.get_omega_spin() * t_poly << endl ;
352 ost <<
" M_irr : " <<
hole.mass_irr_bhns() / m_poly << endl ;
353 ost <<
" M_bh : " <<
hole.get_mass_bh() / m_poly << endl ;
354 ost <<
" R_ah : " <<
hole.rad_ah() / r_poly << endl ;
355 ost <<
" M_bar(NS)iso : " <<
star.mass_b() / m_poly
357 ost <<
" M_bar(NS) : "
360 ost <<
" M_g(NS)iso : " <<
star.mass_g_bhns() / m_poly << endl ;
361 ost <<
" R_0(NS) : " << r0 / r_poly << endl ;
void display_poly(ostream &) const
Display in polytropic units.
void del_deriv() const
Deletes all the derived quantities.
double * p_mass_adm_bhns_surf
Total ADM mass of the system calculated by the surface integral at infinity.
friend ostream & operator<<(ostream &, const Bin_bhns &)
Display.
virtual void sauve(FILE *) const
Save in a file.
Bin_bhns(Map &mp_bh, Map &mp_ns, int nzet, const Eos &eos, bool irrot_ns, bool kerrschild, bool bc_lapse_nd, bool bc_lapse_fs, bool irrot_bh, double mass_bh)
Relative error on the Hamiltonian constraint.
double y_rot
Absolute Y coordinate of the rotation axis.
const Base_vect_cart ref_triad
Cartesian triad of the absolute reference frame.
double * p_mass_kom_bhns_surf
Total Komar mass of the system calculated by the surface integral at infinity.
Hole_bhns hole
Black hole.
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
double omega
Angular velocity with respect to an asymptotically inertial observer.
double * p_mass_adm_bhns_vol
Total ADM mass of the system calculated by the volume integral and the surface integral at the appare...
double * p_virial_bhns_vol
Virial theorem error calculated by the ADM mass and the Komar mass of the volume integral.
double * p_omega_two_points
Orbital angular velocity derived from another method.
double separ
Absolute orbital separation between two centers of BH and NS.
Tbl * p_angu_mom_bhns
Total angular momentum of the system.
double * p_ya_barycenter
Absolute coordinate Y of the barycenter of the baryon density.
double x_rot
Absolute X coordinate of the rotation axis.
virtual ~Bin_bhns()
Destructor.
void operator=(const Bin_bhns &)
Assignment to another Bin_bhns.
double * p_virial_bhns_surf
Virial theorem error calculated by the ADM mass and the Komar mass of the surface integral at infinit...
double * p_mass_kom_bhns_vol
Total Komar mass of the system calculated by the volume integral and the surface integral at the appa...
Star_bhns star
Neutron star.
double * p_xa_barycenter
Absolute coordinate X of the barycenter of the baryon density.
ostream & operator>>(ostream &) const
Operator >> (function called by the operator <<).
Tbl * p_line_mom_bhns
Total linear momentum of the system.
Polytropic equation of state (relativistic case).
double get_gam() const
Returns the adiabatic index (cf. Eq. (3)).
double get_kap() const
Returns the pressure coefficient (cf.
Equation of state base class.
Cmp sqrt(const Cmp &)
Square root.
Cmp pow(const Cmp &, int)
Power .
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 fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Standard units of space, time and mass.