star_bhns_kinema.C

00001 /*
00002  *  Method of class Star_bhns to compute kinematic quantities
00003  *
00004  *    (see file star_bhns.h for documentation).
00005  *
00006  */
00007 
00008 /*
00009  *   Copyright (c) 2005-2007 Keisuke Taniguchi
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 version 2
00015  *   as published by the Free Software Foundation.
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 char star_bhns_kinema_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star_bhns/star_bhns_kinema.C,v 1.2 2008/05/15 19:16:06 k_taniguchi Exp $" ;
00029 
00030 /*
00031  * $Id: star_bhns_kinema.C,v 1.2 2008/05/15 19:16:06 k_taniguchi Exp $
00032  * $Log: star_bhns_kinema.C,v $
00033  * Revision 1.2  2008/05/15 19:16:06  k_taniguchi
00034  * Change of a parameter.
00035  *
00036  * Revision 1.1  2007/06/22 01:32:00  k_taniguchi
00037  * *** empty log message ***
00038  *
00039  *
00040  * $Header: /cvsroot/Lorene/C++/Source/Star_bhns/star_bhns_kinema.C,v 1.2 2008/05/15 19:16:06 k_taniguchi Exp $
00041  *
00042  */
00043 
00044 // C++ headers
00045 //#include <>
00046 
00047 // C headers
00048 #include <math.h>
00049 
00050 // Lorene headers
00051 #include "star_bhns.h"
00052 #include "unites.h"
00053 
00054 void Star_bhns::kinema_bhns(bool kerrschild, const double& mass_bh,
00055                 const double& sepa, double omega,
00056                 double x_rot, double y_rot) {
00057 
00058     // Fundamental constants and units
00059     // -------------------------------
00060     using namespace Unites ;
00061 
00062     int nz = mp.get_mg()->get_nzone() ;
00063     int nzm1 = nz - 1 ;
00064 
00065     //----------------------
00066     // Computation of B^i/N
00067     //----------------------
00068 
00069     // 1/ Computation of omega m^i
00070 
00071     const Coord& xa = mp.xa ;
00072     const Coord& ya = mp.ya ;
00073 
00074     //    bsn.change_triad(mp.get_bvect_cart()) ;
00075 
00076     if (fabs(mp.get_rot_phi()) < 1.e-10) {
00077 
00078         bsn.set(1) = - omega * (ya - y_rot) ;
00079     bsn.set(2) = omega * (xa - x_rot) ;
00080     bsn.set(3) = 0. ;
00081 
00082     }
00083     else {
00084 
00085         bsn.set(1) = omega * (ya - y_rot) ;
00086     bsn.set(2) = - omega * (xa - x_rot) ;
00087     bsn.set(3) = 0. ;
00088 
00089     }
00090 
00091     bsn.std_spectral_base() ;
00092     bsn.annule_domain(nzm1) ;
00093 
00094     // 2/ Addition of shift_tot and division by lapse
00095 
00096     for (int i=1; i<=3; i++) {
00097         bsn.set(i) = confo_tot * ( bsn(i) + shift_tot(i) ) / lapconf_tot ;
00098     }
00099     bsn.std_spectral_base() ;
00100     bsn.annule_domain(nzm1) ;
00101 
00102     //-----------------------------------------------------
00103     // Lorentz factor between the co-orbiting               ---> gam0
00104     // observer and the Eulerian one
00105     // See Eq (23) and (24) from Gourgoulhon et al. (2001)
00106     //-----------------------------------------------------
00107 
00108     Scalar bsn2(mp) ;
00109     bsn2 = bsn(1)%bsn(1) + bsn(2)%bsn(2) + bsn(3)%bsn(3) ;
00110     bsn2.std_spectral_base() ;
00111 
00112     if (kerrschild) {
00113 
00114         double mass = ggrav * mass_bh ;
00115 
00116     Scalar xx(mp) ;
00117     xx = mp.x ;
00118     xx.std_spectral_base() ;
00119     Scalar yy(mp) ;
00120     yy = mp.y ;
00121     yy.std_spectral_base() ;
00122     Scalar zz(mp) ;
00123     zz = mp.z ;
00124     zz.std_spectral_base() ;
00125 
00126     double yns = mp.get_ori_y() ;
00127 
00128     Scalar rbh(mp) ;
00129     rbh = sqrt( (xx+sepa)*(xx+sepa) + (yy+yns)*(yy+yns) + zz*zz ) ;
00130     rbh.std_spectral_base() ;
00131 
00132     Vector ll(mp, CON, mp.get_bvect_cart()) ;
00133     ll.set_etat_qcq() ;
00134     ll.set(1) = (xx+sepa) / rbh ;
00135     ll.set(2) = (yy+yns) / rbh ;
00136     ll.set(3) = zz / rbh ;
00137     ll.std_spectral_base() ;
00138 
00139     Scalar msr(mp) ;
00140     msr = mass / rbh ;
00141     msr.std_spectral_base() ;
00142 
00143     Scalar llbsn(mp) ;
00144     llbsn = ll(1)%bsn(1) + ll(2)%bsn(2) + ll(3)%bsn(3) ;
00145     llbsn.std_spectral_base() ;
00146 
00147     Scalar tmp1(mp) ;
00148     tmp1 = 2. * msr % llbsn % llbsn ;
00149     tmp1.std_spectral_base() ;
00150 
00151     gam0 = 1. / sqrt(1. - psi4*(bsn2+tmp1)) ;
00152     gam0.std_spectral_base() ;
00153 
00154     }
00155     else { // Isotropic coordinates with the maximal slicing
00156 
00157         gam0 = 1. / sqrt(1. - psi4%bsn2) ;
00158     gam0.std_spectral_base() ;
00159 
00160     }
00161 
00162     //-----------------------
00163     // Centrifugal potential
00164     //-----------------------
00165 
00166     pot_centri = - log( gam0 ) ;
00167     pot_centri.annule_domain(nzm1) ;
00168     pot_centri.std_spectral_base() ;
00169 
00170     // The derived quantities are obsolete
00171     // -----------------------------------
00172 
00173     del_deriv() ;
00174 
00175 }

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