-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with IAPWS97 #78
Comments
Hi, https://github.com/jjgomera/iapws/blob/master/test.py#L568 If you use the input values in IAPWS97 class, you dont get the values of the table, you get the values of the stable phase at that conditions, the liqpuid phase, to get the metastable-vapor properties you must use directly the specific correlation |
Juan,
Thanks for the prompt reply. Here is an example of how I am using the iapws
code
# Define pressure (MPa) and temperature (°C)
P = 5.0
T = 300 + 273.15 # Temperature in °C
x = iapws.IAPWS97(T=T, P = P)
My interpretation of the documentation is that this IAPWS97 class can
accept combinations of P, T, X etc. and then internally will determine
which region the input falls into and then will use the appropriate code
for the applicable region. Under this assumption the results from all the
other data tables are correctly reproduced. Is this correct use of the
class, and it so is this meta-stable region an exception. I have not gone
through the code for this class but will do so. if not, then do I need to
write code which evaluates the T and P input value and then selects which
Region to use for the calculations
Note that the commercial software which my company uses and has used for
many years (large multinational engineering company) include functions by
property which performs in the way I assume your code does i.e. if I pass a
function for enthalpy a specific temperature and pressure it
determines which region and returns the result. It reproduces all the data
tables correctly except for the Table 18 data, I have contacted them and am
awaiting a responses.
Thanks for your feedback.
Bernie Moore
…On Wed, Feb 5, 2025 at 1:41 PM Juan José Gómez Romera < ***@***.***> wrote:
Hi,
That table is calculated for a different correlation specific for the
metastable-vapor region, so, you need use it to get the corrected values in
table, in fact, that table is used in testing of library
https://github.com/jjgomera/iapws/blob/master/test.py#L568
—
Reply to this email directly, view it on GitHub
<#78 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF4FMDIZ4BZTJTPIFBWX37L2OJZOBAVCNFSM6AAAAABWQA6ROWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZXHE3TONZZGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Regards,
Bernie Moore
|
Hi, Bernie,
Your right, metastable states are not added in IAPWS97, you must use it directly to get properties in that metastable state
|
Thanks Juan. Is this meta stable region 2 the only region not included in the IAPSW97 class, or are there other I would be aware of. Sorry if I missed this in the documentation.BernieSent from my iPadOn Feb 6, 2025, at 3:09 PM, Juan José Gómez Romera ***@***.***> wrote:
Hi, Bernie,
Juan,
Thanks for the prompt reply. Here is an example of how I am using the iapws
code
# Define pressure (MPa) and temperature (°C)
P = 5.0
T = 300 + 273.15 # Temperature in °C
x = iapws.IAPWS97(T=T, P = P)
My interpretation of the documentation is that this IAPWS97 class can
accept combinations of P, T, X etc. and then internally will determine
which region the input falls into and then will use the appropriate code
for the applicable region. Under this assumption the results from all the
other data tables are correctly reproduced. Is this correct use of the
class, and it so is this meta-stable region an exception. I have not gone
through the code for this class but will do so. if not, then do I need to
write code which evaluates the T and P input value and then selects which
Region to use for the calculations
Your right, metastable states are not added in IAPWS97, you must use it directly to get properties in that metastable state
In [1]: from iapws.iapws97 import _Region2_meta
In [2]: st = _Region2_meta(450, 1)
In [3]: st
Out[3]:
{'T': 450,
'P': 1,
'v': 0.1925165400597291,
'h': 2768.811151116923,
's': 6.566603768617397,
'cp': 2.7634926495107943,
'cv': 1.958307301714166,
'w': 498.40810066232143,
'alfav': 0.0031881982400282847,
'kt': 1.0936423860609599,
'region': 2,
'x': 1}
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I have been validating the IAPWS97 code against data published by IAPWS for the purpose of validating computer code implementation. Data is in this report
The International Association for the Properties of Water and Steam
Lucerne, Switzerland
August 2007
Revised Release on the IAPWS Industrial Formulation 1997
for the Thermodynamic Properties of Water and Steam
(The revision only relates to the extension of region 5 to 50 MPa)
The International Association for the Properties of Water and Steam
The routine iapws.IAPWS97 does not return the values published in Table 18 of this report (it does return essentially identical values for other similar tables). I checked the data in Table 18 against other commercial implementation of this code, and that software produced erros as well. However, the implementation on the IAPWS website at this link reproduced Table 18 - http://twt.mpei.ac.ru/mcs/worksheets/iapws/IAPWS-IF97-Region2.xmcd.
I'm wondering if there was some error in the publication which has been addressed by subsequent errata which is not addressed in your code.
The text was updated successfully, but these errors were encountered: