Skip to content

Commit aaa0ddf

Browse files
author
Anand Radhakrishnan
committed
Test suite passes fully on Phoenix (NVHPC + OPENMP), Fixes failing chemistry cases
1 parent e28423a commit aaa0ddf

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/common/m_constants.fpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module m_constants
1010

1111
real(wp), parameter :: dflt_real = -1.e6_wp !< Default real value
1212
real(wp), parameter :: sgm_eps = 1.e-16_wp !< Segmentation tolerance
13+
real(wp), parameter :: Chem_Tolerance = 1.e-16_wp !< Speed of Sound Tolerance in Chemistry
1314
real(wp), parameter :: small_alf = 1.e-11_wp !< Small alf tolerance
1415
real(wp), parameter :: pi = 3.141592653589793_wp !< Pi
1516
real(wp), parameter :: verysmall = 1.e-12_wp !< Very small number

src/common/m_variables_conversion.fpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,12 +1634,11 @@ contains
16341634
real(wp), intent(out) :: c
16351635

16361636
real(wp) :: blkmod1, blkmod2
1637-
real(wp) :: Tolerance
16381637

16391638
integer :: q
16401639

16411640
if (chemistry) then
1642-
if (avg_state == 1 .and. abs(c_c) > Tolerance) then
1641+
if (avg_state == 1 .and. abs(c_c) > Chem_Tolerance) then
16431642
c = sqrt(c_c - (gamma - 1.0_wp)*(vel_sum - H))
16441643
else
16451644
c = sqrt((1.0_wp + 1.0_wp/gamma)*pres/rho)

src/simulation/m_riemann_solvers.fpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,12 +2326,12 @@ contains
23262326
#:endcall GPU_PARALLEL_LOOP
23272327
else
23282328
! 5-EQUATION MODEL WITH HLLC
2329-
#:call GPU_PARALLEL_LOOP(collapse=3, private='[vel_L, vel_R, Re_L, Re_R, rho_avg, h_avg, gamma_avg, alpha_L, alpha_R, s_L, s_R, s_S, vel_avg_rms, pcorr, zcoef, vel_L_tmp, vel_R_tmp, Ys_L, Ys_R, Xs_L, Xs_R, Gamma_iL, Gamma_iR, Cp_iL, Cp_iR, tau_e_L, tau_e_R, xi_field_L, xi_field_R, Yi_avg,Phi_avg, h_iL, h_iR, h_avg_2]', copyin='[is1, is2, is3]')
2329+
#:call GPU_PARALLEL_LOOP(collapse=3, private='[T_L, T_R, vel_L, vel_R, Re_L, Re_R, rho_avg, h_avg, gamma_avg, alpha_L, alpha_R, s_L, s_R, s_S, vel_avg_rms, pcorr, zcoef, vel_L_tmp, vel_R_tmp, Ys_L, Ys_R, Xs_L, Xs_R, Gamma_iL, Gamma_iR, Cp_iL, Cp_iR, tau_e_L, tau_e_R, xi_field_L, xi_field_R, Yi_avg,Phi_avg, h_iL, h_iR, h_avg_2]', copyin='[is1, is2, is3]')
23302330
do l = is3%beg, is3%end
23312331
do k = is2%beg, is2%end
23322332
do j = is1%beg, is1%end
23332333

2334-
!idx1 = 1; if (dir_idx(1) == 2) idx1 = 2; if (dir_idx(1) == 3) idx1 = 3
2334+
idx1 = 1; if (dir_idx(1) == 2) idx1 = 2; if (dir_idx(1) == 3) idx1 = 3
23352335

23362336
$:GPU_LOOP(parallelism='[seq]')
23372337
do i = 1, num_fluids
@@ -2459,7 +2459,7 @@ contains
24592459
T_R = pres_R/rho_R/R_gas_R
24602460

24612461
call get_species_specific_heats_r(T_L, Cp_iL)
2462-
call get_species_specific_heats_r(T_R, Cp_iR)
2462+
call get_species_specific_heats_r(T_R, Cp_iR)
24632463

24642464
if (chem_params%gamma_method == 1) then
24652465
!> gamma_method = 1: Ref. Section 2.3.1 Formulation of doi:10.7907/ZKW8-ES97.
@@ -2554,20 +2554,20 @@ contains
25542554
end if
25552555

25562556
H_L = (E_L + pres_L)/rho_L
2557-
H_R = (E_R + pres_R)/rho_R
2557+
H_R = (E_R + pres_R)/rho_R
25582558

25592559
@:compute_average_state()
25602560

25612561
call s_compute_speed_of_sound(pres_L, rho_L, gamma_L, pi_inf_L, H_L, alpha_L, &
2562-
vel_L_rms, 0._wp, c_L)
2562+
vel_L_rms, 0._wp, c_L)
25632563

25642564
call s_compute_speed_of_sound(pres_R, rho_R, gamma_R, pi_inf_R, H_R, alpha_R, &
2565-
vel_R_rms, 0._wp, c_R)
2565+
vel_R_rms, 0._wp, c_R)
25662566

25672567
!> The computation of c_avg does not require all the variables, and therefore the non '_avg'
2568-
! variables are placeholders to call the subroutine.
2568+
! variables are placeholders to call the subroutine.
25692569
call s_compute_speed_of_sound(pres_R, rho_avg, gamma_avg, pi_inf_R, H_avg, alpha_R, &
2570-
vel_avg_rms, c_sum_Yi_Phi, c_avg)
2570+
vel_avg_rms, c_sum_Yi_Phi, c_avg)
25712571

25722572
if (viscous) then
25732573
$:GPU_LOOP(parallelism='[seq]')

0 commit comments

Comments
 (0)