Skip to content

Incorrect region for certain region 2 temperature/pressure inputs? #16

Description

@JBridenbaugh

According to table 18 on page 20 of the IAPWS-IF97 documentation the input values in that table should be in region 2 and should return the expected output values. When I use those input values in this library, I am not seeing the expected output values and the region is being identified as region 1.

Sample Code:

from pyXSteam.XSteam import XSteam
from pyXSteam.XSteam import RegionSelection

steamTable = XSteam(XSteam.UNIT_SYSTEM_BARE)

pressure = 1
temperature = 450

print(f"r: {str(RegionSelection.region_pT(pressure, temperature))}")
print(f"v: {str(round(steamTable.v_pt(pressure, temperature), 11))}")
print(f"h: {str(round(steamTable.h_pt(pressure, temperature), 6))}")
print(f"u: {str(round(steamTable.u_pt(pressure, temperature), 6))}")
print(f"s: {str(round(steamTable.s_pt(pressure, temperature), 8))}")
print(f"cp: {str(round(steamTable.Cp_pt(pressure, temperature), 8))}")
print(f"w: {str(round(steamTable.w_pt(pressure, temperature), 5))}")
print()

pressure = 1
temperature = 440

print(f"r: {str(RegionSelection.region_pT(pressure, temperature))}")
print(f"v: {str(round(steamTable.v_pt(pressure, temperature), 11))}")
print(f"h: {str(round(steamTable.h_pt(pressure, temperature), 6))}")
print(f"u: {str(round(steamTable.u_pt(pressure, temperature), 6))}")
print(f"s: {str(round(steamTable.s_pt(pressure, temperature), 8))}")
print(f"cp: {str(round(steamTable.Cp_pt(pressure, temperature), 8))}")
print(f"w: {str(round(steamTable.w_pt(pressure, temperature), 5))}")
print()

pressure = 1.5
temperature = 450

print(f"r: {str(RegionSelection.region_pT(pressure, temperature))}")
print(f"v: {str(round(steamTable.v_pt(pressure, temperature), 11))}")
print(f"h: {str(round(steamTable.h_pt(pressure, temperature), 6))}")
print(f"u: {str(round(steamTable.u_pt(pressure, temperature), 6))}")
print(f"s: {str(round(steamTable.s_pt(pressure, temperature), 8))}")
print(f"cp: {str(round(steamTable.Cp_pt(pressure, temperature), 8))}")
print(f"w: {str(round(steamTable.w_pt(pressure, temperature), 5))}")
print()

Expected Results:

r: 2
v: 0.192516540
h: 2768.81115
u: 2576.29461
s: 6.56660377
cp: 2.76349265
w: 498.408101

r: 2
v: 0.186212297
h: 2740.15123
u: 2553.93894
s: 6.50218759
cp: 2.98166443
w: 489.363295

r: 2
v: 0.121685206
h: 2721.34539
u: 2538.81758
s: 6.29170440
cp: 3.62795578
w: 481.941819

Actual Results:

r: 1
v: 0.0011231015
h: 749.328482
u: 748.205381
s: 2.10885468
cp: 4.39337721
w: 1400.24334

r: 1
v: 0.0011101036
h: 705.575346
u: 704.465243
s: 2.01053038
cp: 4.35807066
w: 1427.13679

r: 1
v: 0.0011226877
h: 749.58737
u: 747.903338
s: 2.10818233
cp: 4.3912142
w: 1401.85642

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions