[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/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 - MATLAB CAPE-OPEN Unit Operation
Page 1 of 1

MATLAB CAPE-OPEN Unit Operation

PostPosted: 05 May 2021, 12:25
by Vanessa
I am simulating a cstr using Matlab UnitOperation. I have 5 compounds in the simulation. When I try to index the compounds using the following code,

%Compound indices:
Cobalt (III) oxide=1;
Sulphuric acid=2;
Sulphur dioxide=3;
Cobalt sulphate=4;
Water=5;

It keeps showing the error in the line %Compound indices: which says "Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise check for mismatched delimiters."

How can I rectify this error?

Re: MATLAB CAPE-OPEN Unit Operation

PostPosted: 05 May 2021, 15:04
by jasper
It is probably the line under it. "Cobalt (III) oxide" is not a valid variable name. Try "Cobalt_III_oxide"?

Re: MATLAB CAPE-OPEN Unit Operation

PostPosted: 10 May 2021, 08:52
by Vanessa
Thank you!

Re: MATLAB CAPE-OPEN Unit Operation

PostPosted: 11 May 2021, 10:07
by Vanessa
Can MATLAB CAPE-OPEN Unit Operation calculate ODEs?

Re: MATLAB CAPE-OPEN Unit Operation

PostPosted: 11 May 2021, 17:22
by colancto
Are you looking for a dynamic unit operation (so for a unit operation model that represents evolution w.r.t. time) or are you looking for ODEs for a model along some length or diameter where differential equations need to be integrated?

Re: MATLAB CAPE-OPEN Unit Operation

PostPosted: 12 May 2021, 07:30
by Vanessa
I have designed a dynamic model for a CSTR as a MATLAB Cape-Open Unit Operation.When I try to solve the ODEs ,it keeps showing the error ," Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
When I run the same code in MATLAB it runs without errors. How do I rectify that error in MATLAB Cape-Open Unit Operation?

Re: MATLAB CAPE-OPEN Unit Operation

PostPosted: 12 May 2021, 12:21
by colancto
A MATLAB CAPE-OPEN Unit Operation must model a steady-state Unit Operation not a dynamic Unit Operation. COFE is a steady-state process simulator (like PRO/II, PROMAX, Aspen Plus) not a dynamic process simulator like Aspen Dynamics, gPROMS. That does not explain the issue you encounter but your objective won't be met. If you want to model a stand-alone dynamic CSTR in MATLAB, use the MATLAB Thermo Import to reach out for thermodynamic properties. But you should not have expectations to run this dynamic CSTR in a steady-state process simulator. The MATLAB CAPE-OPEN Unit Operation implements the CAPE-OPEN Unit Operation interface specification which is clearly mentioned for steady-state operation.

There is a CAPE-OPEN Dynamic Unit Operation interface specification. But it has been implemented only in INDISSPlus from CORYS. It has not been implemented in Aspen Dynamics or in gPROMS. The CAPE-OPEN Dynamic Unit Operation interface specification builds somehow upon the . But the additional interfaces to cope with dynamic operation are simply not there in the MATLAB CAPE-OPEN Unit Operation. I don't expect there will be there any time soon considering the small number of dynamic process simulators having implemented these.

Re: MATLAB CAPE-OPEN Unit Operation

PostPosted: 12 May 2021, 16:29
by jasper
This looks like an error in the script. Perhaps you can narrow it down by using the verbose option and look in the output which is the offending line?

Screenshot 2021-05-12 183931.png
Screenshot 2021-05-12 183931.png (7.5 KiB) Viewed 17131 times


Once you have that, perhaps you can 'disp' the arguments to verify them.