Page 1 of 2

Problems with COFE.xlt

PostPosted: 09 September 2013, 22:33
by lauriew
Have just downloaded COCO. COFE works well however COFE.xlt does not; it opens OK with the start up macro.

If I select <Insert new, empty flowsheet document> I get the following error messages:
<< Cannot insert object >>
<< Unable to get the Add property of the OLE Objects class >>

If I select , Use existing .fsd file on disk> I get the following error messages:
<< Flowsheet document object not found >>

The macro then closes the spread sheet as it < ... requires an excel document to be present; ....>

My computer is 64 bit but I run 32 bit Excel and can run 64 & 32 bit COFE.
COCO/COFE is on the list of OLE objects and I can add a flowsheet manually but it only appears as an icon not as an application embedded in the spread sheet.

Any ideas of what I need to do?

Laurie

Re: Problems with COFE.xlt

PostPosted: 10 September 2013, 07:38
by jasper
It appears that the COFE type libary is not properly registered. Can you attempt to run COFE with the /RegServer option and then try again?

Re: Problems with COFE.xlt

PostPosted: 10 September 2013, 13:01
by lauriew
Thanks Jasper.
I ended up re-installing COCO but this time as Administrator.
COFE.xlt is now working - looks very good.

Re: Problems with COFE.xlt

PostPosted: 10 September 2013, 13:06
by jasper
Glad to hear it. I will try the xlt installation for a non-privileged installation.

Re: Problems with COFE.xlt

PostPosted: 11 September 2013, 14:15
by lauriew
Is it possible to set values for properties such as mass flow for streams and temperature for information streams?
I see that there is a "Call mat.SetProp( ...) for ICapeThermoMaterialObjects.

Re: Problems with COFE.xlt

PostPosted: 11 September 2013, 15:03
by jasper
It is not recommended; the xls interface is intended to read the values into Excel, not put them back.

But yes, it is possible. Don't do strange things such as disconnect streams. If you set values on unit operation parameters, you are bypassing COFE, so it may not know that the unit and therefore the solution is no longer valid. Setting stream values however should not cause such effect. You can then issue Calculate on the flowsheet.

Re: Problems with COFE.xlt

PostPosted: 11 September 2013, 15:03
by jasper
Perhaps a parametric study will suit your needs better?

Re: Problems with COFE.xlt

PostPosted: 11 September 2013, 23:56
by lauriew
What I would like to do is:
1. Global setting of a constant such as Ambient Temperature (Information stream)
2. Set initial conditions for some streams (Information and material) where values are calculated from a simple Excel model

Re: Problems with COFE.xlt

PostPosted: 12 September 2013, 06:37
by jasper
Initial conditions (the starting guesses for iterations) or feed conditions (the values for streams that are not predicted by other unit operations)?

If you mean feed conditions, you can put your Excel model as a CAPE-OPEN unit operation inside the flowsheet to predict the temperature, produce the temperature as output parameters, couple these to an information streams using virtual information ports, and to feed streams using a heater unit.

Re: Problems with COFE.xlt

PostPosted: 12 September 2013, 08:49
by lauriew
Thank you Jasper, I will put the simple Excel model in as a unit operation for each section of the flow sheet as you suggest.

My remaining problem is adding the same ambient temperature to all the unit operations that calculate heat loss?
I could add an Information calculator with multiple outputs and then have information lines going to all the relevant unit operations however this will prevent the flow sheet being used as a Process Flow Diagram.

Currently I have to go to each information stream and make the change.
It would be good to have it as a global variable so the change is applied to all relevant unit operations.
I was thinking this would be some VBA code that sets the value for the relevant information streams.
Is there any documentation on setting information values?