et_bin_kinema.C

00001 /*
00002  * Method Etoile_bin::kinematics
00003  *
00004  * (see file etoile.h for documentation)
00005  *
00006  */
00007 
00008 /*
00009  *   Copyright (c) 2000-2001 Eric Gourgoulhon
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 et_bin_kinema_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_kinema.C,v 1.5 2005/08/29 15:10:16 p_grandclement Exp $" ;
00031 
00032 /*
00033  * $Id: et_bin_kinema.C,v 1.5 2005/08/29 15:10:16 p_grandclement Exp $
00034  * $Log: et_bin_kinema.C,v $
00035  * Revision 1.5  2005/08/29 15:10:16  p_grandclement
00036  * Addition of things needed :
00037  *   1) For BBH with different masses
00038  *   2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT
00039  *   WORKING YET !!!
00040  *
00041  * Revision 1.4  2003/03/03 19:18:12  f_limousin
00042  * Suppression of bsn.set_triad(ref_triad).
00043  *
00044  * Revision 1.3  2003/01/17 13:35:48  f_limousin
00045  * Add comments and replace A^2*flat_scalar_prod by sprod
00046  *
00047  * Revision 1.2  2002/12/10 15:56:43  k_taniguchi
00048  * Change the multiplication "*" to "%".
00049  *
00050  * Revision 1.1.1.1  2001/11/20 15:19:28  e_gourgoulhon
00051  * LORENE
00052  *
00053  * Revision 2.4  2000/02/17  18:51:22  eric
00054  * pot_centri is set to zero only in the external compactified domain.
00055  *
00056  * Revision 2.3  2000/02/12  18:37:17  eric
00057  * Appel de set_std_base sur les quantites calculees.
00058  *
00059  * Revision 2.2  2000/02/08  19:29:27  eric
00060  * Calcul sur les tenseurs.
00061  *
00062  * Revision 2.1  2000/02/04  17:14:27  eric
00063  * *** empty log message ***
00064  *
00065  * Revision 2.0  2000/02/04  16:37:51  eric
00066  * *** empty log message ***
00067  *
00068  *
00069  * $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_kinema.C,v 1.5 2005/08/29 15:10:16 p_grandclement Exp $
00070  *
00071  */
00072 
00073 // Headers Lorene
00074 #include "etoile.h"
00075 #include "graphique.h"
00076 
00077 void Etoile_bin::kinematics(double omega, double x_axe) {
00078 
00079     int nz = mp.get_mg()->get_nzone() ; 
00080     int nzm1 = nz - 1 ; 
00081     
00082     // --------------------
00083     // Computation of B^i/N
00084     // --------------------
00085     
00086     //  1/ Computation of  - omega m^i
00087 
00088     const Coord& xa = mp.xa ; 
00089     const Coord& ya = mp.ya ; 
00090 
00091     bsn.set_etat_qcq() ; 
00092     
00093     bsn.set(0) = omega * ya ;
00094     bsn.set(1) = - omega * (xa - x_axe) ;
00095     bsn.set(2) = 0 ;
00096     
00097     bsn.annule(nzm1, nzm1) ;    // set to zero in the ZEC
00098     
00099     //  2/ Addition of shift and division by lapse
00100     // See Eq (47) from Gourgoulhon et al. (2001)
00101 
00102     bsn = ( bsn + shift ) / nnn ;
00103     
00104     bsn.annule(nzm1, nzm1) ;    // set to zero in the ZEC
00105     bsn.set_std_base() ;   // set the bases for spectral expansions
00106    
00107     //-------------------------
00108     // Centrifugal potentatial
00109     //-------------------------
00110 
00111     if (relativistic) {
00112 
00113     // Lorentz factor between the co-orbiting observer and the Eulerian one
00114       // See Eq (23) from Gourgoulhon et al. (2001)
00115       Tenseur gam0 = 1 / sqrt( 1-sprod(bsn, bsn) ) ;
00116       
00117     pot_centri = - log( gam0 ) ;
00118 
00119     }
00120     else {
00121 
00122     pot_centri.set_etat_qcq() ; 
00123     
00124 
00125     // See Eq (40) from Gourgoulhon et al. (2001)
00126     pot_centri.set() = - 0.5 * omega * omega * (
00127                 (xa - x_axe) * (xa - x_axe) + ya * ya ) ; 
00128 
00129     }
00130     
00131     pot_centri.annule(nzm1, nzm1) ; // set to zero in the external domain
00132     pot_centri.set_std_base() ;   // set the bases for spectral expansions
00133     
00134     // The derived quantities are obsolete
00135     // -----------------------------------
00136     
00137     del_deriv() ;                
00138     
00139     
00140 }

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