LORENE
et_rot_bifluid.h
1/*
2 * Definition of Lorene class Et_rot_bifluid
3 *
4 */
5
6/*
7 * Copyright (c) 2001 Jerome Novak
8 * (c) 2015 Aurelien Sourie
9 *
10 * This file is part of LORENE.
11 *
12 * LORENE is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * LORENE is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with LORENE; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 */
27
28
29#ifndef __ET_ROT_BIFLUID_H_
30#define __ET_ROT_BIFLUID_H_
31
32/*
33 * $Id: et_rot_bifluid.h,v 1.21 2017/10/06 12:36:33 a_sourie Exp $
34 * $Log: et_rot_bifluid.h,v $
35 * Revision 1.21 2017/10/06 12:36:33 a_sourie
36 * Cleaning of tabulated 2-fluid EoS class + superfluid rotating star model.
37 *
38 * Revision 1.20 2015/06/26 14:10:08 j_novak
39 * Modified comments.
40 *
41 * Revision 1.19 2015/06/11 13:50:18 j_novak
42 * Minor corrections
43 *
44 * Revision 1.18 2015/06/10 14:39:17 a_sourie
45 * New class Eos_bf_tabul for tabulated 2-fluid EoSs and associated functions for the computation of rotating stars with such EoSs.
46 *
47 * Revision 1.17 2014/10/13 08:52:34 j_novak
48 * Lorene classes and functions now belong to the namespace Lorene.
49 *
50 * Revision 1.16 2013/11/25 13:50:55 j_novak
51 * The inheritance from Etoile_rot is no longer virtual.
52 *
53 * Revision 1.15 2011/10/06 14:55:36 j_novak
54 * equation_of_state() is now virtual to be able to call to the magnetized
55 * Eos_mag.
56 *
57 * Revision 1.14 2004/09/01 10:56:05 r_prix
58 * added option of converging baryon-mass to equilibrium_bi()
59 *
60 * Revision 1.13 2004/03/22 13:12:41 j_novak
61 * Modification of comments to use doxygen instead of doc++
62 *
63 * Revision 1.12 2003/12/04 14:13:32 r_prix
64 * added method get_typeos {return typeos}; and fixed some comments.
65 *
66 * Revision 1.11 2003/11/20 14:01:45 r_prix
67 * changed member names to better conform to Lorene coding standards:
68 * J_euler -> j_euler, EpS_euler -> enerps_euler, Delta_car -> delta_car
69 *
70 * Revision 1.10 2003/11/18 18:32:36 r_prix
71 * added new class-member: EpS_euler := ener_euler + s_euler
72 * has the advantage of a nice Newtonian limit -> rho
73 * (ener_euler is no longer used in this class!)
74 *
75 * Revision 1.9 2003/11/13 12:02:03 r_prix
76 * - adapted/extended some of the documentation
77 * - changed xxx2 -> Delta_car
78 * - added members J_euler, sphph_euler, representing 3+1 components of Tmunu
79 * (NOTE: these are not 2-fluid specific, and should ideally be moved into Class Etoile!)
80 *
81 * Revision 1.8 2003/09/17 08:27:50 j_novak
82 * New methods: mass_b1() and mass_b2().
83 *
84 * Revision 1.7 2002/10/09 07:54:29 j_novak
85 * Et_rot_bifluid and Et_rot_mag inheritate virtually from Etoile_rot
86 *
87 * Revision 1.6 2002/09/13 09:17:33 j_novak
88 * Modif. commentaires
89 *
90 * Revision 1.5 2002/04/05 09:09:36 j_novak
91 * The inversion of the EOS for 2-fluids polytrope has been modified.
92 * Some errors in the determination of the surface were corrected.
93 *
94 * Revision 1.4 2002/01/16 15:03:28 j_novak
95 * *** empty log message ***
96 *
97 * Revision 1.3 2002/01/08 14:43:53 j_novak
98 * better determination of surfaces for 2-fluid stars
99 *
100 * Revision 1.2 2002/01/03 15:30:27 j_novak
101 * Some comments modified.
102 *
103 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
104 * LORENE
105 *
106 * Revision 1.3 2001/10/03 09:49:06 novak
107 * *** empty log message ***
108 *
109 * Revision 1.2 2001/08/28 14:14:10 novak
110 * overrided l_surf function
111 *
112 * Revision 1.1 2001/06/22 15:38:52 novak
113 * Initial revision
114 *
115 *
116 * $Header: /cvsroot/Lorene/C++/Include/et_rot_bifluid.h,v 1.21 2017/10/06 12:36:33 a_sourie Exp $
117 *
118 */
119
120// Headers Lorene
121#include "eos_bifluid.h"
122#include "etoile.h"
123
124namespace Lorene {
125
126 // Local prototype (for determining the surface)
127 Cmp prolonge_c1(const Cmp& uu, const int nzet) ;
128
150 class Et_rot_bifluid : public Etoile_rot {
151
152 // Data :
153 // -----
154 protected:
155 const Eos_bifluid& eos ;
156
157 double omega2 ;
158
159 // Fluid quantities with respect to the fluid frame
160 // ------------------------------------------------
161
164
166
171
172 // Fluid quantities with respect to the Eulerian frame
173 // ---------------------------------------------------
174
175 // FIXME: the following three variables are not specific to 2-fluid stars
176 // and should ideally be moved to class Etoile!
177
180
187
190
193
196
199
205
206 // Derived data :
207 // ------------
208 protected:
210 mutable double* p_ray_eq2 ;
211
213 mutable double* p_ray_eq2_pis2 ;
214
216 mutable double* p_ray_eq2_pi ;
217
219 mutable double* p_ray_pole2 ;
220
225 mutable Itbl* p_l_surf2 ;
226
231 mutable Tbl* p_xi_surf2 ;
232
233 mutable double* p_r_circ2 ;
234 mutable double* p_area2 ;
235 mutable double* p_aplat2 ;
236
237 mutable double* p_mass_b1 ;
238 mutable double* p_mass_b2 ;
239
240 mutable double* p_angu_mom_1;
241 mutable double* p_angu_mom_2;
242
244 mutable double* p_coupling_mominert_1;
245 mutable double* p_coupling_mominert_2;
246 mutable double* p_coupling_entr;
247 mutable double* p_coupling_LT_1;
248 mutable double* p_coupling_LT_2;
249
250
251 // Constructors - Destructor
252 // -------------------------
253 public:
254
255 Et_rot_bifluid(Map& mp_i, int nzet_i, bool relat,
256 const Eos_bifluid& eos_i) ;
257
259
264 Et_rot_bifluid(Map& mp_i, const Eos_bifluid& eos_i, FILE* fich) ;
265
266 virtual ~Et_rot_bifluid() ;
267
268 // Memory management
269 // -----------------
270 protected:
271
273 virtual void del_deriv() const ;
274
276 virtual void set_der_0x0() const ;
277
281 virtual void del_hydro_euler() ;
282
283 // Mutators / assignment
284 // ---------------------
285 public:
286
288 void operator=(const Et_rot_bifluid&) ;
289
291 void set_enthalpies(const Cmp&, const Cmp&) ;
292
301 void equilibrium_spher_bi(double ent_c, double ent_c2,
302 double precis = 1.e-14) ;
303
314 void equil_spher_regular(double ent_c, double ent_c2,
315 double precis = 1.e-14) ;
316
317 // Accessors
318 // ---------
319 public:
320
322 const Eos_bifluid& get_eos() const {return eos; } ;
323
325 const Tenseur& get_ent2() const {return ent2 ; } ;
326
328 const Tenseur& get_nbar2() const {return nbar2 ; } ;
329
331 const Tenseur& get_K_nn() const {return K_nn ; } ;
332
334 const Tenseur& get_K_np() const {return K_np ; } ;
335
337 const Tenseur& get_K_pp() const {return K_pp ; } ;
338
340 const Tenseur& get_alpha_eos() const {return alpha_eos ; } ;
341
343 const Tenseur& get_delta_car() const {return delta_car ; } ;
344
346 const Tenseur& get_gam_euler2() const {return gam_euler2 ; } ;
347
349 double get_omega2() const {return omega2 ; } ;
350
352 const Tenseur& get_uuu2() const {return uuu2 ; } ;
353
354 // Outputs
355 // -------
356 public:
357 virtual void sauve(FILE *) const ;
358
360 virtual ostream& operator>>(ostream& ) const ;
361
363 virtual void partial_display(ostream& ) const ;
364
365 // Global quantities
366 // -----------------
367 public:
368
376 virtual const Itbl& l_surf() const ;
377
385 const Itbl& l_surf2() const ;
386
394 const Tbl& xi_surf2() const ;
395
397 double ray_eq2() const ;
398
400 double ray_eq2_pis2() const ;
401
403 double ray_eq2_pi() const ;
404
406 double ray_pole2() const ;
407
409 double mass_b1() const ;
410
412 double mass_b2() const ;
413
414 virtual double mass_b() const ;
415 virtual double mass_g() const ;
416 virtual double angu_mom() const ;
417
422 virtual double grv2() const ;
423
435 virtual double grv3(ostream* ost = 0x0) const ;
436
437 virtual double r_circ2() const ;
438 virtual double area2() const ;
439 virtual double mean_radius2() const ;
440 virtual double aplat2() const ;
441
456 virtual double mom_quad() const ;
457
465 virtual double mom_quad_old() const ;
466
473 virtual double mom_quad_Bo() const ;
474
475 virtual double angu_mom_1() const ;
476 virtual double angu_mom_2() const ;
477
486 virtual double coupling_mominert_1() const ;
487 virtual double coupling_mominert_2() const ;
488 virtual double coupling_entr() const ;
489 virtual double coupling_LT_1() const ;
490 virtual double coupling_LT_2() const ;
491
492 // Computational routines
493 // ----------------------
494 public:
505 virtual void hydro_euler() ;
506
511 virtual void equation_of_state() ;
512
571 void equilibrium_bi(double ent_c, double ent_c2, double omega0,
572 double omega20, const Tbl& ent_limit,
573 const Tbl& ent2_limit, const Itbl& icontrol,
574 const Tbl& control, Tbl& diff,
575 int mer_mass, double mbar1_wanted, double mbar2_wanted,
576 double aexp_mass);
577 };
578
579}
580#endif
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
2-fluids equation of state base class.
Et_rot_bifluid(Map &mp_i, int nzet_i, bool relat, const Eos_bifluid &eos_i)
Standard constructor.
const Tenseur & get_K_pp() const
Returns the coefficient .
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
void equilibrium_bi(double ent_c, double ent_c2, double omega0, double omega20, const Tbl &ent_limit, const Tbl &ent2_limit, const Itbl &icontrol, const Tbl &control, Tbl &diff, int mer_mass, double mbar1_wanted, double mbar2_wanted, double aexp_mass)
Computes an equilibrium configuration.
Tenseur gam_euler2
Lorentz factor between the fluid 2 and Eulerian observers.
Tenseur enerps_euler
the combination : useful because in the Newtonian limit .
Tenseur K_np
Coefficient .
virtual ~Et_rot_bifluid()
Destructor.
double * p_mass_b1
Baryon mass of fluid 1.
double * p_coupling_mominert_1
Quantities used to describe the different couplings between the fluids.
double * p_mass_b2
Baryon mass of fluid 2.
virtual double grv3(ostream *ost=0x0) const
Error on the virial identity GRV3.
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...
const Tenseur & get_ent2() const
Returns the enthalpy field for fluid 2.
virtual double mom_quad_Bo() const
Part of the quadrupole moment.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
void set_enthalpies(const Cmp &, const Cmp &)
Sets both enthalpy profiles.
Tenseur j_euler2
To compute .
Tenseur sphph_euler
The component of the stress tensor .
const Tenseur & get_nbar2() const
Returns the proper baryon density for fluid 2.
virtual double area2() const
Surface area for fluid 2.
Tenseur K_pp
Coefficient .
void operator=(const Et_rot_bifluid &)
Assignment to another Et_rot_bifluid.
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
const Eos_bifluid & get_eos() const
Returns the equation of state.
Tbl * p_xi_surf2
Description of the surface of fluid 2: 2-D Tbl containing the values of the radial coordinate on the...
double * p_angu_mom_1
Angular momentum of fluid 1.
const Tenseur & get_alpha_eos() const
Returns the coefficient (entrainment parameter).
virtual double angu_mom_2() const
Angular momentum of fluid 2.
virtual void del_deriv() const
Deletes all the derived quantities.
double * p_ray_eq2
Coordinate radius at , .
virtual void sauve(FILE *) const
Save in a file.
const Tenseur & get_K_np() const
Returns the coefficient .
double ray_pole2() const
Coordinate radius for fluid 2 at [r_unit].
void equilibrium_spher_bi(double ent_c, double ent_c2, double precis=1.e-14)
Computes a spherical static configuration.
const Tenseur & get_K_nn() const
Returns the coefficient .
virtual double mass_b() const
Total Baryon mass.
Tenseur j_euler1
To compute .
Tenseur j_euler
Total angular momentum (flat-space!) 3-vector , which is related to of the "3+1" decomposition,...
virtual void equation_of_state()
Computes the proper baryon and energy densities, as well as pressure and the coefficients Knn,...
const Tenseur & get_gam_euler2() const
Returns the Lorentz factor between the fluid 2 and Eulerian observers.
double get_omega2() const
Returns the rotation angular velocity of fluid 2([f_unit] ).
const Tbl & xi_surf2() const
Description of the surface of fluid 2: returns a 2-D Tbl containing the values of the radial coordi...
double * p_ray_pole2
Coordinate radius at .
virtual double coupling_mominert_1() const
Quantities used to study the different fluid couplings: , and .
Tenseur alpha_eos
Coefficient relative to entrainment effects.
Tenseur K_nn
Coefficient .
virtual double mass_g() const
Gravitational mass.
double * p_aplat2
Flatening r_pole/r_eq of fluid no.2.
void equil_spher_regular(double ent_c, double ent_c2, double precis=1.e-14)
Computes a spherical static configuration.
double * p_area2
Surface area of fluid no.2.
double * p_angu_mom_2
Angular momentum of fluid 2.
Tenseur delta_car
The "relative velocity" (squared) of the two fluids.
const Itbl & l_surf2() const
Description of the surface of fluid 2: returns a 2-D Itbl containing the values of the domain index...
double omega2
Rotation angular velocity for fluid 2 ([f_unit] ).
const Eos_bifluid & eos
Equation of state for two-fluids model.
double mass_b1() const
Baryon mass of fluid 1.
Tenseur uuu2
Norm of the (fluid no.2) 3-velocity with respect to the eulerian observer.
double ray_eq2() const
Coordinate radius for fluid 2 at , [r_unit].
virtual double r_circ2() const
Circumferential radius for fluid 2.
double mass_b2() const
Baryon mass of fluid 2.
virtual double mom_quad() const
Quadrupole moment.
virtual double aplat2() const
Flatening r_pole/r_eq for fluid 2.
virtual double grv2() const
Error on the virial identity GRV2.
double * p_r_circ2
Circumferential radius of fluid no.2.
Tenseur ent2
Log-enthalpy for the second fluid.
double * p_ray_eq2_pi
Coordinate radius at , .
const Tenseur & get_uuu2() const
Returns the norm of the fluid 2 3-velocity with respect to the eulerian frame.
virtual void partial_display(ostream &) const
Printing of some informations, excluding all global quantities.
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...
Tenseur nbar2
Baryon density in the fluid frame, for fluid 2.
virtual double angu_mom_1() const
Angular momentum of fluid 1.
virtual double angu_mom() const
Angular momentum.
double * p_ray_eq2_pis2
Coordinate radius at , .
double ray_eq2_pis2() const
Coordinate radius for fluid 2 at , [r_unit].
double ray_eq2_pi() const
Coordinate radius for fluid 2 at , [r_unit].
const Tenseur & get_delta_car() const
Returns the "relative velocity" (squared) of the two fluids.
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
virtual double mean_radius2() const
Mean radius for fluid 2.
virtual double mom_quad_old() const
Part of the quadrupole moment.
Etoile_rot(Map &mp_i, int nzet_i, bool relat, const Eos &eos_i)
Standard constructor.
Definition etoile_rot.C:146
Basic integer array class.
Definition itbl.h:122
Basic array class.
Definition tbl.h:161
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition tenseur.h:304
Lorene prototypes.
Definition app_hor.h:67
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition map.C:142