@@ -264,13 +264,20 @@ contains
264264 ! Calculating the density, the specific heat ratio function, the
265265 ! liquid stiffness function, and the energy reference function,
266266 ! respectively, from the species analogs
267- rho = 0._wp ; gamma = 0._wp ; pi_inf = 0._wp ; qv = 0._wp
268- do i = 1 , num_fluids
269- rho = rho + alpha_rho_K(i)
270- gamma = gamma + alpha_K(i)* gammas(i)
271- pi_inf = pi_inf + alpha_K(i)* pi_infs(i)
272- qv = qv + alpha_rho_K(i)* qvs(i)
273- end do
267+ if (num_fluids == 1 .and. bubbles_euler) then
268+ rho = alpha_rho_K(1 )
269+ gamma = gammas(1 )
270+ pi_inf = pi_infs(1 )
271+ qv = qvs(1 )
272+ else
273+ rho = 0._wp ; gamma = 0._wp ; pi_inf = 0._wp ; qv = 0._wp
274+ do i = 1 , num_fluids
275+ rho = rho + alpha_rho_K(i)
276+ gamma = gamma + alpha_K(i)* gammas(i)
277+ pi_inf = pi_inf + alpha_K(i)* pi_infs(i)
278+ qv = qv + alpha_rho_K(i)* qvs(i)
279+ end do
280+ end if
274281
275282#ifdef MFC_SIMULATION
276283 ! Computing the shear and bulk Reynolds numbers from species analogs
@@ -326,13 +333,20 @@ contains
326333 ! their physical bounds to make sure that any mixture variables that
327334 ! are derived from them result within the limits that are set by the
328335 ! fluids physical parameters that make up the mixture
329- rho_K = 0._wp ; gamma_K = 0._wp ; pi_inf_K = 0._wp ; qv_K = 0._wp
330- do i = 1 , num_fluids
331- rho_K = rho_K + alpha_rho_K(i)
332- gamma_K = gamma_K + alpha_K(i)* gammas(i)
333- pi_inf_K = pi_inf_K + alpha_K(i)* pi_infs(i)
334- qv_K = qv_K + alpha_rho_K(i)* qvs(i)
335- end do
336+ if (num_fluids == 1 .and. bubbles_euler) then
337+ rho_K = alpha_rho_K(1 )
338+ gamma_K = gammas(1 )
339+ pi_inf_K = pi_infs(1 )
340+ qv_K = qvs(1 )
341+ else
342+ rho_K = 0._wp ; gamma_K = 0._wp ; pi_inf_K = 0._wp ; qv_K = 0._wp
343+ do i = 1 , num_fluids
344+ rho_K = rho_K + alpha_rho_K(i)
345+ gamma_K = gamma_K + alpha_K(i)* gammas(i)
346+ pi_inf_K = pi_inf_K + alpha_K(i)* pi_infs(i)
347+ qv_K = qv_K + alpha_rho_K(i)* qvs(i)
348+ end do
349+ end if
336350
337351 if (present (G_K)) then
338352 G_K = 0._wp
@@ -595,6 +609,8 @@ contains
595609
596610 call s_compute_species_fraction(qK_cons_vf, j, k, l, alpha_rho_K, alpha_K)
597611
612+ ! print * , j, k, l, alpha_rho_K, qK_cons_vf(1 )%sf(j, k, l), alpha_K, qK_cons_vf(advxb)%sf(j, k, l)
613+
598614 if (model_eqns /= 4 ) then
599615#ifdef MFC_SIMULATION
600616 ! If in simulation, use acc mixture subroutines
@@ -1324,9 +1340,12 @@ contains
13241340 alpha_rho_K(i) = max (0._wp , alpha_rho_K(i))
13251341 alpha_K(i) = min (max (0._wp , alpha_K(i)), 1._wp )
13261342 end do
1343+
13271344 alpha_K = alpha_K/ max (sum (alpha_K), 1.e-16_wp )
13281345 end if
13291346
1347+ if (num_fluids == 1 .and. bubbles_euler) alpha_K(1 ) = q_vf(advxb)%sf(k, l, r)
1348+
13301349 end subroutine s_compute_species_fraction
13311350
13321351 impure subroutine s_finalize_variables_conversion_module ()
0 commit comments