LORENE
strot_cfc_hydro.C
1 /*
2  * Function Star_rot_CFC::hydro_euler
3  *
4  * (see file star_rot_cfc.h for documentation).
5  *
6  */
7 
8 /*
9  * Copyright (c) 2005 Lap-Ming Lin & Jerome Novak
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 
29 // Lorene headers
30 #include"star_rot_cfc.h"
31 
32 namespace Lorene {
34 
35  // u_euler (fluid 3-velocity w.r.t. the Eulerian frame)
36  // -----------------------------------------------------
37 
38 
41 
42  u_euler.set(3) = omega ;
44  u_euler.set(3).mult_rsint() ;
45  u_euler.set(3) += beta(3) ;
46 
47  u_euler = u_euler / nn ;
48 
49  // v2 (square of the norm of u_euler)
50  // ----------------------------------
51 
52  v2 = contract(contract(gamma.cov(), 0, u_euler, 0), 0, u_euler, 0) ;
53 
54 
55  // gam_euler (Lorentz factor between the fluid and Eulerian observers)
56  // -------------------------------------------------------------------
57 
58  gam_euler = 1. / sqrt(1. - v2) ;
59 
61 
62 
63  // ener_euler (energy density w.r.t. the Eulerian observer)
64  // ------------------------------------------------------
65 
67 
69  if (spectral_filter > 0) {
71  }
72  // j_euler (momentum density 3-vector w.r.t. the Eulerian observer)
73  // ----------------------------------------------------------------
74 
77 
78  if (spectral_filter > 0) {
80  }
81 
82  // s_euler (trace of the stress tensor w.r.t. the Eulerian observer)
83  // ----------------------------------------------------------------
84 
85  s_euler = (ener_euler + press)*v2 + 3*press ;
87  if (spectral_filter > 0) {
89  }
90  // stress_euler (stress tensor w.r.t. the Eulerian observer)
91  // ---------------------------------------------------------
92 
93 
96  if (spectral_filter > 0) {
98  }
99 
100  // The derived quantities are obsolete
101  // ------------------------------------
102 
103  del_deriv() ;
104 
105  } // End of Star_rot_CFC:hydro_euler()
106 
107 } // End of namespace LORENE
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Definition: metric.C:293
Cmp sqrt(const Cmp &)
Square root.
Definition: cmp_math.C:223
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Definition: scalar.C:330
Metric gamma
3-metric
Definition: star.h:235
virtual void exponential_filter_r(int lzmin, int lzmax, int p, double alpha=-16.)
Applies exponential filters to all components (see Scalar::exponential_filter_r ).
Definition: sym_tensor.C:449
Lorene prototypes.
Definition: app_hor.h:67
Sym_tensor stress_euler
Spatial part of the stress-energy tensor with respect to the Eulerian observer.
Definition: star.h:212
virtual void del_deriv() const
Deletes all the derived quantities.
Definition: star_rot_cfc.C:164
int spectral_filter
Spectral exponential filtering order.
Definition: star_rot_cfc.h:58
virtual void exponential_filter_r(int lzmin, int lzmax, int p, double alpha=-16.)
Applies an exponential filter to the spectral coefficients in the radial direction.
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
Definition: scalar.C:790
Scalar s_euler
Trace of the stress scalar in the Eulerian frame.
Definition: star.h:201
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:322
int nzet
Number of domains of *mp occupied by the star.
Definition: star.h:183
virtual void exponential_filter_r(int lzmin, int lzmax, int p, double alpha=-16.)
Applies exponential filters to all components (see Scalar::exponential_filter_r ).
Definition: vector.C:856
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
Scalar gam_euler
Lorentz factor between the fluid and Eulerian observers.
Definition: star.h:204
Scalar ener
Total energy density in the fluid frame.
Definition: star.h:193
double omega
Rotation angular velocity ([f_unit] )
Definition: star_rot_cfc.h:60
Scalar press
Fluid pressure.
Definition: star.h:194
Vector u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Definition: star.h:207
void mult_rsint()
Multiplication by everywhere; dzpuis is not changed.
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
Definition: metric.C:283
Scalar nn
Lapse function N .
Definition: star.h:225
Scalar & set(int)
Read/write access to a component.
Definition: vector.C:302
Vector j_euler
Momentum density 3-vector with respect to the Eulerian observer.
Definition: star_rot_cfc.h:75
Scalar ener_euler
Total energy density in the Eulerian frame.
Definition: star.h:198
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
Definition: tensor.C:935