PLUTO  4.4-patch2
Functions
prim_eqn.c File Reference

Compute the right hand side of the relativistic hydro (RHD) equations in primitive form. More...

#include "pluto.h"

Functions

void PrimRHS (double *w, double *dw, double cs2, double h, double *Adw)
 
void PrimSource (const State *state, double **src, int beg, int end, Grid *grid)
 

Detailed Description

Implements the right hand side of the quasi-linear form of the relativistic hydro equations. In 1D this may be written as

\[ \partial_t{\mathbf{V}} = - A\cdot\partial_x\mathbf{V} + \mathbf{S} \]

where $ A $ is the matrix of the primitive form of the equations, $ S $ is the source term.

Reference:

The function PrimRHS() implements the first term while PrimSource() implements the source term part.

Authors
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
A. Pavan (andre.nosp@m.a.pa.nosp@m.van.2.nosp@m.0@ph.nosp@m.d.uni.nosp@m.pd.i.nosp@m.t)
Date
June 26, 2020

Function Documentation

◆ PrimRHS()

void PrimRHS ( double *  w,
double *  dw,
double  cs2,
double  h,
double *  Adw 
)

Compute the matrix-vector multiplication $ A(\mathbf{v})\cdot \Delta\mathbf{v} $ where A is the matrix of the quasi-linear form of the RHD equations.

Parameters
[in]wvector of primitive variables;
[in]dwlimited (linear) slopes;
[in]cs2local sound speed;
[in]hlocal enthalpy;
[out]Adwmatrix-vector product.
Note
Returns
This function has no return value.

◆ PrimSource()

void PrimSource ( const State state,
double **  src,
int  beg,
int  end,
Grid grid 
)

Compute source terms of the RHD equations in primitive variables.

  • Geometrical sources;
  • Gravity;

The rationale for choosing during which sweep a particular source term has to be incorporated should match the same criterion used during the conservative update. For instance, in polar or cylindrical coordinates, curvilinear source terms are included during the radial sweep only.

Parameters
[in]statepointer to a Sweep structure
[out]srcarray of source terms
[in]beginitial index of computation
[in]endfinal index of computation
[in]gridpointer to a Grid structure