Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:19:16

0001 
0002 class Cell;
0003 class Fluid;
0004 class EoS;
0005 class TransportCoeff;
0006 
0007 // this class implements the hydrodynamic evolution and
0008 // contains the hydrodynamic algorithm
0009 class Hydro {
0010  private:
0011   Fluid *f;
0012   EoS *eos;
0013   TransportCoeff *trcoeff;
0014   double dt, tau;  // dt: timestep, tau: current value of the proper time
0015   double tau_z;  // effective value of the proper time used in 1/tau factors in
0016                  // the fluxes. Used to increase the accuracy
0017  public:
0018   Hydro(Fluid *_f, EoS *_eos, TransportCoeff *_trcoeff, double _t0, double _dt);
0019   ~Hydro();
0020   void setDtau(double deltaTau);  // change the timestep
0021 
0022   // HLLE (ideal)flux between two neighbouring cells in a given direction
0023   // mode: PREDICT = used in predictor step; calculates fluxes for dt/2
0024   // CORRECT = used in corrector step, calculates fluxes based on predicted
0025   // half-step quantities
0026   void hlle_flux(Cell *left, Cell *right, int direction, int mode);
0027   // viscous flux \delta F
0028   void visc_flux(Cell *left, Cell *right, int direction);
0029   // viscous source step for a given cell (ix,iy,iz)
0030   void visc_source_step(int ix, int iy, int iz);
0031   // ideal source terms, output : S[7],  input: the rest of the parameters
0032   void source(double tau, double x, double y, double z, double e, double p,
0033               double nb, double nq, double ns, double vx, double vy, double vz,
0034               double S[7]);
0035   // ideal source step for a given cell (ix,iy,iz)
0036   void source_step(int ix, int iy, int iz, int mode);
0037   // shear stress tensor and bulk pressure in Navier-Stokes (NS) limit
0038   // plus \partial_\mu u^\nu matrix (dmu) and
0039   // expansion scalar \partial_mu u^\mu (du)
0040   // for a given cell (ix,iy,iz)
0041   void NSquant(int ix, int iy, int iz, double pi[][4], double &Pi,
0042                double dmu[4][4], double &du);
0043   // sets the values of shear stress/bulk pressure in NS limit in all hydro grid
0044   void setNSvalues();
0045   // advances numerical solution for shear/bulk in a whole grid over one
0046   // timestep
0047   void ISformal();
0048   // advances numerical solution for Q (including ideal and viscous fluxes and
0049   // source terms) over one timestep
0050   void performStep(void);
0051   // gets the current proper time
0052   inline double getTau() { return tau; }
0053 };