binary_omegaana.C

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

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