Page 1 of 3
COFE Flowsheet Unit Operation
Posted: 16 June 2014, 15:14
by nrgeng
I have combined two solved flowsheets as SUB Units, SUB 1 and SUB 2, into one MAIN flowsheet. Both SUBs have been inserted as COFE Flowsheet Unit Operations. When I [Validate] the flowsheet, the message that appears is: "External port "Name" is not connected (connect from external simulation environment, or connect internally)" I can connect the ports from the Main, Host, flowsheet but do not understand what is meant by "connect internally." When the [External Ports] Dialog is opened from within a SUB Flowsheet, nothing is editable. {Q1} Please explain?
The MAIN flowsheet will not validate unless I connect all material, information, and energy streams. {Q2} Please explain the following COFE Help System Paragraph:
"For energy and information ports, an exact match is not required. The mapping between external and internal data items is automatic; at least one data item must be successfully mapped. Internal input data items that cannot be mapped will be set to a missing number. External output data items that cannot be mapped will be set to their default value (if one is available) or to a missing number."
I read this as my not having to connect all information and energy ports. I mapped one information stream but still no validation. {Q3} Why? {I use some information streams to provide a quick value on a "mouse-over" movement so as not to have to open the Unit or GUI dialog.} I use these streams to conveniently obtain information only, so being required to connect to an external port is numbingly painful effort.
{Q4} Must all internal streams be mapped to external streams? I would like to use some of the internal stream settings. Some internal material stream values do not matter because they are set by a controller. Yet, it seems that one is "forced" to connect these streams to allow Unit Validation.
I created a module (UNIT), SUB 1, including controls within a MAIN flowsheet. The flowsheet SUB 1 solves by itself. {Q5} Why do I obtain the message:
"error: calculate failed for unit SUB 1: Cannot solve flow constraint unit "XYZ FV (1)": a feed stream of a flowsheet that is embedded as a unit operation cannot be controlled?"
This seems to defeat the purpose of modularizing a large flowsheet. Answers to the five questions {Qn} would be appreciated.
Re: COFE Flowsheet Unit Operation
Posted: 17 June 2014, 07:35
by jasper
I can connect the ports from the Main, Host, flowsheet but do not understand what is meant by "connect internally."
This implies: connect within the sub flowsheet (i.e. to a unit operation inside the sub flowsheet)
When the [External Ports] Dialog is opened from within a SUB Flowsheet, nothing is editable. Please explain?
A stream that is connected internally in the sub flowsheet will not appear in this dialog.
The MAIN flowsheet will not validate unless I connect all material, information, and energy streams. {Q2} Please explain the following COFE Help System. I read this as my not having to connect all information and energy ports.
All external streams must be connected. What does not need to match exactly is the data on information streams and energy streams.
{I use some information streams to provide a quick value on a "mouse-over" movement so as not to have to open the Unit or GUI dialog.} I use these streams to conveniently obtain information only, so being required to connect to an external port is numbingly painful effort.
Why don't you use the Watch window for this? In the SUB flowsheets you can expose the parameters to the outer flowsheet and put them in the Watch window there.
{Q4} Must all internal streams be mapped to external streams?
All streams in the sub flowsheet that have their beginning unconnected are seen as a feed port to the entire sub flowsheet.
All streams in the sub flowsheet that have their end unconnected are seen as a product port of the entire sub flowsheet.
All these feed and product ports of the embedded flowsheet must be connected.
I created a module (UNIT), SUB 1, including controls within a MAIN flowsheet. The flowsheet SUB 1 solves by itself. {Q5} Why do I obtain the message:
All CAPE-OPEN units must predict their product streams and all data on feed streams is input to the unit. You can place a feed constraint in the feed of the outer flowsheet, but if you do that for a sub flowsheet, the feed rate of the feed port of the unit operation defined by that sub flowsheet is no longer an input. This conflicts with the CAPE-OPEN standards, and can therefore not be applied. The feed flow rate is determined by the outer flowsheet. There of course you can place your flow constraint back.
This seems to defeat the purpose of modularizing a large flowsheet. Answers to the five questions {Qn} would be appreciated.
See above. Let me know if you have further questions...
Re: COFE Flowsheet Unit Operation
Posted: 17 June 2014, 07:37
by jasper
Unit parameter reports embedded in the flowsheet of course allow easy inspection of output parameters, as an alternative to information streams.
Re: COFE Flowsheet Unit Operation 2
Posted: 18 June 2014, 02:08
by nrgeng
To start, I imported a solved flowsheet into a COFE Flowsheet Unit Operation (SUB) contained in a blank flowsheet (MAIN). I have cut up the original working SUB flowsheet and moved the Flow Constraints to the MAIN flowsheet. Having suffered through numerous "Environment" Crashes, I finally was able to resolve one last problem with an energy stream (by deleting it and then adding it again: the Unit Operation [Ports] somehow defined it as an Information stream--who knows why?). When the MAIN flowsheet [Validated], the Unit failed with the messages:
message: Unit "ABC Sub Unit": Solve failed
error: calculate failed for unit ABC Sub Unit: Cannot solve controller "WMR C": it needs to take part in a recycle.
Are you going to tell me that after cutting up the flowsheet to remove all of the Flow Constraints that I now have to cut out all of the Controllers and move them to the MAIN flowsheet too? If so, this is a lot of work. I do not expect anyone, who tries the COFE Flowsheet Unit Operation and is successful, will ever use it again. What is the verdict, please?
Re: COFE Flowsheet Unit Operation
Posted: 18 June 2014, 06:53
by jasper
First, can you let me know how to reproduce a crash?
Second, I am not sure what you mean with Unit operation [Ports]. Can you send me an example?
Regarding a controller: it is not a classic unit operation in the sense that it takes and input and predicts an output. It adds different types of equations to the overall system, and as a result
- the system is no longer suitable for direct substitution, and only Newton like solvers can be used
- the stream that comes out of a controller must be a cut stream, hence it needs to be contained inside a recycle
I am not sure how you cut your flowsheet up: again, can you send me an example?
Re: COFE Flowsheet Unit Operation 3
Posted: 19 June 2014, 00:19
by nrgeng
In response to your first request
COFE crashed for three different reasons on 06/17/14 with a complicated flowsheet that contained Flow Constraints and Controllers. Today using a simple flowsheet, COFE crashed only when I deleted an imported flowsheet then attempted to import the flowsheet again. This seems to work (crash) with any fsd file, but I am sending today's simple fsd file and two images of the crash screen for your viewing pleasure. Hope this helps with debugging.
Re: COFE Flowsheet Unit Operation
Posted: 19 June 2014, 07:09
by jasper
I will need more info, as I cannot reproduce a crash just by opening your document, deleting the unit operation, inserting a new COFE unit operation and importing an (any) fsd file in there. Can you tell me which steps I need to perform exactly to obtain a crash?
Are you using the latest version of COFE?
Re: COFE Flowsheet Unit Operation 4
Posted: 19 June 2014, 10:12
by nrgeng
I am reluctant to upgrade due to past problems incurred as a result of upgrading. Any method suggested to go back to the current working version if a problem develops? With hundreds of hours of time invested in developing working simulations, it takes a leap of faith for me to risk upgrading these days.
Current Versions:
COFE 2.6.0.21 (x86, 32-bit)
COUSCOUS 2.6.0.24 Mixer
COUSCOUS 2.6.0.21 COFE Flowsheet Unit Operation
I did not see anything in the Change Log (2.6.0.28) that would indicate a need to upgrade. Do you know of something?
PS. Have you considered placing the latest changes at the top rather than at the bottom of the Change Log?
Re: COFE Flowsheet Unit Operation
Posted: 19 June 2014, 10:21
by jasper
You can just copy the entire COCO folder, and copy it back if you need to. All changes, except for COM object registration, are kept local to the COCO folder. COM object registration you can simply redo, but should not be necessary as nothing has changed (except Water, you may need to re-register that; lots of fixes there since 2.6.0.4).
This update may have fixed it:
COFE (2.6.0.27): corrections in phase sorting for 1.0 external thermodynamics (COFE Flowsheet Unit Operation)
Yes, I did consider it.
Re: COFE Flowsheet Unit Operation 5
Posted: 19 June 2014, 14:55
by nrgeng
Updated with CUP successfully. No change. Same as before.
Load MAIN, Open SUB Unit GUI, Select All, Delete, Enter, [within existing open SUB Unit GUI] Import Existing Flowsheet {select SUB} Open ==> Crash.
Current Versions:
COFE 2.6.0.27 (x86, 32-bit)
COUSCOUS 2.6.0.28 Mixer
COUSCOUS 2.6.0.27 COFE Flowsheet Unit Operation