Skip to content

Commit

Permalink
specify Mach number for TGV
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanmontoya committed Oct 21, 2023
1 parent 3197d8d commit c39c1dc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ConservationLaws/euler_navierstokes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit c39c1dc

Please sign in to comment.