00001 /* 00002 * Method Star_bin::kinematics 00003 * 00004 * (see file star.h for documentation) 00005 * 00006 */ 00007 00008 /* 00009 * Copyright (c) 2004 Francois Limousin 00010 * 00011 * This file is part of LORENE. 00012 * 00013 * LORENE is free software; you can redistribute it and/or modify 00014 * it under the terms of the GNU General Public License as published by 00015 * the Free Software Foundation; either version 2 of the License, or 00016 * (at your option) any later version. 00017 * 00018 * LORENE is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 * GNU General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU General Public License 00024 * along with LORENE; if not, write to the Free Software 00025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00026 * 00027 */ 00028 00029 00030 char star_bin_kinema_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star/star_bin_kinema.C,v 1.8 2006/04/11 14:24:44 f_limousin Exp $" ; 00031 00032 /* 00033 * $Id: star_bin_kinema.C,v 1.8 2006/04/11 14:24:44 f_limousin Exp $ 00034 * $Log: star_bin_kinema.C,v $ 00035 * Revision 1.8 2006/04/11 14:24:44 f_limousin 00036 * New version of the code : improvement of the computation of some 00037 * critical sources, estimation of the dirac gauge, helical symmetry... 00038 * 00039 * Revision 1.7 2005/09/13 19:38:31 f_limousin 00040 * Reintroduction of the resolution of the equations in cartesian coordinates. 00041 * 00042 * Revision 1.6 2005/02/17 17:33:54 f_limousin 00043 * Change the name of some quantities to be consistent with other classes 00044 * (for instance nnn is changed to nn, shift to beta, beta to lnq...) 00045 * 00046 * Revision 1.5 2004/06/22 12:51:59 f_limousin 00047 * Simplify the computation of gam_pot to improve the convergence of the code. 00048 * 00049 * Revision 1.4 2004/05/25 14:21:26 f_limousin 00050 * New method to compute pot_centri to improve the convergence of the code. 00051 * 00052 * Revision 1.3 2004/02/27 09:56:10 f_limousin 00053 * Correction of an error on the computation of bsn. 00054 * 00055 * Revision 1.2 2004/01/20 15:18:45 f_limousin 00056 * First version 00057 * 00058 * 00059 * $Header: /cvsroot/Lorene/C++/Source/Star/star_bin_kinema.C,v 1.8 2006/04/11 14:24:44 f_limousin Exp $ 00060 * 00061 */ 00062 00063 #include <math.h> 00064 00065 // Headers Lorene 00066 #include "star.h" 00067 00068 void Star_bin::kinematics(double omega, double x_axe) { 00069 00070 int nz = mp.get_mg()->get_nzone() ; 00071 int nzm1 = nz - 1 ; 00072 00073 // -------------------- 00074 // Computation of B^i/N 00075 // -------------------- 00076 00077 // 1/ Computation of omega m^i 00078 00079 const Coord& xa = mp.xa ; 00080 const Coord& ya = mp.ya ; 00081 00082 bsn.change_triad(mp.get_bvect_cart()) ; 00083 00084 if (fabs(mp.get_rot_phi()) < 1e-10){ 00085 bsn.set(1) = - omega * ya ; 00086 bsn.set(2) = omega * (xa - x_axe) ; 00087 bsn.set(3) = 0 ; 00088 } 00089 else { 00090 bsn.set(1) = omega * ya ; 00091 bsn.set(2) = - omega * (xa - x_axe) ; 00092 bsn.set(3) = 0 ; 00093 } 00094 00095 bsn.std_spectral_base() ; 00096 00097 bsn.annule(nzm1, nzm1) ; // set to zero in the ZEC 00098 00099 // 2/ Addition of beta and division by lapse 00100 // See Eq (47) from Gourgoulhon et al. (2001) 00101 // New convention : l = Nn + B ==> B = \beta + \Omega d\phi 00102 00103 bsn = ( bsn + beta ) / nn ; 00104 00105 bsn.annule(nzm1, nzm1) ; // set to zero in the ZEC 00106 00107 //------------------------- 00108 // Centrifugal potential 00109 //------------------------- 00110 00111 // Lorentz factor between the co-orbiting observer and the Eulerian one 00112 // See Eq (23) from Gourgoulhon et al. (2001) 00113 00114 Sym_tensor gamma_cov (gamma.cov()) ; 00115 gamma_cov.change_triad(mp.get_bvect_cart()) ; 00116 00117 Scalar gam0 = 1 / sqrt(1 - contract(gamma_cov, 0, 1, bsn * bsn, 0, 1)) ; 00118 pot_centri = - log( gam0 ) ; 00119 00120 pot_centri.annule(nzm1, nzm1) ; // set to zero in the external domain 00121 pot_centri.std_spectral_base() ; // set the bases for spectral expansions 00122 00123 // The derived quantities are obsolete 00124 // ----------------------------------- 00125 00126 del_deriv() ; 00127 00128 }
1.4.6