From f756cd408b30f87f2e489340c6e61bdf1fb6a02a Mon Sep 17 00:00:00 2001 From: haochey Date: Fri, 7 Jun 2024 00:59:21 -0400 Subject: [PATCH 1/3] Fix probe output --- src/simulation/m_data_output.fpp | 38 +++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/src/simulation/m_data_output.fpp b/src/simulation/m_data_output.fpp index 1fd0da6457..cb41a187c4 100644 --- a/src/simulation/m_data_output.fpp +++ b/src/simulation/m_data_output.fpp @@ -1230,14 +1230,20 @@ contains vel(s) = q_cons_vf(cont_idx%end + s)%sf(j - 2, k - 2, l)/rho end do - call s_compute_pressure( & - q_cons_vf(1)%sf(j - 2, k - 2, l), & - q_cons_vf(alf_idx)%sf(j - 2, k - 2, l), & - 0.5d0*(q_cons_vf(2)%sf(j - 2, k - 2, l)**2.d0)/ & - q_cons_vf(1)%sf(j - 2, k - 2, l), & - pi_inf, gamma, rho, qv, pres, & - q_cons_vf(stress_idx%beg)%sf(j - 2, k - 2, l), & - q_cons_vf(mom_idx%beg)%sf(j - 2, k - 2, l), G) + if (hypoelasticity) then + call s_compute_pressure( & + q_cons_vf(1)%sf(j - 2, k - 2, l), & + q_cons_vf(alf_idx)%sf(j - 2, k - 2, l), & + 0.5d0*(q_cons_vf(2)%sf(j - 2, k - 2, l)**2.d0)/ & + q_cons_vf(1)%sf(j - 2, k - 2, l), & + pi_inf, gamma, rho, qv, pres, & + q_cons_vf(stress_idx%beg)%sf(j - 2, k - 2, l), & + q_cons_vf(mom_idx%beg)%sf(j - 2, k - 2, l), G) + else + call s_compute_pressure(q_cons_vf(E_idx)%sf(j - 2, k - 2, l), & + q_cons_vf(alf_idx)%sf(j - 2, k - 2, l), & + 0.5d0*rho*dot_product(vel, vel), pi_inf, gamma, rho, qv, pres) + end if if (model_eqns == 4) then lit_gamma = 1d0/fluid_pp(1)%gamma + 1d0 @@ -1307,8 +1313,20 @@ contains vel(s) = q_cons_vf(cont_idx%end + s)%sf(j - 2, k - 2, l - 2)/rho end do - call s_compute_pressure(q_cons_vf(E_idx)%sf(j - 2, k - 2, l - 2), & - 0d0, 0.5d0*rho*dot_product(vel, vel), pi_inf, gamma, rho, qv, pres) + if (hypoelasticity) then + call s_compute_pressure( & + q_cons_vf(1)%sf(j - 2, k - 2, l - 2), & + q_cons_vf(alf_idx)%sf(j - 2, k - 2, l - 2), & + 0.5d0*(q_cons_vf(2)%sf(j - 2, k - 2, l - 2)**2.d0)/ & + q_cons_vf(1)%sf(j - 2, k - 2, l - 2), & + pi_inf, gamma, rho, qv, pres, & + q_cons_vf(stress_idx%beg)%sf(j - 2, k - 2, l - 2), & + q_cons_vf(mom_idx%beg)%sf(j - 2, k - 2, l - 2), G) + else + call s_compute_pressure(q_cons_vf(E_idx)%sf(j - 2, k - 2, l - 2), & + q_cons_vf(alf_idx)%sf(j - 2, k - 2, l - 2), & + 0.5d0*rho*dot_product(vel, vel), pi_inf, gamma, rho, qv, pres) + end if ! Compute mixture sound speed call s_compute_speed_of_sound(pres, rho, gamma, pi_inf, & From a429b80ab5f296b9c60eb19edf1a43f49dd645d3 Mon Sep 17 00:00:00 2001 From: haochey Date: Fri, 7 Jun 2024 10:26:25 -0400 Subject: [PATCH 2/3] Fix --- src/simulation/m_data_output.fpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/simulation/m_data_output.fpp b/src/simulation/m_data_output.fpp index cb41a187c4..4f48958f6d 100644 --- a/src/simulation/m_data_output.fpp +++ b/src/simulation/m_data_output.fpp @@ -1049,6 +1049,8 @@ contains real(kind(0d0)) :: E_e real(kind(0d0)), dimension(6) :: tau_e real(kind(0d0)) :: G + real(kind(0d0)) :: dyn_p + integer :: i, j, k, l, s, q !< Generic loop iterator @@ -1128,22 +1130,20 @@ contains vel(s) = q_cons_vf(cont_idx%end + s)%sf(j - 2, k, l)/rho end do + dyn_p = 0.5d0*rho*dot_product(vel, vel) + if (hypoelasticity) then call s_compute_pressure( & q_cons_vf(1)%sf(j - 2, k, l), & q_cons_vf(alf_idx)%sf(j - 2, k, l), & - 0.5d0*(q_cons_vf(2)%sf(j - 2, k, l)**2.d0)/ & - q_cons_vf(1)%sf(j - 2, k, l), & - pi_inf, gamma, rho, qv, pres, & + dyn_p, pi_inf, gamma, rho, qv, pres, & q_cons_vf(stress_idx%beg)%sf(j - 2, k, l), & q_cons_vf(mom_idx%beg)%sf(j - 2, k, l), G) else call s_compute_pressure( & q_cons_vf(1)%sf(j - 2, k, l), & q_cons_vf(alf_idx)%sf(j - 2, k, l), & - 0.5d0*(q_cons_vf(2)%sf(j - 2, k, l)**2.d0)/ & - q_cons_vf(1)%sf(j - 2, k, l), & - pi_inf, gamma, rho, qv, pres) + dyn_p, pi_inf, gamma, rho, qv, pres) end if if (model_eqns == 4) then @@ -1230,19 +1230,19 @@ contains vel(s) = q_cons_vf(cont_idx%end + s)%sf(j - 2, k - 2, l)/rho end do + dyn_p = 0.5d0*rho*dot_product(vel, vel) + if (hypoelasticity) then call s_compute_pressure( & q_cons_vf(1)%sf(j - 2, k - 2, l), & q_cons_vf(alf_idx)%sf(j - 2, k - 2, l), & - 0.5d0*(q_cons_vf(2)%sf(j - 2, k - 2, l)**2.d0)/ & - q_cons_vf(1)%sf(j - 2, k - 2, l), & - pi_inf, gamma, rho, qv, pres, & + dyn_p, pi_inf, gamma, rho, qv, pres, & q_cons_vf(stress_idx%beg)%sf(j - 2, k - 2, l), & q_cons_vf(mom_idx%beg)%sf(j - 2, k - 2, l), G) else call s_compute_pressure(q_cons_vf(E_idx)%sf(j - 2, k - 2, l), & q_cons_vf(alf_idx)%sf(j - 2, k - 2, l), & - 0.5d0*rho*dot_product(vel, vel), pi_inf, gamma, rho, qv, pres) + dyn_p, pi_inf, gamma, rho, qv, pres) end if if (model_eqns == 4) then @@ -1313,19 +1313,19 @@ contains vel(s) = q_cons_vf(cont_idx%end + s)%sf(j - 2, k - 2, l - 2)/rho end do + dyn_p = 0.5d0*rho*dot_product(vel, vel) + if (hypoelasticity) then call s_compute_pressure( & q_cons_vf(1)%sf(j - 2, k - 2, l - 2), & q_cons_vf(alf_idx)%sf(j - 2, k - 2, l - 2), & - 0.5d0*(q_cons_vf(2)%sf(j - 2, k - 2, l - 2)**2.d0)/ & - q_cons_vf(1)%sf(j - 2, k - 2, l - 2), & - pi_inf, gamma, rho, qv, pres, & + dyn_p, pi_inf, gamma, rho, qv, pres, & q_cons_vf(stress_idx%beg)%sf(j - 2, k - 2, l - 2), & q_cons_vf(mom_idx%beg)%sf(j - 2, k - 2, l - 2), G) else call s_compute_pressure(q_cons_vf(E_idx)%sf(j - 2, k - 2, l - 2), & q_cons_vf(alf_idx)%sf(j - 2, k - 2, l - 2), & - 0.5d0*rho*dot_product(vel, vel), pi_inf, gamma, rho, qv, pres) + dyn_p, pi_inf, gamma, rho, qv, pres) end if ! Compute mixture sound speed From fe3bbdbf43228c0192f14f72af79a8df0534866f Mon Sep 17 00:00:00 2001 From: haochey Date: Fri, 7 Jun 2024 10:28:56 -0400 Subject: [PATCH 3/3] Formatting --- src/simulation/m_data_output.fpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/simulation/m_data_output.fpp b/src/simulation/m_data_output.fpp index 4f48958f6d..04258fe64c 100644 --- a/src/simulation/m_data_output.fpp +++ b/src/simulation/m_data_output.fpp @@ -1051,7 +1051,6 @@ contains real(kind(0d0)) :: G real(kind(0d0)) :: dyn_p - integer :: i, j, k, l, s, q !< Generic loop iterator real(kind(0d0)) :: nondim_time !< Non-dimensional time