Page 1 of 1
Problem(s) with Thermo Import Function
Posted:
23 January 2018, 13:20
by nrgeng
Re: Problem(s) with Thermo Import Function
Posted:
23 January 2018, 16:47
by jasper
Problem(s) with Thermo Import Function {002}
Posted:
23 January 2018, 22:09
by nrgeng
{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.
Re: Problem(s) with Thermo Import Function
Posted:
24 January 2018, 08:24
by jasper
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.
Problem(s) with Thermo Import Function {003}
Posted:
24 January 2018, 13:57
by nrgeng
{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.
Re: Problem(s) with Thermo Import Function
Posted:
24 January 2018, 15:56
by jasper
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
Problem(s) with Thermo Import Function {004}
Posted:
25 January 2018, 12:39
by nrgeng
Re: Problem(s) with Thermo Import Function
Posted:
26 January 2018, 12:39
by jasper
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");
Re: Problem(s) with Thermo Import Function
Posted:
26 January 2018, 13:51
by jasper
The help has been updated.