et_bin_bhns_extr_kinema.C
/*
* Method Et_bin_bhns_extr::kinematics_extr_ks
* and Et_bin_bhns_extr::kinematics_extr_cf
*
* (see file et_bin_bhns_extr.h for documentation).
*
*/
/*
* Copyright (c) 2004-2005 Keisuke Taniguchi
*
* This file is part of LORENE.
*
* LORENE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* LORENE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LORENE; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
char et_bin_bhns_extr_kinema_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr_kinema.C,v 1.3 2014/10/13 08:52:55 j_novak Exp $" ;
/*
* $Id: et_bin_bhns_extr_kinema.C,v 1.3 2014/10/13 08:52:55 j_novak Exp $
* $Log: et_bin_bhns_extr_kinema.C,v $
* Revision 1.3 2014/10/13 08:52:55 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.2 2005/02/28 23:15:09 k_taniguchi
* Modification to include the case of the conformally flat background metric
*
* Revision 1.1 2004/11/30 20:49:58 k_taniguchi
* *** empty log message ***
*
*
* $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr_kinema.C,v 1.3 2014/10/13 08:52:55 j_novak Exp $
*
*/
// Lorene headers
#include "et_bin_bhns_extr.h"
#include "etoile.h"
#include "coord.h"
#include "unites.h"
namespace Lorene {
void Et_bin_bhns_extr::kinematics_extr(double omega, const double& mass,
const double& sepa) {
using namespace Unites ;
if (kerrschild) {
int nz = mp.get_mg()->get_nzone() ;
int nzm1 = nz - 1 ;
// --------------------
// Computation of B^i/N
// --------------------
// 1/ Computation of - omega m^i
const Coord& xa = mp.xa ;
const Coord& ya = mp.ya ;
bsn.set_etat_qcq() ;
bsn.set(0) = omega * ya ;
bsn.set(1) = - omega * xa ;
bsn.set(2) = 0 ;
bsn.annule(nzm1, nzm1) ; // set to zero in the ZEC
// 2/ Addition of shift and division by lapse
bsn = ( bsn + shift ) / nnn ;
bsn.annule(nzm1, nzm1) ; // set to zero in the ZEC
bsn.set_std_base() ; // set the bases for spectral expansions
//-------------------------
// Centrifugal potentatial
//-------------------------
const Coord& xx = mp.x ;
const Coord& yy = mp.y ;
const Coord& zz = mp.z ;
Tenseur r_bh(mp) ;
r_bh.set_etat_qcq() ;
r_bh.set() = pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ;
r_bh.set_std_base() ;
Tenseur xx_cov(mp, 1, COV, ref_triad) ;
xx_cov.set_etat_qcq() ;
xx_cov.set(0) = xx + sepa ;
xx_cov.set(1) = yy ;
xx_cov.set(2) = zz ;
xx_cov.set_std_base() ;
Tenseur xsr_cov(mp, 1, COV, ref_triad) ;
xsr_cov = xx_cov / r_bh ;
xsr_cov.set_std_base() ;
Tenseur msr(mp) ;
msr = ggrav * mass / r_bh ;
msr.set_std_base() ;
if (relativistic) {
// Lorentz factor between the co-orbiting observer and
// the Eulerian one
Tenseur tmp1(mp) ;
tmp1.set_etat_qcq() ;
tmp1.set() = 0 ;
tmp1.set_std_base() ;
for (int i=0; i<3; i++)
tmp1.set() += xsr_cov(i) % bsn(i) ;
tmp1.set_std_base() ;
Tenseur tmp2 = 2.*msr % tmp1 % tmp1 ;
tmp2.set_std_base() ;
for (int i=0; i<3; i++)
tmp2.set() += bsn(i) % bsn(i) ;
tmp2 = a_car % tmp2 ;
Tenseur gam0 = 1 / sqrt( 1 - tmp2 ) ;
pot_centri = - log( gam0 ) ;
}
else {
cout << "BH-NS binary system should be relativistic !!!" << endl ;
abort() ;
}
pot_centri.annule(nzm1, nzm1) ; // set to zero in the external domain
pot_centri.set_std_base() ; // set the bases for spectral expansions
// The derived quantities are obsolete
// -----------------------------------
Etoile_bin::del_deriv() ;
}
else {
int nz = mp.get_mg()->get_nzone() ;
int nzm1 = nz - 1 ;
// --------------------
// Computation of B^i/N
// --------------------
// 1/ Computation of - omega m^i
const Coord& xa = mp.xa ;
const Coord& ya = mp.ya ;
bsn.set_etat_qcq() ;
bsn.set(0) = omega * ya ;
bsn.set(1) = - omega * xa ;
bsn.set(2) = 0 ;
bsn.annule(nzm1, nzm1) ; // set to zero in the ZEC
// 2/ Addition of shift and division by lapse
bsn = ( bsn + shift ) / nnn ;
bsn.annule(nzm1, nzm1) ; // set to zero in the ZEC
bsn.set_std_base() ; // set the bases for spectral expansions
//-------------------------
// Centrifugal potentatial
//-------------------------
if (relativistic) {
// Lorentz factor between the co-orbiting observer and
// the Eulerian one
Tenseur tmp(mp) ;
tmp.set_etat_qcq() ;
tmp.set() = 0. ;
tmp.set_std_base() ;
for (int i=0; i<3; i++)
tmp.set() += bsn(i) % bsn(i) ;
tmp = a_car % tmp ;
Tenseur gam0 = 1 / sqrt( 1 - tmp ) ;
pot_centri = - log( gam0 ) ;
}
else {
cout << "BH-NS binary system should be relativistic !!!" << endl ;
abort() ;
}
pot_centri.annule(nzm1, nzm1) ; // set to zero in the external domain
pot_centri.set_std_base() ; // set the bases for spectral expansions
// The derived quantities are obsolete
// -----------------------------------
Etoile_bin::del_deriv() ;
}
}
}
Lorene::Coord
Active physical coordinates and mapping derivatives.
Definition coord.h:90
Lorene::Et_bin_bhns_extr::kinematics_extr
void kinematics_extr(double omega, const double &mass, const double &sepa)
Computes the quantities bsn and pot_centri in the Kerr-Schild background metric or in the conformally...
Definition et_bin_bhns_extr_kinema.C:55
Lorene::Et_bin_bhns_extr::kerrschild
bool kerrschild
Indicator of the background metric: true for the Kerr-Shild metric, false for the conformally flat on...
Definition et_bin_bhns_extr.h:78
Lorene::Etoile_bin::bsn
Tenseur bsn
3-vector shift, divided by N , of the rotating coordinates, .
Definition etoile.h:950
Lorene::Etoile_bin::ref_triad
const Base_vect & ref_triad
Reference triad ("absolute frame"), with respect to which the components of all the member Tenseur 's...
Definition etoile.h:828
Lorene::Etoile_bin::del_deriv
virtual void del_deriv() const
Deletes all the derived quantities.
Definition etoile_bin.C:447
Lorene::Etoile_bin::pot_centri
Tenseur pot_centri
Centrifugal potential.
Definition etoile.h:953
Lorene::Etoile::nnn
Tenseur nnn
Total lapse function.
Definition etoile.h:509
Lorene::Etoile::mp
Map & mp
Mapping associated with the star.
Definition etoile.h:429
Lorene::Etoile::relativistic
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one.
Definition etoile.h:437
Lorene::Etoile::shift
Tenseur shift
Total shift vector.
Definition etoile.h:512
Lorene::Etoile::a_car
Tenseur a_car
Total conformal factor .
Definition etoile.h:515
Lorene::Tenseur
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition tenseur.h:301
Lorene::Tenseur::set
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Definition tenseur.C:824
Lorene::Tenseur::set_etat_qcq
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition tenseur.C:636
Lorene::Tenseur::set_std_base
void set_std_base()
Set the standard spectal basis of decomposition for each component.
Definition tenseur.C:1170
Lorene::sqrt
Cmp sqrt(const Cmp &)
Square root.
Definition cmp_math.C:220
Lorene::pow
Cmp pow(const Cmp &, int)
Power .
Definition cmp_math.C:348
Lorene::log
Cmp log(const Cmp &)
Neperian logarithm.
Definition cmp_math.C:296
Lorene
Lorene prototypes.
Definition app_hor.h:64
Lorene::xa
Coord xa
Absolute x coordinate.
Definition map.h:730
Lorene::ya
Coord ya
Absolute y coordinate.
Definition map.h:731
Unites
Standard units of space, time and mass.