30char etoile_bin_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Etoile/etoile_bin.C,v 1.13 2014/10/13 08:52:58 j_novak Exp $" ;
199Cmp raccord_c1(
const Cmp& uu,
int l1) ;
208 bool irrot,
const Base_vect& ref_triad_i)
209 :
Etoile(mpi, nzet_i, relat, eos_i),
264 for (
int i=0; i<3; i++) {
283 for (
int i=0; i<3; i++) {
331 :
Etoile(mpi, eos_i, fich),
385 Tenseur w_shift_file(
mp,
mp.get_bvect_cart(), fich) ;
393 Cmp ssjm1_logn_file(
mp, *(
mp.get_mg()), fich) ;
396 Cmp ssjm1_beta_file(
mp, *(
mp.get_mg()), fich) ;
399 Cmp ssjm1_khi_file(
mp, *(
mp.get_mg()), fich) ;
402 Tenseur ssjm1_wshift_file(
mp,
mp.get_bvect_cart(), fich) ;
589 ost <<
"Star in a binary system" << endl ;
590 ost <<
"-----------------------" << endl ;
593 ost <<
"irrotational configuration" << endl ;
596 ost <<
"corotating configuration" << endl ;
599 ost <<
"Absolute abscidia of the stellar center: " <<
600 mp.get_ori_x() / km <<
" km" << endl ;
602 ost <<
"Absolute abscidia of the barycenter of the baryon density : " <<
606 double d_ns = fabs(
mp.get_ori_x() ) +
ray_eq_pi() - r_0 ;
607 double d_tilde = 2 * d_ns / r_0 ;
609 ost <<
"d_tilde : " << d_tilde << endl ;
611 ost <<
"Orientation with respect to the absolute frame : " <<
612 mp.get_rot_phi() <<
" rad" << endl ;
614 ost <<
"Central value of gam_euler : "
617 ost <<
"Central u_euler (U^X, U^Y, U^Z) [c] : "
618 <<
u_euler(0)(0, 0, 0, 0) <<
" "
619 <<
u_euler(1)(0, 0, 0, 0) <<
" "
620 <<
u_euler(2)(0, 0, 0, 0) << endl ;
623 ost <<
"Central d_psi (X, Y, Z) [c] : "
624 <<
d_psi(0)(0, 0, 0, 0) <<
" "
625 <<
d_psi(1)(0, 0, 0, 0) <<
" "
626 <<
d_psi(2)(0, 0, 0, 0) << endl ;
628 ost <<
"Central vel. / co-orb. (W^X, W^Y, W^Z) [c] : "
629 <<
wit_w(0)(0, 0, 0, 0) <<
" "
630 <<
wit_w(1)(0, 0, 0, 0) <<
" "
631 <<
wit_w(2)(0, 0, 0, 0) << endl ;
633 ost <<
"Max vel. / co-orb. (W^X, W^Y, W^Z) [c] : "
638 ost <<
"Min vel. / co-orb. (W^X, W^Y, W^Z) [c] : "
643 double r_surf =
mp.val_r(0,1.,M_PI/4,M_PI/4) ;
645 ost <<
"Velocity at (r_surf,pi/4,pi/4) / co-orb. [c] : "
646 <<
wit_w(0).val_point(r_surf,M_PI/4,M_PI/4) <<
" "
647 <<
wit_w(1).val_point(r_surf,M_PI/4,M_PI/4) <<
" "
648 <<
wit_w(2).val_point(r_surf,M_PI/4,M_PI/4) << endl ;
650 ost <<
"Central value of loggam : "
651 <<
loggam()(0, 0, 0, 0) << endl ;
655 ost <<
"Central value of log(N) auto, comp : "
659 ost <<
"Central value of beta=log(AN) auto, comp : "
663 ost <<
"Central value of shift (N^X, N^Y, N^Z) [c] : "
664 <<
shift(0)(0, 0, 0, 0) <<
" "
665 <<
shift(1)(0, 0, 0, 0) <<
" "
666 <<
shift(2)(0, 0, 0, 0) << endl ;
668 ost <<
" ... shift_auto part of it [c] : "
673 ost <<
" ... shift_comp part of it [c] : "
678 ost <<
" ... w_shift (NB: components in the star Cartesian frame) [c] : "
680 <<
w_shift(0)(0, 0, 0, 0) <<
" "
681 <<
w_shift(1)(0, 0, 0, 0) <<
" "
682 <<
w_shift(2)(0, 0, 0, 0) << endl ;
684 ost <<
"Central value of khi_shift [km c] : "
685 <<
khi_shift()(0, 0, 0, 0) / km << endl ;
687 ost << endl <<
"Central value of (B^X, B^Y, B^Z)/N [c] : "
688 <<
bsn(0)(0, 0, 0, 0) <<
" "
689 <<
bsn(1)(0, 0, 0, 0) <<
" "
690 <<
bsn(2)(0, 0, 0, 0) << endl ;
693 "Central (d/dX,d/dY,d/dZ)(logn_auto) [km^{-1}] : "
698 ost <<
"Central (d/dX,d/dY,d/dZ)(logn_comp) [km^{-1}] : "
704 "Central (d/dX,d/dY,d/dZ)(beta_auto) [km^{-1}] : "
709 ost <<
"Central (d/dX,d/dY,d/dZ)(beta_comp) [km^{-1}] : "
715 ost << endl <<
"Central A^2 K^{ij} [c/km] : " << endl ;
716 ost <<
" A^2 K^{xx} auto, comp : "
717 <<
tkij_auto(0, 0)(0, 0, 0, 0) * km <<
" "
718 <<
tkij_comp(0, 0)(0, 0, 0, 0) * km << endl ;
719 ost <<
" A^2 K^{xy} auto, comp : "
720 <<
tkij_auto(0, 1)(0, 0, 0, 0) * km <<
" "
721 <<
tkij_comp(0, 1)(0, 0, 0, 0) * km << endl ;
722 ost <<
" A^2 K^{xz} auto, comp : "
723 <<
tkij_auto(0, 2)(0, 0, 0, 0) * km <<
" "
724 <<
tkij_comp(0, 2)(0, 0, 0, 0) * km << endl ;
725 ost <<
" A^2 K^{yy} auto, comp : "
726 <<
tkij_auto(1, 1)(0, 0, 0, 0) * km <<
" "
727 <<
tkij_comp(1, 1)(0, 0, 0, 0) * km << endl ;
728 ost <<
" A^2 K^{yz} auto, comp : "
729 <<
tkij_auto(1, 2)(0, 0, 0, 0) * km <<
" "
730 <<
tkij_comp(1, 2)(0, 0, 0, 0) * km << endl ;
731 ost <<
" A^2 K^{zz} auto, comp : "
732 <<
tkij_auto(2, 2)(0, 0, 0, 0) * km <<
" "
733 <<
tkij_comp(2, 2)(0, 0, 0, 0) * km << endl ;
735 ost << endl <<
"Central A^2 K_{ij} K^{ij} [c^2/km^2] : " << endl ;
736 ost <<
" A^2 K_{ij} K^{ij} auto, comp : "
767 d_psi.set_etat_nondef() ;
788 for (
int i=0; i<3; i++) {
789 v_orb.
set(i) = www(i)(0, 0, 0, 0) ;
793 int nzm1 =
mp.get_mg()->get_nzone() - 1 ;
794 for (
int l=
nzet; l<=nzm1; l++)
795 for (
int i=0; i<=2; i++)
806 d_psi = d_psi0 + v_orb ;
813 if (d_psi0.
get_etat() == ETATQCQ ) {
815 for (
int i=0; i<3; i++) {
816 d_psi.set(i).va.set_base( d_psi0(i).va.base ) ;
840 double lambda = double(1) / double(3) ;
848 for (
int i=0; i<3; i++) {
850 - (lambda/2./(lambda+1)) * (d_khi(i) + x_d_w(i)) ;
864 double relax_met,
int mer,
int fmer_met) {
866 double relax_ent_jm1 = 1. - relax_ent ;
867 double relax_met_jm1 = 1. - relax_met ;
869 ent = relax_ent *
ent + relax_ent_jm1 * star_jm1.
ent ;
871 if ( (mer != 0) && (mer % fmer_met == 0)) {
Vectorial bases (triads) with respect to which the tensorial components are defined.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
void annule(int l)
Sets the Cmp to zero in a given domain.
Equation of state base class.
Tenseur shift_comp
Part of the shift vector generated principaly by the companion star.
Tenseur psi0
Scalar potential of the non-translational part of fluid 4-velocity (in the irrotational case).
Tenseur d_beta_auto
Gradient of beta_auto (Cartesian components with respect to ref_triad ).
Tenseur d_logn_auto
Gradient of logn_auto (Cartesian components with respect to ref_triad ).
double * p_xa_barycenter
Absolute coordinate X of the barycenter of the baryon density.
virtual void sauve(FILE *) const
Save in a file.
Tenseur bsn
3-vector shift, divided by N , of the rotating coordinates, .
Tenseur akcar_comp
Part of the scalar generated by shift_auto and shift_comp , i.e.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
Cmp ssjm1_khi
Effective source at the previous step for the resolution of the Poisson equation for the scalar by m...
Tenseur d_psi
Gradient of (in the irrotational case) (Cartesian components with respect to ref_triad ).
void relaxation(const Etoile_bin &star_prev, double relax_ent, double relax_met, int mer, int fmer_met)
Performs a relaxation on ent , logn_auto , beta_auto and shift_auto .
const Base_vect & ref_triad
Reference triad ("absolute frame"), with respect to which the components of all the member Tenseur 's...
void fait_shift_auto()
Computes shift_auto from w_shift and khi_shift according to Shibata's prescription [Prog.
bool irrotational
true for an irrotational star, false for a corotating one
Tenseur w_shift
Vector used in the decomposition of shift_auto , following Shibata's prescription [Prog.
Tenseur logn_comp
Part of the lapse logarithm (gravitational potential at the Newtonian limit) generated principaly by ...
Tenseur & set_w_shift()
Read/write of w_shift.
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Tenseur d_logn_comp
Gradient of logn_comp (Cartesian components with respect to ref_triad ).
Tenseur beta_comp
Part of the logarithm of AN generated principaly by the companion star.
Tenseur ssjm1_wshift
Effective source at the previous step for the resolution of the vector Poisson equation for by means...
Cmp ssjm1_logn
Effective source at the previous step for the resolution of the Poisson equation for logn_auto by mea...
virtual void del_deriv() const
Deletes all the derived quantities.
Cmp ssjm1_psi
Effective source at the previous step for the resolution of the Poisson equation for the scalar by m...
Tenseur pot_centri
Centrifugal potential.
Tenseur loggam
Logarithm of the Lorentz factor between the fluid and the co-orbiting observer.
Tenseur shift_auto
Part of the shift vector generated principaly by the star.
virtual double xa_barycenter() const
Absolute coordinate X of the barycenter of the baryon density, defined according to the formula.
Tenseur_sym tkij_auto
Part of the extrinsic curvature tensor generated by shift_auto .
Tenseur akcar_auto
Part of the scalar generated by shift_auto , i.e.
Cmp ssjm1_beta
Effective source at the previous step for the resolution of the Poisson equation for beta_auto by mea...
Cmp decouple
Function used to construct the part of generated by the star from the total .
Tenseur wit_w
Spatial projection of the fluid 3-velocity with respect to the co-orbiting observer.
Tenseur & set_logn_comp()
Read/write the part of the lapse logarithm (gravitational potential at the Newtonian limit) generated...
Tenseur_sym tkij_comp
Part of the extrinsic curvature tensor generated by shift_comp .
Tenseur & set_khi_shift()
Read/write of khi_shift.
virtual Tenseur sprod(const Tenseur &t1, const Tenseur &t2) const
Performs the scalar product of two tensors by contracting the last index of t1 with the first index o...
Tenseur d_beta_comp
Gradient of beta_comp (Cartesian components with respect to ref_triad ).
Etoile_bin(Map &mp_i, int nzet_i, bool relat, const Eos &eos_i, bool irrot, const Base_vect &ref_triad_i)
Standard constructor.
Tenseur d_logn_auto_regu
Gradient of logn_auto_regu (Cartesian components with respect to ref_triad ).
virtual ~Etoile_bin()
Destructor.
Tenseur & set_pot_centri()
Read/write the centrifugal potential.
void fait_d_psi()
Computes the gradient of the total velocity potential .
void operator=(const Etoile_bin &)
Assignment to another Etoile_bin.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Tenseur khi_shift
Scalar used in the decomposition of shift_auto , following Shibata's prescription [Prog.
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Tenseur logn_auto_div
Divergent part (if k_div!=0 ) of the logarithm of the part of the lapse N generated principaly by t...
int nzet
Number of domains of *mp occupied by the star.
void operator=(const Etoile &)
Assignment to another Etoile.
Tenseur logn_auto_regu
Regular part of the logarithm of the part of the lapse N generated principaly by the star.
double ray_eq_pi() const
Coordinate radius at , [r_unit].
double ray_eq() const
Coordinate radius at , [r_unit].
Tenseur logn_auto
Total of the logarithm of the part of the lapse N generated principaly by the star.
virtual void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
Tenseur u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Tenseur gam_euler
Lorentz factor between the fluid and Eulerian observers.
Map & mp
Mapping associated with the star.
virtual void del_deriv() const
Deletes all the derived quantities.
Etoile(Map &mp_i, int nzet_i, bool relat, const Eos &eos_i)
Standard constructor.
Tenseur d_logn_auto_div
Gradient of logn_auto_div (if k_div!=0 ).
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
virtual void sauve(FILE *) const
Save in a file.
Tenseur shift
Total shift vector.
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case).
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
Tenseur beta_auto
Logarithm of the part of the product AN generated principaly by by the star.
Tenseur a_car
Total conformal factor .
double unsurc2
: unsurc2=1 for a relativistic star, 0 for a Newtonian one.
Tensor handling *** DEPRECATED : use class Tensor instead ***.
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
int get_type_indice(int i) const
Returns the type of the index number i .
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void dec2_dzpuis()
dzpuis -= 2 ;
void dec_dzpuis()
dzpuis -= 1 ;
int get_valence() const
Returns the valence.
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
void set_triad(const Base_vect &new_triad)
Assigns a new vectorial basis (triad) of decomposition.
int get_etat() const
Returns the logical state.
Cmp exp(const Cmp &)
Exponential.
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Tenseur skxk(const Tenseur &)
Contraction of the last index of (*this) with or , depending on the type of S .
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...
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Standard units of space, time and mass.