LORENE
single_param.C
1 /*
2  * Method of class Isol_hor to compute physical parameters of the horizon
3  *
4  * (see file isol_hor.h for documentation).
5  *
6  */
7 
8 /*
9  * Copyright (c) 2004 Jose Luis Jaramillo
10  *
11  * This file is part of LORENE.
12  *
13  * LORENE is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License version 2
15  * as published by the Free Software Foundation.
16  *
17  * LORENE is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with LORENE; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25  *
26  */
27 
28 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 $" ;
29 
30 /*
31  * $Id: single_param.C,v 1.3 2014/10/13 08:53:01 j_novak Exp $
32  * $Log: single_param.C,v $
33  * Revision 1.3 2014/10/13 08:53:01 j_novak
34  * Lorene classes and functions now belong to the namespace Lorene.
35  *
36  * Revision 1.2 2014/10/06 15:13:11 j_novak
37  * Modified #include directives to use c++ syntax.
38  *
39  * Revision 1.1 2007/04/13 15:28:35 f_limousin
40  * Lots of improvements, generalisation to an arbitrary state of
41  * rotation, implementation of the spatial metric given by Samaya.
42  *
43  *
44  * $Header: /cvsroot/Lorene/C++/Source/Isol_hor/single_param.C,v 1.3 2014/10/13 08:53:01 j_novak Exp $
45  *
46  */
47 
48 // C++ headers
49 #include "headcpp.h"
50 
51 // C headers
52 #include <cstdlib>
53 #include <cassert>
54 
55 // Lorene headers
56 #include "isol_hor.h"
57 #include "metric.h"
58 #include "evolution.h"
59 #include "unites.h"
60 #include "scalar.h"
61 #include "vector.h"
62 #include "graphique.h"
63 #include "utilitaires.h"
64 
65 
66 
67 namespace Lorene {
69 
70  Scalar tmp = contract( beta, 0, tgam.radial_vect()
71  .down(0, tgam), 0) ;
72 
73  return tmp ;
74 
75 }
76 
78 
79  Scalar tmp = sqrt( get_gam().cov()(2,2) * get_gam().cov()(3,3) -
80  get_gam().cov()(2,3) * get_gam().cov()(2,3)) ;
81 
82  tmp.std_spectral_base() ;
83 
84  return tmp ;
85 
86 }
87 
88 double Single_hor::area_hor() const {
89 
90  Scalar integrand (darea_hor()) ;
91  integrand.raccord(1) ;
92 
93  return mp.integrale_surface(integrand, radius + 1e-15) ;
94 
95 }
96 
97 double Single_hor::radius_hor() const {
98 
99  double resu = area_hor() / (4. * M_PI);
100 
101  resu = pow(resu, 1./2.) ;
102 
103  return resu ;
104 
105 }
106 
107 double Single_hor::ang_mom_hor()const {
108 
109  // Vector \partial_phi
110  Vector phi (ff.get_mp(), CON, *(ff.get_triad()) ) ;
111 
112  Scalar tmp (ff.get_mp() ) ;
113  tmp = 1 ;
114  tmp.std_spectral_base() ;
115  tmp.mult_rsint() ;
116 
117  phi.set(1) = 0. ;
118  phi.set(2) = 0. ;
119  phi.set(3) = tmp ;
120 
121  Scalar k_rphi = contract(contract( get_gam().radial_vect(), 0,
122  get_k_dd(), 0), 0,
123  phi, 0) / (8. * M_PI) ;
124 
125  Scalar integrand = k_rphi * darea_hor() ; // we correct with the curved
126  // element of area
127 
128  double ang_mom = mp.integrale_surface(integrand, radius + 1e-15) ;
129 
130  return ang_mom ;
131 
132 }
133 
134 // Mass (fundamental constants made 1)
135 double Single_hor::mass_hor()const {
136 
137  double rr = radius_hor() ;
138 
139  double tmp = sqrt( pow( rr, 4) + 4 * pow( ang_mom_hor(), 2) ) / ( 2 * rr ) ;
140 
141  return tmp ;
142 
143 }
144 
145 // Surface gravity
146 double Single_hor::kappa_hor() const{
147 
148  double rr = radius_hor() ;
149 
150  double jj = ang_mom_hor() ;
151 
152  double tmp = (pow( rr, 4) - 4 * pow( jj, 2)) / ( 2 * pow( rr, 3)
153  * sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ;
154 
155  return tmp ;
156 
157 }
158 
159 // Orbital velocity
160 double Single_hor::omega_hor()const {
161 
162  double rr = radius_hor() ;
163 
164  double jj = ang_mom_hor() ;
165 
166  double tmp = 2 * jj / ( rr * sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ;
167 
168  return tmp ;
169 
170 }
171 
172 // ADM angular momentum
173 
174 double Single_hor::ang_mom_adm()const {
175 
176  Scalar integrand = (get_k_dd()(1,3) - get_gam().cov()(1,3) * trK) /
177  (8. * M_PI) ;
178 
179  integrand.mult_rsint() ; // in order to pass from the triad
180  // component to the coordinate basis
181 
182  double tmp = mp.integrale_surface_infini(integrand) ;
183 
184  return tmp ;
185 
186 }
187 
188 // Expansion
189 
191 
192  Scalar expa = contract(get_gam().radial_vect().derive_cov(get_gam()), 0,1)
193  + contract(contract(get_k_dd(), 0, get_gam().radial_vect(), 0),
194  0, get_gam().radial_vect(), 0) - trK ;
195 
196  return expa ;
197 }
198 }
double mass_hor() const
Mass computed at the horizon.
Definition: single_param.C:135
const Metric & get_gam() const
metric
Definition: single_hor.C:339
double omega_hor() const
Orbital velocity.
Definition: single_param.C:160
double integrale_surface(const Cmp &ci, double rayon) const
Performs the surface integration of ci on the sphere of radius rayon .
Metric tgam
3 metric tilde
Definition: isol_hor.h:977
Cmp sqrt(const Cmp &)
Square root.
Definition: cmp_math.C:220
double kappa_hor() const
Surface gravity.
Definition: single_param.C:146
double area_hor() const
Area of the horizon.
Definition: single_param.C:88
double integrale_surface_infini(const Cmp &ci) const
Performs the surface integration of ci at infinity.
const Sym_tensor & get_k_dd() const
k_dd
Definition: single_hor.C:348
Lorene prototypes.
Definition: app_hor.h:64
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:387
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the metric is defined.
Definition: metric.h:309
virtual const Vector & radial_vect() const
Returns the radial vector normal to a spherical slicing and pointing toward spatial infinity...
Definition: metric.C:362
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
Tensor field of valence 1.
Definition: vector.h:188
const Map & get_mp() const
Returns the mapping.
Definition: metric.h:202
double ang_mom_adm() const
ADM angular Momentum.
Definition: single_param.C:174
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
Scalar expansion() const
Expansion of the outgoing null normal ( )
Definition: single_param.C:190
Scalar trK
Trace of the extrinsic curvature.
Definition: isol_hor.h:989
double radius_hor() const
Radius of the horizon.
Definition: single_param.C:97
Vector beta
Shift function .
Definition: isol_hor.h:950
void mult_rsint()
Multiplication by everywhere; dzpuis is not changed.
Cmp pow(const Cmp &, int)
Power .
Definition: cmp_math.C:348
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
const Scalar darea_hor() const
Element of area of the horizon.
Definition: single_param.C:77
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
Definition: metric.C:280
Map_af & mp
Affine mapping.
Definition: isol_hor.h:900
Scalar & set(int)
Read/write access to a component.
Definition: vector.C:296
double ang_mom_hor() const
Angular momentum (modulo)
Definition: single_param.C:107
double radius
Radius of the horizon in LORENE&#39;s units.
Definition: isol_hor.h:906
Metric_flat ff
3 metric flat
Definition: isol_hor.h:980
const Scalar b_tilde() const
Radial component of the shift with respect to the conformal metric.
Definition: single_param.C:68
Tensor down(int ind, const Metric &gam) const
Computes a new tensor by lowering an index of *this.