phys_param.C

00001 /*
00002  *  Method of class Isol_hor to compute physical parameters of the horizon
00003  *
00004  *    (see file isol_hor.h for documentation).
00005  *
00006  */
00007 
00008 /*
00009  *   Copyright (c) 2004  Jose Luis Jaramillo
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 phys_param_C[] = "$Header: /cvsroot/Lorene/C++/Source/Isol_hor/phys_param.C,v 1.11 2005/11/02 16:09:44 jl_jaramillo Exp $" ;
00029 
00030 /*
00031  * $Id: phys_param.C,v 1.11 2005/11/02 16:09:44 jl_jaramillo Exp $
00032  * $Log: phys_param.C,v $
00033  * Revision 1.11  2005/11/02 16:09:44  jl_jaramillo
00034  * changes in boundary_nn_Dir_lapl
00035  *
00036  * Revision 1.10  2005/04/15 11:54:21  jl_jaramillo
00037  * function to compute the expansion of spherical surfaces
00038  *
00039  * Revision 1.9  2005/03/22 13:25:36  f_limousin
00040  * Small changes. The angular velocity and A^{ij} are computed
00041  * with a differnet sign.
00042  *
00043  * Revision 1.8  2005/03/03 10:10:14  f_limousin
00044  * Add the function area_hor().
00045  *
00046  * Revision 1.7  2005/02/07 10:35:42  f_limousin
00047  * Minor changes.
00048  *
00049  * Revision 1.6  2004/12/22 18:16:16  f_limousin
00050  * Mny different changes.
00051  *
00052  * Revision 1.5  2004/11/18 12:30:01  jl_jaramillo
00053  * Definition of b_tilde
00054  *
00055  * Revision 1.4  2004/10/29 15:44:13  jl_jaramillo
00056  * ADM angular momentum added.
00057  *
00058  * Revision 1.3  2004/09/17 13:37:21  f_limousin
00059  * Correction of an error in calculation of the radius
00060  *
00061  * Revision 1.2  2004/09/09 16:54:53  f_limousin
00062  * Add the 2 lines $Id: phys_param.C,v 1.11 2005/11/02 16:09:44 jl_jaramillo Exp $Log: for CVS
00063  *
00064  *
00065  *
00066  * $Header: /cvsroot/Lorene/C++/Source/Isol_hor/phys_param.C,v 1.11 2005/11/02 16:09:44 jl_jaramillo Exp $
00067  *
00068  */
00069 
00070 // C++ headers
00071 #include "headcpp.h"
00072 
00073 // C headers
00074 #include <stdlib.h>
00075 #include <assert.h>
00076 
00077 // Lorene headers
00078 #include "isol_hor.h"
00079 #include "metric.h"
00080 #include "evolution.h"
00081 #include "unites.h"
00082 #include "scalar.h"
00083 #include "vector.h"
00084 #include "graphique.h"
00085 #include "utilitaires.h"
00086 
00087 
00088 const Vector Isol_hor::radial_vect_hor() const {
00089 
00090   Vector get_radial_vect (ff.get_mp(), CON, *(ff.get_triad()) ) ;
00091        
00092   get_radial_vect.set(1) = gam_uu()(1,1) ;
00093  
00094   get_radial_vect.set(2) = gam_uu()(1,2) ;
00095 
00096   get_radial_vect.set(3) = gam_uu()(1,3) ;
00097 
00098   get_radial_vect = get_radial_vect / sqrt(gam_uu()(1,1)) ;
00099 
00100   get_radial_vect.std_spectral_base() ;
00101 
00102 
00103   return get_radial_vect ;
00104 
00105 }
00106 
00107 
00108 // Think of defining this as a pointer
00109 const Vector Isol_hor::tradial_vect_hor() const {
00110 
00111   Vector get_radial_vect (ff.get_mp(), CON, *(ff.get_triad()) ) ;
00112        
00113   get_radial_vect.set(1) = (met_gamt.con())(1,1) ;
00114  
00115   get_radial_vect.set(2) = (met_gamt.con())(1,2) ;
00116 
00117   get_radial_vect.set(3) = (met_gamt.con())(1,3) ;
00118 
00119   get_radial_vect = get_radial_vect / sqrt((met_gamt.con())(1,1)) ;
00120 
00121   get_radial_vect.std_spectral_base() ;
00122 
00123 
00124   return get_radial_vect ;
00125 
00126 }
00127 
00128 
00129 const Scalar Isol_hor::b_tilde()const {
00130 
00131   Scalar tmp = contract( beta(), 0, met_gamt.radial_vect()
00132              .down(0, met_gamt), 0) ;
00133   
00134   return tmp ;
00135 
00136 }
00137 
00138 
00139 const Scalar Isol_hor::darea_hor() const {
00140   
00141   Scalar tmp = sqrt( gam_dd()(2,2) * gam_dd()(3,3) - gam_dd()(2,3) 
00142              * gam_dd()(2,3)) ;
00143   
00144   tmp.std_spectral_base() ;
00145   
00146   return tmp ;
00147   
00148 }
00149 
00150 double Isol_hor::area_hor() const {
00151     
00152     Scalar integrand (darea_hor()) ;
00153     integrand.raccord(1) ;
00154 
00155     return mp.integrale_surface(integrand, radius + 1e-15) ;
00156 
00157 }
00158 
00159 
00160 double Isol_hor::radius_hor() const {
00161 
00162   double resu =  area_hor() / (4. * M_PI);
00163 
00164   resu = pow(resu, 1./2.) ;
00165 
00166   return resu ;
00167 
00168 }
00169 
00170 
00171 double Isol_hor::ang_mom_hor()const {
00172 
00173   // Vector \partial_phi
00174   Vector phi (ff.get_mp(), CON, *(ff.get_triad()) ) ;
00175 
00176   Scalar tmp (ff.get_mp() ) ;
00177   tmp = 1 ;
00178   tmp.std_spectral_base() ;
00179   tmp.mult_rsint() ;
00180 
00181   phi.set(1) = 0. ;
00182   phi.set(2) = 0. ;
00183   phi.set(3) = tmp ; 
00184   
00185   Scalar k_rphi = contract(contract( radial_vect_hor(), 0, k_dd(), 0), 0, 
00186                phi, 0) / (8. * M_PI) ;
00187 
00188   Scalar integrand = k_rphi * darea_hor() ;   // we correct with the curved 
00189                                               // element of area 
00190 
00191   double ang_mom = mp.integrale_surface(integrand, radius + 1e-15) ;
00192 
00193   return ang_mom ;
00194 
00195 }
00196 
00197 
00198 // Mass  (fundamental constants made 1)
00199 double Isol_hor::mass_hor()const {
00200   
00201   double rr = radius_hor() ;
00202 
00203   double  tmp = sqrt( pow( rr, 4) + 4 * pow( ang_mom_hor(), 2) ) / ( 2 * rr ) ;
00204                                           
00205   return tmp ;
00206 
00207 }
00208 
00209 
00210 // Surface gravity
00211 double Isol_hor::kappa_hor() const{
00212   
00213   double rr = radius_hor() ;
00214 
00215   double jj = ang_mom_hor() ;
00216 
00217   double tmp = (pow( rr, 4) - 4 * pow( jj, 2)) / ( 2 * pow( rr, 3) 
00218              *  sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ;
00219   
00220   return tmp ;
00221 
00222 }
00223 
00224 
00225 // Orbital velocity
00226 double Isol_hor::omega_hor()const {
00227   
00228   double rr = radius_hor() ;
00229 
00230   double jj = ang_mom_hor() ;
00231 
00232   double tmp = 2 * jj / ( rr *  sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ;
00233   
00234   return tmp ;
00235 
00236 }
00237 
00238 
00239 // ADM angular momentum
00240 
00241 double Isol_hor::ang_mom_adm()const {
00242 
00243   Scalar integrand =  (k_dd()(1,3) - gam_dd()(1,3) * trk()) / (8. * M_PI)  ;
00244 
00245   integrand.mult_rsint() ;  // in order to pass from the triad 
00246                             // component to the coordinate basis
00247 
00248   double tmp = mp.integrale_surface_infini(integrand) ;
00249 
00250   return  tmp ;
00251 
00252 }
00253 
00254 // Expansion
00255 
00256 Scalar Isol_hor::expansion() const {
00257 
00258   Scalar expa = contract(gam().radial_vect().derive_cov(gam()), 0,1) 
00259     + contract(contract(k_dd(), 0, gam().radial_vect(), 0), 
00260            0, gam().radial_vect(), 0) - trk() ; 
00261 
00262   return expa ;
00263 }

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