[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/bbcode.php on line 112: 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 112: 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 112: 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 - Problem(s) with Thermo Import Function

Problem(s) with Thermo Import Function

Moderator: jasper

Problem(s) with Thermo Import Function

Postby nrgeng » 23 January 2018, 13:20

nrgeng
 
Posts: 239
Joined: 16 February 2013, 12:45
Location: USA

Re: Problem(s) with Thermo Import Function

Postby jasper » 23 January 2018, 16:47

User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Problem(s) with Thermo Import Function {002}

Postby nrgeng » 23 January 2018, 22:09

{capeOpenEquilibrium function}

1) TEA (CAPE-OPEN 1.1) is configured as the Property Package Manager. The capeOpenFlashPropList function lists the extensive properties of "enthalpyF" and "gibbsEnergy" for the property package used.

In the code with the error,The first function successfully used gibbsEnergy, a valid propNames argument, with the capeOpenEquilibriumProp function. The second function fails to use propNames as prop1 for the capeOpenEquilibrium function. The problem as defined is that the functions work for enthalpyF, code section with No error, but not for gibbsEnergy, code section with Error.

If gibbsEnergy is not supported, then why is it listed for TEA (CAPE-OPEN 1.1)? Question: How does one check version 1.1 packages for supported extensive properties?

Since the capeOpenFlashPropList function calls the handle of the property package used, why is the returned list of properties not specific to that package? Why not call an empty function parameter list, e.g., functionList(), instead if the list is not relevant to the specified package handle? Then what use is the returned list?

2) The Example for capeOpenEquilibriumProp shows '0' in the parameter list for type. This statement is not true. The type parameter is optional so it was omitted from the parameter list of the example. The '0' appeared as the value of prop2, val2,--"vaporFraction",0), not as the value of type. The example is correct as written.
nrgeng
 
Posts: 239
Joined: 16 February 2013, 12:45
Location: USA

Re: Problem(s) with Thermo Import Function

Postby jasper » 24 January 2018, 08:24

The list of extensive properties is obtained from GetSinglePropList (and filtering out the ones that are extensive). So the returns list contains pressure, temperature, vapor fraction (if a vapor phase is defined) and all properties in the single phase property list that are extensive. The SciLab CAPE-OPEN thermo implementation does not iterate over all combinations of possibly supported properties to see which ones are actually supported. I suppose it could do so, but (apart from the slightly longer start up time) it might be somewhat error prone.

In any case, the resulting list of properties is still not decisive. For example, as temperature appears in the list, it does not imply that a temperature-temperature flash is ok (it will surely not be). In general, you cannot depend on any combination of flash properties to work. I could provide a function that will test whether a particular combination will work however.
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Problem(s) with Thermo Import Function {003}

Postby nrgeng » 24 January 2018, 13:57

{capeOpenEquilibrium function}

a) My understanding of your explanation of the 'capeOpenEquilibrium' function is that one tests the code for an error and then tries another combination of flash properties until hopefully, one finds something that works.
(T)rue or (F)alse?

b) This is an odd method of programming. How can one write code to perform a calculation which possibly cannot be computed? You seem to suggest a long string of If...Then statements.
(T)rue or (F)alse?

c) By calculating H from X, p and T using the 'capeOpenEquilibriumProp' function successfully, then using the 'capeOpenEquilibrium' function to calculate T from X, H, and p successfully; why was the calculation of T unsuccessful when substituting G for H in the script? Why is this not an error? After all, G was calculated successfully, as was H, from X, p and T using the 'capeOpenEquilibriumProp' function. Is this not evidence that G is supported?
Explain, please.

d) Relevant to my Scilab script, I want to calculate the Gibbs Free Energy, G, at equilibrium for a variable Mole Fraction at a specific Temperature and Pressure. I am searching for the particular Mole Fraction that yields a Gibbs Free Energy of zero. Since the 'capeOpenEquilibrium' function presents an error message for using G, do I have to calculate ∆G = ∆H -T∆S? Or does this method also have unknown success?
(T)rue or (F)alse? Explain, please.

e) Please provide any other useful information that could help to accomplish my task. Thank you.
nrgeng
 
Posts: 239
Joined: 16 February 2013, 12:45
Location: USA

Re: Problem(s) with Thermo Import Function

Postby jasper » 24 January 2018, 15:56

a) False. It will only try the combination you specify
b) False. See (a)
c) because TEA does not support Gibbs Free Energy as a flash condition
d) I suggest you use a root finder in Scilab, changing T so that G is obtained
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Problem(s) with Thermo Import Function {004}

Postby nrgeng » 25 January 2018, 12:39

nrgeng
 
Posts: 239
Joined: 16 February 2013, 12:45
Location: USA

Re: Problem(s) with Thermo Import Function

Postby jasper » 26 January 2018, 12:39

The help is incorrect - string matrix support was removed in an earlier version. Apologies. Try a single string and separate the properties by spaces:

[eaF , eoF , Te]=capeOpenEquilibriumProp(handle,"enthalpyF entropyF temperature",X,"pressure",p,"temperature",T,"Unspecified");
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Re: Problem(s) with Thermo Import Function

Postby jasper » 26 January 2018, 13:51

The help has been updated.
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain


Return to Scilab Thermo import (AmsterCHEM)

Who is online

Users browsing this forum: No registered users and 0 guests

cron