Right now the kind of saturation points or volume roots are defined with characters "liquid", "dew", etc. A more solid approach would be the implementation of some enum type that holds those values.
This improvement would need two steps:
[ ] Definition of new enum types
[ ] Replacement of how all kinds of points are used inside each routine to support these enums instead
module yaeos__saturation_kinds
implicit none
type, private :: EquilibriaEnum
integer, parameter :: bubble = 1
integer, parameter :: dew = 2
...
end type
type, private :: VolumeRootEnum
integer, parameter :: liquid = 1
integer, parameter :: vapor = 2
integer, parameter :: stable = 3
...
end type
type(SaturationEnum), public :: saturation_kind
type(VolumeRootEnum), public :: roots
end module
program main
use yaeos
use yaeos__saturation_kinds
... ! model definition somewhere
call model%volume(n, P, T, root=roots%volume, V=V)
sat_point = saturation_pressure(model, n, T, kind=saturation_kind%bubble)
end program
Right now the kind of saturation points or volume roots are defined with characters "liquid", "dew", etc. A more solid approach would be the implementation of some enum type that holds those values.
This improvement would need two steps: