diff --git a/src/ConservationLaws/euler_navierstokes.jl b/src/ConservationLaws/euler_navierstokes.jl index 17ac85d5..442bafd9 100644 --- a/src/ConservationLaws/euler_navierstokes.jl +++ b/src/ConservationLaws/euler_navierstokes.jl @@ -307,9 +307,11 @@ Domain should be [0,2]² """ struct KelvinHelmholtzInstability <: AbstractGridFunction{2} γ::Float64 + ρ_0::Float64 N_c::Int - function KelvinHelmholtzInstability(conservation_law::EulerEquations{2}) - return new(conservation_law.γ,4) + function KelvinHelmholtzInstability(conservation_law::EulerEquations{2}, + ρ_0::Float64=0.5) + return new(conservation_law.γ,ρ_0,4) end end @@ -317,9 +319,9 @@ end x::NTuple{2,Float64}, t::Float64=0.0) x_rel = (x[1]-1, x[2]-1) B = tanh(15*x_rel[2] + 7.5) - tanh(15*x_rel[2] - 7.5) - ρ = 0.5 + 0.75*B + ρ = f.ρ_0 + 0.75*B p = 1.0 - u = 0.5*(B-1) + u = 0.5*(B-1) v = 0.1*sin(2π*x_rel[1]) return SVector{4}(ρ,ρ*u,ρ*v,p/(f.γ-1) + 0.5*ρ*(u^2 + v^2)) end \ No newline at end of file