Skip to content

Commit

Permalink
foo3
Browse files Browse the repository at this point in the history
  • Loading branch information
谢萧涯 authored and 谢萧涯 committed Sep 12, 2024
1 parent 06f020e commit a4d9ba6
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ function wave_source_convection(
L = 1000000,
N = 0.012,
)
FT=typeof(U)
F=0.0
Δ=ν_vec[2]-ν_vec[1]
nc_para=(14/45,64/45,24/45,64/45,14/45) #newton-cotes parameter
Expand All @@ -727,17 +728,17 @@ for i=1:5
F = F+ nc_para[i] * Δ * abs(k^2 / ν) *ρ₀ * sign(c-U) * sqrt((N / ν_hat)^2 - 1) * abs(B)^2 / (L * τ)
end
end
return F
return FT(F)
end

function wave_source_original(c, u_source, Bw, Bn, cw, cn, gw_c0, flag)
sign((c - u_source)) * (
Bw * exp(
-log(2.0) *
-log(2.0f0) *
((c * flag + (c - u_source) * (1 - flag) - gw_c0) / cw)^2,
) +
Bn * exp(
-log(2.0) *
-log(2.0f0) *
((c * flag + (c - u_source) * (1 - flag) - gw_c0) / cn)^2,
)
)
Expand Down

0 comments on commit a4d9ba6

Please sign in to comment.