Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
huiyuxie committed Oct 7, 2024
1 parent fa43fb2 commit ff6a45f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
19 changes: 9 additions & 10 deletions src/equations/compressible_euler_multicomponent_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,15 @@ function initial_condition_weak_blast_wave(x, t,
r = abs(x_norm)
cos_phi = x_norm > 0 ? 1 : -1

prim_rho = SVector{ncomponents(equations), real(equations)}(r > 0.5f0 ?
2^(i - 1) * (1 - 2) /
(1 -
2^ncomponents(equations)) *
one(RealT) :
2^(i - 1) * (1 - 2) /
(1 -
2^ncomponents(equations)) *
convert(RealT, 1.1691)
for i in eachcomponent(equations))
prim_rho = SVector{ncomponents(equations), RealT}(r > 0.5f0 ?
2^(i - 1) * (1 - 2) /
(1 -
2^ncomponents(equations)) :
2^(i - 1) * (1 - 2) /
(1 -
2^ncomponents(equations)) *
1.1691
for i in eachcomponent(equations))

v1 = r > 0.5f0 ? zero(RealT) : convert(RealT, 0.1882) * cos_phi
p = r > 0.5f0 ? one(RealT) : convert(RealT, 1.245)
Expand Down
19 changes: 9 additions & 10 deletions src/equations/compressible_euler_multicomponent_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,15 @@ function initial_condition_weak_blast_wave(x, t,
phi = atan(y_norm, x_norm)
sin_phi, cos_phi = sincos(phi)

prim_rho = SVector{ncomponents(equations), real(equations)}(r > 0.5f0 ?
2^(i - 1) * (1 - 2) /
(1 -
2^ncomponents(equations)) *
one(RealT) :
2^(i - 1) * (1 - 2) /
(1 -
2^ncomponents(equations)) *
convert(RealT, 1.1691)
for i in eachcomponent(equations))
prim_rho = SVector{ncomponents(equations), RealT}(r > 0.5f0 ?
2^(i - 1) * (1 - 2) /
(1 -
2^ncomponents(equations)) :
2^(i - 1) * (1 - 2) /
(1 -
2^ncomponents(equations)) *
1.1691
for i in eachcomponent(equations))

v1 = r > 0.5f0 ? zero(RealT) : convert(RealT, 0.1882) * cos_phi
v2 = r > 0.5f0 ? zero(RealT) : convert(RealT, 0.1882) * sin_phi
Expand Down

0 comments on commit ff6a45f

Please sign in to comment.