72 #include "et_rot_diff.h" 75 #include "utilitaires.h" 86 double (*frot_i)(
double,
const Tbl&),
87 double (*primfrot_i)(
double,
const Tbl&),
88 const Tbl& par_frot_i)
113 primfrot(et.primfrot),
114 par_frot(et.par_frot),
115 omega_field(et.omega_field),
116 omega_min(et.omega_min),
117 omega_max(et.omega_max),
118 prim_field(et.prim_field)
125 double (*frot_i)(
double,
const Tbl&),
126 double (*primfrot_i)(
double,
const Tbl&) )
129 primfrot(primfrot_i),
206 ost <<
"Differentially rotating star" << endl ;
207 ost <<
"-----------------------------" << endl ;
209 ost << endl <<
"Parameters of F(Omega) : " << endl ;
212 ost <<
"Min, Max of Omega/(2pi) : " <<
omega_min / (2*M_PI) * f_unit
213 <<
" Hz, " <<
omega_max / (2*M_PI) * f_unit <<
" Hz" << endl ;
214 int lsurf =
nzet - 1;
217 ost <<
"Central, equatorial value of Omega: " 218 <<
omega_field()(0, 0, 0, 0) * f_unit <<
" rad/s, " 221 ost <<
"Central, equatorial value of Omega/(2 Pi): " 222 <<
omega_field()(0, 0, 0, 0) * f_unit / (2*M_PI) <<
" Hz, " 229 ost <<
"Max prop. bar. dens. : " << nbar_max
230 <<
" x 0.1 fm^-3 = " << nbar_max /
nbar()(0, 0, 0, 0) <<
" central" 232 ost <<
"Max prop. ener. dens. (e_max) : " << ener_max
233 <<
" rho_nuc c^2 = " << ener_max /
ener()(0, 0, 0, 0) <<
" central" 235 ost <<
"Max pressure : " << press_max
236 <<
" rho_nuc c^2 = " << press_max /
press()(0, 0, 0, 0) <<
" central" 240 double len_rho = 1. /
sqrt( ggrav * ener_max ) ;
241 ost << endl <<
"Value of A = par_frot(1) in units of e_max^{1/2} : " <<
244 ost <<
"Value of A / r_eq : " <<
247 ost <<
"r_p/r_eq : " <<
aplat() << endl ;
248 ost <<
"KEH l^2 = (c/G^2)^{2/3} J^2 e_max^{1/3} M_B^{-10/3} : " <<
251 /
pow(ggrav, 1.3333333333333333) << endl ;
253 ost <<
"M e_max^{1/2} : " << ggrav *
mass_g() / len_rho << endl ;
255 ost <<
"r_eq e_max^{1/2} : " <<
ray_eq() / len_rho << endl ;
257 ost <<
"T/W : " <<
tsw() << endl ;
259 ost <<
"Omega_c / e_max^{1/2} : " <<
get_omega_c() * len_rho << endl ;
279 if (p_eos_poly != 0x0) {
281 double kappa = p_eos_poly->
get_kap() ;
282 double gamma = p_eos_poly->
get_gam() ; ;
285 double kap_ns2 =
pow( kappa, 0.5 /(gamma-1) ) ;
288 double r_poly = kap_ns2 /
sqrt(ggrav) ;
291 double t_poly = r_poly ;
294 double rho_poly = 1. / (ggrav * r_poly * r_poly) ;
297 ost <<
" n_max : " <<
max(
max(
nbar() ) ) / rho_poly << endl ;
298 ost <<
" e_max : " <<
max(
max(
ener() ) ) / rho_poly << endl ;
299 ost <<
" P_min : " << 2.*M_PI /
omega_max / t_poly << endl ;
300 ost <<
" P_max : " << 2.*M_PI /
omega_min / t_poly << endl ;
302 int lsurf =
nzet - 1;
305 ost <<
" P_eq : " << 2.*M_PI /
Et_rot_diff(Map &mp_i, int nzet_i, bool relat, const Eos &eos_i, double(*frot_i)(double, const Tbl &), double(*primfrot_i)(double, const Tbl &), const Tbl &par_frot_i)
Standard constructor.
void operator=(const Et_rot_diff &)
Assignment to another Et_rot_diff.
Tenseur prim_field
Field .
double prim_funct_omega(double omeg) const
Evaluates the primitive of , where F is the function defining the rotation profile.
Cmp sqrt(const Cmp &)
Square root.
virtual void display_poly(ostream &) const
Display in polytropic units.
double(* frot)(double, const Tbl &)
Function defining the rotation profile.
Standard units of space, time and mass.
Equation of state base class.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
double ray_eq() const
Coordinate radius at , [r_unit].
Base class for coordinate mappings.
Class for isolated rotating stars *** DEPRECATED : use class Star_rot instead ***.
double(* primfrot)(double, const Tbl &)
Primitive of the function , which vanishes at the stellar center.
void operator=(const Etoile_rot &)
Assignment to another Etoile_rot.
Tenseur press
Fluid pressure.
double funct_omega(double omeg) const
Evaluates , where F is the function defining the rotation profile.
double omega_max
Maximum value of .
double get_gam() const
Returns the adiabatic index (cf. Eq. (3))
Class for differentially rotating stars.
void fait_prim_field()
Computes the member prim_field from omega_field .
virtual void display_poly(ostream &) const
Display in polytropic units.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
virtual double angu_mom() const
Angular momentum.
void sauve(FILE *) const
Save in a file.
double get_kap() const
Returns the pressure coefficient (cf.
Tenseur nbar
Baryon density in the fluid frame.
virtual void sauve(FILE *) const
Save in a file.
Tbl par_frot
Parameters of the function .
virtual double mass_b() const
Baryon mass.
Polytropic equation of state (relativistic case).
Map & mp
Mapping associated with the star.
const Eos & eos
Equation of state of the stellar matter.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
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.
Cmp pow(const Cmp &, int)
Power .
double omega
Rotation angular velocity ([f_unit] )
int nzet
Number of domains of *mp occupied by the star.
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 get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
virtual void sauve(FILE *) const
Save in a file.
Tenseur ener
Total energy density in the fluid frame.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
void sauve(FILE *) const
Save in a file.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
double omega_min
Minimum value of .
virtual double mass_g() const
Gravitational mass.
virtual double get_omega_c() const
Returns the central value of the rotation angular velocity ([f_unit] )
virtual ~Et_rot_diff()
Destructor.
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Tenseur omega_field
Field .
virtual double aplat() const
Flatening r_pole/r_eq.
virtual double tsw() const
Ratio T/W.