USER_PROBLEM: Make velocity perturbation truely divergence free.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
40b52165e8
commit
827825a8d1
@ -130,7 +130,7 @@ module user_problem
|
||||
!
|
||||
character(len=64) :: perturbation = "noise"
|
||||
integer :: n
|
||||
real(kind=8) :: thh, fc
|
||||
real(kind=8) :: thh, fc, ka
|
||||
#if NDIMS == 3
|
||||
real(kind=8) :: thv, tx, ty, tz, tt
|
||||
#endif /* NDIMS == 3 */
|
||||
@ -329,8 +329,9 @@ module user_problem
|
||||
kx(n) = pi2 * nint(kper * cos(thh))
|
||||
ky(n) = pi2 * nint(kper * sin(thh))
|
||||
kz(n) = 0.0d+00
|
||||
ux(n) = fc * sin(thh)
|
||||
uy(n) = fc * cos(thh)
|
||||
ka = sqrt(kx(n)**2 + ky(n)**2)
|
||||
ux(n) = fc * ky(n) / ka
|
||||
uy(n) = - fc * kx(n) / ka
|
||||
uz(n) = 0.0d+00
|
||||
#endif /* NDIMS == 3 */
|
||||
ph(n) = pi2 * randuni()
|
||||
|
Loading…
x
Reference in New Issue
Block a user