Skip to content

Commit

Permalink
Update iapws_r1124.f90
Browse files Browse the repository at this point in the history
Add coefficients for computation.
Implement the Empirical function Bandura-Lvov (Z(T, rhow).
  • Loading branch information
MilanSkocic authored Jan 15, 2025
1 parent 659d525 commit 677caa2
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion src/iapws_r1124.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,28 @@ module iapws__g704
implicit none
private

end module iapws__r1124
integer(int32), parameter :: n = 6 ! Ion coordination number
real(dp), parameter :: Mw = 18.015268 ! g.mol^{-1}
real(dp), parameter :: a0 = -0.702132 ! -
real(dp), parameter :: a1 = +8681.05 ! K
real(dp), parameter :: a2 = -24145.1 ! K^2(g.cm^{-3})^{-2/3}
real(dp), parameter :: b0 = +0.813876 ! cm^3.g^{-1}
real(dp), parameter :: b1 = -51.4471 ! K cm^3 g^{-1}
real(dp), parameter :: b2 = -0.469920 ! cm^6.g^{-2}

contains

pure elemental Z(T, rhow)result(res)
!! Empirical function in Bandura–Lvov model, g.cm^{-3}

!! Arguments
real(dp), intent(in) :: T !! Temperature in K.
real(dp), intent(in) :: rhow !! Mass density, g.cm^{-3}

!! Returns
real(dp) :: res !! Empirical value of temperature and water density

Z = rhow * exp(a0 + a1/T + a2/T**2.0_dp*rhow**(2.0_dp/3.0_dp))
end function

end module iapws__r1124

0 comments on commit 677caa2

Please sign in to comment.