Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hdo.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file hdo.h
1 
2 class Cell;
3 class Fluid;
4 class EoS;
5 class TransportCoeff;
6 
7 // this class implements the hydrodynamic evolution and
8 // contains the hydrodynamic algorithm
9 class Hydro {
10  private:
11  Fluid *f;
12  EoS *eos;
14  double dt, tau; // dt: timestep, tau: current value of the proper time
15  double tau_z; // effective value of the proper time used in 1/tau factors in
16  // the fluxes. Used to increase the accuracy
17  public:
18  Hydro(Fluid *_f, EoS *_eos, TransportCoeff *_trcoeff, double _t0, double _dt);
19  ~Hydro();
20  void setDtau(double deltaTau); // change the timestep
21 
22  // HLLE (ideal)flux between two neighbouring cells in a given direction
23  // mode: PREDICT = used in predictor step; calculates fluxes for dt/2
24  // CORRECT = used in corrector step, calculates fluxes based on predicted
25  // half-step quantities
26  void hlle_flux(Cell *left, Cell *right, int direction, int mode);
27  // viscous flux \delta F
28  void visc_flux(Cell *left, Cell *right, int direction);
29  // viscous source step for a given cell (ix,iy,iz)
30  void visc_source_step(int ix, int iy, int iz);
31  // ideal source terms, output : S[7], input: the rest of the parameters
32  void source(double tau, double x, double y, double z, double e, double p,
33  double nb, double nq, double ns, double vx, double vy, double vz,
34  double S[7]);
35  // ideal source step for a given cell (ix,iy,iz)
36  void source_step(int ix, int iy, int iz, int mode);
37  // shear stress tensor and bulk pressure in Navier-Stokes (NS) limit
38  // plus \partial_\mu u^\nu matrix (dmu) and
39  // expansion scalar \partial_mu u^\mu (du)
40  // for a given cell (ix,iy,iz)
41  void NSquant(int ix, int iy, int iz, double pi[][4], double &Pi,
42  double dmu[4][4], double &du);
43  // sets the values of shear stress/bulk pressure in NS limit in all hydro grid
44  void setNSvalues();
45  // advances numerical solution for shear/bulk in a whole grid over one
46  // timestep
47  void ISformal();
48  // advances numerical solution for Q (including ideal and viscous fluxes and
49  // source terms) over one timestep
50  void performStep(void);
51  // gets the current proper time
52  inline double getTau() { return tau; }
53 };