@@ -51,10 +51,10 @@ module m_phase_change
5151
5252 !> @name Parameters for the first order transition phase change
5353 !> @{
54- integer , parameter :: max_iter = 1e8 !< max # of iterations
55- real (wp), parameter :: pCr = 4.94d7 !< Critical water pressure
54+ integer , parameter :: max_iter = 1e8_wp !< max # of iterations
55+ real (wp), parameter :: pCr = 4.94e7_wp !< Critical water pressure
5656 real (wp), parameter :: TCr = 385.05 + 273.15 !< Critical water temperature
57- real (wp), parameter :: mixM = 1.0e-8 !< threshold for ' mixture cell' . If Y < mixM, phase change does not happen
57+ real (wp), parameter :: mixM = 1.0e-8_wp !< threshold for ' mixture cell' . If Y < mixM, phase change does not happen
5858 integer , parameter :: lp = 1 !< index for the liquid phase of the reacting fluid
5959 integer , parameter :: vp = 2 !< index for the vapor phase of the reacting fluid
6060 !> @}
@@ -148,7 +148,7 @@ contains
148148 !$acc loop seq
149149 do i = momxb, momxe
150150
151- dynE = dynE + 5.0e-1 * q_cons_vf(i)%sf(j, k, l)** 2 / rho
151+ dynE = dynE + 5.0e-1_wp * q_cons_vf(i)%sf(j, k, l)** 2 / rho
152152
153153 end do
154154
@@ -352,12 +352,12 @@ contains
352352
353353 ! Maybe improve this condition afterwards. As long as the initial guess is in between -min(ps_inf)
354354 ! and infinity, a solution should be able to be found.
355- pS = 1.0d4
355+ pS = 1.0e4_wp
356356
357357 ! Newton Solver for the pT-equilibrium
358358 ns = 0
359- ! change this relative error metric. 1E4 is just arbitrary
360- do while ((abs(pS - pO) > palpha_eps) .and. (abs((pS - pO)/pO) > palpha_eps/1e4 ) .or. (ns == 0))
359+ ! change this relative error metric. 1e4_wp is just arbitrary
360+ do while ((abs(pS - pO) > palpha_eps) .and. (abs((pS - pO)/pO) > palpha_eps/1e4_wp ) .or. (ns == 0))
361361
362362 ! increasing counter
363363 ns = ns + 1
@@ -425,17 +425,17 @@ contains
425425 ns = 0
426426
427427 ! Relaxation factor
428- Om = 1.0e-3
428+ Om = 1.0e-3_wp
429429
430430 p_infpTg = p_infpT
431431
432432 if (((pS < 0.0_wp ) .and. ((q_cons_vf(lp + contxb - 1 )%sf(j, k, l) &
433433 + q_cons_vf(vp + contxb - 1 )%sf(j, k, l)) > ((rhoe &
434434 - gs_min(lp)* ps_inf(lp)/ (gs_min(lp) - 1 ))/ qvs(lp)))) .or. &
435- ((pS >= 0.0_wp ) .and. (pS < 1.0e-1 ))) then
435+ ((pS >= 0.0_wp ) .and. (pS < 1.0e-1_wp ))) then
436436
437437 ! improve this initial condition
438- pS = 1.0d4
438+ pS = 1.0e4_wp
439439
440440 end if
441441
@@ -447,7 +447,7 @@ contains
447447 R2D(1 ) = 0.0_wp ; R2D(2 ) = 0.0_wp
448448 DeltamP(1 ) = 0.0_wp ; DeltamP(2 ) = 0.0_wp
449449 do while (((sqrt (R2D(1 )** 2 + R2D(2 )** 2 ) > ptgalpha_eps) &
450- .and. ((sqrt (R2D(1 )** 2 + R2D(2 )** 2 )/ rhoe) > (ptgalpha_eps/ 1d6 ))) &
450+ .and. ((sqrt (R2D(1 )** 2 + R2D(2 )** 2 )/ rhoe) > (ptgalpha_eps/ 1e6_wp ))) &
451451 .or. (ns == 0 ))
452452
453453 ! Updating counter for the iterative procedure
@@ -754,7 +754,7 @@ contains
754754 ns = 0
755755
756756 ! underrelaxation factor
757- Om = 1.0e-3
757+ Om = 1.0e-3_wp
758758 do while ((abs (FT) > ptgalpha_eps) .or. (ns == 0 ))
759759 ! increasing counter
760760 ns = ns + 1
0 commit comments