LORENE
bin_ns_bh_omegaana.C
1 /*
2  * Methods of class Bin_ns_bh to set analytical value to omega
3  *
4  * (see file bin_ns_bh.h for documentation).
5  *
6  */
7 
8 /*
9  * Copyright (c) 2004 Keisuke Taniguchi
10  *
11  * This file is part of LORENE.
12  *
13  * LORENE is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License version 2
15  * as published by the Free Software Foundation.
16  *
17  * LORENE is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with LORENE; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25  *
26  */
27 
28 
29 
30 /*
31  * $Id: bin_ns_bh_omegaana.C,v 1.5 2016/12/05 16:17:46 j_novak Exp $
32  * $Log: bin_ns_bh_omegaana.C,v $
33  * Revision 1.5 2016/12/05 16:17:46 j_novak
34  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
35  *
36  * Revision 1.4 2014/10/13 08:52:43 j_novak
37  * Lorene classes and functions now belong to the namespace Lorene.
38  *
39  * Revision 1.3 2014/10/06 15:13:01 j_novak
40  * Modified #include directives to use c++ syntax.
41  *
42  * Revision 1.2 2005/11/30 11:09:06 p_grandclement
43  * Changes for the Bin_ns_bh project
44  *
45  * Revision 1.1 2004/06/09 06:27:40 k_taniguchi
46  * First revision.
47  *
48  *
49  * $Header: /cvsroot/Lorene/C++/Source/Bin_ns_bh/bin_ns_bh_omegaana.C,v 1.5 2016/12/05 16:17:46 j_novak Exp $
50  *
51  */
52 
53 // C headers
54 #include <cmath>
55 
56 // Lorene headers
57 #include "bin_ns_bh.h"
58 #include "unites.h"
59 
60 namespace Lorene {
62 
63  // NS-BH binary systems should be relativistic
64  // -------------------------------------------
65  if ( !star.is_relativistic() ) {
66  abort() ;
67  }
68 
69  using namespace Unites ;
70 
71  double rr = separation() ;
72  double mtot = star.mass_g() + hole.masse_adm_seul() / ggrav ;
73 
74  // Compaction factor
75  double compact = ggrav * mtot / rr ;
76 
77  double omega2 ;
78 
79  if ( star.is_irrotational() ) {
80 
81  // Irrotational case
82  // -----------------
83 
84  omega2 = ggrav * mtot / pow(rr, 3.)
85  * (1. - 2.75 * compact + 8.625 * compact*compact ) ;
86 
87  }
88  else {
89  // Corotating case
90  // ---------------
91 
92  // a0/R
93  double a0sr = star.ray_eq() / rr ;
94 
95  // Rescaled moment of inertia 5 I / (2 M a0^2)
96  double ired = double(5)/double(3) * ( 1. - double(6)/M_PI/M_PI ) ;
97  omega2 = ggrav * mtot / pow(rr, 3.)
98  * (1. - compact * ( 2.75 + 2.*a0sr*a0sr * ired
99  - 0.48*pow(a0sr, 4) * ired*ired )
100  + compact*compact * ( 8.625 + 2.75*a0sr*a0sr * ired
101  + 2.*pow(a0sr, 4) * ired*ired ) ) ;
102 
103  }
104 
105  set_omega (sqrt( omega2 )) ;
106 
107  // The derived quantities are obsolete:
108  del_deriv() ;
109 
110 }
111 }
void set_omega(double)
Sets the orbital angular velocity [{ f_unit}].
Definition: bin_ns_bh.C:221
void analytical_omega()
Sets the orbital angular velocity of the neutron star to some 2-PN analytical value.
Cmp sqrt(const Cmp &)
Square root.
Definition: cmp_math.C:223
Lorene prototypes.
Definition: app_hor.h:67
Standard units of space, time and mass.
double ray_eq() const
Coordinate radius at , [r_unit].
bool is_irrotational() const
Returns true for an irrotational motion, false for a corotating one.
Definition: etoile.h:1095
virtual double mass_g() const
Gravitational mass.
void del_deriv() const
Destructor.
Definition: bin_ns_bh.C:166
Et_bin_nsbh star
The neutron star.
Definition: bin_ns_bh.h:131
Cmp pow(const Cmp &, int)
Power .
Definition: cmp_math.C:351
Bhole hole
The black hole.
Definition: bin_ns_bh.h:134
double masse_adm_seul() const
Calculates the ADM mass of the black hole using : .
double separation() const
Return the separation.
Definition: bin_ns_bh.C:238
bool is_relativistic() const
Returns true for a relativistic star, false for a Newtonian one.
Definition: etoile.h:670