et_rot_bifluid.h

00001 /*
00002  *  Definition of Lorene class Et_rot_bifluid
00003  *
00004  */
00005 
00006 /*
00007  *   Copyright (c) 2001 Jerome Novak
00008  *
00009  *   This file is part of LORENE.
00010  *
00011  *   LORENE is free software; you can redistribute it and/or modify
00012  *   it under the terms of the GNU General Public License as published by
00013  *   the Free Software Foundation; either version 2 of the License, or
00014  *   (at your option) any later version.
00015  *
00016  *   LORENE is distributed in the hope that it will be useful,
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *   GNU General Public License for more details.
00020  *
00021  *   You should have received a copy of the GNU General Public License
00022  *   along with LORENE; if not, write to the Free Software
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024  *
00025  */
00026 
00027 
00028 #ifndef __ET_ROT_BIFLUID_H_ 
00029 #define __ET_ROT_BIFLUID_H_ 
00030 
00031 /*
00032  * $Id: et_rot_bifluid.h,v 1.15 2011/10/06 14:55:36 j_novak Exp $
00033  * $Log: et_rot_bifluid.h,v $
00034  * Revision 1.15  2011/10/06 14:55:36  j_novak
00035  * equation_of_state() is now virtual to be able to call to the magnetized
00036  * Eos_mag.
00037  *
00038  * Revision 1.14  2004/09/01 10:56:05  r_prix
00039  * added option of converging baryon-mass to equilibrium_bi()
00040  *
00041  * Revision 1.13  2004/03/22 13:12:41  j_novak
00042  * Modification of comments to use doxygen instead of doc++
00043  *
00044  * Revision 1.12  2003/12/04 14:13:32  r_prix
00045  * added method get_typeos {return typeos}; and fixed some comments.
00046  *
00047  * Revision 1.11  2003/11/20 14:01:45  r_prix
00048  * changed member names to better conform to Lorene coding standards:
00049  * J_euler -> j_euler, EpS_euler -> enerps_euler, Delta_car -> delta_car
00050  *
00051  * Revision 1.10  2003/11/18 18:32:36  r_prix
00052  * added new class-member: EpS_euler := ener_euler + s_euler
00053  * has the advantage of a nice Newtonian limit -> rho
00054  * (ener_euler is no longer used in this class!)
00055  *
00056  * Revision 1.9  2003/11/13 12:02:03  r_prix
00057  * - adapted/extended some of the documentation
00058  * - changed xxx2 -> Delta_car
00059  * - added members J_euler, sphph_euler, representing 3+1 components of Tmunu
00060  *   (NOTE: these are not 2-fluid specific, and should ideally be moved into Class Etoile!)
00061  *
00062  * Revision 1.8  2003/09/17 08:27:50  j_novak
00063  * New methods: mass_b1() and mass_b2().
00064  *
00065  * Revision 1.7  2002/10/09 07:54:29  j_novak
00066  * Et_rot_bifluid and Et_rot_mag inheritate virtually from Etoile_rot
00067  *
00068  * Revision 1.6  2002/09/13 09:17:33  j_novak
00069  * Modif. commentaires
00070  *
00071  * Revision 1.5  2002/04/05 09:09:36  j_novak
00072  * The inversion of the EOS for 2-fluids polytrope has been modified.
00073  * Some errors in the determination of the surface were corrected.
00074  *
00075  * Revision 1.4  2002/01/16 15:03:28  j_novak
00076  * *** empty log message ***
00077  *
00078  * Revision 1.3  2002/01/08 14:43:53  j_novak
00079  * better determination of surfaces for 2-fluid stars
00080  *
00081  * Revision 1.2  2002/01/03 15:30:27  j_novak
00082  * Some comments modified.
00083  *
00084  * Revision 1.1.1.1  2001/11/20 15:19:27  e_gourgoulhon
00085  * LORENE
00086  *
00087  * Revision 1.3  2001/10/03  09:49:06  novak
00088  * *** empty log message ***
00089  *
00090  * Revision 1.2  2001/08/28 14:14:10  novak
00091  * overrided l_surf function
00092  *
00093  * Revision 1.1  2001/06/22 15:38:52  novak
00094  * Initial revision
00095  *
00096  *
00097  * $Header: /cvsroot/Lorene/C++/Include/et_rot_bifluid.h,v 1.15 2011/10/06 14:55:36 j_novak Exp $
00098  *
00099  */
00100 
00101 // Headers Lorene
00102 #include "eos_bifluid.h"
00103 #include "etoile.h"
00104 
00105 // Local prototype (for determining the surface)
00106 Cmp prolonge_c1(const Cmp& uu, const int nzet) ;
00107 
00128 class Et_rot_bifluid : virtual public Etoile_rot {
00129   
00130   // Data : 
00131   // -----
00132  protected:
00133   const Eos_bifluid& eos ; 
00134   
00135     double omega2 ; 
00136 
00137   // Fluid quantities with respect to the fluid frame
00138   // ------------------------------------------------
00139 
00141   Tenseur ent2 ;
00142   
00143   Tenseur nbar2 ; 
00144   
00145   // Fluid quantities with respect to the Eulerian frame
00146   // ---------------------------------------------------
00147 
00148   // FIXME: the following three variables are not specific to 2-fluid stars
00149   //  and should ideally be moved to class Etoile!
00150 
00152   Tenseur sphph_euler;
00153     
00159   Tenseur j_euler;
00160 
00162   Tenseur enerps_euler;
00163 
00165   Tenseur uuu2 ;
00166   
00168   Tenseur gam_euler2 ;
00169   
00174   Tenseur delta_car ; 
00175 
00176   // Derived data : 
00177   // ------------
00178  protected:
00180   mutable double* p_ray_eq2 ; 
00181   
00183   mutable double* p_ray_eq2_pis2 ;
00184   
00186   mutable double* p_ray_eq2_pi ;
00187   
00189   mutable double* p_ray_pole2 ;
00190     
00195   mutable Itbl* p_l_surf2 ; 
00196     
00201   mutable Tbl* p_xi_surf2 ; 
00202     
00203   mutable double* p_r_circ2 ;   
00204   mutable double* p_aplat2 ;    
00205 
00206     
00207   mutable double* p_mass_b1 ;   
00208   mutable double* p_mass_b2 ;   
00209 
00210 
00211   // Constructors - Destructor
00212   // -------------------------
00213  public:
00214 
00215   Et_rot_bifluid(Map& mp_i, int nzet_i, bool relat, 
00216          const Eos_bifluid& eos_i) ;     
00217 
00218   Et_rot_bifluid(const Et_rot_bifluid& ) ;       
00219 
00224   Et_rot_bifluid(Map& mp_i, const Eos_bifluid& eos_i, FILE* fich) ;    
00225 
00226   virtual ~Et_rot_bifluid() ;           
00227  
00228 
00229   // Memory management
00230   // -----------------
00231  protected:
00232 
00234   virtual void del_deriv() const ; 
00235     
00237   virtual void set_der_0x0() const ; 
00238 
00242   virtual void del_hydro_euler() ; 
00243     
00244 
00245   // Mutators / assignment
00246   // ---------------------
00247  public:
00248 
00250   void operator=(const Et_rot_bifluid&) ;   
00251 
00253   void set_enthalpies(const Cmp&, const Cmp&) ;
00254 
00263   void equilibrium_spher_bi(double ent_c, double ent_c2, 
00264              double precis = 1.e-14) ;
00265     
00276   void equil_spher_regular(double ent_c, double ent_c2, 
00277                double precis = 1.e-14) ;
00278 
00279   // Accessors
00280   // ---------
00281  public:
00282 
00284   const Eos_bifluid& get_eos() const {return eos; } ;
00285 
00287   const Tenseur& get_ent2() const {return ent2 ; } ;
00288 
00290   const Tenseur& get_nbar2() const {return nbar2 ; } ;
00291     
00293   const Tenseur& get_delta_car() const {return delta_car ; } ;
00294 
00296   const Tenseur& get_gam_euler2() const {return gam_euler2 ; } ;
00297 
00299   double get_omega2() const {return omega2 ; } ;
00300 
00302   const Tenseur& get_uuu2() const {return uuu2 ; } ;
00303 
00304   // Outputs
00305   // -------
00306  public:
00307   virtual void sauve(FILE *) const ;        
00308     
00310   virtual ostream& operator>>(ostream& ) const ;    
00311 
00313   virtual void partial_display(ostream& ) const ;    
00314 
00315   // Global quantities
00316   // -----------------
00317  public:
00318     
00326   virtual const Itbl& l_surf() const ; 
00327     
00335   const Itbl& l_surf2() const ; 
00336     
00344   const Tbl& xi_surf2() const ; 
00345 
00347   double ray_eq2() const ; 
00348     
00350   double ray_eq2_pis2() const ; 
00351     
00353   double ray_eq2_pi() const ; 
00354     
00356   double ray_pole2() const ; 
00357     
00359   double mass_b1() const ;
00360   
00362   double mass_b2() const ;
00363 
00364   virtual double mass_b() const ;   
00365   virtual double mass_g() const ;   
00366   virtual double angu_mom() const ; 
00367 
00372   virtual double grv2() const ;     
00373 
00385   virtual double grv3(ostream* ost = 0x0) const ;   
00386 
00387   virtual double r_circ2() const ;     
00388   virtual double aplat2() const ;      
00389 
00399   virtual double mom_quad() const ; 
00400 
00401   // Computational routines
00402   // ----------------------
00403  public: 
00414   virtual void hydro_euler() ; 
00415     
00419   virtual void equation_of_state() ; 
00420     
00479   void equilibrium_bi(double ent_c, double ent_c2, double omega0, 
00480               double omega20, const Tbl& ent_limit, 
00481               const Tbl& ent2_limit, const Itbl& icontrol, 
00482               const Tbl& control, Tbl& diff,
00483               int mer_mass, double mbar1_wanted, double mbar2_wanted, double aexp_mass);
00484     
00485 
00486 
00487 
00488 };
00489 
00490 #endif

Generated on Tue Feb 7 01:35:16 2012 for LORENE by  doxygen 1.4.6