114 #include "et_rot_bifluid.h" 128 dens1.std_base_scal() ;
130 p_mass_b1 =
new double( dens1.integrale() ) ;
144 dens2.std_base_scal() ;
146 p_mass_b2 =
new double( dens2.integrale() ) ;
184 p_mass_g =
new double( source().integrale() ) ;
308 double Et_rot_bifluid::coupling_mominert_2()
const {
319 dens.std_base_scal() ;
321 dens.std_base_scal() ;
323 dens.std_base_scal() ;
334 double Et_rot_bifluid::coupling_entr()
const {
343 dens.std_base_scal() ;
345 dens.std_base_scal() ;
347 dens.std_base_scal() ;
357 double Et_rot_bifluid::coupling_LT_1()
const {
364 mu_1.set_std_base() ;
368 dens.std_base_scal() ;
370 dens.std_base_scal() ;
372 dens.std_base_scal() ;
383 double Et_rot_bifluid::coupling_LT_2()
const {
390 mu_2.set_std_base() ;
394 dens.std_base_scal() ;
396 dens.std_base_scal() ;
398 dens.std_base_scal() ;
456 Cmp aa = alpha() - 0.5 * beta() ;
462 cout <<
"Et_rot_bifluid::grv3: the mapping does not belong" 463 <<
" to the class Map_radial !" << endl ;
470 vdaadt = vdaadt.
ssint() ;
483 vtemp = (mpr->
xsr) * vtemp ;
491 source =
bbb() * source() + 0.5 * temp ;
500 double int_grav = source().integrale() ;
510 double int_mat = source().integrale() ;
515 *ost <<
"Et_rot_bifluid::grv3 : gravitational term : " << int_grav
517 *ost <<
"Et_rot_bifluid::grv3 : matter term : " << int_mat
521 p_grv3 =
new double( (int_grav + int_mat) / int_mat ) ;
542 int i_b = mg->
get_nr(l_b) - 1 ;
543 int j_b = mg->
get_nt(l_b) - 1 ;
586 assert(mp_rad != 0x0) ;
593 for (
int k=0; k<np; k++) {
594 for (
int j=0; j<nt; j++) {
595 int l_star2 = lsurf2(k, j) ;
596 double xi_star2 = xisurf2(k, j) ;
598 va_r.set(0, k, j, 0) = mp_rad->
val_r_jk(l_star2, xi_star2, j, k) ;
601 va_r.std_base_scal() ;
605 integ =
sqrt(va_r*va_r + dr*dr) ;
610 for (
int k=0; k<np; k++) {
611 for (
int j=0; j<nt; j++) {
612 integ.set(0, k, j, 0) *=
sqrt(a2.
val_point_jk(lsurf2(k, j), xisurf2(k, j), j, k))
613 * b.
val_point_jk(lsurf2(k, j), xisurf2(k, j), j, k) * va_r(0, k, j, 0) ;
616 integ.std_base_scal() ;
618 double surftot = 0. ;
619 for (
int j=0; j<nt; j++) {
620 surftot += (*integ2.
c_cf)(0, 0, j, 0) / double(2*j+1) ;
623 p_area2 =
new double( 4*M_PI*surftot) ;
712 Cmp& csource = source.
set() ;
724 assert( dynamic_cast<const Map_radial*>(&
mp) != 0x0 ) ;
734 source = 0.5 * source() - 1.5 * temp ;
765 double precis = 1.e-15 ;
766 int nitermax = 10000000 ;
772 surf = -0.2*
nbar()(0,0,0,0) ;
775 surf = prolonge_c1(surf,
nzet) ;
798 double precis = 1.e-15 ;
799 int nitermax = 10000000 ;
805 surf2 = -0.2*
nbar2()(0,0,0,0) ;
808 surf2 = prolonge_c1(surf2,
nzet) ;
846 if ( type_t == SYM ) {
852 double theta = M_PI / 2 ;
859 cout <<
"Et_rot_bifluid::ray_eq2 : the case type_t = " << type_t
860 <<
" is not contemplated yet !" << endl ;
882 if ( type_t == SYM ) {
885 double theta = M_PI / 2 ;
886 double phi = M_PI / 2 ;
899 assert( np % 4 == 0 ) ;
908 cout <<
"Et_rot_bifluid::ray_eq2_pis2 : the case type_p = " 909 << type_p <<
" is not contemplated yet !" << endl ;
916 cout <<
"Et_rot_bifluid::ray_eq2_pis2 : the case type_t = " << type_t
917 <<
" is not contemplated yet !" << endl ;
939 if ( type_t == SYM ) {
953 double theta = M_PI / 2 ;
962 cout <<
"Et_rot_bifluid::ray_eq2_pi : the case type_t = " << type_t
963 <<
" and type_p = " << type_p << endl ;
964 cout <<
" is not contemplated yet !" << endl ;
981 assert( ((
mp.
get_mg())->get_type_t() == SYM)
982 || ((
mp.
get_mg())->get_type_t() == NONSYM) ) ;
int get_type_p() const
Returns the type of sampling in the direction: SYM : : symmetry with respect to the transformatio...
const Cmp & dsdr() const
Returns of *this .
double get_m2() const
Return the individual particule mass .
double * p_mass_b2
Baryon mass of fluid 2.
double * p_mom_quad_old
Part of the quadrupole moment.
const Valeur & dsdt() const
Returns of *this.
Cmp log(const Cmp &)
Neperian logarithm.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
double * p_mom_quad_Bo
Part of the quadrupole moment.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Cmp exp(const Cmp &)
Exponential.
virtual double mass_g() const
Gravitational mass.
Tenseur tnphi
Component of the shift vector.
const Tenseur & get_a_car() const
Returns the total conformal factor .
Tenseur j_euler2
To compute .
const Tenseur & gradient_spher() const
Returns the gradient of *this (Spherical coordinates) (scalar field only).
Tenseur j_euler1
To compute .
virtual double mass_b() const
Total Baryon mass.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Cmp sqrt(const Cmp &)
Square root.
double mass_b1() const
Baryon mass of fluid 1.
void annule(int l)
Sets the Cmp to zero in a given domain.
void set_std_base()
Set the standard spectal basis of decomposition for each component.
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
double * p_r_circ2
Circumferential radius of fluid no.2.
Tbl * p_xi_surf2
Description of the surface of fluid 2: 2-D Tbl containing the values of the radial coordinate on the...
Standard units of space, time and mass.
void annule_hard()
Sets the Valeur to zero in a hard way.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
int get_etat() const
Returns the logical state.
Tenseur nnn
Total lapse function.
Tenseur nphi
Metric coefficient .
Tenseur s_euler
Trace of the stress tensor in the Eulerian frame.
double * p_angu_mom_1
Angular momentum of fluid 1.
Tenseur flat_scalar_prod(const Tenseur &t1, const Tenseur &t2)
Scalar product of two Tenseur when the metric is : performs the contraction of the last index of t1 w...
double * p_mom_quad
Quadrupole moment.
const Cmp & srdsdt() const
Returns of *this .
Tenseur b_car
Square of the metric factor B.
int get_type_t() const
Returns the type of sampling in the direction: SYM : : symmetry with respect to the equatorial pl...
Basic integer array class.
const Valeur & sx() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR ) ...
double unsurc2
: unsurc2=1 for a relativistic star, 0 for a Newtonian one.
Values and coefficients of a (real-value) function.
double * p_ray_eq2
Coordinate radius at , .
Tenseur press
Fluid pressure.
virtual double mom_quad_Bo() const
Part of the quadrupole moment.
const Itbl & l_surf2() const
Description of the surface of fluid 2: returns a 2-D Itbl containing the values of the domain index ...
void std_base_scal()
Sets the bases for spectral expansions (member base ) to the standard ones for a scalar.
Tenseur j_euler
Total angular momentum (flat-space!) 3-vector , which is related to of the "3+1" decomposition...
void mult_r()
Multiplication by r everywhere.
double * p_mass_b1
Baryon mass of fluid 1.
virtual double val_r(int l, double xi, double theta, double pphi) const =0
Returns the value of the radial coordinate r for a given in a given domain.
Tenseur gam_euler2
Lorentz factor between the fluid 2 and Eulerian observers.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
double * p_grv3
Error on the virial identity GRV3.
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
double ray_eq2_pi() const
Coordinate radius for fluid 2 at , [r_unit].
const Eos_bifluid & eos
Equation of state for two-fluids model.
const Valeur & ssint() const
Returns of *this.
Tenseur nbar
Baryon density in the fluid frame.
const Mg3d * get_angu() const
Returns the pointer on the associated angular grid.
double * p_coupling_mominert_1
Quantities used to describe the different couplings between the fluids.
Tenseur gam_euler
Lorentz factor between the fluid and Eulerian observers.
virtual double grv3(ostream *ost=0x0) const
Error on the virial identity GRV3.
double * p_coupling_mominert_2
Base class for pure radial mappings.
virtual double angu_mom_2() const
Angular momentum of fluid 2.
void mult_rsint()
Multiplication by .
Map & mp
Mapping associated with the star.
double * p_area2
Surface area of fluid no.2.
const Valeur & mult_st() const
Returns applied to *this.
virtual double val_r_jk(int l, double xi, int j, int k) const =0
Returns the value of the radial coordinate r for a given and a given collocation point in in a give...
double integrale() const
Computes the integral over all space of *this .
Tbl * p_xi_surf
Description of the stellar surface: 2-D Tbl containing the values of the radial coordinate on the su...
const Tbl & xi_surf2() const
Description of the surface of fluid 2: returns a 2-D Tbl containing the values of the radial coordin...
double ray_eq2_pis2() const
Coordinate radius for fluid 2 at , [r_unit].
int get_etat() const
Returns the logical state.
static double lambda_grv2(const Cmp &sou_m, const Cmp &sou_q)
Computes the coefficient which ensures that the GRV2 virial identity is satisfied.
Tenseur enerps_euler
the combination : useful because in the Newtonian limit .
double val_point_jk(int l, double x, int j, int k) const
Computes the value of the field represented by *this at an arbitrary point in , but collocation point...
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain...
Tenseur bbb
Metric factor B.
double * p_ray_eq2_pi
Coordinate radius at , .
Cmp pow(const Cmp &, int)
Power .
virtual const Itbl & l_surf() const
Description of the surface of fluid 1: returns a 2-D Itbl containing the values of the domain index ...
virtual double mom_quad_old() const
Part of the quadrupole moment.
virtual double grv2() const
Error on the virial identity GRV2.
void inc2_dzpuis()
Increases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
double * p_mass_g
Gravitational mass.
virtual double mean_radius2() const
Mean radius for fluid 2.
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
int nzet
Number of domains of *mp occupied by the star.
double ray_pole2() const
Coordinate radius for fluid 2 at [r_unit].
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
virtual double angu_mom_1() const
Angular momentum of fluid 1.
Tenseur a_car
Total conformal factor .
double * p_angu_mom_2
Angular momentum of fluid 2.
Tenseur ent2
Log-enthalpy for the second fluid.
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one. ...
Tenseur sphph_euler
The component of the stress tensor .
virtual double mom_quad() const
Quadrupole moment.
int get_dzpuis() const
Returns dzpuis.
double * p_ray_eq2_pis2
Coordinate radius at , .
double * p_ray_pole2
Coordinate radius at .
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case)
virtual double r_circ2() const
Circumferential radius for fluid 2.
Tenseur nbar2
Baryon density in the fluid frame, for fluid 2.
bool check_dzpuis(int dzi) const
Returns false if the last domain is compactified and *this is not zero in this domain and dzpuis is n...
const Valeur & mult_ct() const
Returns applied to *this.
Tenseur & logn
Metric potential = logn_auto.
void set_dzpuis(int)
Set a value to dzpuis.
virtual double coupling_mominert_1() const
Quantities used to study the different fluid couplings: , and .
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
virtual double angu_mom() const
Angular momentum.
double mass_b2() const
Baryon mass of fluid 2.
double * p_grv2
Error on the virial identity GRV2.
const Tenseur & get_bbb() const
Returns the metric factor B.
Tenseur alpha_eos
Coefficient relative to entrainment effects.
Tenseur delta_car
The "relative velocity" (squared) of the two fluids.
double ray_eq2() const
Coordinate radius for fluid 2 at , [r_unit].
Tenseur & dzeta
Metric potential = beta_auto.
virtual double aplat2() const
Flatening r_pole/r_eq for fluid 2.
double * p_aplat2
Flatening r_pole/r_eq of fluid no.2.
Valeur va
The numerical value of the Cmp.
double * p_mass_b
Baryon mass.
double get_m1() const
Return the individual particule mass .
virtual double area2() const
Surface area for fluid 2.
Tensor handling *** DEPRECATED : use class Tensor instead ***.
double * p_angu_mom
Angular momentum.
Itbl * p_l_surf2
Description of the surface of fluid 2: 2-D Itbl containing the values of the domain index l on the su...
Itbl * p_l_surf
Description of the stellar surface: 2-D Itbl containing the values of the domain index l on the surfa...