single_param.C
/*
* Method of class Isol_hor to compute physical parameters of the horizon
*
* (see file isol_hor.h for documentation).
*
*/
/*
* Copyright (c) 2004 Jose Luis Jaramillo
*
* This file is part of LORENE.
*
* LORENE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* LORENE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LORENE; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
char single_param_C[] = "$Header: /cvsroot/Lorene/C++/Source/Isol_hor/single_param.C,v 1.3 2014/10/13 08:53:01 j_novak Exp $" ;
/*
* $Id: single_param.C,v 1.3 2014/10/13 08:53:01 j_novak Exp $
* $Log: single_param.C,v $
* Revision 1.3 2014/10/13 08:53:01 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.2 2014/10/06 15:13:11 j_novak
* Modified #include directives to use c++ syntax.
*
* Revision 1.1 2007/04/13 15:28:35 f_limousin
* Lots of improvements, generalisation to an arbitrary state of
* rotation, implementation of the spatial metric given by Samaya.
*
*
* $Header: /cvsroot/Lorene/C++/Source/Isol_hor/single_param.C,v 1.3 2014/10/13 08:53:01 j_novak Exp $
*
*/
// C++ headers
#include "headcpp.h"
// C headers
#include <cstdlib>
#include <cassert>
// Lorene headers
#include "isol_hor.h"
#include "metric.h"
#include "evolution.h"
#include "unites.h"
#include "scalar.h"
#include "vector.h"
#include "graphique.h"
#include "utilitaires.h"
namespace Lorene {
const Scalar Single_hor::b_tilde()const {
Scalar tmp = contract( beta, 0, tgam.radial_vect()
.down(0, tgam), 0) ;
return tmp ;
}
const Scalar Single_hor::darea_hor() const {
Scalar tmp = sqrt( get_gam().cov()(2,2) * get_gam().cov()(3,3) -
get_gam().cov()(2,3) * get_gam().cov()(2,3)) ;
tmp.std_spectral_base() ;
return tmp ;
}
double Single_hor::area_hor() const {
Scalar integrand (darea_hor()) ;
integrand.raccord(1) ;
return mp.integrale_surface(integrand, radius + 1e-15) ;
}
double Single_hor::radius_hor() const {
double resu = area_hor() / (4. * M_PI);
resu = pow(resu, 1./2.) ;
return resu ;
}
double Single_hor::ang_mom_hor()const {
// Vector \partial_phi
Vector phi (ff.get_mp(), CON, *(ff.get_triad()) ) ;
Scalar tmp (ff.get_mp() ) ;
tmp = 1 ;
tmp.std_spectral_base() ;
tmp.mult_rsint() ;
phi.set(1) = 0. ;
phi.set(2) = 0. ;
phi.set(3) = tmp ;
Scalar k_rphi = contract(contract( get_gam().radial_vect(), 0,
get_k_dd(), 0), 0,
phi, 0) / (8. * M_PI) ;
Scalar integrand = k_rphi * darea_hor() ; // we correct with the curved
// element of area
double ang_mom = mp.integrale_surface(integrand, radius + 1e-15) ;
return ang_mom ;
}
// Mass (fundamental constants made 1)
double Single_hor::mass_hor()const {
double rr = radius_hor() ;
double tmp = sqrt( pow( rr, 4) + 4 * pow( ang_mom_hor(), 2) ) / ( 2 * rr ) ;
return tmp ;
}
// Surface gravity
double Single_hor::kappa_hor() const{
double rr = radius_hor() ;
double jj = ang_mom_hor() ;
double tmp = (pow( rr, 4) - 4 * pow( jj, 2)) / ( 2 * pow( rr, 3)
* sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ;
return tmp ;
}
// Orbital velocity
double Single_hor::omega_hor()const {
double rr = radius_hor() ;
double jj = ang_mom_hor() ;
double tmp = 2 * jj / ( rr * sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ;
return tmp ;
}
// ADM angular momentum
double Single_hor::ang_mom_adm()const {
Scalar integrand = (get_k_dd()(1,3) - get_gam().cov()(1,3) * trK) /
(8. * M_PI) ;
integrand.mult_rsint() ; // in order to pass from the triad
// component to the coordinate basis
double tmp = mp.integrale_surface_infini(integrand) ;
return tmp ;
}
// Expansion
Scalar Single_hor::expansion() const {
Scalar expa = contract(get_gam().radial_vect().derive_cov(get_gam()), 0,1)
+ contract(contract(get_k_dd(), 0, get_gam().radial_vect(), 0),
0, get_gam().radial_vect(), 0) - trK ;
return expa ;
}
}
Lorene::Metric::cov
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
Definition metric.C:280
Lorene::Scalar
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
Lorene::Scalar::raccord
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
Definition scalar_raccord.C:62
Lorene::Scalar::std_spectral_base
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field.
Definition scalar.C:784
Lorene::Scalar::mult_rsint
void mult_rsint()
Multiplication by everywhere; dzpuis is not changed.
Definition scalar_r_manip.C:281
Lorene::Single_hor::radius_hor
double radius_hor() const
Radius of the horizon.
Definition single_param.C:97
Lorene::Single_hor::radius
double radius
Radius of the horizon in LORENE's units.
Definition isol_hor.h:906
Lorene::Single_hor::get_gam
const Metric & get_gam() const
metric
Definition single_hor.C:339
Lorene::Single_hor::darea_hor
const Scalar darea_hor() const
Element of area of the horizon.
Definition single_param.C:77
Lorene::Single_hor::mass_hor
double mass_hor() const
Mass computed at the horizon.
Definition single_param.C:135
Lorene::Single_hor::get_k_dd
const Sym_tensor & get_k_dd() const
k_dd
Definition single_hor.C:348
Lorene::Single_hor::ff
Metric_flat ff
3 metric flat
Definition isol_hor.h:980
Lorene::Single_hor::mp
Map_af & mp
Affine mapping.
Definition isol_hor.h:900
Lorene::Single_hor::area_hor
double area_hor() const
Area of the horizon.
Definition single_param.C:88
Lorene::Single_hor::expansion
Scalar expansion() const
Expansion of the outgoing null normal ( ).
Definition single_param.C:190
Lorene::Single_hor::ang_mom_adm
double ang_mom_adm() const
ADM angular Momentum.
Definition single_param.C:174
Lorene::Single_hor::kappa_hor
double kappa_hor() const
Surface gravity.
Definition single_param.C:146
Lorene::Single_hor::ang_mom_hor
double ang_mom_hor() const
Angular momentum (modulo).
Definition single_param.C:107
Lorene::Single_hor::omega_hor
double omega_hor() const
Orbital velocity.
Definition single_param.C:160
Lorene::Single_hor::beta
Vector beta
Shift function .
Definition isol_hor.h:950
Lorene::Single_hor::b_tilde
const Scalar b_tilde() const
Radial component of the shift with respect to the conformal metric.
Definition single_param.C:68
Lorene::Single_hor::trK
Scalar trK
Trace of the extrinsic curvature.
Definition isol_hor.h:989
Lorene::Single_hor::tgam
Metric tgam
3 metric tilde
Definition isol_hor.h:977
Lorene::Vector
Tensor field of valence 1.
Definition vector.h:188
Lorene::sqrt
Cmp sqrt(const Cmp &)
Square root.
Definition cmp_math.C:220
Lorene::pow
Cmp pow(const Cmp &, int)
Power .
Definition cmp_math.C:348
Lorene::contract
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Definition tenseur_operateur.C:279
Lorene
Lorene prototypes.
Definition app_hor.h:64
Lorene::phi
Coord phi
coordinate centered on the grid
Definition map.h:720