Question Regarding getSinglePhaseProperty -- MATLAB Unit Op

Moderator: jasper

Post Reply
djweber
Posts: 3
Joined: 04 September 2019, 04:48

Question Regarding getSinglePhaseProperty -- MATLAB Unit Op

Post by djweber »

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
User avatar
jasper
Posts: 1129
Joined: 24 October 2012, 15:33
Location: Spain
Contact:

Re: Question Regarding getSinglePhaseProperty -- MATLAB Unit

Post by jasper »

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)
djweber
Posts: 3
Joined: 04 September 2019, 04:48

Re: Question Regarding getSinglePhaseProperty -- MATLAB Unit

Post by djweber »

Thank you for the help!
Post Reply

Return to “MATLAB Unit Operation (AmsterCHEM)”