File size: 4,488 Bytes
b1b3bae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
'    DWSIM Interface definitions
'    Copyright 2010-2017 Daniel Wagner O. de Medeiros
'
'    This file is part of DWSIM.
'
'    DWSIM is free software: you can redistribute it and/or modify
'    it under the terms of the GNU General Public License as published by
'    the Free Software Foundation, either version 3 of the License, or
'    (at your option) any later version.
'
'    DWSIM is distributed in the hope that it will be useful,
'    but WITHOUT ANY WARRANTY; without even the implied warranty of
'    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'    GNU General Public License for more details.
'
'    You should have received a copy of the GNU General Public License
'    along with DWSIM.  If not, see <http://www.gnu.org/licenses/>.

''' <summary>
''' This interface defines the basic Property Package funcionality to be exposed for communication between the various DWSIM components.
''' The actual Property Package class exposes much more funcionality through the implementation of other interfaces, including CAPE-OPEN ones.
''' </summary>
<InterfaceType(ComInterfaceType.InterfaceIsIDispatch)>
Public Interface IPropertyPackage

    Property UniqueID As String

    ReadOnly Property Name As String

    Property Tag As String

    Property FlashAlgorithm As IFlashAlgorithm

    Property CurrentMaterialStream As IMaterialStream

    Function CalculateEquilibrium(calctype As Enums.FlashCalculationType,
                                            val1 As Double, val2 As Double,
                                            mixmolefrac As Double(),
                                            initialKval As Double(),
                                            initialestimate As Double) As IFlashCalculationResult

    Function CalculateEquilibrium2(calctype As Enums.FlashCalculationType,
                                            val1 As Double, val2 As Double,
                                            initialestimate As Double) As IFlashCalculationResult

    Function AUX_DELGig_RT(p1 As Double, T As Double, id As String(), stcoef As Double(), bcidx As Integer, Optional ByVal mode2 As Boolean = False) As Double

    Function AUX_CPm(phase As Enums.PhaseLabel, Ti As Double) As Double

    Function AUX_MMM(phase As Enums.PhaseLabel) As Double

    Function AUX_Z(Vx As Double(), T As Double, P As Double, state As Enums.PhaseName) As Double

    Function Clone() As IPropertyPackage

    Property Flowsheet As IFlowsheet

    Sub DisplayEditingForm()

    Function DisplayAdvancedEditingForm() As Object

    Sub CalcAdditionalPhaseProperties()

    ReadOnly Property MobileCompatible As Boolean

    ReadOnly Property IsFunctional As Boolean

    ReadOnly Property ShouldUseKvalueMethod2 As Boolean

    Function ReturnInstance(typename As String) As Object

    Sub DisplayGroupedEditingForm()

    ReadOnly Property DisplayName As String

    ReadOnly Property DisplayDescription As String
    ReadOnly Property HasReactivePhase As Boolean
    ReadOnly Property ShouldUseKvalueMethod3 As Boolean
    Function GetAsObject() As Object

End Interface

<InterfaceType(ComInterfaceType.InterfaceIsIDispatch)>
Public Interface IPhaseEnvelopeOptions

    Property QualityLine As Boolean
    Property QualityValue As Double
    Property StabilityCurve As Boolean
    Property PhaseIdentificationCurve As Boolean
    Property CheckLiquidInstability As Boolean
    Property Hydrate As Boolean
    Property HydrateModel As Integer
    Property HydrateVaporOnly As Boolean
    Property OperatingPoint As Boolean

    Property BubbleCurveInitialFlash As String
    Property BubbleCurveInitialPressure As Double
    Property BubbleCurveInitialTemperature As Double
    Property BubbleCurveMaximumTemperature As Double

    Property DewCurveInitialFlash As String
    Property DewCurveInitialPressure As Double
    Property DewCurveInitialTemperature As Double
    Property DewCurveMaximumTemperature As Double

    Property BubbleCurveMaximumPoints As Integer
    Property DewCurveMaximumPoints As Integer

    Property BubbleCurveDeltaP As Double
    Property BubbleCurveDeltaT As Double

    Property DewCurveDeltaP As Double
    Property DewCurveDeltaT As Double

    Property BubbleUseCustomParameters As Boolean
    Property DewUseCustomParameters As Boolean

    Property ImmiscibleWater As Boolean


End Interface