1 | using "types"; |
---|

2 | |
---|

3 | FlowSheet test_PP |
---|

4 | PARAMETERS |
---|

5 | PP as Plugin(Type="PP", |
---|

6 | Components = ["oxygen","nitrogen"], |
---|

7 | LiquidModel = "IdealLiquid", |
---|

8 | VapourModel = "Ideal" |
---|

9 | ); |
---|

10 | N as Integer; |
---|

11 | NC as Integer; |
---|

12 | |
---|

13 | SET |
---|

14 | N = 3; |
---|

15 | NC = PP.NumberOfComponents; |
---|

16 | |
---|

17 | VARIABLES |
---|

18 | T(N+1) as temperature; |
---|

19 | dT as temp_delta; |
---|

20 | P as pressure; |
---|

21 | z(NC) as fraction; |
---|

22 | h(N+1) as enth_mol; |
---|

23 | |
---|

24 | EQUATIONS |
---|

25 | for i in [1:N+1] |
---|

26 | h(i) = PP.VapourEnthalpy(T(i),P,z); |
---|

27 | end |
---|

28 | |
---|

29 | # h(1) = PP.VapourEnthalpy(T(1),P,z); |
---|

30 | # h(2) = PP.VapourEnthalpy(T(2),P,z); |
---|

31 | # h(3) = PP.VapourEnthalpy(T(3),P,z); |
---|

32 | # h(4) = PP.VapourEnthalpy(T(4),P,z); |
---|

33 | |
---|

34 | for i in [2:N] |
---|

35 | T(i) = T(i-1) + dT; |
---|

36 | end |
---|

37 | |
---|

38 | dT = (T(N+1) - T(1))/N; |
---|

39 | |
---|

40 | SPECIFY |
---|

41 | T(1) = 300*'K'; |
---|

42 | T(N+1) = 400*'K'; |
---|

43 | P = 1*'atm'; |
---|

44 | z = [0.21, 0.79]; |
---|

45 | |
---|

46 | OPTIONS |
---|

47 | Dynamic = false; |
---|

48 | end |
---|

49 | |
---|