LORENE
binaire_omega_ana.C
1/*
2 * Methods of class Binaire to set analytical value to omega
3 *
4 */
5
6/*
7 * Copyright (c) 2000-2001 Eric Gourgoulhon
8 * Copyright (c) 2000-2001 Keisuke Taniguchi
9 *
10 * This file is part of LORENE.
11 *
12 * LORENE is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
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/*
32 * $Id: binaire_omega_ana.C,v 1.4 2016/12/05 16:17:47 j_novak Exp $
33 * $Log: binaire_omega_ana.C,v $
34 * Revision 1.4 2016/12/05 16:17:47 j_novak
35 * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
36 *
37 * Revision 1.3 2014/10/13 08:52:44 j_novak
38 * Lorene classes and functions now belong to the namespace Lorene.
39 *
40 * Revision 1.2 2004/03/25 10:28:59 j_novak
41 * All LORENE's units are now defined in the namespace Unites (in file unites.h).
42 *
43 * Revision 1.1.1.1 2001/11/20 15:19:30 e_gourgoulhon
44 * LORENE
45 *
46 * Revision 2.1 2000/03/17 15:53:28 eric
47 * *** empty log message ***
48 *
49 * Revision 2.0 2000/03/17 15:27:41 eric
50 * *** empty log message ***
51 *
52 *
53 * $Header: /cvsroot/Lorene/C++/Source/Binaire/binaire_omega_ana.C,v 1.4 2016/12/05 16:17:47 j_novak Exp $
54 *
55 */
56
57// Headers C
58#include "math.h"
59
60// Headers Lorene
61#include "binaire.h"
62#include "unites.h"
63
64
65namespace Lorene {
67
68 using namespace Unites ;
69
70 double rr = separation() ;
71 double mtot = star1.mass_g() + star2.mass_g() ;
72
73 // Compacity factor
74 double compact = ggrav * mtot / rr ;
75
76 // The compacity factor is set to zero in the Newtonian case
77 if ( !star1.is_relativistic() ) {
78 assert( !star2.is_relativistic() ) ;
79 compact = 0 ;
80 }
81
82
83 double omega2 ;
84
85 if ( star1.is_irrotational() ) {
86
87 // Irrotational case
88 // -----------------
89
90 assert( star2.is_irrotational() ) ;
91
92 omega2 = ggrav * mtot / pow(rr, 3)
93 * (1. - 2.75 * compact + 8.625 * compact*compact ) ;
94
95 }
96 else{ // Corotating case
97 // ---------------
98
99 assert( !star2.is_irrotational() ) ;
100
101 // a0/R
102 double a0sr = star1.ray_eq() / rr ;
103
104 // Rescaled moment of inertia 5 I / (2 M a0^2)
105 double ired = double(5)/double(3) * ( 1. - double(6) / M_PI / M_PI ) ;
106 omega2 = ggrav * mtot / pow(rr, 3)
107 * (1. - compact * ( 2.75 + 2.*a0sr*a0sr * ired
108 - 0.48*pow(a0sr, 4) * ired*ired )
109 + compact*compact * ( 8.625 + 2.75*a0sr*a0sr * ired
110 + 2.*pow(a0sr, 4) * ired*ired ) ) ;
111
112 }
113
114 omega = sqrt( omega2 ) ;
115
116 // The derived quantities are obsolete:
117 del_deriv() ;
118
119}
120}
void analytical_omega()
Sets the orbital angular velocity to some 2-PN analytical value (Keplerian value in the Newtonian cas...
double separation() const
Returns the coordinate separation of the two stellar centers [{\tt r_unit}].
Definition binaire.C:460
void del_deriv() const
Destructor.
Definition binaire.C:180
Etoile_bin star2
Second star of the system.
Definition binaire.h:121
double omega
Angular velocity with respect to an asymptotically inertial observer.
Definition binaire.h:132
Etoile_bin star1
First star of the system.
Definition binaire.h:118
Cmp sqrt(const Cmp &)
Square root.
Definition cmp_math.C:223
Cmp pow(const Cmp &, int)
Power .
Definition cmp_math.C:351
Lorene prototypes.
Definition app_hor.h:67
Standard units of space, time and mass.