Skip to content
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

Erroneous two-phase calculation of function setState_psX for R134a medium #3320

Closed
beutlich opened this issue Jan 14, 2020 · 4 comments · Fixed by #3392
Closed

Erroneous two-phase calculation of function setState_psX for R134a medium #3320

beutlich opened this issue Jan 14, 2020 · 4 comments · Fixed by #3392
Assignees
Labels
bug Critical/severe issue L: Media Issue addresses Modelica.Media
Milestone

Comments

@beutlich
Copy link
Member

beutlich commented Jan 14, 2020

I am afraid the issue reported in #3163 for Modelica.Media.R134a.R134a_ph.setState_dTX (which was fixed in #3275) also is apparent with Modelica.Media.R134a.R134a_ph.setState_psX in two-phase region.

Check the setState_psX table generated by T3320.mo:

setState_phX() (ref props in parentheses)

row T p d h
1 374.21
(374.21)
4.05911e+06
(4.05911e+06)
511.899
(511.9)
389639
(389639)
2 169.85
(169.85)
389.563
(389.563)
1517.14
(1591.11)
71455.2
(71455.2)
3 298.15
(298.15)
3e+06
(3e+06)
1220.13
(1220.13)
234687
(234687)
4 305.987
(305.987)
3e+06
(3e+06)
1190.76
(1190.76)
245776
(245776)
5 273.15
(273.15)
292803
(292803)
1294.76
(1294.78)
200000
(200000)
6 298.15
(298.15)
665380
(665380)
969.978
(969.916)
235741
(235741)

setState_dTX() (ref props in parentheses)

row T p d h
1 374.21
(374.21)
4.05911e+06
(4.05911e+06)
511.9
(511.9)
389639
(389639)
2 169.85
(169.85)
2527.38
(389.563)
1591.11
(1591.11)
71456
(71455.2)
3 298.15
(298.15)
3.00047e+06
(3e+06)
1220.13
(1220.13)
234687
(234687)
4 305.987
(305.987)
3.00047e+06
(3e+06)
1190.76
(1190.76)
245776
(245776)
5 273.15
(273.15)
293558
(292803)
1294.78
(1294.78)
200000
(200000)
6 298.15
(298.15)
665381
(665380)
969.916
(969.916)
235741
(235741)

setState_psX() (ref props in parentheses)

row T p d h
1 374.21
(374.21)
4.05911e+06
(4.05911e+06)
511.897
(511.9)
389639
(389639)
2 🔺 293.15
(169.85)
389.563
(389.563)
🔺 4
(1591.11)
71455.2
(71455.2)
3 298.149
(298.15)
3e+06
(3e+06)
1220.13
(1220.13)
234686
(234687)
4 305.986
(305.987)
3e+06
(3e+06)
1190.76
(1190.76)
245775
(245776)
5 🔺 293.15
(273.15)
292803
(292803)
🔺 4
(1294.78)
200000
(200000)
6 🔺 293.15
(298.15)
665380
(665380)
🔺 4
(969.916)
235741
(235741)

setState_pTX() (ref props in parentheses)

row T p d h
1 374.21
(374.21)
4.05911e+06
(4.05911e+06)
501.2
(511.9)
390934
(389639)
2 169.85
(169.85)
389.563
(389.563)
n.a.
(1591.11)
n.a.
(71455.2)
3 298.15
(298.15)
3e+06
(3e+06)
1220.13
(1220.13)
234687
(234687)
4 305.987
(305.987)
3e+06
(3e+06)
1190.76
(1190.76)
245776
(245776)
5 273.15
(273.15)
292803
(292803)
n.a.
(1294.78)
n.a.
(200000)
6 298.15
(298.15)
665380
(665380)
n.a.
(969.916)
n.a.
(235741)
@beutlich beutlich added bug Critical/severe issue L: Media Issue addresses Modelica.Media labels Jan 14, 2020
@beutlich beutlich added this to the MSL4.0.0 milestone Jan 14, 2020
@beutlich
Copy link
Member Author

I marked the incorrect values by 🔺 in the above table for better visualibility.

@wischhusen
Copy link
Contributor

Resolved as far as I can see. Outputs for d and T were missing in setState_psX in two-phase mode.

@beutlich
Copy link
Member Author

beutlich commented Feb 5, 2020

Resolved as far as I can see.

What do you mean by "Resolved"? Do you have a patch for it?

@wischhusen
Copy link
Contributor

Yes I pushed into my fork

beutlich added a commit to beutlich/ModelicaStandardLibrary that referenced this issue Feb 5, 2020
Additionally, add the phase calculation for the thermodynamic state
beutlich added a commit that referenced this issue Feb 7, 2020
Additionally, add the phase calculation for the thermodynamic state
beutlich added a commit to beutlich/ModelicaStandardLibrary that referenced this issue Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Critical/severe issue L: Media Issue addresses Modelica.Media
Projects
None yet
2 participants