00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 #include "math.h"
00046
00047
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
00060 double compact = ggrav * mtot / rr ;
00061
00062 double omega2 ;
00063
00064 if ( star1.is_irrotational() ) {
00065
00066
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{
00076
00077
00078 assert( !star2.is_irrotational() ) ;
00079
00080
00081 double a0sr = star1.ray_eq() / rr ;
00082
00083
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
00096 del_deriv() ;
00097
00098 }