Skip to content

Commit e1e953c

Browse files
Hyeoksu LeeHyeoksu Lee
authored andcommitted
fix mixture rule
1 parent ae827a5 commit e1e953c

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

src/simulation/m_bubbles_EE.fpp

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -242,16 +242,22 @@ contains
242242
myalpha(ii) = q_cons_vf(advxb + ii - 1)%sf(j, k, l)
243243
end do
244244

245-
myRho = 0._wp
246-
n_tait = 0._wp
247-
B_tait = 0._wp
248-
249-
$:GPU_LOOP(parallelism='[seq]')
250-
do ii = 1, num_fluids
251-
myRho = myRho + myalpha_rho(ii)
252-
n_tait = n_tait + myalpha(ii)*gammas(ii)
253-
B_tait = B_tait + myalpha(ii)*pi_infs(ii)/pi_fac
254-
end do
245+
if (num_fluids == 1) then
246+
myRho = myalpha_rho(1)
247+
n_tait = gammas(1)
248+
B_tait = pi_infs(1)/pi_fac
249+
else
250+
myRho = 0._wp
251+
n_tait = 0._wp
252+
B_tait = 0._wp
253+
254+
$:GPU_LOOP(parallelism='[seq]')
255+
do ii = 1, num_fluids
256+
myRho = myRho + myalpha_rho(ii)
257+
n_tait = n_tait + myalpha(ii)*gammas(ii)
258+
B_tait = B_tait + myalpha(ii)*pi_infs(ii)/pi_fac
259+
end do
260+
end if
255261

256262
n_tait = 1._wp/n_tait + 1._wp !make this the usual little 'gamma'
257263
B_tait = B_tait*(n_tait - 1)/n_tait ! make this the usual pi_inf

0 commit comments

Comments
 (0)