Lorene::Binaire Class Reference

Binary systems. More...

`#include <binaire.h>`

## Public Member Functions

| Binaire (Map &mp1, int nzet1, const Eos &eos1, int irrot1, Map &mp2, int nzet2, const Eos &eos2, int irrot2, int relat)
| Standard constructor.
| Binaire (const Binaire &)
| Binaire (Map &mp1, const Eos &eos1, Map &mp2, const Eos &eos2, FILE *fich)
| Copy constructor.
void | operator= (const Binaire &)
| Assignment to another {\tt Binaire}.
Etoile_bin & | set (int i)
| Read/write of the star no. i.
double & | set_omega ()
| Sets the orbital angular velocity [{\tt f_unit}].
double & | set_x_axe ()
| Sets the absolute coordinate X of the rotation axis [{\tt r_unit}].
const Etoile_bin & | operator() (int i) const
| Returns a reference to the star no. i.
double | get_omega () const
| Returns the orbital angular velocity [{\tt f_unit}].
double | get_x_axe () const
| Returns the absolute coordinate X of the rotation axis [{\tt r_unit}].
double | separation () const
| Returns the coordinate separation of the two stellar centers [{\tt r_unit}].
void | sauve (FILE *) const
void | display_poly (ostream &) const
| Display in polytropic units.
void | write_global (ostream &) const
| Write global quantities in a formatted file.
double | mass_adm () const
| Total ADM mass.
double | mass_kom () const
| Total Komar mass.
const Tbl & | angu_mom () const
| Total angular momentum.
double | total_ener () const
| Total energy (excluding the rest mass energy).
double | virial () const
| Estimates the relative error on the virial theorem (for a relativistic one, it returns $|1 - M_{\rm Komar} / M_{\rm ADM}|$).
double | virial_gb () const
| Estimates the relative error on the virial theorem calculated by E.Gourgoulhon and S.Bonazzola (Class.
double | virial_fus () const
| Estimates the relative error on the virial theorem calculated by J.L.Friedman, K.Uryu, and M.Shibata (PRD accepted, gr-qc/0108070).
double | ham_constr () const
| Estimates the relative error on the Hamiltonian constraint equation by comparing $\underline\Delta\ln A$ with \begin{equation} -4\pi A^2 E - {A^2\over 4} K_{ij} K^{ij} - {1\over 2} {\overline\nabla}_i \ln A {\overline\nabla}^i \ln A \end{equation}.
const Tbl & | mom_constr () const
| Estimates the relative error on the momentum constraint equation by comparing ${\overline\nabla}_j K^{ij}$ with \begin{equation} 8\pi J^i - 5 K^{ij} {\overline\nabla}_j \ln A \end{equation}.
void | orbit (double fact_omeg_min, double fact_omeg_max, double &xgg1, double &xgg2)
| Computes the orbital angular velocity {\tt omega} and the position of the rotation axis {\tt x_axe}.
void | orbit_eqmass (double fact_omeg_min, double fact_omeg_max, double mass1, double mass2, double &xgg1, double &xgg2)
| Computes the orbital angular velocity {\tt omega} and the position of the rotation axis {\tt x_axe}.
void | analytical_omega ()
| Sets the orbital angular velocity to some 2-PN analytical value (Keplerian value in the Newtonian case).
void | analytical_shift ()
| Sets some analytical template for the shift vector (via the members {\tt w_shift} and {\tt khi_shift} of the two {\tt Etoile_bin}.

## Private Member Functions

void | del_deriv () const
| Destructor.
void | set_der_0x0 () const
| Sets to {\tt 0x0} all the pointers on derived quantities.
ostream & | operator>> (ostream &) const
| Operator >> (function called by the operator <<).

## Private Attributes

const Base_vect_cart | ref_triad
| Cartesian triad of the absolute reference frame.
Etoile_bin | star1
| First star of the system.
Etoile_bin | star2
| Second star of the system.
Etoile_bin * | et [2]
| Array of the two stars (to perform loops on the stars): {\tt et[0]} contains the address of {\tt star1} and {\tt et[1]} that of {\tt star2}.
double | omega
| Angular velocity with respect to an asymptotically inertial observer.
double | x_axe
| Absolute X coordinate of the rotation axis.
double * | p_mass_adm
| Total ADM mass of the system.
double * | p_mass_kom
| Total Komar mass of the system.
Tbl * | p_angu_mom
| Total angular momentum of the system.
double * | p_total_ener
| Total energy of the system.
double * | p_virial
| Virial theorem error.
double * | p_virial_gb
| Virial theorem error by E.Gourgoulhon and S.Bonazzola.
double * | p_virial_fus
| Virial theorem error by J.L.Friedman, K.Uryu, and M.Shibata.
double * | p_ham_constr
| Relative error on the Hamiltonian constraint.
Tbl * | p_mom_constr
| Relative error on the momentum constraint.

## Friends

ostream & | operator<< (ostream &ost, const Binaire &bibi)
| Save in a file.

## Detailed Description

Binary systems.

Version
  #$Id: binaire.h,v 1.6 2014/10/13 08:52:32 j_novak Exp $#

Definition at line 104 of file binaire.h.

## Constructor & Destructor Documentation

## Binaire() [1/3]

Lorene::Binaire::Binaire | ( | Map & | mp1,
|  | int | nzet1,
|  | const Eos & | eos1,
|  | int | irrot1,
|  | Map & | mp2,
|  | int | nzet2,
|  | const Eos & | eos2,
|  | int | irrot2,
|  | int | relat )

Standard constructor.

Parameters

  mp1 | Mapping on which {\tt star1} will be defined
  nzet1 | Number of domains occupied by {\tt star1}
  eos1 | Equation of state of {\tt star1}
  irrot1 | should be {\tt true} if {\tt star1} is irrotational, {\tt false} if {\tt star1} is corotating
  mp2 | Mapping on which {\tt star2} will be defined
  nzet2 | Number of domains occupied by {\tt star2}
  eos2 | Equation of state of {\tt star2}
  irrot2 | should be {\tt true} if {\tt star2} is irrotational, {\tt false} if {\tt star2} is corotating
  relat | should be {\tt true} for a relativistic configuration, {\tt false} for a Newtonian one

Definition at line 109 of file binaire.C.

References et, Lorene::Map(), omega, ref_triad, set_der_0x0(), star1, star2, and x_axe.

## Binaire() [2/3]

Lorene::Binaire::Binaire | ( | const Binaire & | bibi | ) |

Definition at line 129 of file binaire.C.

## Binaire() [3/3]

Lorene::Binaire::Binaire | ( | Map & | mp1,
|  | const Eos & | eos1,
|  | Map & | mp2,
|  | const Eos & | eos2,
|  | FILE * | fich )

Copy constructor.

Constructor from a file (see {\tt sauve(FILE* )}).

Parameters

  mp1 | Mapping on which {\tt star1} will be defined
  eos1 | Equation of state of {\tt star1}
  mp2 | Mapping on which {\tt star2} will be defined
  eos2 | Equation of state of {\tt star2}
  fich | input file (must have been created by the function {\tt sauve})

Definition at line 145 of file binaire.C.

References et, Lorene::fread_be(), Lorene::Map(), omega, ref_triad, set_der_0x0(), star1, star2, and x_axe.

## ~Binaire()

Lorene::Binaire::~Binaire | ( |  | ) |

Definition at line 167 of file binaire.C.

## Member Function Documentation

## analytical_omega()

void Lorene::Binaire::analytical_omega | ( |  | ) |

Sets the orbital angular velocity to some 2-PN analytical value (Keplerian value in the Newtonian case).

Definition at line 63 of file binaire_omega_ana.C.

References del_deriv(), omega, Lorene::pow(), separation(), Lorene::sqrt(), star1, and star2.

## analytical_shift()

void Lorene::Binaire::analytical_shift | ( |  | ) |

Sets some analytical template for the shift vector (via the members {\tt w_shift} and {\tt khi_shift} of the two {\tt Etoile_bin}.

Definition at line 69 of file binaire_ana_shift.C.

References Lorene::Cmp::annule(), et, Lorene::Map(), omega, separation(), star1, and star2.

## angu_mom()

const Tbl & Lorene::Binaire::angu_mom | ( |  | ) | const

Total angular momentum.

Returns
  1-D {\tt Tbl} of size 3, according to \ {\tt angu_mom()(0)} = $J^X$, \ {\tt angu_mom()(1)} = $J^Y$, \ {\tt angu_mom()(2)} = $J^Z$.

Definition at line 198 of file binaire_global.C.

References et, Lorene::Cmp::integrale(), Lorene::Map(), p_angu_mom, Lorene::pow(), Lorene::Cmp::std_base_scal(), and Lorene::Cmp::va.

## del_deriv()

void Lorene::Binaire::del_deriv | ( |  | ) | const

private

Destructor.

Deletes all the derived quantities

Definition at line 177 of file binaire.C.

References p_angu_mom, p_ham_constr, p_mass_adm, p_mass_kom, p_mom_constr, p_total_ener, p_virial, p_virial_fus, p_virial_gb, and set_der_0x0().

## display_poly()

void Lorene::Binaire::display_poly | ( | ostream & | ost | ) | const

Display in polytropic units.

Definition at line 284 of file binaire.C.

References angu_mom(), Lorene::Eos_poly::get_gam(), Lorene::Eos_poly::get_kap(), mass_adm(), mass_kom(), omega, Lorene::pow(), separation(), Lorene::sqrt(), star1, star2, and total_ener().

## get_omega()

double Lorene::Binaire::get_omega | ( |  | ) | const

inline

Returns the orbital angular velocity [{\tt f_unit}].

Definition at line 244 of file binaire.h.

References omega.

## get_x_axe()

double Lorene::Binaire::get_x_axe | ( |  | ) | const

inline

Returns the absolute coordinate X of the rotation axis [{\tt r_unit}].

Definition at line 247 of file binaire.h.

References x_axe.

## ham_constr()

double Lorene::Binaire::ham_constr | ( |  | ) | const

Estimates the relative error on the Hamiltonian constraint equation by comparing $\underline\Delta\ln A$ with \begin{equation} -4\pi A^2 E - {A^2\over 4} K_{ij} K^{ij} - {1\over 2} {\overline\nabla}_i \ln A {\overline\nabla}^i \ln A \end{equation}.

Definition at line 69 of file binaire_constr.C.

References Lorene::abs(), Lorene::diffrel(), et, Lorene::flat_scalar_prod(), Lorene::max(), p_ham_constr, star1, and star2.

## mass_adm()

double Lorene::Binaire::mass_adm | ( |  | ) | const

Total ADM mass.

Definition at line 88 of file binaire_global.C.

References et, Lorene::Cmp::integrale(), p_mass_adm, Lorene::pow(), star1, star2, and Lorene::Cmp::std_base_scal().

## mass_kom()

double Lorene::Binaire::mass_kom | ( |  | ) | const

Total Komar mass.

Definition at line 136 of file binaire_global.C.

References et, Lorene::flat_scalar_prod(), Lorene::Cmp::integrale(), p_mass_kom, star1, star2, and Lorene::Cmp::std_base_scal().

## mom_constr()

const Tbl & Lorene::Binaire::mom_constr | ( |  | ) | const

Estimates the relative error on the momentum constraint equation by comparing ${\overline\nabla}_j K^{ij}$ with \begin{equation} 8\pi J^i - 5 K^{ij} {\overline\nabla}_j \ln A \end{equation}.

Definition at line 158 of file binaire_constr.C.

References Lorene::abs(), Lorene::Tenseur::change_triad(), Lorene::contract(), Lorene::Tenseur::dec2_dzpuis(), Lorene::diffrel(), et, Lorene::get_bvect_cart(), Lorene::Tenseur::gradient(), Lorene::max(), Lorene::norme(), p_mom_constr, ref_triad, star1, and star2.

## operator()()

const Etoile_bin & Lorene::Binaire::operator() | ( | int | i | ) | const

inline

Returns a reference to the star no. i.

Definition at line 239 of file binaire.h.

References et.

## operator=()

void Lorene::Binaire::operator= | ( | const Binaire & | bibi | ) |

Assignment to another {\tt Binaire}.

Definition at line 217 of file binaire.C.

References Binaire(), del_deriv(), omega, ref_triad, star1, star2, and x_axe.

## operator>>()

ostream & Lorene::Binaire::operator>> | ( | ostream & | ost | ) | const

private

Operator >> (function called by the operator <<).

Definition at line 257 of file binaire.C.

References omega, separation(), star1, star2, and x_axe.

## orbit()

void Lorene::Binaire::orbit | ( | double | fact_omeg_min,
|  | double | fact_omeg_max,
|  | double & | xgg1,
|  | double & | xgg2 )

Computes the orbital angular velocity {\tt omega} and the position of the rotation axis {\tt x_axe}.

Parameters

  fact_omeg_min | [input] : determines the lower bound of the interval {\tt [omega_min, omega_max]} in which {\tt omega} is searched by {\tt omega_min = fact_omeg_min * omega}, where {\tt omega} is the previous value of the angular velocity (typical value : {\tt fact_omeg_min = 0.5})
  fact_omeg_max | [input] : determines the higher bound of the interval {\tt [omega_min, omega_max]} in which {\tt omega} is searched by {\tt omega_max = fact_omeg_max * omega}, where {\tt omega} is the previous value of the angular velocity. (typical value : {\tt fact_omeg_max = 1.5})
  xgg1 | [output] : x coordinate (relative to star 1 mapping) of the ``center of mass'' of star 1
  xgg2 | [output] : x coordinate (relative to star 2 mapping) of the ``center of mass'' of star 2

Definition at line 122 of file binaire_orbite.C.

References Lorene::Param::add_double(), Lorene::Param::add_int(), Lorene::Tenseur::change_triad(), Lorene::Cmp::dsdx(), et, Lorene::flat_scalar_prod(), Lorene::Tbl::get_taille(), Lorene::Tenseur::get_triad(), Lorene::Map(), omega, ref_triad, x_axe, Lorene::zero_list(), Lorene::zerosec(), and Lorene::zerosec_b().

## orbit_eqmass()

void Lorene::Binaire::orbit_eqmass | ( | double | fact_omeg_min,
|  | double | fact_omeg_max,
|  | double | mass1,
|  | double | mass2,
|  | double & | xgg1,
|  | double & | xgg2 )

Computes the orbital angular velocity {\tt omega} and the position of the rotation axis {\tt x_axe}.

Parameters

  fact_omeg_min | [input] : determines the lower bound of the interval {\tt [omega_min, omega_max]} in which {\tt omega} is searched by {\tt omega_min = fact_omeg_min * omega}, where {\tt omega} is the previous value of the angular velocity (typical value : {\tt fact_omeg_min = 0.5})
  fact_omeg_max | [input] : determines the higher bound of the interval {\tt [omega_min, omega_max]} in which {\tt omega} is searched by {\tt omega_max = fact_omeg_max * omega}, where {\tt omega} is the previous value of the angular velocity. (typical value : {\tt fact_omeg_max = 1.5})
  mass1 | [input] : baryon rest mass of NS1
  mass2 | [input] : baryon rest mass of NS2
  xgg1 | [output] : x coordinate (relative to star 1 mapping) of the ``center of mass'' of star 1
  xgg2 | [output] : x coordinate (relative to star 2 mapping) of the ``center of mass'' of star 2

Definition at line 464 of file binaire_orbite.C.

References Lorene::Param::add_double(), Lorene::Param::add_int(), Lorene::Tenseur::change_triad(), Lorene::Cmp::dsdx(), et, Lorene::flat_scalar_prod(), Lorene::Tbl::get_taille(), Lorene::Tenseur::get_triad(), Lorene::Map(), omega, ref_triad, x_axe, Lorene::zero_list(), Lorene::zerosec(), and Lorene::zerosec_b().

## sauve()

void Lorene::Binaire::sauve | ( | FILE * | fich | ) | const

Definition at line 239 of file binaire.C.

## separation()

double Lorene::Binaire::separation | ( |  | ) | const

Returns the coordinate separation of the two stellar centers [{\tt r_unit}].

Definition at line 457 of file binaire.C.

References Lorene::sqrt(), star1, and star2.

## set()

Etoile_bin & Lorene::Binaire::set | ( | int | i | ) |

inline

Read/write of the star no. i.

Definition at line 223 of file binaire.h.

References del_deriv(), and et.

## set_der_0x0()

void Lorene::Binaire::set_der_0x0 | ( |  | ) | const

private

Sets to {\tt 0x0} all the pointers on derived quantities.

Definition at line 195 of file binaire.C.

References p_angu_mom, p_ham_constr, p_mass_adm, p_mass_kom, p_mom_constr, p_total_ener, p_virial, p_virial_fus, and p_virial_gb.

## set_omega()

double & Lorene::Binaire::set_omega | ( |  | ) |

inline

Sets the orbital angular velocity [{\tt f_unit}].

Definition at line 229 of file binaire.h.

References omega.

## set_x_axe()

double & Lorene::Binaire::set_x_axe | ( |  | ) |

inline

Sets the absolute coordinate X of the rotation axis [{\tt r_unit}].

Definition at line 232 of file binaire.h.

References x_axe.

## total_ener()

double Lorene::Binaire::total_ener | ( |  | ) | const

Total energy (excluding the rest mass energy).

In the Newtonian case, it is defined as the sum of kinetic, internal, and gravitational potential energies.

In the relativistic case, it is defined as $M_{\rm ADM} - M_{\rm bar,1} - M_{\rm bar,2}$.

Definition at line 289 of file binaire_global.C.

References et, Lorene::flat_scalar_prod(), Lorene::Cmp::integrale(), mass_adm(), p_total_ener, star1, and star2.

## virial()

double Lorene::Binaire::virial | ( |  | ) | const

Estimates the relative error on the virial theorem (for a relativistic one, it returns $|1 - M_{\rm Komar} / M_{\rm ADM}|$).

Definition at line 345 of file binaire_global.C.

References et, Lorene::flat_scalar_prod(), Lorene::Cmp::integrale(), mass_adm(), mass_kom(), p_virial, star1, and star2.

## virial_fus()

double Lorene::Binaire::virial_fus | ( |  | ) | const

Estimates the relative error on the virial theorem calculated by J.L.Friedman, K.Uryu, and M.Shibata (PRD accepted, gr-qc/0108070).

The expression used in the LORENE is Eq.(5.7) in the paper by M.Shibata and K.Uryu (PRD64, 104017 (2001))

Definition at line 481 of file binaire_global.C.

References et, Lorene::flat_scalar_prod(), Lorene::Cmp::integrale(), mass_adm(), p_virial_fus, Lorene::sqrt(), star1, star2, Lorene::Cmp::std_base_scal(), and virial().

## virial_gb()

double Lorene::Binaire::virial_gb | ( |  | ) | const

Estimates the relative error on the virial theorem calculated by E.Gourgoulhon and S.Bonazzola (Class.

Quantum Grav. 11, 443 (1994): Eq.(29)) normalized by $2 \pi G$.

Definition at line 408 of file binaire_global.C.

References et, Lorene::flat_scalar_prod(), Lorene::Cmp::integrale(), mass_adm(), p_virial_gb, Lorene::sqrt(), star1, star2, Lorene::Cmp::std_base_scal(), and virial().

## write_global()

void Lorene::Binaire::write_global | ( | ostream & | ost | ) | const

Write global quantities in a formatted file.

This file can be read by an external program.

Definition at line 334 of file binaire.C.

References angu_mom(), Lorene::Eos_poly::get_gam(), Lorene::Eos_poly::get_kap(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Map(), mass_adm(), omega, Lorene::pow(), separation(), Lorene::sqrt(), star1, star2, virial(), virial_fus(), and virial_gb().

## Friends And Related Symbol Documentation

## operator<<

ostream & operator<< | ( | ostream & | ost,
|  | const Binaire & | bibi )

friend

Save in a file.

Display

Definition at line 251 of file binaire.C.

References Binaire(), and operator<<.

## Member Data Documentation

## et

Etoile_bin* Lorene::Binaire::et[2]

private

Array of the two stars (to perform loops on the stars): {\tt et[0]} contains the address of {\tt star1} and {\tt et[1]} that of {\tt star2}.

Definition at line 124 of file binaire.h.

## omega

double Lorene::Binaire::omega

private

Angular velocity with respect to an asymptotically inertial observer.

Definition at line 129 of file binaire.h.

## p_angu_mom

Tbl* Lorene::Binaire::p_angu_mom

mutable private

Total angular momentum of the system.

Definition at line 145 of file binaire.h.

## p_ham_constr

double* Lorene::Binaire::p_ham_constr

mutable private

Relative error on the Hamiltonian constraint.

Definition at line 160 of file binaire.h.

## p_mass_adm

double* Lorene::Binaire::p_mass_adm

mutable private

Total ADM mass of the system.

Definition at line 139 of file binaire.h.

## p_mass_kom

double* Lorene::Binaire::p_mass_kom

mutable private

Total Komar mass of the system.

Definition at line 142 of file binaire.h.

## p_mom_constr

Tbl* Lorene::Binaire::p_mom_constr

mutable private

Relative error on the momentum constraint.

Definition at line 163 of file binaire.h.

## p_total_ener

double* Lorene::Binaire::p_total_ener

mutable private

Total energy of the system.

Definition at line 148 of file binaire.h.

## p_virial

double* Lorene::Binaire::p_virial

mutable private

Virial theorem error.

Definition at line 151 of file binaire.h.

## p_virial_fus

double* Lorene::Binaire::p_virial_fus

mutable private

Virial theorem error by J.L.Friedman, K.Uryu, and M.Shibata.

Definition at line 157 of file binaire.h.

## p_virial_gb

double* Lorene::Binaire::p_virial_gb

mutable private

Virial theorem error by E.Gourgoulhon and S.Bonazzola.

Definition at line 154 of file binaire.h.

## ref_triad

const Base_vect_cart Lorene::Binaire::ref_triad

private

Cartesian triad of the absolute reference frame.

Definition at line 112 of file binaire.h.

## star1

Etoile_bin Lorene::Binaire::star1

private

First star of the system.

Definition at line 115 of file binaire.h.

## star2

Etoile_bin Lorene::Binaire::star2

private

Second star of the system.

Definition at line 118 of file binaire.h.

## x_axe

double Lorene::Binaire::x_axe

private

Absolute X coordinate of the rotation axis.

Definition at line 133 of file binaire.h.

The documentation for this class was generated from the following files:

- binaire.h
- binaire.C
- binaire_ana_shift.C
- binaire_constr.C
- binaire_global.C
- binaire_omega_ana.C
- binaire_orbite.C