Skip to content

Commit cb0c54b

Browse files
committed
spelling and formating
1 parent a8acb14 commit cb0c54b

File tree

11 files changed

+73
-66
lines changed

11 files changed

+73
-66
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
clean:
44
rm -rf build dist *.egg-info
55

6+
clear_cache:
7+
rm -rf .pytest_cache
8+
rm -rf .ruff_cache
9+
uv run pyclean .
10+
611
test:
712
uv run pytest
813

pyXSteam/IAPWS_R14.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def pmelt_T_iceIII(T: float) -> float:
4646

4747

4848
def Tmelt_p_iceIII(p: float) -> float:
49-
"""invers of `pmelt_T_iceIII`
49+
"""inverse of `pmelt_T_iceIII`
5050
:param T: melting preasure in [MPa]
5151
5252
:return: temperature in [K]
@@ -73,7 +73,7 @@ def pmelt_T_iceV(T: float) -> float:
7373

7474

7575
def Tmelt_p_iceV(p: float) -> float:
76-
"""invers of `pmelt_T_iceV`
76+
"""inversee of `pmelt_T_iceV`
7777
:param T: melting preasure in [MPa]
7878
7979
:return: temperature in [K]
@@ -99,7 +99,7 @@ def pmelt_T_iceVI(T: float) -> float:
9999

100100

101101
def Tmelt_p_iceVI(p: float) -> float:
102-
"""invers of `pmelt_T_iceVI`
102+
"""inversee of `pmelt_T_iceVI`
103103
:param T: melting preasure in [MPa]
104104
105105
:return: temperature in [K]

pyXSteam/IAPWS_R4.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212

1313

1414
def myHW_rhoT(rho: float, T: float) -> float:
15-
pass
15+
"""placeholder"""
16+
raise DeprecationWarning("R4-84 was superseded by R17 and R18!")
17+
return
1618

1719

1820
def myHW_rhoT_R4(rho: float, T: float) -> float:
@@ -25,7 +27,7 @@ def myHW_rhoT_R4(rho: float, T: float) -> float:
2527
2628
:return: viscosity µ or NaN if arguments are out of range, in [Pa s]
2729
"""
28-
raise DeprecationWarning("R4-84 was superseded by R17 and R18!")
30+
logger.warning("R4-84 was superseded by R17 and R18!")
2931
logger.debug("calculating 'viscosity of heavy water' for ρ=%f and T=%f", rho, T)
3032

3133
T_star = 643.847 # K
@@ -83,7 +85,7 @@ def tcHW_rhoT_R4(rho: float, T: float) -> float:
8385
8486
:return: thermal conductivity λ or NaN, in [W / (m * K)]
8587
"""
86-
raise DeprecationWarning("R4-84 was superseded by R17 and R18!")
88+
logger.warning("R4-84 was superseded by R17 and R18!")
8789
logger.debug("calculating 'thermal conductivity of heavy water' for ρ=%f and T=%f", rho, T)
8890

8991
T_star = 643.847 # K

pyXSteam/IAPWS_R6.py

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414
logger = logging.getLogger(__name__)
1515

16-
# TODO: make functions availible via XSteam
17-
# TODO: verify functions R6_* for which no test values are availible in R6
16+
# TODO: make functions available via XSteam
17+
# TODO: verify functions R6_* for which no test values are available in R6
1818
# TODO: add missing tests
1919

2020

2121
def eq_Theta(tau: float, delta: float, A: float, beta: float) -> float:
22-
"""line 2 of eq 6 or table 5 - function not to be used seperatly
22+
"""line 2 of eq 6 or table 5 - function not to be used separately
2323
2424
:param tau: temperature coefficient τ
2525
:param delta: density coefficient δ
@@ -32,7 +32,7 @@ def eq_Theta(tau: float, delta: float, A: float, beta: float) -> float:
3232

3333

3434
def eq_Delta(tau: float, delta: float, a: float, A: float, B: float, beta: float) -> float:
35-
"""line 1 of eq 6 or table 5 - function not to be used seperatly
35+
"""line 1 of eq 6 or table 5 - function not to be used separately
3636
3737
:param tau: temperature coefficient τ
3838
:param delta: density coefficient δ
@@ -48,7 +48,7 @@ def eq_Delta(tau: float, delta: float, a: float, A: float, B: float, beta: float
4848

4949

5050
def eq_Psi(tau: float, delta: float, C: float, D: float) -> float:
51-
"""line 3 of eq 6 or table 5 - function not to be used seperatly
51+
"""line 3 of eq 6 or table 5 - function not to be used separately
5252
5353
:param tau: temperature coefficient τ
5454
:param delta: density coefficient δ
@@ -61,7 +61,7 @@ def eq_Psi(tau: float, delta: float, C: float, D: float) -> float:
6161

6262

6363
def eq_dDelta_ddelta(tau: float, delta: float, a: float, A: float, B: float, beta: float) -> float:
64-
"""line 6 in table 5 continued - function not to be used seperatly
64+
"""line 6 in table 5 continued - function not to be used separately
6565
Derivatives of the distance function ∆
6666
6767
:param tau: temperature coefficient τ
@@ -80,7 +80,7 @@ def eq_dDelta_ddelta(tau: float, delta: float, a: float, A: float, B: float, bet
8080

8181

8282
def eq_ddDelta_ddeltadelta(tau: float, delta: float, a: float, A: float, B: float, beta: float):
83-
"""line 7 in table 5 continued - function not to be used seperatly
83+
"""line 7 in table 5 continued - function not to be used separately
8484
Derivatives of the distance function ∆
8585
8686
:param tau: temperature coefficient τ
@@ -102,7 +102,7 @@ def eq_ddDelta_ddeltadelta(tau: float, delta: float, a: float, A: float, B: floa
102102

103103

104104
def eq_dDelta_b_ddelta(tau: float, delta: float, a: float, b: float, A: float, B: float, beta: float) -> float:
105-
"""line 1 of table 5 continued - function not to be used seperatly
105+
"""line 1 of table 5 continued - function not to be used separately
106106
Derivatives of the distance function ∆^b
107107
108108
:param tau: temperature coefficient τ
@@ -121,7 +121,7 @@ def eq_dDelta_b_ddelta(tau: float, delta: float, a: float, b: float, A: float, B
121121

122122

123123
def eq_ddDelta_b_ddeltadelta(tau: float, delta: float, a: float, b: float, A: float, B: float, beta: float) -> float:
124-
"""line 2 in table 5 continued - function not to be used seperatly
124+
"""line 2 in table 5 continued - function not to be used separately
125125
Derivatives of the distance function ∆^b
126126
127127
:param tau: temperature coefficient τ
@@ -141,7 +141,7 @@ def eq_ddDelta_b_ddeltadelta(tau: float, delta: float, a: float, b: float, A: fl
141141

142142

143143
def eq_dDelta_b_dtau(tau: float, delta: float, a: float, b: float, A: float, B: float, beta: float) -> float:
144-
"""line 3 in table 5 continued - function not to be used seperatly
144+
"""line 3 in table 5 continued - function not to be used separately
145145
Derivatives of the distance function ∆^b
146146
147147
:param tau: temperature coefficient τ
@@ -160,7 +160,7 @@ def eq_dDelta_b_dtau(tau: float, delta: float, a: float, b: float, A: float, B:
160160

161161

162162
def eq_ddDelta_b_dtautau(tau: float, delta: float, a: float, b: float, A: float, B: float, beta: float) -> float:
163-
"""line 4 of table 5 continued - function not to be used seperatly
163+
"""line 4 of table 5 continued - function not to be used separately
164164
Derivatives of the distance function ∆^b
165165
166166
:param tau: temperature coefficient τ
@@ -179,7 +179,7 @@ def eq_ddDelta_b_dtautau(tau: float, delta: float, a: float, b: float, A: float,
179179

180180

181181
def eq_ddDelta_b_ddeltadtau(tau: float, delta: float, a: float, b: float, A: float, B: float, beta: float) -> float:
182-
"""line 5 of table 5 continued - function not to be used seperatly
182+
"""line 5 of table 5 continued - function not to be used separately
183183
Derivatives of the distance function ∆^b
184184
185185
:param tau: temperature coefficient τ
@@ -202,7 +202,7 @@ def eq_ddDelta_b_ddeltadtau(tau: float, delta: float, a: float, b: float, A: flo
202202

203203

204204
def eq_dPsi_ddelta(tau: float, delta: float, C: float, D: float) -> float:
205-
"""line 1 in column 2 of table 5 continued - function not to be used seperatly
205+
"""line 1 in column 2 of table 5 continued - function not to be used separately
206206
Derivatives of the exponential function ψ
207207
208208
:param tau: temperature coefficient τ
@@ -217,7 +217,7 @@ def eq_dPsi_ddelta(tau: float, delta: float, C: float, D: float) -> float:
217217

218218

219219
def eq_ddPsi_ddeltadelta(tau: float, delta: float, C: float, D: float) -> float:
220-
"""line 2 in column 2 of table 5 continued - function not to be used seperatly
220+
"""line 2 in column 2 of table 5 continued - function not to be used separately
221221
Derivatives of the exponential function ψ
222222
223223
:param tau: temperature coefficient τ
@@ -232,7 +232,7 @@ def eq_ddPsi_ddeltadelta(tau: float, delta: float, C: float, D: float) -> float:
232232

233233

234234
def eq_dPsi_dtau(tau: float, delta: float, C: float, D: float) -> float:
235-
"""line 3 in column 2 of table 5 continued - function not to be used seperatly
235+
"""line 3 in column 2 of table 5 continued - function not to be used separately
236236
Derivatives of the exponential function ψ
237237
238238
:param tau: temperature coefficient τ
@@ -247,7 +247,7 @@ def eq_dPsi_dtau(tau: float, delta: float, C: float, D: float) -> float:
247247

248248

249249
def eq_ddPsi_dtautau(tau: float, delta: float, C: float, D: float) -> float:
250-
"""line 4 in column 2 of table 5 continued - function not to be used seperatly
250+
"""line 4 in column 2 of table 5 continued - function not to be used separately
251251
Derivatives of the exponential function ψ
252252
253253
:param tau: temperature coefficient τ
@@ -262,7 +262,7 @@ def eq_ddPsi_dtautau(tau: float, delta: float, C: float, D: float) -> float:
262262

263263

264264
def eq_ddPsi_ddeltadtau(tau: float, delta: float, C: float, D: float) -> float:
265-
"""line 5 in column 2 of table 5 continued - function not to be used seperatly
265+
"""line 5 in column 2 of table 5 continued - function not to be used separately
266266
Derivatives of the exponential function ψ
267267
268268
:param tau: temperature coefficient τ
@@ -277,7 +277,7 @@ def eq_ddPsi_ddeltadtau(tau: float, delta: float, C: float, D: float) -> float:
277277

278278

279279
def eq_phi_o(tau: float, delta: float) -> float:
280-
"""Ep 5 or line 1 in table 4 - function not to be used seperatly
280+
"""Ep 5 or line 1 in table 4 - function not to be used separately
281281
The ideal-gas part φo of the dimensionless Helmholtz free energy
282282
283283
:param tau: temperature coefficient τ
@@ -295,7 +295,7 @@ def eq_phi_o(tau: float, delta: float) -> float:
295295

296296

297297
def eq_phi_o_delta(delta: float) -> float:
298-
"""line 2 in table 4 - function not to be used seperatly
298+
"""line 2 in table 4 - function not to be used separately
299299
The ideal-gas part φo of the dimensionless Helmholtz free energy
300300
301301
:param delta: density coefficient δ
@@ -306,7 +306,7 @@ def eq_phi_o_delta(delta: float) -> float:
306306

307307

308308
def eq_phi_o_deltadelta(delta: float) -> float:
309-
"""line 3 in table 4 - function not to be used seperatly
309+
"""line 3 in table 4 - function not to be used separately
310310
The ideal-gas part φo of the dimensionless Helmholtz free energy
311311
312312
:param delta: density coefficient δ
@@ -317,7 +317,7 @@ def eq_phi_o_deltadelta(delta: float) -> float:
317317

318318

319319
def eq_phi_o_tau(tau: float) -> float:
320-
"""line 5 in table 4 - function not to be used seperatly
320+
"""line 5 in table 4 - function not to be used separately
321321
The ideal-gas part φo of the dimensionless Helmholtz free energy
322322
323323
:param tau: temperature coefficient τ
@@ -332,7 +332,7 @@ def eq_phi_o_tau(tau: float) -> float:
332332

333333

334334
def eq_phi_o_tautau(tau: float) -> float:
335-
"""line 6 in table 4 - function not to be used seperatly
335+
"""line 6 in table 4 - function not to be used separately
336336
The ideal-gas part φo of the dimensionless Helmholtz free energy
337337
338338
:param tau: temperature coefficient τ
@@ -348,7 +348,7 @@ def eq_phi_o_tautau(tau: float) -> float:
348348

349349

350350
def eq_phi_o_deltatau() -> float:
351-
"""Table 4, Eq 6 - function not to be used seperatly
351+
"""Table 4, Eq 6 - function not to be used separately
352352
The ideal-gas part φo of the dimensionless Helmholtz free energy
353353
354354
:return: φ^o_δτ
@@ -357,7 +357,7 @@ def eq_phi_o_deltatau() -> float:
357357

358358

359359
def eq_phi_r(tau: float, delta: float) -> float:
360-
"""Eq 6 or line 1 in table 5 - function not to be used seperatly
360+
"""Eq 6 or line 1 in table 5 - function not to be used separately
361361
The residual part φr of the dimensionless Helmholtz free energy
362362
363363
:param tau: temperature coefficient τ
@@ -389,7 +389,7 @@ def _exp(tau, delta, alpha, beta, gamma, epsilon) -> float:
389389

390390

391391
def eq_phi_r_delta(tau: float, delta: float) -> float:
392-
"""line 2 in table 5 - function not to be used seperatly
392+
"""line 2 in table 5 - function not to be used separately
393393
The residual part φr of the dimensionless Helmholtz free energy
394394
395395
:param tau: temperature coefficient τ
@@ -420,7 +420,7 @@ def eq_phi_r_delta(tau: float, delta: float) -> float:
420420

421421

422422
def eq_phi_r_deltadelta(tau: float, delta: float) -> float:
423-
"""line 3 in table 5 - function not to be used seperatly
423+
"""line 3 in table 5 - function not to be used separately
424424
The residual part φr of the dimensionless Helmholtz free energy
425425
426426
:param tau: temperature coefficient τ
@@ -469,7 +469,7 @@ def eq_phi_r_deltadelta(tau: float, delta: float) -> float:
469469

470470

471471
def eq_phi_r_tau(tau: float, delta: float) -> float:
472-
"""line 4 in table 5 - function not to be used seperatly
472+
"""line 4 in table 5 - function not to be used separately
473473
The residual part φr of the dimensionless Helmholtz free energy
474474
475475
:param tau: temperature coefficient τ
@@ -501,7 +501,7 @@ def eq_phi_r_tau(tau: float, delta: float) -> float:
501501

502502

503503
def eq_phi_r_tautau(tau: float, delta: float) -> float:
504-
"""line 5 in table 5 - function not to be used seperatly
504+
"""line 5 in table 5 - function not to be used separately
505505
The residual part φr of the dimensionless Helmholtz free energy
506506
507507
:param tau: temperature coefficient τ
@@ -540,7 +540,7 @@ def eq_phi_r_tautau(tau: float, delta: float) -> float:
540540

541541

542542
def eq_phi_r_deltatau(tau: float, delta: float) -> float:
543-
"""line 6 in table 5 - function not to be used seperatly
543+
"""line 6 in table 5 - function not to be used separately
544544
The residual part φr of the dimensionless Helmholtz free energy
545545
546546
:param tau: temperature coefficient τ

pyXSteam/XSteam.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
pmelt_T_iceVII,
4040
psubl_T,
4141
)
42-
from .IAPWS_R12 import eq10
42+
from .IAPWS_R12 import my_rhoT
4343

4444

4545
class XSteam:
@@ -2373,24 +2373,24 @@ def psubl_t(self, t: float) -> float:
23732373
self.logger.warning("temperature %f out of range", T)
23742374
return float("NaN")
23752375

2376-
def R12_my_rhot(self, rho: float, t: float, industrial_application: bool = True) -> float:
2377-
"""shear viscosity of pure water substance over an extensive range of fluid states
2376+
# def R12_my_rhot(self, rho: float, t: float, industrial_application: bool = True) -> float:
2377+
# """shear viscosity of pure water substance over an extensive range of fluid states
23782378

2379-
Release on the IAPWS Formulation 2008 for the Viscosity of Ordinary Water Substance
2380-
IAPWS R12-08
2381-
http://www.iapws.org/relguide/visc.pdf
2379+
# Release on the IAPWS Formulation 2008 for the Viscosity of Ordinary Water Substance
2380+
# IAPWS R12-08
2381+
# http://www.iapws.org/relguide/visc.pdf
23822382

2383-
:param rho: density
2384-
:param t: temperature
2385-
:param industrial_application: select if simple or detailes approximation should be used
2383+
# :param rho: density
2384+
# :param t: temperature
2385+
# :param industrial_application: select if simple or detailes approximation should be used
23862386

2387-
:return: shear viscosity
2388-
"""
2389-
self.logger.warning("this function is still experimental, use at your own risk!")
2387+
# :return: shear viscosity
2388+
# """
2389+
# self.logger.warning("this function is still experimental, use at your own risk!")
23902390

2391-
T = self._unit_converter.toSIunit_T(t)
2391+
# T = self._unit_converter.toSIunit_T(t)
23922392

2393-
my_my = eq10(T, rho, industrial=industrial_application)
2394-
my = my_my * 10e5
2393+
# my_my = my_rhoT(rho, T)
2394+
# my = my_my * 10e5
23952395

2396-
return self._unit_converter.fromSIunit_my(my)
2396+
# return self._unit_converter.fromSIunit_my(my)

pyXSteam/tables/R14_08.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Sources:
77
8-
* IAPWS R14-08(2011) Revised Release on the Pressure along the Melting
8+
* IAPWS R14-08(2011) Revised Release on the Pressure along the Melting
99
and Sublimation Curves of Ordinary Water Substance
1010
1111
"""

pyXSteam/tables/SR2_01.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
Sources:
77
88
* IAPWS SR2-01(2014) Revised Supplementary Release on Backward Equations for
9-
Pressure as a Function of Enthalpy and Entropy p(h,s) for Regions 1 and 2 of
10-
the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of
9+
Pressure as a Function of Enthalpy and Entropy p(h,s) for Regions 1 and 2 of
10+
the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of
1111
Water and Steam
1212
1313
"""

pyXSteam/tables/SR3_03.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Sources:
77
8-
* IAPWS SR3-03(2014) Revised Supplementary Release on Backward Equations for
8+
* IAPWS SR3-03(2014) Revised Supplementary Release on Backward Equations for
99
the Functions T(p,h), v(p,h) and T(p,s), v(p,s) for Region 3 of the IAPWS Industrial
1010
Formulation 1997 for the Thermodynamic Properties of Water and Steam
1111

0 commit comments

Comments
 (0)