Closed tkoenig1 closed 6 months ago
the main problem is that there is not a definition of Region3_TPh
that calculates the Temperature of the fluid, given p,h inputs in that region.
the same problem happens with the region 5, and with P-s inputs
I tried the version mentioned in the pull request, but unfortunately, it does not appear to work for my case:
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.10.2 (2024-03-01)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> include("issue.jl")
ERROR: LoadError: DomainError with (30.0, 1.4846968704759807e6):
Pressure/Temperature outside valid ranges.
Stacktrace:
[1] RegionID_Ph(P::Float64, h::Float64)
@ SteamTables ~/.julia/packages/SteamTables/pMvX5/src/SteamTables.jl:2028
[2] SpecificS_Ph(P::Float64, h::Float64)
@ SteamTables ~/.julia/packages/SteamTables/pMvX5/src/SteamTables.jl:2949
[3] top-level scope
@ ~/Nico/Steam/issue.jl:6
[4] include(fname::String)
@ Base.MainInclude ./client.jl:489
[5] top-level scope
@ REPL[1]:1
in expression starting at /home/ig25/Nico/Steam/issue.jl:6
(@v1.10) pkg> st SteamTables
Status `~/.julia/environments/v1.10/Project.toml`
[43dc94dd] SteamTables v1.2.1 `https://github.com/longemen3000/SteamTables.jl.git#master`
where issue.jl is
using SteamTables
P=30.
T=650.
H=SpecificH(P,T)
SpecificS_Ph(P,H)
First, thanks for a nice package...
I am having some trouble with SpecificS_Ph, which fails for some valid input data in the supercritical region. Example below.
If this is user error, I don's see what I did wrong. Is there a known fix or workaround for this? I guess using NonlinearSolve would be one method, but I'd like to avoid re-implementing something if it is already available.