28char star_rot_dirac_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Star/star_rot_dirac.C,v 1.10 2014/10/13 08:53:39 j_novak Exp $" ;
81#include "star_rot_dirac.h"
83#include "utilitaires.h"
94 :
Star(mpi, nzet_i, eos_i),
125 taa.set_etat_zero() ;
165 :
Star(mpi, eos_i, fich),
188 Vector shift_tmp(mpi, mpi.get_bvect_spher(), fich) ;
249 v2.set_etat_nondef() ;
321 ost <<
"Rotating star in Dirac gauge" << endl ;
325 ost <<
"Uniformly rotating star" << endl ;
326 ost <<
"-----------------------" << endl ;
328 ost <<
"hydro sources of equations are filtered\n"
331 double freq =
omega/ (2.*M_PI) ;
332 ost <<
"Omega : " <<
omega * f_unit
333 <<
" rad/s f : " << freq * f_unit <<
" Hz" << endl ;
334 ost <<
"Rotation period : " << 1000. / (freq * f_unit) <<
" ms"
337 ost <<
"Error on the virial identity GRV2 : " << endl ;
338 ost <<
"GRV2 = " <<
grv2() << endl ;
339 ost <<
"Error on the virial identity GRV3 : " << endl ;
340 ost <<
"GRV3 = " <<
grv3() << endl ;
342 ost <<
"Angular momentum J : "
343 <<
angu_mom()/( qpig / (4*M_PI) *msol*msol) <<
" G M_sol^2 / c"
345 ost <<
"c J / (G M^2) : "
350 double mom_iner_38si = mom_iner * rho_unit * (
pow(r_unit,
double(5.))
352 ost <<
"Moment of inertia: " << mom_iner_38si <<
" 10^38 kg m^2"
356 ost <<
"Ratio T/W : " <<
tsw() << endl ;
357 ost <<
"Circumferential equatorial radius R_circ : "
358 <<
r_circ()/km <<
" km" << endl ;
359 if (
mp.get_mg()->get_np(0) == 1)
360 ost <<
"Circumferential polar radius Rp_circ : "
361 <<
rp_circ()/km <<
" km" << endl ;
362 ost <<
"Coordinate equatorial radius r_eq : " <<
ray_eq()/km <<
" km"
364 ost <<
"Flattening r_pole/r_eq : " <<
aplat() << endl ;
365 if (
mp.get_mg()->get_np(0) == 1)
366 ost <<
"Ellipticity sqrt(1-(Rp_circ/R_circ)^2) : " <<
ellipt() << endl ;
369 ost <<
"Compaction parameter M_g / R_circ : " << compact << endl ;
Equation of state base class.
virtual double mass_g() const
Gravitational mass.
virtual double ellipt() const
Ellipticity e.
virtual double grv3() const
Error on the virial identity GRV3.
Star_rot_Dirac(Map &mp_i, int nzet_i, const Eos &eos_i, int filter=0)
Standard constructor.
Sym_tensor_trans hh
is defined by .
virtual double angu_mom() const
Angular momentum.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
virtual void del_deriv() const
Deletes all the derived quantities.
double * p_grv3
Error on the virial identity GRV3.
virtual double r_circ() const
Circumferential equatorial radius.
int spectral_filter
Spectral exponential filtering order.
double omega
Rotation angular velocity ([f_unit] ).
double * p_r_circ
Circumferential equatorial radius.
virtual double tsw() const
Ratio T/W.
Vector j_euler
Momentum density 3-vector with respect to the Eulerian observer.
const Metric_flat & flat
flat metric (spherical components)
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
virtual void sauve(FILE *) const
Save in a file.
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
virtual double rp_circ() const
Circumferential polar radius.
void update_metric()
Computes metric quantities from known potentials.
Scalar psi4
Conformal factor .
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
double * p_grv2
Error on the virial identity GRV2.
virtual ~Star_rot_Dirac()
Destructor.
double * p_angu_mom
Angular momentum.
double * p_rp_circ
Circumferential polar radius.
virtual double aplat() const
Flattening r_pole/r_eq.
void operator=(const Star_rot_Dirac &)
Assignment to another Star_rot_Dirac.
virtual double grv2() const
Error on the virial identity GRV2.
Star(Map &mp_i, int nzet_i, const Eos &eos_i)
Standard constructor.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
virtual void del_deriv() const
Deletes all the derived quantities.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
double ray_eq() const
Coordinate radius at , [r_unit].
virtual void sauve(FILE *) const
Save in a file.
Map & mp
Mapping associated with the star.
void operator=(const Star &)
Assignment to another Star.
Tensor field of valence 1.
Cmp pow(const Cmp &, int)
Power .
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
const Metric_flat & flat_met_spher() const
Returns the flat metric associated with the spherical coordinates and with components expressed in th...
Standard units of space, time and mass.