PLUTO
fluxes.c File Reference

Compute the hydro (HD) flux. More...

#include "pluto.h"
Include dependency graph for fluxes.c:

Go to the source code of this file.

Functions

void Flux (double **u, double **w, double *a2, double **fx, double *p, int beg, int end)
 

Detailed Description

Compute the hydro (HD) flux.

Compute the flux of the conservative HD equations in the direction given by g_dir. This function defines the component of the hyperbolic flux tensor of the standard HD equations.
In what follows:

  • VXn, MXn are the velocity, momentum components in the direction given by g_dir (normal, "n")
  • VXt, MXt and VXb, MXb are the transverse components (tangent "t" and bi-tangent "b").
Author
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
Date
Aug 16, 2012

Definition in file fluxes.c.

Function Documentation

void Flux ( double **  u,
double **  w,
double *  a2,
double **  fx,
double *  p,
int  beg,
int  end 
)
Parameters
[in]u1D array of conserved quantities
[in]w1D array of primitive quantities
[in]a21D array of sound speeds
[out]fx1D array of fluxes (total pressure excluded)
[out]p1D array of pressure values
[in]beginitial index of computation
[in]endfinal index of computation
Returns
This function has no return value.

Definition at line 23 of file fluxes.c.

36 {
37  int nv, ii;
38 
39  for (ii = beg; ii <= end; ii++) {
40  fx[ii][RHO] = u[ii][MXn];
41  EXPAND(fx[ii][MX1] = u[ii][MX1]*w[ii][VXn]; ,
42  fx[ii][MX2] = u[ii][MX2]*w[ii][VXn]; ,
43  fx[ii][MX3] = u[ii][MX3]*w[ii][VXn];)
44 #if HAVE_ENERGY
45  p[ii] = w[ii][PRS];
46  fx[ii][ENG] = (u[ii][ENG] + w[ii][PRS])*w[ii][VXn];
47 #elif EOS == ISOTHERMAL
48  p[ii] = a2[ii]*w[ii][RHO];
49 #endif
50 /*
51 #if DUST == YES
52  fx[ii][RHO_D] = u[ii][MXn_D];
53  EXPAND(fx[ii][MX1_D] = u[ii][MX1_D]*w[ii][VXn_D]; ,
54  fx[ii][MX2_D] = u[ii][MX2_D]*w[ii][VXn_D]; ,
55  fx[ii][MX3_D] = u[ii][MX3_D]*w[ii][VXn_D];)
56 #endif
57 */
58  }
59 }
#define MX3
Definition: mod_defs.h:22
#define MX1
Definition: mod_defs.h:20
#define RHO
Definition: mod_defs.h:19
#define MX2
Definition: mod_defs.h:21
int MXn
Definition: globals.h:74
int VXn
Definition: globals.h:73
#define HAVE_ENERGY
Definition: pluto.h:395

Here is the caller graph for this function: