Struct2D  1.0
Solution of 2-D Euler- and Navier-Stokes Equations on Structured Grids
 All Classes Files Functions Variables
precondMatrices.f90 File Reference

Collection of matrices and operators for low Mach-number preconditioning. All formulations assume general 3-D flow. More...

Functions/Subroutines

real(rtype) function comptheta (gam, c, q2)
 Computes the preconditioning parameter theta. More...
 
subroutine prim2cons (wvec, wpvec, H, theta, rhoT, hp, hT, pmat)
 Computes transformation matrix from primitive to conservative variables P (equivalent to the preconditioning matrix G). More...
 
subroutine cons2prim (wvec, wpvec, H, q2, theta, rhoT, hp, hT, pmat1)
 Computes transformation matrix from conservative to primitive variables P^-1 (equivalent to the inverse of the preconditioning matrix G^-1). More...
 
subroutine lefteigenvec (wvec, wpvec, nvec, V, theta, rhop, rhoT, hp, hT, evl)
 Computes matrix of left eigenvectors of G^-1*A_c,p (i.e., (T_p)^-1). More...
 
subroutine righteigenvec (wvec, wpvec, nvec, V, H, theta, rhop, rhoT, hp, hT, evr)
 Computes matrix of right eigenvectors of G^-1*A_c,p multiplied by the preconditioning matrix G (i.e., G*T_p). More...
 
subroutine matprodtp1_p1 (wvec, wpvec, nvec, V, H, theta, rhop, rhoT, hp, hT, q2, mat)
 Computes matrix product (T_p^-1) * (P^-1). More...
 
subroutine matrixtimesinverse (wpvec, q2, amat, bmat, cmat)
 Computes matrix times the inverse of a similar matrix, where both matrices have the structure of the preconditioning (or the transformation) matrix. Thus, products like P*G^-1 or G*P^-1 can be evaluated efficiently. More...
 
subroutine matvecprod5 (a, v, c)
 Computes matrix times vector (n=5). More...
 

Function/Subroutine Documentation

real(rtype) function comptheta ( real(rtype), intent(in)  gam,
real(rtype), intent(in)  c,
real(rtype), intent(in)  q2 
)
Parameters
gamratio of specific heats
cspeed of sound
q2total velocity squared
subroutine cons2prim ( real(rtype), dimension(5), intent(in)  wvec,
real(rtype), dimension(5), intent(in)  wpvec,
real(rtype), intent(in)  H,
real(rtype), intent(in)  q2,
real(rtype), intent(in)  theta,
real(rtype), intent(in)  rhoT,
real(rtype), intent(in)  hp,
real(rtype), intent(in)  hT,
real(rtype), dimension(5,5), intent(out)  pmat1 
)
Parameters
wvecvector of conservative variables
wpvecvector of primitive variables
Htotal enthalpy
q2total velocity squared
thetapreconditioning parameter
rhoTderivative of density wrp. to temperature
hpderivative of enthalpy wrp. to pressure
hTderivative of enthalpy wrp. to temperature
pmat1inverse of matrix P
subroutine lefteigenvec ( real(rtype), dimension(5), intent(in)  wvec,
real(rtype), dimension(5), intent(in)  wpvec,
real(rtype), dimension(3), intent(in)  nvec,
real(rtype), intent(in)  V,
real(rtype), intent(in)  theta,
real(rtype), intent(in)  rhop,
real(rtype), intent(in)  rhoT,
real(rtype), intent(in)  hp,
real(rtype), intent(in)  hT,
real(rtype), dimension(5,5), intent(out)  evl 
)
Parameters
wvecvector of conservative variables
wpvecvector of primitive variables
nveccomponents of the unit normal vector
Vcontravariant velocity
thetapreconditioning parameter
rhopderivative of density wrp. to pressure
rhoTderivative of density wrp. to temperature
hpderivative of enthalpy wrp. to pressure
hTderivative of enthalpy wrp. to temperature
evlmatrix of left eigenvectors (T_p)^-1
subroutine matprodtp1_p1 ( real(rtype), dimension(5), intent(in)  wvec,
real(rtype), dimension(5), intent(in)  wpvec,
real(rtype), dimension(3), intent(in)  nvec,
real(rtype), intent(in)  V,
real(rtype), intent(in)  H,
real(rtype), intent(in)  theta,
real(rtype), intent(in)  rhop,
real(rtype), intent(in)  rhoT,
real(rtype), intent(in)  hp,
real(rtype), intent(in)  hT,
real(rtype), intent(in)  q2,
real(rtype), dimension(5,5), intent(out)  mat 
)
Parameters
wvecvector of conservative variables
wpvecvector of primitive variables
nveccomponents of the unit normal vector
Vcontravariant velocity
Htotal enthalpy
thetapreconditioning parameter
rhopderivative of density wrp. to pressure
rhoTderivative of density wrp. to temperature
hpderivative of enthalpy wrp. to pressure
hTderivative of enthalpy wrp. to temperature
q2total velocity squared
matresulting matrix
subroutine matrixtimesinverse ( real(rtype), dimension(5), intent(in)  wpvec,
real(rtype), intent(in)  q2,
real(rtype), dimension(5,5), intent(in)  amat,
real(rtype), dimension(5,5), intent(in)  bmat,
real(rtype), dimension(5,5), intent(out)  cmat 
)
Parameters
wpvecvector of primitive variables
q2total velocity squared
amatmatrix A
bmatmatrix B
cmatresulting matrix C, i.e., C=A*B
subroutine matvecprod5 ( real(rtype), dimension(5,5), intent(in)  a,
real(rtype), dimension(5), intent(in)  v,
real(rtype), dimension(5), intent(out)  c 
)
Parameters
a5x5 matrix A
vvector v (length 5)
cresulting vector c, i.e., c=A*v
subroutine prim2cons ( real(rtype), dimension(5), intent(in)  wvec,
real(rtype), dimension(5), intent(in)  wpvec,
real(rtype), intent(in)  H,
real(rtype), intent(in)  theta,
real(rtype), intent(in)  rhoT,
real(rtype), intent(in)  hp,
real(rtype), intent(in)  hT,
real(rtype), dimension(5,5), intent(out)  pmat 
)
Parameters
wvecvector of conservative variables
wpvecvector of primitive variables
Htotal enthalpy
thetapreconditioning parameter
rhoTderivative of density wrp. to temperature
hpderivative of enthalpy wrp. to pressure
hTderivative of enthalpy wrp. to temperature
pmatmatrix P
subroutine righteigenvec ( real(rtype), dimension(5), intent(in)  wvec,
real(rtype), dimension(5), intent(in)  wpvec,
real(rtype), dimension(3), intent(in)  nvec,
real(rtype), intent(in)  V,
real(rtype), intent(in)  H,
real(rtype), intent(in)  theta,
real(rtype), intent(in)  rhop,
real(rtype), intent(in)  rhoT,
real(rtype), intent(in)  hp,
real(rtype), intent(in)  hT,
real(rtype), dimension(5,5), intent(out)  evr 
)
Parameters
wvecvector of conservative variables
wpvecvector of primitive variables
nveccomponents of the unit normal vector
Vcontravariant velocity
Htotal enthalpy
thetapreconditioning parameter
rhopderivative of density wrp. to pressure
rhoTderivative of density wrp. to temperature
hpderivative of enthalpy wrp. to pressure
hTderivative of enthalpy wrp. to temperature
evrmatrix of right eigenvectors multiplied by G (G*T_p)