binaire_omega_ana.C

00001 /*
00002  * Methods of class Binaire to set analytical value to omega
00003  *
00004  */
00005 
00006 /*
00007  *   Copyright (c) 2000-2001 Eric Gourgoulhon
00008  *   Copyright (c) 2000-2001 Keisuke Taniguchi
00009  *
00010  *   This file is part of LORENE.
00011  *
00012  *   LORENE is free software; you can redistribute it and/or modify
00013  *   it under the terms of the GNU General Public License as published by
00014  *   the Free Software Foundation; either version 2 of the License, or
00015  *   (at your option) any later version.
00016  *
00017  *   LORENE is distributed in the hope that it will be useful,
00018  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *   GNU General Public License for more details.
00021  *
00022  *   You should have received a copy of the GNU General Public License
00023  *   along with LORENE; if not, write to the Free Software
00024  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *
00026  */
00027 
00028 
00029 char binaire_omega_ana_C[] = "$Header: /cvsroot/Lorene/C++/Source/Binaire/binaire_omega_ana.C,v 1.2 2004/03/25 10:28:59 j_novak Exp $" ;
00030 
00031 /*
00032  * $Id: binaire_omega_ana.C,v 1.2 2004/03/25 10:28:59 j_novak Exp $
00033  * $Log: binaire_omega_ana.C,v $
00034  * Revision 1.2  2004/03/25 10:28:59  j_novak
00035  * All LORENE's units are now defined in the namespace Unites (in file unites.h).
00036  *
00037  * Revision 1.1.1.1  2001/11/20 15:19:30  e_gourgoulhon
00038  * LORENE
00039  *
00040  * Revision 2.1  2000/03/17  15:53:28  eric
00041  * *** empty log message ***
00042  *
00043  * Revision 2.0  2000/03/17  15:27:41  eric
00044  * *** empty log message ***
00045  *
00046  *
00047  * $Header: /cvsroot/Lorene/C++/Source/Binaire/binaire_omega_ana.C,v 1.2 2004/03/25 10:28:59 j_novak Exp $
00048  *
00049  */
00050 
00051 // Headers C
00052 #include "math.h"
00053 
00054 // Headers Lorene
00055 #include "binaire.h"
00056 #include "unites.h"
00057 
00058 
00059 void Binaire::analytical_omega() {
00060     
00061   using namespace Unites ;
00062     
00063     double rr = separation() ;
00064     double mtot = star1.mass_g() + star2.mass_g() ; 
00065 
00066     // Compacity factor
00067     double compact = ggrav * mtot / rr ; 
00068 
00069     // The compacity factor is set to zero in the Newtonian case
00070     if ( !star1.is_relativistic() ) {
00071     assert( !star2.is_relativistic() ) ; 
00072     compact = 0 ; 
00073     }
00074     
00075     
00076     double omega2 ; 
00077     
00078     if ( star1.is_irrotational() ) {
00079     
00080         // Irrotational case
00081         // -----------------
00082     
00083     assert( star2.is_irrotational() ) ; 
00084     
00085     omega2 = ggrav * mtot / pow(rr, 3) 
00086         * (1. - 2.75 * compact + 8.625 * compact*compact ) ; 
00087     
00088     }
00089     else{   // Corotating case
00090         // ---------------
00091     
00092     assert( !star2.is_irrotational() ) ; 
00093     
00094     // a0/R
00095     double a0sr = star1.ray_eq() / rr ; 
00096 
00097     // Rescaled moment of inertia 5 I / (2 M a0^2)
00098     double ired = double(5)/double(3) * ( 1. - double(6) / M_PI / M_PI ) ; 
00099     omega2 =  ggrav * mtot / pow(rr, 3)
00100         * (1. - compact * ( 2.75 + 2.*a0sr*a0sr * ired 
00101           - 0.48*pow(a0sr, 4) * ired*ired ) 
00102           + compact*compact * ( 8.625 + 2.75*a0sr*a0sr * ired
00103                     + 2.*pow(a0sr, 4) * ired*ired ) ) ;
00104     
00105     }    
00106     
00107     omega = sqrt( omega2 ) ; 
00108     
00109     // The derived quantities are obsolete:
00110     del_deriv() ; 
00111     
00112 }

Generated on Tue Feb 7 01:35:14 2012 for LORENE by  doxygen 1.4.6