entropy_func_LinearEuler2D_t Function

public pure function entropy_func_LinearEuler2D_t(this, s) result(e)

The entropy function is the sum of kinetic and internal energy For the linear model, this is

\begin{equation} e = \frac{1}{2} \left( \rho_0*( u^2 + v^2 ) + \frac{P^2}{\rho_0 c^2} \right)

Arguments

TypeIntentOptionalAttributesName
class(LinearEuler2D_t), intent(in) :: this
real(kind=prec), intent(in) :: s(1:this%nvar)

Return Value real(kind=prec)


Contents


Source Code

  pure function entropy_func_LinearEuler2D_t(this,s) result(e)
    !! The entropy function is the sum of kinetic and internal energy
    !! For the linear model, this is
    !!
    !! \begin{equation}
    !!   e = \frac{1}{2} \left( \rho_0*( u^2 + v^2 ) + \frac{P^2}{\rho_0 c^2} \right)
    class(LinearEuler2D_t),intent(in) :: this
    real(prec),intent(in) :: s(1:this%nvar)
    real(prec) :: e

    e = 0.5_prec*this%rho0*(s(2)*s(2)+s(3)*(3))+ &
        0.5_prec*(s(4)*s(4)/(this%rho0*this%c*this%c))

  endfunction entropy_func_LinearEuler2D_t