Question Regarding getSinglePhaseProperty -- MATLAB Unit Op

Discusses use of CAPE-OPEN compliant Process Modelling Components

Moderator: jasper

Question Regarding getSinglePhaseProperty -- MATLAB Unit Op

Postby djweber » 29 May 2020, 02:58

Good Evening,

I hope all is well given these odd circumstances around the world.

As far as trying to use my MATLAB membrane simulation using amsterCHEM's MATLAB Unit Op software, I have a quick question regarding the 'getSinglePhaseProperty' function. Specifically, I am using this property call in a iterative loop to look up the permeate bulk activity coefficient using the iterative variables of the permeate compositions.

The problem is that the iterative solver (fsolve, a form of Newton's method), some iterative solutions (prior to convergence) have permeate values that do not sum to unity; which throws an error when 'getSinglePhaseProperty' is called inside the iterative loop. I am wondering if this is something that can be turned off or if it is a part of the Aspen code so the error was thrown first in the CAPE-OPEN software to stop further errors in the flow sheet software.

However I can't imagine with the capabilities of Aspen and with the continuous functions that make up activity models or equations of state, that I mathematically should still be able to plug in some number and get out some activity; even though it may be not physically meaningful. The only caveat being possibly negative compositions causing errors if the activity models have a 'ln(x_i)' term.

I have a few ideas for a work around but I was wondering this first.

Thank you for your time and help in this matter,

Dylan Weber
PhD Student
Chemical and Biomolecular Engineering
Georgia Institute of Technology, USA
djweber
 
Posts: 2
Joined: 04 September 2019, 04:48

Re: Question Regarding getSinglePhaseProperty -- MATLAB Unit

Postby jasper » 29 May 2020, 09:14

The non-normalized composition messages comes from Matlab CAPE-OPEN thermo, and is there because the result of compositions that do not add up to unity are undefined, and therefore should not be used.

I suggest you normalize the composition, e.g X/sum(X)
User avatar
jasper
 
Posts: 935
Joined: 24 October 2012, 15:33
Location: Spain


Return to Process Modelling Components

Who is online

Users browsing this forum: No registered users and 3 guests

cron