LORENE
strot_dirac_diff_hydro.C
1/*
2 * Function Star_rot_Dirac_diff::hydro_euler
3 *
4 * (see file star_rot_dirac.h for documentation).
5 *
6 */
7
8/*
9 * Copyright (c) 2005 Motoyuki Saijo
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 strot_dirac_diff_hydro_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_diff_hydro.C,v 1.3 2014/10/13 08:53:40 j_novak Exp $" ;
29
30/*
31 * $Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_diff_hydro.C,v 1.3 2014/10/13 08:53:40 j_novak Exp $
32 *
33 */
34
35
36// C headers
37#include <cmath>
38#include <cassert>
39
40// Lorene headers
41#include"star_rot_dirac_diff.h"
42
43namespace Lorene {
45
46 // u_euler (fluid 3-velocity w.r.t. the Eulerian frame)
47 // -----------------------------------------------------
48
49
52
56 u_euler.set(3) += beta(3) ;
57
58 u_euler = u_euler / nn ;
59
60 // v2 (square of the norm of u_euler)
61 // ----------------------------------
62
63 v2 = contract(contract(gamma.cov(), 0, u_euler, 0), 0, u_euler, 0) ;
64
65
66 // gam_euler (Lorentz factor between the fluid and Eulerian observers)
67 // -------------------------------------------------------------------
68
69 gam_euler = 1. / sqrt(1. - v2) ;
70
72
73
74 // ener_euler (energy density w.r.t. the Eulerian observer)
75 // ------------------------------------------------------
76
78
80
81
82 // j_euler (momentum density 3-vector w.r.t. the Eulerian observer)
83 // ----------------------------------------------------------------
84
86
88
89
90 // s_euler (trace of the stress tensor w.r.t. the Eulerian observer)
91 // ----------------------------------------------------------------
92
93 s_euler = (ener_euler + press)*v2 + 3*press ;
94
96
97
98 // stress_euler (stress tensor w.r.t. the Eulerian observer)
99 // ---------------------------------------------------------
100
101
103
105
106
107 // The derived quantities are obsolete
108 // ------------------------------------
109
110 del_deriv() ;
111
112
113}
114}
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Definition metric.C:290
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
Definition metric.C:280
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
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Definition scalar.C:324
void mult_rsint()
Multiplication by everywhere; dzpuis is not changed.
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
virtual void del_deriv() const
Deletes all the derived quantities.
Vector j_euler
Momentum density 3-vector with respect to the Eulerian observer.
Scalar ener
Total energy density in the fluid frame.
Definition star.h:193
Scalar nn
Lapse function N .
Definition star.h:225
Scalar ener_euler
Total energy density in the Eulerian frame.
Definition star.h:198
Scalar gam_euler
Lorentz factor between the fluid and Eulerian observers.
Definition star.h:204
Scalar s_euler
Trace of the stress scalar in the Eulerian frame.
Definition star.h:201
Metric gamma
3-metric
Definition star.h:235
Sym_tensor stress_euler
Spatial part of the stress-energy tensor with respect to the Eulerian observer.
Definition star.h:212
Scalar press
Fluid pressure.
Definition star.h:194
Vector u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Definition star.h:207
Vector beta
Shift vector.
Definition star.h:228
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
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
Definition tensor.C:926
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Lorene prototypes.
Definition app_hor.h:64