Properties is very flexible and there are different ways to define by code compositions, BIPs etc.
Here there is the code from "Prode.com" site :
; define a stream
Stream = 1
; Initialize the stream
initS(Stream)
; define the model for gas phase fugacity
setMFg(Stream,SRK_MODEL,GAS_PHASE)
; and liquid phase
setMFg(Stream,,SRK_MODEL,LIQ_PHASE)
; set the list of components
putCC(Stream,1,H2S)
putCC(Stream,2,METHANE)
putCC(Stream,3,CO2)
; set molar compositions
putZ(Stream,1,0.15)
putZ(Stream,2,0.7)
putZ(Stream,3,0.15)
; row 1, Kij components 3-2
putCi(Stream,1,3)
putCj(Stream,1,2)
putMod(Stream,1,SRK_MODEL)
putKji(Stream,1,0.097)
; row 2, Kij components 3-1
putCi(Stream,2,3)
putCj(Stream,2,1)
putMod(Stream,2,SRK_MODEL)
putKji(Stream,2,0.102)
; row 3, Kij components 1-2
putCi(Stream,3,1)
putCj(Stream,3,2)
putMod(Stream,3,SRK_MODEL)
putKji(Stream,3,0.085)
; finally save data
setS(Stream)
; as alternative you can utilize the method loadSB to looad binery intercation parameters from database
loadSB(Stream)
if you wish to change a composition just use this code
; set new molar compositions
putZ(Stream,1,0.3)
putZ(Stream,2,0.3)
putZ(Stream,3,0.4)
; save data
setS(Stream)
and so on...



Reply With Quote

Bookmarks