1

Can someone please tell me how to list all the components in a stream using COM and Python?

I have this output stream and its path in aspen plus variable explorer is:

aspen.Tree.FindNode("\Data\Streams\COM1\Output\STR_MAIN\MASSFLMX\MIXED")

This stream as 8 components: Water, SO2,CO2, etc as shown in the pic linked below:

Variable explorer image from Aspen Plus

How can I list the components in this stream in python environment?

Thanks, Gargeya.

gary_brown
  • 25
  • 6

1 Answers1

0

I have created a new library which can be used to control Aspen Plus via Python: https://github.com/YouMayCallMeJesus/AspenPlus-Python-Interface It is currently not completed yet but until 01.07.22 its finished. There are also some tutorials, documentation, cases and such.
You are able to edit the flowsheet, run, set values, get values, debug, automatically extract all outputs and insert all inputs into blocks and much more.

In this case, you would need to instantiate the simulation and then use the functions built in the library

sim = Simulation (*args)
sim.STRM_Get_MoleFlowPerCompound()
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103