Skip to content

Commit d66c7ef

Browse files
author
Mark Zhang
committed
Fix minor precision mismatch
1 parent 6f6e3d3 commit d66c7ef

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/common/include/2dHardcodedIC.fpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@
135135

136136
case (207) ! Kelvin Helmholtz Instability
137137
sigma = 0.05_wp / sqrt(2.0_wp)
138-
gauss1 = exp(- (y_cc(j) - 0.75_wp) ** 2 / (2 * sigma ** 2))
139-
gauss2 = exp(- (y_cc(j) - 0.25_wp) ** 2 / (2 * sigma ** 2))
138+
gauss1 = exp(- (y_cc(j) - 0.75_wp) ** 2 / (2.0_wp * sigma ** 2))
139+
gauss2 = exp(- (y_cc(j) - 0.25_wp) ** 2 / (2.0_wp * sigma ** 2))
140140
q_prim_vf(momxb + 1)%sf(i, j, 0) = &
141141
0.1_wp * sin(4.0_wp * pi * x_cc(i)) * (gauss1 + gauss2)
142142

@@ -145,13 +145,13 @@
145145
eps = 1.0e-6_wp
146146
ei = 5.0_wp
147147
! Smoothening function to smooth out sharp discontinuity in the interface
148-
if(x_cc(i) <= 0.7 * lam) then
148+
if(x_cc(i) <= 0.7_wp * lam) then
149149
d = x_cc(i) - lam * (0.4_wp - 0.1_wp * sin(2.0_wp * pi * (y_cc(j) / lam + 0.25_wp)))
150150
fsm = 0.5_wp * (1.0_wp + erf(d / (ei * sqrt(dx * dy))))
151151
alpha_air = eps + (1.0_wp - 2.0_wp * eps) * fsm
152-
alpha_sf6 = 1.0 - alpha_air
153-
q_prim_vf(contxb)%sf(i, j, 0) = alpha_sf6 * 5.04
154-
q_prim_vf(contxe)%sf(i, j, 0) = alpha_air * 1.0
152+
alpha_sf6 = 1.0_wp - alpha_air
153+
q_prim_vf(contxb)%sf(i, j, 0) = alpha_sf6 * 5.04_wp
154+
q_prim_vf(contxe)%sf(i, j, 0) = alpha_air * 1.0_wp
155155
q_prim_vf(advxb)%sf(i, j, 0) = alpha_sf6
156156
q_prim_vf(advxe)%sf(i, j, 0) = alpha_air
157157
end if

0 commit comments

Comments
 (0)