[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
CAPE-OPEN • View topic - Opening a fsd file through COM
Page 1 of 2

Opening a fsd file through COM

PostPosted: 03 May 2017, 19:32
by DanW
Hi Jasper,

Suppose that I have COCO installed and correctly registered. Is it possible to open a simulation file (fsd) through COM (that is, without opening COFE) and access all the flowsheet items (streams and unit operations) as CAPE-OPEN objects?

Regards
Daniel

Re: Opening a fsd file through COM

PostPosted: 04 May 2017, 06:46
by jasper
You can open a flowsheet document via COM, yes. This requires creating an OLE version of COFE (via automation, see here for the details ), but you can of course hide the OLE site if you write that yourself.

Not sure where you want to go, but another way to access an fsd as an object would be as a CAPE-OPEN unit operation:

Re: Opening a fsd file through COM

PostPosted: 04 May 2017, 13:41
by DanW
Thanks for the answer, Jasper.

I've developed a capital cost estimation tool which currently works as a plugin for dwsim. I'm working on making it standalone, being able to open flowsheets from other simulators to read data from the streams and unit operations via an "import" tool.

It's been a while since I've worked with the flowsheet monitoring interface, but I'll see if can make it work with COCO through that interface as well.

Re: Opening a fsd file through COM

PostPosted: 04 May 2017, 14:04
by jasper
That would be very nice - note that the monitoring interface is in a review stage in the M&T group, after which it will be officially published, with a bunch of modifications.

Re: Opening a fsd file through COM

PostPosted: 04 May 2017, 14:06
by jasper
If you want to grab and interpret the content of a flowsheet document, I would recommend monitoring (best the newly unreleased interface, I can upgrade to that as well).

There is an alternative for COFE - which is to unpack the fsd and parse the xml.

Re: Opening a fsd file through COM

PostPosted: 04 May 2017, 14:36
by DanW

Re: Opening a fsd file through COM

PostPosted: 04 May 2017, 14:42
by jasper
No - not at this point. But several parties have expressed an interest in implementing it once it is published.

Re: Opening a fsd file through COM

PostPosted: 04 May 2017, 18:50
by DanW
COFE's XML file seems very "human-readable". I'll proceed through this path and get back here as soon as I have something to show.

Re: Opening a fsd file through COM

PostPosted: 04 May 2017, 19:02
by jasper
Ok - note that COUSCOUS units and TEA will write to IPropertyBag, which translates nicely to XML, but many PMCs don't, in which case the content of the PMC will be a BASE64 blob.

Re: Opening a fsd file through COM

PostPosted: 06 May 2017, 00:09
by DanW
I've finished the Import tool. I'm mapping some COUSCOUS unit operations according to cost data availability.

The workflow to import data from a FSD file is very simple:

ccost010.png
ccost010.png (40.69 KiB) Viewed 26549 times


ccost011.png
ccost011.png (21.27 KiB) Viewed 26549 times


ccost012.png
ccost012.png (52.94 KiB) Viewed 26549 times


ccost013.png
ccost013.png (43.18 KiB) Viewed 26549 times


ccost014.png
ccost014.png (71.21 KiB) Viewed 26549 times


I also map material and energy streams to Materials and Utilities.