29 #include "star_rot_diff_cfc.h" 32 #include "utilitaires.h" 44 double (*omega_frot_i)(
double,
const Tbl&),
45 double (*primfrot_i)(
double,
const Tbl&),
46 const Tbl& par_frot_i)
48 omega_frot(omega_frot_i),
70 omega_frot(star.omega_frot),
71 primfrot(star.primfrot),
72 par_frot(star.par_frot),
73 omega_field(star.omega_field),
74 omega_min(star.omega_min),
75 omega_max(star.omega_max),
76 prim_field(star.prim_field)
82 double (*omega_frot_i)(
double,
const Tbl&),
83 double (*primfrot_i)(
double,
const Tbl&) )
85 omega_frot(omega_frot_i),
166 ost <<
"Differentially rotating star" << endl ;
167 ost <<
"-----------------------------" << endl ;
169 ost << endl <<
"Parameters of Omega(F) : " << endl ;
172 ost <<
"Min, Max of Omega/(2pi) : " <<
omega_min / (2*M_PI) * f_unit
173 <<
" Hz, " <<
omega_max / (2*M_PI) * f_unit <<
" Hz" << endl ;
174 int lsurf =
nzet - 1;
177 ost <<
"Central, equatorial value of Omega: " 181 ost <<
"Central, equatorial value of Omega/(2 Pi): " 189 ost <<
"Max prop. bar. dens. : " << nbar_max
192 ost <<
"Max prop. ener. dens. (e_max) : " << ener_max
195 ost <<
"Max pressure : " << press_max
200 double len_rho = 1. /
sqrt( ggrav * ener_max ) ;
201 ost << endl <<
"Value of A = par_frot(1) in units of e_max^{1/2} : " <<
204 ost <<
"Value of A / r_eq : " <<
207 ost <<
"r_p/r_eq : " <<
aplat() << endl ;
208 ost <<
"KEH l^2 = (c/G^2)^{2/3} J^2 e_max^{1/3} M_B^{-10/3} : " <<
211 /
pow(ggrav, 1.3333333333333333) << endl ;
213 ost <<
"M e_max^{1/2} : " << ggrav *
mass_g() / len_rho << endl ;
215 ost <<
"r_eq e_max^{1/2} : " <<
ray_eq() / len_rho << endl ;
217 ost <<
"T/W : " <<
tsw() << endl ;
219 ost <<
"Omega_c / e_max^{1/2} : " <<
get_omega_c() * len_rho << endl ;
230 void Star_rot_diff_CFC::display_poly(ostream& ost)
const {
236 if (p_eos_poly != 0x0) {
238 double kappa = p_eos_poly->
get_kap() ;
241 double kap_ns2 =
pow( kappa, 0.5 /(p_eos_poly->
get_gam()-1) ) ;
244 double r_poly = kap_ns2 /
sqrt(ggrav) ;
247 double t_poly = r_poly ;
250 double m_poly = r_poly / ggrav ;
253 double j_poly = r_poly * r_poly / ggrav ;
256 double rho_poly = 1. / (ggrav * r_poly * r_poly) ;
259 ost << endl <<
"Quantities in polytropic units : " << endl ;
260 ost <<
"==============================" << endl ;
261 ost <<
" ( r_poly = " << r_poly / km <<
" km )" << endl ;
264 ost <<
" Omega_c : " <<
get_omega_c() * t_poly << endl ;
265 ost <<
" P_c : " << 2.*M_PI /
get_omega_c() / t_poly << endl ;
266 ost <<
" M_bar : " <<
mass_b() / m_poly << endl ;
267 ost <<
" M : " <<
mass_g() / m_poly << endl ;
268 ost <<
" J : " <<
angu_mom() / j_poly << endl ;
269 ost <<
" r_eq : " <<
ray_eq() / r_poly << endl ;
270 ost <<
" R_circ_eq : " <<
r_circ() / r_poly << endl ;
272 ost <<
" n_max : " <<
max(
max(
nbar ) ) / rho_poly << endl ;
273 ost <<
" e_max : " <<
max(
max(
ener ) ) / rho_poly << endl ;
274 ost <<
" P_min : " << 2.*M_PI /
omega_max / t_poly << endl ;
275 ost <<
" P_max : " << 2.*M_PI /
omega_min / t_poly << endl ;
277 int lsurf =
nzet - 1;
280 ost <<
" P_eq : " << 2.*M_PI /
315 double freq = omega_c / (2.*M_PI) ;
316 ost <<
"Central Omega : " << omega_c * f_unit
317 <<
" rad/s f : " << freq * f_unit <<
" Hz" << endl ;
318 ost <<
"Rotation period : " << 1000. / (freq * f_unit) <<
" ms" 320 ost << endl <<
"Central enthalpy : " <<
ent.
val_grid_point(0,0,0,0) <<
" c^2" << endl ;
322 <<
" x 0.1 fm^-3" << endl ;
324 <<
" rho_nuc c^2" << endl ;
326 <<
" rho_nuc c^2" << endl ;
328 ost <<
"Central value of log(N) : " 333 double nphi_c =
beta(3).val_grid_point(0, 0, 0, 0) ;
334 if ( (omega_c==0) && (nphi_c==0) ) {
335 ost <<
"Central azimuthal shift : " << nphi_c << endl ;
338 ost <<
"Central azimuthal shift /Omega : " << nphi_c / omega_c
343 int lsurf =
nzet - 1;
346 ost <<
"Equatorial value of the velocity U: " 347 <<
u_euler(3).val_grid_point(
nzet-1, 0, nt-1, nr-1) <<
" c" << endl ;
350 <<
"Coordinate equatorial radius r_eq = " 351 <<
ray_eq()/km <<
" km" << endl ;
352 ost <<
"Flattening r_pole/r_eq : " <<
aplat() << endl ;
void operator=(const Star_rot_diff_CFC &)
Assignment to another Star_rot_diff.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Map & mp
Mapping associated with the star.
Cmp sqrt(const Cmp &)
Square root.
double omega_min
Minimum value of .
Scalar psi
Conformal factor .
const Eos & eos
Equation of state of the stellar matter.
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.
Tensor field of valence 0 (or component of a tensorial field).
Scalar omega_field
Field .
virtual double angu_mom() const
Angular momentum.
Base class for coordinate mappings.
virtual double r_circ() const
Circumferential equatorial radius.
void operator=(const Star_rot_CFC &)
Assignment to another Star_rot_CFC.
Class for differentially rotating stars in Conformal Flatness Condition and maximal slicing...
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Scalar nbar
Baryon density in the fluid frame.
double get_gam() const
Returns the adiabatic index (cf. Eq. (3))
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
virtual ~Star_rot_diff_CFC()
Destructor.
int nzet
Number of domains of *mp occupied by the star.
Class for relativistic rotating stars in Conformal Flatness Condition and maximal slicing...
virtual void sauve(FILE *) const
Save in a file.
double prim_funct_omega(double F) const
Evaluates the primitive of .
Scalar ener
Total energy density in the fluid frame.
virtual double aplat() const
Flattening r_pole/r_eq.
double omega
Rotation angular velocity ([f_unit] )
Scalar press
Fluid pressure.
double get_kap() const
Returns the pressure coefficient (cf.
virtual void sauve(FILE *) const
Save in a file.
Polytropic equation of state (relativistic case).
Tbl par_frot
Parameters of the function .
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
virtual double mass_b() const
Baryonic mass.
Vector u_euler
Fluid 3-velocity with respect to the Eulerian observer.
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 .
Scalar logn
Logarithm of the lapse N .
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 partial_display(ostream &) const
Printing of some informations, excluding all global quantities.
double(* omega_frot)(double, const Tbl &)
Function defining the rotation profile.
double(* primfrot)(double, const Tbl &)
Primitive of the function , which vanishes at the stellar center.
Scalar nn
Lapse function N .
double omega_max
Maximum value of .
Star_rot_diff_CFC(Map &mp_i, int nzet_i, const Eos &eos_i, int relat_i, int filter, double(*omega_frot_i)(double, const Tbl &), double(*primfrot_i)(double, const Tbl &), const Tbl &par_frot_i)
Standard constructor.
double ray_eq() const
Coordinate radius at , [r_unit].
virtual double get_omega_c() const
Returns the central value of the rotation angular velocity ([f_unit] )
void sauve(FILE *) const
Save in a file.
virtual void sauve(FILE *) const
Save in a file.
virtual double tsw() const
Ratio T/W.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
double omega_funct(double F) const
Evaluates , where F is linked to the components of the fluid 4-velocity by .
void fait_prim_field()
Computes the member prim_field from omega_field .
virtual double mass_g() const
Gravitational mass.