Skip to content

Commit

Permalink
Add API for R797.
Browse files Browse the repository at this point in the history
  • Loading branch information
MilanSkocic committed Dec 30, 2024
1 parent 95f59b8 commit 105215f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/iapws_api.f90
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,31 @@ pure subroutine Tsat(ps, Ts)
Ts = r4_Ts(ps)

end subroutine

pure subroutine waterproperty(p, T, prop)result(res)
!! Compute water properties at pressure p in MPa and temperature T in Kelvin.
!! The adequate region is selected according to p and T.
!! Returns NaN if no adequate region is found.
!!
!! Available properties:
!! * v: specific volume
!! * u: specific internal energy
!! * s: specific entropy
!! * h: specific enthalpy
!! * cp: specific isobaric heat capacity
!! * cv: specific isochoric heat capacity
!! * w: speed of sound

! parameters
real(dp), intent(in) :: p !! Pressure in MPa.
real(dp), intent(in) :: T !! Pressure in K.
character(len=*), intent(in) :: prop !! Property

! results
real(dp) :: res

res = ieee_value(1.0_dp, ieee_quiet_nan)
end subroutine
! ------------------------------------------------------------------------------


Expand Down

0 comments on commit 105215f

Please sign in to comment.