| 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 |
char binaire_omega_ana_C[] = "$Header: /cvsroot/Lorene/C++/Source/Binaire/binaire_omega_ana.C,v 1.3 2014/10/13 08:52:44 j_novak Exp $" ; |
| 30 |
|
| 31 |
/* |
| 32 |
* $Id: binaire_omega_ana.C,v 1.3 2014/10/13 08:52:44 j_novak Exp $ |
| 33 |
* $Log: binaire_omega_ana.C,v $ |
| 34 |
* Revision 1.3 2014/10/13 08:52:44 j_novak |
| 35 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 36 |
* |
| 37 |
* Revision 1.2 2004/03/25 10:28:59 j_novak |
| 38 |
* All LORENE's units are now defined in the namespace Unites (in file unites.h). |
| 39 |
* |
| 40 |
* Revision 1.1.1.1 2001/11/20 15:19:30 e_gourgoulhon |
| 41 |
* LORENE |
| 42 |
* |
| 43 |
* Revision 2.1 2000/03/17 15:53:28 eric |
| 44 |
* *** empty log message *** |
| 45 |
* |
| 46 |
* Revision 2.0 2000/03/17 15:27:41 eric |
| 47 |
* *** empty log message *** |
| 48 |
* |
| 49 |
* |
| 50 |
* $Header: /cvsroot/Lorene/C++/Source/Binaire/binaire_omega_ana.C,v 1.3 2014/10/13 08:52:44 j_novak Exp $ |
| 51 |
* |
| 52 |
*/ |
| 53 |
|
| 54 |
// Headers C |
| 55 |
#include "math.h" |
| 56 |
|
| 57 |
// Headers Lorene |
| 58 |
#include "binaire.h" |
| 59 |
#include "unites.h" |
| 60 |
|
| 61 |
|
| 62 |
namespace Lorene { |
| 63 |
void Binaire::analytical_omega() { |
| 64 |
|
| 65 |
using namespace Unites ; |
| 66 |
|
| 67 |
double rr = separation() ; |
| 68 |
double mtot = star1.mass_g() + star2.mass_g() ; |
| 69 |
|
| 70 |
// Compacity factor |
| 71 |
double compact = ggrav * mtot / rr ; |
| 72 |
|
| 73 |
// The compacity factor is set to zero in the Newtonian case |
| 74 |
if ( !star1.is_relativistic() ) { |
| 75 |
assert( !star2.is_relativistic() ) ; |
| 76 |
compact = 0 ; |
| 77 |
} |
| 78 |
|
| 79 |
|
| 80 |
double omega2 ; |
| 81 |
|
| 82 |
if ( star1.is_irrotational() ) { |
| 83 |
|
| 84 |
// Irrotational case |
| 85 |
// ----------------- |
| 86 |
|
| 87 |
assert( star2.is_irrotational() ) ; |
| 88 |
|
| 89 |
omega2 = ggrav * mtot / pow(rr, 3) |
| 90 |
* (1. - 2.75 * compact + 8.625 * compact*compact ) ; |
| 91 |
|
| 92 |
} |
| 93 |
else{ // Corotating case |
| 94 |
// --------------- |
| 95 |
|
| 96 |
assert( !star2.is_irrotational() ) ; |
| 97 |
|
| 98 |
// a0/R |
| 99 |
double a0sr = star1.ray_eq() / rr ; |
| 100 |
|
| 101 |
// Rescaled moment of inertia 5 I / (2 M a0^2) |
| 102 |
double ired = double(5)/double(3) * ( 1. - double(6) / M_PI / M_PI ) ; |
| 103 |
omega2 = ggrav * mtot / pow(rr, 3) |
| 104 |
* (1. - compact * ( 2.75 + 2.*a0sr*a0sr * ired |
| 105 |
- 0.48*pow(a0sr, 4) * ired*ired ) |
| 106 |
+ compact*compact * ( 8.625 + 2.75*a0sr*a0sr * ired |
| 107 |
+ 2.*pow(a0sr, 4) * ired*ired ) ) ; |
| 108 |
|
| 109 |
} |
| 110 |
|
| 111 |
omega = sqrt( omega2 ) ; |
| 112 |
|
| 113 |
// The derived quantities are obsolete: |
| 114 |
del_deriv() ; |
| 115 |
|
| 116 |
} |
| 117 |
} |