Scilab UnitOp calc thermo without feed

Moderator: jasper

Scilab UnitOp calc thermo without feed

Postby greTol » 12 April 2017, 14:58

Hi Jasper,

I added a scilab unit operation to a flowsheet. This unit only has one port: An output.
When I call "getSinglePhaseProperty" to get the activity coefficient
e1_greek_gamma_i = getSinglePhaseProperty("activityCoefficient","liquid",e1_T,e1_p,e1_x_i);
I get the following error:

Error:
Failed to calculate activityCoefficient:
CalcSinglePhaseProp failed:
Failed to obtain temperature from the material object:
no values set for temperature, phase overall, calcType mixture

In another unit operation, that has input ports, the same line works.
Is it really a problem that my unit has no input?
If yes, is there a workaround to get results from these thermo functions anyway?

Would be glad to get an answer.

With best regards,

greTol
greTol
 
Posts: 20
Joined: 26 August 2013, 14:45

Re: Scilab UnitOp calc thermo without feed

Postby jasper » 12 April 2017, 15:02

Is there any way you can send me a file that contains this issue so that I can investigate?
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Re: Scilab UnitOp calc thermo without feed

Postby jasper » 13 April 2017, 12:14

The problem is that T and P are zero on the very first call to activity. You can see it if you do

disp(e1p1_T)
e1_greek_gamma_i = getSinglePhaseProperty("activityCoefficient","liquid",e1p1_T,e1p1_P,e1_x_L_i);

instead of just

e1_greek_gamma_i = getSinglePhaseProperty("activityCoefficient","liquid",e1p1_T,e1p1_P,e1_x_L_i);

The error message of course is not nice - I will check how to improve upon that.
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Re: Scilab UnitOp calc thermo without feed

Postby jasper » 14 April 2017, 09:46

The error message from COCO is nicer now - it does not accept a value of 0 for temperature or pressure anymore.

Also if you are using Scilab 6.0 - please update your Scilab Unit Operation; the error handling is fixed there too.

Thank you for posting your issue.
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain


Return to Scilab Unit Operation (AmsterCHEM)

Who is online

Users browsing this forum: No registered users and 1 guest

cron