Aspen Touch Solutions ATM-123R Series Especificações Página 308

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 374
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 307
6-14 Dehumidifier Example
6-14
8. To add code, switch to the Code page and click the Edit
button. This opens the Edit Existing Code property view
where you can enter the following code:
Dehumidifier Code
Sub Initialize()
' Of the four optional nozzles, we only want the second products:
ActiveObject.Feeds1Name = "Feed"
ActiveObject.Products1Name = "Dry Product"
ActiveObject.Feeds2Name = "Inactive Feed"
ActiveObject.Feeds2Active = False
ActiveObject.Products2Name = "Water Product"
ActiveObject.Products2Active = True
ActiveObject.EnergyFeedsName = "Inactive Energy In"
ActiveObject.EnergyFeedsActive = False
ActiveObject.EnergyProductsName = "Inactive EnergyOut"
ActiveObject.EnergyProductsActive = False
End Sub
Sub Execute()
On Error GoTo EarlyExit
' get the feed stream
Dim feed As Object
Set feed = ActiveObject.Feeds1.Item(0)
If feed Is Nothing Then GoTo EarlyExit
' get the dry product stream
Dim prod As Object
Set prod = ActiveObject.Products1.Item(0)
If prod Is Nothing Then GoTo EarlyExit
' get the water product stream
Dim wtr As Object
Set wtr = ActiveObject.Products2.Item(0)
If wtr Is Nothing Then GoTo EarlyExit
' find the position of water in the current Fluid Package's component
list
Dim theComps As Object
Set theComps = ActiveObject.Flowsheet.FluidPackage.Components
waterPosn = theComps.index("H2O")
' get the array of component molar flows from the feed stream
Dim CMFs As Variant
CMFs = feed.ComponentMolarFlowValue
WaterFlow = CMFs(waterPosn)
DryFlow = Feed.MolarFlowValue - WaterFlow
' calculate the Temperature, Pressure, and Flow of the water product
Vista de página 307
1 2 ... 303 304 305 306 307 308 309 310 311 312 313 ... 373 374

Comentários a estes Manuais

Sem comentários