Page 1 of 1

Question Regarding getSinglePhaseProperty -- MATLAB Unit Op

PostPosted: 29 May 2020, 02:58
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

Re: Question Regarding getSinglePhaseProperty -- MATLAB Unit

PostPosted: 29 May 2020, 09:14
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)

Re: Question Regarding getSinglePhaseProperty -- MATLAB Unit

PostPosted: 31 August 2020, 15:29
by djweber
Thank you for the help!