LORENE
phys_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
28char phys_param_C[] = "$Header: /cvsroot/Lorene/C++/Source/Isol_hor/phys_param.C,v 1.13 2014/10/13 08:53:01 j_novak Exp $" ;
29
30/*
31 * $Id: phys_param.C,v 1.13 2014/10/13 08:53:01 j_novak Exp $
32 * $Log: phys_param.C,v $
33 * Revision 1.13 2014/10/13 08:53:01 j_novak
34 * Lorene classes and functions now belong to the namespace Lorene.
35 *
36 * Revision 1.12 2014/10/06 15:13:11 j_novak
37 * Modified #include directives to use c++ syntax.
38 *
39 * Revision 1.11 2005/11/02 16:09:44 jl_jaramillo
40 * changes in boundary_nn_Dir_lapl
41 *
42 * Revision 1.10 2005/04/15 11:54:21 jl_jaramillo
43 * function to compute the expansion of spherical surfaces
44 *
45 * Revision 1.9 2005/03/22 13:25:36 f_limousin
46 * Small changes. The angular velocity and A^{ij} are computed
47 * with a differnet sign.
48 *
49 * Revision 1.8 2005/03/03 10:10:14 f_limousin
50 * Add the function area_hor().
51 *
52 * Revision 1.7 2005/02/07 10:35:42 f_limousin
53 * Minor changes.
54 *
55 * Revision 1.6 2004/12/22 18:16:16 f_limousin
56 * Mny different changes.
57 *
58 * Revision 1.5 2004/11/18 12:30:01 jl_jaramillo
59 * Definition of b_tilde
60 *
61 * Revision 1.4 2004/10/29 15:44:13 jl_jaramillo
62 * ADM angular momentum added.
63 *
64 * Revision 1.3 2004/09/17 13:37:21 f_limousin
65 * Correction of an error in calculation of the radius
66 *
67 * Revision 1.2 2004/09/09 16:54:53 f_limousin
68 * Add the 2 lines $Id: phys_param.C,v 1.13 2014/10/13 08:53:01 j_novak Exp $Log: for CVS
69 *
70 *
71 *
72 * $Header: /cvsroot/Lorene/C++/Source/Isol_hor/phys_param.C,v 1.13 2014/10/13 08:53:01 j_novak Exp $
73 *
74 */
75
76// C++ headers
77#include "headcpp.h"
78
79// C headers
80#include <cstdlib>
81#include <cassert>
82
83// Lorene headers
84#include "isol_hor.h"
85#include "metric.h"
86#include "evolution.h"
87#include "unites.h"
88#include "scalar.h"
89#include "vector.h"
90#include "graphique.h"
91#include "utilitaires.h"
92
93
94namespace Lorene {
96
97 Vector get_radial_vect (ff.get_mp(), CON, *(ff.get_triad()) ) ;
98
99 get_radial_vect.set(1) = gam_uu()(1,1) ;
100
101 get_radial_vect.set(2) = gam_uu()(1,2) ;
102
103 get_radial_vect.set(3) = gam_uu()(1,3) ;
104
105 get_radial_vect = get_radial_vect / sqrt(gam_uu()(1,1)) ;
106
107 get_radial_vect.std_spectral_base() ;
108
109
110 return get_radial_vect ;
111
112}
113
114
115// Think of defining this as a pointer
117
118 Vector get_radial_vect (ff.get_mp(), CON, *(ff.get_triad()) ) ;
119
120 get_radial_vect.set(1) = (met_gamt.con())(1,1) ;
121
122 get_radial_vect.set(2) = (met_gamt.con())(1,2) ;
123
124 get_radial_vect.set(3) = (met_gamt.con())(1,3) ;
125
126 get_radial_vect = get_radial_vect / sqrt((met_gamt.con())(1,1)) ;
127
128 get_radial_vect.std_spectral_base() ;
129
130
131 return get_radial_vect ;
132
133}
134
135
137
139 .down(0, met_gamt), 0) ;
140
141 return tmp ;
142
143}
144
145
147
148 Scalar tmp = sqrt( gam_dd()(2,2) * gam_dd()(3,3) - gam_dd()(2,3)
149 * gam_dd()(2,3)) ;
150
151 tmp.std_spectral_base() ;
152
153 return tmp ;
154
155}
156
157double Isol_hor::area_hor() const {
158
159 Scalar integrand (darea_hor()) ;
160 integrand.raccord(1) ;
161
162 return mp.integrale_surface(integrand, radius + 1e-15) ;
163
164}
165
166
167double Isol_hor::radius_hor() const {
168
169 double resu = area_hor() / (4. * M_PI);
170
171 resu = pow(resu, 1./2.) ;
172
173 return resu ;
174
175}
176
177
179
180 // Vector \partial_phi
181 Vector phi (ff.get_mp(), CON, *(ff.get_triad()) ) ;
182
183 Scalar tmp (ff.get_mp() ) ;
184 tmp = 1 ;
185 tmp.std_spectral_base() ;
186 tmp.mult_rsint() ;
187
188 phi.set(1) = 0. ;
189 phi.set(2) = 0. ;
190 phi.set(3) = tmp ;
191
192 Scalar k_rphi = contract(contract( radial_vect_hor(), 0, k_dd(), 0), 0,
193 phi, 0) / (8. * M_PI) ;
194
195 Scalar integrand = k_rphi * darea_hor() ; // we correct with the curved
196 // element of area
197
198 double ang_mom = mp.integrale_surface(integrand, radius + 1e-15) ;
199
200 return ang_mom ;
201
202}
203
204
205// Mass (fundamental constants made 1)
206double Isol_hor::mass_hor()const {
207
208 double rr = radius_hor() ;
209
210 double tmp = sqrt( pow( rr, 4) + 4 * pow( ang_mom_hor(), 2) ) / ( 2 * rr ) ;
211
212 return tmp ;
213
214}
215
216
217// Surface gravity
218double Isol_hor::kappa_hor() const{
219
220 double rr = radius_hor() ;
221
222 double jj = ang_mom_hor() ;
223
224 double tmp = (pow( rr, 4) - 4 * pow( jj, 2)) / ( 2 * pow( rr, 3)
225 * sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ;
226
227 return tmp ;
228
229}
230
231
232// Orbital velocity
233double Isol_hor::omega_hor()const {
234
235 double rr = radius_hor() ;
236
237 double jj = ang_mom_hor() ;
238
239 double tmp = 2 * jj / ( rr * sqrt( pow( rr, 4) + 4 * pow( jj, 2) ) ) ;
240
241 return tmp ;
242
243}
244
245
246// ADM angular momentum
247
249
250 Scalar integrand = (k_dd()(1,3) - gam_dd()(1,3) * trk()) / (8. * M_PI) ;
251
252 integrand.mult_rsint() ; // in order to pass from the triad
253 // component to the coordinate basis
254
255 double tmp = mp.integrale_surface_infini(integrand) ;
256
257 return tmp ;
258
259}
260
261// Expansion
262
264
265 Scalar expa = contract(gam().radial_vect().derive_cov(gam()), 0,1)
266 + contract(contract(k_dd(), 0, gam().radial_vect(), 0),
267 0, gam().radial_vect(), 0) - trk() ;
268
269 return expa ;
270}
271}
Scalar expansion() const
Expansion of the outgoing null normal ( )
Definition phys_param.C:263
const Scalar darea_hor() const
Element of area of the horizon.
Definition phys_param.C:146
Metric met_gamt
3 metric tilde
Definition isol_hor.h:326
const Scalar b_tilde() const
Radial component of the shift with respect to the conformal metric.
Definition phys_param.C:136
double ang_mom_hor() const
Angular momentum (modulo)
Definition phys_param.C:178
double ang_mom_adm() const
ADM angular Momentum
Definition phys_param.C:248
double kappa_hor() const
Surface gravity
Definition phys_param.C:218
double radius
Radius of the horizon in LORENE's units.
Definition isol_hor.h:266
double mass_hor() const
Mass computed at the horizon
Definition phys_param.C:206
double radius_hor() const
Radius of the horizon.
Definition phys_param.C:167
const Vector tradial_vect_hor() const
Vector radial normal tilde.
Definition phys_param.C:116
Map_af & mp
Affine mapping.
Definition isol_hor.h:260
const Vector radial_vect_hor() const
Vector radial normal.
Definition phys_param.C:95
double area_hor() const
Area of the horizon.
Definition phys_param.C:157
double omega_hor() const
Orbital velocity
Definition phys_param.C:233
double integrale_surface_infini(const Cmp &ci) const
Performs the surface integration of ci at infinity.
double integrale_surface(const Cmp &ci, double rayon) const
Performs the surface integration of ci on the sphere of radius rayon .
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the metric is defined.
Definition metric.h:309
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Definition metric.C:290
virtual const Vector & radial_vect() const
Returns the radial vector normal to a spherical slicing and pointing toward spatial infinity.
Definition metric.C:362
const Map & get_mp() const
Returns the mapping.
Definition metric.h:202
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
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
void mult_rsint()
Multiplication by everywhere; dzpuis is not changed.
virtual const Sym_tensor & gam_dd() const
Induced metric (covariant components ) at the current time step (jtime )
virtual const Sym_tensor & k_dd() const
Extrinsic curvature tensor (covariant components ) at the current time step (jtime )
virtual const Sym_tensor & gam_uu() const
Induced metric (contravariant components ) at the current time step (jtime )
const Metric_flat & ff
Pointer on the flat metric with respect to which the conformal decomposition is performed.
Definition time_slice.h:507
virtual const Scalar & trk() const
Trace K of the extrinsic curvature at the current time step (jtime )
virtual const Vector & beta() const
shift vector at the current time step (jtime )
const Metric & gam() const
Induced metric at the current time step (jtime )
Tensor field of valence 1.
Definition vector.h:188
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
Definition vector.C:316
Scalar & set(int)
Read/write access to a component.
Definition vector.C:296
Cmp sqrt(const Cmp &)
Square root.
Definition cmp_math.C:220
Cmp pow(const Cmp &, int)
Power .
Definition cmp_math.C:348
Tensor down(int ind, const Metric &gam) const
Computes a new tensor by lowering an index of *this.
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Lorene prototypes.
Definition app_hor.h:64