PLUTO  4.4-patch2
Functions
eigenv.c File Reference

Wave-speeds and characteristic decomposition for the HD equations. More...

#include "pluto.h"

Functions

void MaxSignalSpeed (const State *state, double *cmin, double *cmax, int beg, int end)
 
void Eigenvalues (double **v, double *csound2, double **lambda, int beg, int end)
 
void PrimEigenvectors (const State *state, int beg, int end)
 
void ConsEigenvectors (double *u, double *v, double a2, double **LL, double **RR, double *lambda)
 
void PrimToChar (double **L, double *v, double *w)
 

Detailed Description

This file contains various functions containing Jacobian-related information such as characteristic signal speeds, eigenvalues and eigenvector decomposition for the HD module.

The function MaxSignalSpeed() computes the maximum and minimum characteristic signal velocity for the HD equations.

The function Eigenvalues() computes the 3 characteristic wave speed

The function PrimEigenvectors() calculates left and right eigenvectors and the corresponding eigenvalues for the primitive form the the HD equations with an adiabatic, general convex or isothermal EoS.

The function ConsEigenvectors() provides the characteristic decomposition of the convervative HD equations.

The function PrimToChar() compute the matrix-vector multiplcation between the L matrix (containing primitive left eigenvectors) and the vector v. The result containing the characteristic variables is stored in the vector w = L.v

Author
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
Date
June 25, 2019

Function Documentation

◆ ConsEigenvectors()

void ConsEigenvectors ( double *  u,
double *  v,
double  a2,
double **  LL,
double **  RR,
double *  lambda 
)

Provide conservative eigenvectors for HD equations.

Parameters
[in]uarray of conservative variables
[in]varray of primitive variables
[in]a2square of sound speed
[out]LLleft conservative eigenvectors
[out]RRright conservative eigenvectors
[out]lambdaeigenvalues

References:

  • "Riemann Solvers and Numerical Methods for Fluid Dynamics",
    Toro, 1997 Springer-Verlag (Page 107)

◆ Eigenvalues()

void Eigenvalues ( double **  v,
double *  csound2,
double **  lambda,
int  beg,
int  end 
)

Compute eigenvalues for the HD equations

Parameters
[in]v1-D array of primitive variables
[out]csound21-D array containing the square of sound speed
[out]lambda1-D array [i][nv] containing the eigenvalues
[in]begstarting index of computation
[in]endfinal index of computation

◆ MaxSignalSpeed()

void MaxSignalSpeed ( const State state,
double *  cmin,
double *  cmax,
int  beg,
int  end 
)

Compute the maximum and minimum characteristic velocities for the HD equations from the vector of primitive variables state->v.

Parameters
[in]statepointer to a State structure
[out]cmin1-D array containing the leftmost characteristic
[out]cmin1-D array containing the rightmost characteristic
[in]begstarting index of computation
[in]endfinal index of computation

◆ PrimEigenvectors()

void PrimEigenvectors ( const State state,
int  beg,
int  end 
)

Provide left and right eigenvectors and corresponding eigenvalues for the primitive form of the HD equations (adiabatic, pvte & isothermal cases).

Parameters
[in]statepointer to a State structure
[in]begstarting index of computation
[in]endfinal index of computation
Note
It is highly recommended that state->LL and state->RR be initialized to zero BEFORE since only non-zero entries are treated here.

Wave names and their order are defined as enumeration constants in mod_defs.h.

Advection modes associated with passive scalars are simple cases for which lambda = u (entropy mode) and l = r = (0, ... , 1, 0, ...). For this reason they are NOT defined here and must be treated seperately.

References:

  • "Riemann Solvers and Numerical Methods for Fluid Dynamics",
    Toro, 1997 Springer-Verlag, Eq. [3.18]

◆ PrimToChar()

void PrimToChar ( double **  L,
double *  v,
double *  w 
)

Compute the matrix-vector multiplcation between the the L matrix (containing primitive left eigenvectors) and the vector v. The result containing the characteristic variables is stored in the vector w = L.v

For efficiency purpose, multiplication is done explicitly, so that only nonzero entries of the left primitive eigenvectors are considered.

Parameters
[in]LLeft eigenvectors
[in]v(difference of) primitive variables
[out]w(difference of) characteristic variables