Hydrodynamics Entropy Function

from Trangenstein, 4.4.2 through 4.4.4

Thermodynamics


ρ = density
P = pressure
eint = internal specific energy
T = temperature
S = entropy

i,j,k,... spans x,y,z
I,J,K,... spans all elements

Second law of thermodynamics:
deint=TdSPd(1/ρ)
therefore
P=1/ρe
T=Seint

Ideal gas relation:
P=ρRT
eint=cvT
where
R = gas constant
cv = heat capacity
polytropic gas heat capacity:
cv=Rγ1
where
γ = heat capacity ratio

polytropic ideal gas:
eint=cvT=RTγ1
therefore
(γ1)eint=RT
therefore
P/ρ=RT=(γ1)eint
P=(γ1)ρeint

specific enthalpy:
h=eint+P/ρ=eint+(γ1)eint=γe
where
h = enthalpy

second law, in terms of dS:
dS=1T(deint+Pd(1/ρ))
d(1/ρ)=1/ρ2dρ
therefore
dS=1Tdeint1Tρ2Pdρ

second law for polytropic ideal gas:
using eint=Pρ(γ1)
therefore deint=dPρ(γ1)Pdρρ2(γ1)
substitute into second law:
dS=1Tdeint1Tρ2Pdρ
dS=1T(dPρ(γ1)Pdρρ2(γ1))1Tρ2Pdρ
dS=1Tρ(γ1)dPPTρ2(γ1)dρ1Tρ2Pdρ
dS=1Tρ(γ1)dPγγ1PTρ2dρ

second law partials for polytropic ideal gas:
PS=1Tρ(γ1)
ρS=γγ1PTρ2
substitute T=eintcv=P(γ1)ρcv
our partials of S become:
SP=cvP
Sρ=γcvρ
solve to find the entropy function:
dS=cvPdPγcvρdρ
S=S0+cv(ln(P)ln(P0))γcv(ln(ρ)ln(ρ0))
S=S0+cvln(PP0(ρ0ρ)γ)

The entropy function should be constant (i.e. dSdt=0 except in the presence of shock waves.
Notice that velocity does not appear in the entropy function. Nor does it appear later in the entropy flux function ρS. This might be why the entropy flux function gradient with respect to primitives matches the diagonalized quasilinear solution, which is equal to the acoustic matrix plus identity times vx. This vi variables might be distinct of the entropy flux, but they are also distinct of what its gradient computes.

Characteristics

primitives:
WI=↓I[ρviP]

conservatives:
UI=↓I[ρρviEtotal]
for
Etotal=ρetotal = total energy density
etotal=eint+ekin=eint+12v2 = total specific energy

Derivative of conservative wrt primitive:
UIWJ=↓I[100viρδij012v2ρvj1γ1]J
Derivative of primitives wrt conservatives:
WJUI=↓J[100vjρδij1ρ012(γ1)v2(γ1)viγ1]I

Flux vector:
FIj=↓I[ρvjρvivj+δijPHtotalvj]
for
Htotal=ρhtotal = total entropy density
htotal=etotal+P = total specific entropy

Derivative of flux vector with respect to primitive variables:
FIjWK=↓I[vjρδjk0vivjρ(δikvj+viδjk)δij12v2vjρvjvk+Htotalδjkγγ1vj]K

Derivative of flux vector with respect to conservative variables:
FIjUK=FIjWLWLUK
=↓I[vjρδjl0vivjρ(δilvj+viδjl)δij12v2vjρvjvl+(Ehydro+P)δjlγγ1vj]LL[1001ρvl1ρδkl012(γ1)v2(γ1)vkγ1]K
=↓I[0δjk0vivj+12δij(γ1)v2δikvj+δjkviδij(γ1)vkδij(γ1)vj(12(γ1)v2htotal)(γ1)vjvk+δjkhtotalγvj]K

Hyperbolic conservation law:
UIt+FIjxJ=0
with respect to conservative variables:
UIt+FIjUKUKxj=0

Rewritten in terms of primitives:
UIWKWKt+FIjUKUKxj=0
WLUIUIWKWKt+WLUIFIjUKUKxj=0
δLKWKt+WLUIFIjUKUKxj=0
WLt+WLUIFIjUMUMWKWKxj=0
reindex
WIt+WIULFLjUMUMWKWKxj=0

Therefore the equivalent flux matrix for the primitive variables - the quasilinear flux matrix - is given by:
WIULFLjUMUMWK=WIULFLjWK
=↓I[100viρδil1ρ012(γ1)v2(γ1)vlγ1]LFLjWK
=↓I[100viρδil1ρ012(γ1)v2(γ1)vlγ1]LL[vjρδjk0vlvjρ(δlkvj+vlδjk)δlj12v2vjρvjvk+Htotalδjkγγ1vj]K
=↓I[vjρδjk00δikvjδij1ρ0γPδjkvj]K
=↓I[0ρδjk000δij1ρ0γPδjk0]K+δIKvj
=AIjK+δIKvj
for
AIjK=↓I[0ρδjk000δij1ρ0γPδjk0]K= the acoustic matrix in direction xj

Let csnd2=γPρ be the speed of sound.

Right eigenvectors of AIjK:
AIjKyK=λyK
I[0ρδjk000δij1ρ0γPδjk0]KyK

has the following solutions:
{ρδjkyk=λyρ1ρδijyP=λyiγPδjkyk=λyP}
{yj=λyρ/ρyi=δijyP/(ρλ)yj=λyP/(γP)}
combining yj of the 1st and 3rd constraints:
λyρ/ρ=λyP/(γP)
divide by λ:
(γP)/ρ=yP/yρ
Let yρ=1
Therefore yP=γPρ=csnd2
substitute yP into the 2nd constraint:
yi=δijγPρ2λ
equate this with the 2nd constraint:
yj=γPρ2λ=λ/ρ
solve for λ:
λ2=γPρ=csnd2
λ=±csnd
use λ and yi=δijλ/ρ to solve for yi:
yi=±δijcsndρ

Then there is λ=0 (TODO show where this comes from)
{ρδjkyk=01ρδijyP=0γPδjkyk=0}
This is true for yj=0 by the 1st and 3rd constraint, and yP=0 by the 2nd constraint
Therefore we are left with three degrees of freedom: one of yρ=1, and two of yj=1 for jj

Put these together and we get:
AIjKyKL=ΛIKyKL
For ΛIK=δIKλK is the diagonal matrix of eigenvalues
and yKL are the collection of eigenvectors yK, for the index L denoting the distinct eigenvector.
Written out:
I[0ρδjk0001ρδij0γPδjk0]KK[1101δijcsndρ0δjjδijcsndρcsnd200csnd2]L=↓I[csnd0000000csnd]KK[1101δijcsndρ0δjjδijcsndρcsnd200csnd2]L

Now we can find the eigenvalues of the change in flux with respect to change in conservative as:
=FIjWLWLUK by chain rule
=δINFNjWLWLUK by inserting a delta
=UIWMWMUNFNjWLWLUK by replacing the delta with a change in coordinates and its inverse
Now we can replace the WMUNFNjWL with the acoustic matrix ANjl+δNLvj.
=UIWM(ANjL+δNLvj)WLUK
So the eigenvectors of FIjUK are equal to those of AIjK plus vj (why? because AIjK is traceless?).
And (only if the eigenvectors of AIjK are equal to those of δIKvj. why again?) the right eigenvectors of FIjUK
are equal to UIWKyKL.

Entropy Function

Entropy recap:
S=S0+cvln(PP0(ρ0ρ)γ

Derivative of S wrt primitives:
ρS=γcv/ρ
viS=0
PS=cv/P
IS=[γcvρ0cvP]I

Derivative of densitised entropy wrt primitives:
ρ(ρS)=Sγcv
vi(ρS)=0
P(ρS)=cvρ/P
IS=[Sγcv0cvρP]I

...transformed by the transpose quasilinear flux matrix...
I(ρS)WIULFLjWK
=[Sγcv0cvρP]II[vjρδjk00δikvjδij1ρ0γPδjkvj]K
=[vj(Sγcv)δjkρSvjcvρP]K
=ρvjIS+S[vjδjkρ0]
=ρvjIS+SI(ρvj)
=I(Sρvj)
So the gradient of the densitized entropy function, times the quasilinear flux matrix, is equal to the gradient of the combined densitized entropy function times the velocity in the flux direction.
Is that the conditions for the definition of the entropy flux?

Second derivative of densitized entropy with respect to primitives:
(ρS),ρρ=S,ρ=γcvρ
(ρS),ρP=S,P=cvP
(ρS),viK=0
(ρS),PP=(cvρP),P=cvρP2
(ρS)IK=cvI[γρ01P0001P0ρP2]K

eigenvalues of second derivative of entropy with respect to primitives:
λ=0 times 3
and
(cvγρλ)(cvρP2λ)cv2P2=0
λ2+cv(γρ+ρP2)λ+cv2γ1P2=0
λ=12cv2((γρ+ρP2)±(γρ+ρP2)24γ1P2)
λ=12cv2(γρ+ρP2γ2ρ2+2γP2+ρ2P44γ1P2)
λ=12cv2(γρ+ρP2γ2ρ22γP2+ρ2P4+4P2)