From c39c1dcaa7789ff7f8f2539ad27a87af8a5b0a9f Mon Sep 17 00:00:00 2001 From: Tristan Montoya Date: Sat, 21 Oct 2023 15:11:37 -0400 Subject: [PATCH] specify Mach number for TGV --- src/ConservationLaws/euler_navierstokes.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ConservationLaws/euler_navierstokes.jl b/src/ConservationLaws/euler_navierstokes.jl index c0b7886e..17ac85d5 100644 --- a/src/ConservationLaws/euler_navierstokes.jl +++ b/src/ConservationLaws/euler_navierstokes.jl @@ -284,15 +284,17 @@ Domain should be [0,2π]³. """ struct TaylorGreenVortex <: AbstractGridFunction{3} γ::Float64 + Ma::Float64 N_c::Int - function TaylorGreenVortex(conservation_law::EulerEquations{3}) - return new(conservation_law.γ,5) + function TaylorGreenVortex(conservation_law::EulerEquations{3}, + Ma::Float64=0.1) + return new(conservation_law.γ,Ma,5) end end @inline function evaluate(f::TaylorGreenVortex, x::NTuple{3,Float64}, t::Float64=0.0) - p = (100/f.γ) + 0.0625*(2*cos(2*x[1]) + 2*cos(2*x[2]) + + p = (1/(f.Ma^2*f.γ)) + 0.0625*(2*cos(2*x[1]) + 2*cos(2*x[2]) + cos(2*x[1])*cos(2*x[3]) + cos(2*x[2])*cos(2*x[3])) u = sin(x[1])*cos(x[2])*cos(x[3]) v = -cos(x[1])*sin(x[2])*cos(x[3])