| 1 |
/* |
| 2 |
* Methods of class Binary_xcts to set analytical value to omega |
| 3 |
* (see file binary_xcts.h for documentation) |
| 4 |
*/ |
| 5 |
|
| 6 |
/* |
| 7 |
* Copyright (c) 2010 Michal Bejger |
| 8 |
* |
| 9 |
* This file is part of LORENE. |
| 10 |
* |
| 11 |
* LORENE is free software; you can redistribute it and/or modify |
| 12 |
* it under the terms of the GNU General Public License version 2 |
| 13 |
* as published by the Free Software Foundation. |
| 14 |
* |
| 15 |
* LORENE is distributed in the hope that it will be useful, |
| 16 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 |
* GNU General Public License for more details. |
| 19 |
* |
| 20 |
* You should have received a copy of the GNU General Public License |
| 21 |
* along with LORENE; if not, write to the Free Software |
| 22 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 23 |
* |
| 24 |
*/ |
| 25 |
|
| 26 |
char binary_omega_ana_xcts_C[] = "$Header: /cvsroot/Lorene/C++/Source/Binary_xcts/binary_omega_ana_xcts.C,v 1.2 2014/10/13 08:52:45 j_novak Exp $" ; |
| 27 |
|
| 28 |
/* |
| 29 |
* $Id: binary_omega_ana_xcts.C,v 1.2 2014/10/13 08:52:45 j_novak Exp $ |
| 30 |
* $Log: binary_omega_ana_xcts.C,v $ |
| 31 |
* Revision 1.2 2014/10/13 08:52:45 j_novak |
| 32 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 33 |
* |
| 34 |
* Revision 1.1 2010/05/04 07:35:54 m_bejger |
| 35 |
* Initial version |
| 36 |
* |
| 37 |
* $Header: /cvsroot/Lorene/C++/Source/Binary_xcts/binary_omega_ana_xcts.C,v 1.2 2014/10/13 08:52:45 j_novak Exp $ |
| 38 |
* |
| 39 |
*/ |
| 40 |
|
| 41 |
// Headers C |
| 42 |
#include "math.h" |
| 43 |
|
| 44 |
// Headers Lorene |
| 45 |
#include "binary_xcts.h" |
| 46 |
#include "unites.h" |
| 47 |
|
| 48 |
|
| 49 |
namespace Lorene { |
| 50 |
void Binary_xcts::analytical_omega() { |
| 51 |
|
| 52 |
using namespace Unites ; |
| 53 |
|
| 54 |
double rr = separation() ; |
| 55 |
double mtot = star1.mass_g() + star2.mass_g() ; |
| 56 |
|
| 57 |
// Compacity factor |
| 58 |
double compact = ggrav * mtot / rr ; |
| 59 |
|
| 60 |
double omega2 ; |
| 61 |
|
| 62 |
if ( star1.is_irrotational() ) { |
| 63 |
|
| 64 |
// Irrotational case |
| 65 |
// ----------------- |
| 66 |
|
| 67 |
assert( star2.is_irrotational() ) ; |
| 68 |
|
| 69 |
omega2 = ggrav * mtot / pow(rr, 3) |
| 70 |
* (1. - 2.75 * compact + 8.625 * compact*compact ) ; |
| 71 |
|
| 72 |
} |
| 73 |
else{ // Corotating case |
| 74 |
// --------------- |
| 75 |
|
| 76 |
assert( !star2.is_irrotational() ) ; |
| 77 |
|
| 78 |
// a0/R |
| 79 |
double a0sr = star1.ray_eq() / rr ; |
| 80 |
|
| 81 |
// Rescaled moment of inertia 5 I / (2 M a0^2) |
| 82 |
double ired = double(5)/double(3) * ( 1. - double(6) / M_PI / M_PI ) ; |
| 83 |
omega2 = ggrav * mtot / pow(rr, 3) |
| 84 |
* (1. - compact * ( 2.75 + 2.*a0sr*a0sr * ired |
| 85 |
- 0.48*pow(a0sr, 4) * ired*ired ) |
| 86 |
+ compact*compact * ( 8.625 + 2.75*a0sr*a0sr * ired |
| 87 |
+ 2.*pow(a0sr, 4) * ired*ired ) ) ; |
| 88 |
|
| 89 |
} |
| 90 |
|
| 91 |
omega = sqrt( omega2 ) ; |
| 92 |
|
| 93 |
// The derived quantities are obsolete: |
| 94 |
del_deriv() ; |
| 95 |
|
| 96 |
} |
| 97 |
} |