Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/common/m_phase_change.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,8 @@ contains
InvJac = InvJac/(Jac(1, 1)*Jac(2, 2) - Jac(1, 2)*Jac(2, 1))

! calculating correction array for Newton's method
DeltamP = -1.0_wp*(matmul(InvJac, R2D))
DeltamP(1) = -1.0_wp*(InvJac(1, 1)*R2D(1) + InvJac(1, 2)*R2D(2))
DeltamP(2) = -1.0_wp*(InvJac(2, 1)*R2D(1) + InvJac(2, 2)*R2D(2))

! updating two reacting 'masses'. Recall that inert 'masses' do not change during the phase change
! liquid
Expand Down Expand Up @@ -716,7 +717,7 @@ contains

! underrelaxation factor
Om = 1.0e-3_wp
do while ((abs(FT) > ptgalpha_eps) .or. (ns == 0))
do
! increasing counter
ns = ns + 1

Expand All @@ -737,6 +738,7 @@ contains
! updating saturation temperature
TSat = TSat - Om*FT/dFdT

if (abs(FT) <= ptgalpha_eps) exit
end do

end if
Expand Down
12 changes: 6 additions & 6 deletions src/simulation/m_viscous.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ contains

#:if not MFC_CASE_OPTIMIZATION or num_dims > 1
if (shear_stress) then ! Shear stresses
$:GPU_PARALLEL_LOOP(collapse=3, private='[i,j,k,l,rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum ,alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
$:GPU_PARALLEL_LOOP(collapse=3, private='[i,j,k,l,q,rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum, alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
do l = is3_viscous%beg, is3_viscous%end
do k = -1, 1
do j = is1_viscous%beg, is1_viscous%end
Expand Down Expand Up @@ -212,7 +212,7 @@ contains

#:if not MFC_CASE_OPTIMIZATION or num_dims > 1
if (bulk_stress) then ! Bulk stresses
$:GPU_PARALLEL_LOOP(collapse=3, private='[i,j,k,l,rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum ,alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
$:GPU_PARALLEL_LOOP(collapse=3, private='[i,j,k,l,q,rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum, alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
do l = is3_viscous%beg, is3_viscous%end
do k = -1, 1
do j = is1_viscous%beg, is1_viscous%end
Expand Down Expand Up @@ -319,7 +319,7 @@ contains
#:if not MFC_CASE_OPTIMIZATION or num_dims > 2

if (shear_stress) then ! Shear stresses
$:GPU_PARALLEL_LOOP(collapse=3, private='[alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
$:GPU_PARALLEL_LOOP(collapse=3, private='[i,j,k,l,q,rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum, alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
do l = is3_viscous%beg, is3_viscous%end
do k = -1, 1
do j = is1_viscous%beg, is1_viscous%end
Expand Down Expand Up @@ -428,7 +428,7 @@ contains
end if

if (bulk_stress) then ! Bulk stresses
$:GPU_PARALLEL_LOOP(collapse=3, private='[alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
$:GPU_PARALLEL_LOOP(collapse=3, private='[i,j,k,l,q,rho_visc, gamma_visc, pi_inf_visc, alpha_visc_sum, alpha_visc, alpha_rho_visc, Re_visc, tau_Re]')
do l = is3_viscous%beg, is3_viscous%end
do k = -1, 1
do j = is1_viscous%beg, is1_viscous%end
Expand Down Expand Up @@ -1564,12 +1564,12 @@ contains
real(wp) :: divergence
integer :: l, q ! iterators

! zero the viscous stress, collection of velocity diriviatives, and spacial finite differences
! zero the viscous stress, collection of velocity derivatives, and spatial finite differences
viscous_stress_tensor = 0._wp
velocity_gradient_tensor = 0._wp
dx = 0._wp

! get the change in x used in the finite difference equaiont
! get the change in x used in the finite difference equation
dx(1) = 0.5_wp*(x_cc(i + 1) - x_cc(i - 1))
dx(2) = 0.5_wp*(y_cc(j + 1) - y_cc(j - 1))
if (num_dims == 3) then
Expand Down
Loading