PLUTO
|
Wave-speeds and characteristic decomposition for the HD equations. More...
#include "pluto.h"
Go to the source code of this file.
Functions | |
void | MaxSignalSpeed (double **v, double *cs2, double *cmin, double *cmax, int beg, int end) |
void | Eigenvalues (double **v, double *csound2, double **lambda, int beg, int end) |
void | PrimEigenvectors (double *q, double cs2, double h, double *lambda, double **LL, double **RR) |
void | ConsEigenvectors (double *u, double *v, double a2, double **LL, double **RR, double *lambda) |
void | PrimToChar (double **L, double *v, double *w) |
Wave-speeds and characteristic decomposition for the HD equations.
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
Definition in file eigenv.c.
void ConsEigenvectors | ( | double * | u, |
double * | v, | ||
double | a2, | ||
double ** | LL, | ||
double ** | RR, | ||
double * | lambda | ||
) |
Provide conservative eigenvectors for HD equations.
[in] | u | array of conservative variables |
[in] | v | array of primitive variables |
[in] | a2 | square of sound speed |
[out] | LL | left conservative eigenvectors |
[out] | RR | right conservative eigenvectors |
[out] | lambda | eigenvalues |
References:
Definition at line 279 of file eigenv.c.
void Eigenvalues | ( | double ** | v, |
double * | csound2, | ||
double ** | lambda, | ||
int | beg, | ||
int | end | ||
) |
Compute eigenvalues for the HD equations
[in] | v | 1-D array of primitive variables |
[out] | csound2 | 1-D array containing the square of sound speed |
[out] | lambda | 1-D array [i][nv] containing the eigenvalues |
[in] | beg | starting index of computation |
[in] | end | final index of computation |
Definition at line 67 of file eigenv.c.
void MaxSignalSpeed | ( | double ** | v, |
double * | cs2, | ||
double * | cmin, | ||
double * | cmax, | ||
int | beg, | ||
int | end | ||
) |
Compute the maximum and minimum characteristic velocities for the HD equation from the vector of primitive variables v.
[in] | v | 1-D array of primitive variables |
[in] | cs2 | 1-D array containing the square of the sound speed |
[out] | cmin | 1-D array containing the leftmost characteristic |
[out] | cmin | 1-D array containing the rightmost characteristic |
[in] | beg | starting index of computation |
[in] | end | final index of computation |
Definition at line 34 of file eigenv.c.
void PrimEigenvectors | ( | double * | q, |
double | cs2, | ||
double | h, | ||
double * | lambda, | ||
double ** | LL, | ||
double ** | RR | ||
) |
Provide left and right eigenvectors and corresponding eigenvalues for the primitive form of the HD equations (adiabatic, pvte & isothermal cases).
[in] | q | vector of primitive variables |
[in] | cs2 | sound speed squared |
[in] | h | enthalpy |
[out] | lambda | eigenvalues |
[out] | LL | matrix containing left primitive eigenvectors (rows) |
[out] | RR | matrix containing right primitive eigenvectors (columns) |
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:
Definition at line 91 of file eigenv.c.
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.
[in] | L | Left eigenvectors |
[in] | v | (difference of) primitive variables |
[out] | w | (difference of) characteristic variables |
Definition at line 593 of file eigenv.c.