pyfluids 2.8.2__tar.gz → 3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyfluids-3.0.0/PKG-INFO +50 -0
- pyfluids-3.0.0/PyPI.md +9 -0
- {pyfluids-2.8.2 → pyfluids-3.0.0}/pyproject.toml +24 -26
- pyfluids-3.0.0/src/pyfluids/config/__init__.py +5 -0
- pyfluids-2.8.2/pyfluids/config/pyfluids_config_builder.py → pyfluids-3.0.0/src/pyfluids/config/config.py +30 -23
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/config/unit_converter.py +2 -3
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/enums/fluids_list.py +7 -6
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/fluids/abstract_fluid.py +24 -29
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/fluids/fluid.py +43 -14
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/fluids/mixture.py +3 -3
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/humid_air/humid_air.py +23 -24
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/io/abstract_input.py +2 -2
- pyfluids-2.8.2/LICENSE +0 -21
- pyfluids-2.8.2/PKG-INFO +0 -56
- pyfluids-2.8.2/PyPI.md +0 -13
- pyfluids-2.8.2/pyfluids/config/__init__.py +0 -11
- pyfluids-2.8.2/pyfluids/config/pyfluids_config.py +0 -12
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/__init__.py +0 -0
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/config/singleton.py +0 -0
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/config/units_system.py +0 -0
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/enums/__init__.py +0 -0
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/enums/mix.py +0 -0
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/enums/phases.py +2 -2
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/fluids/__init__.py +0 -0
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/humid_air/__init__.py +0 -0
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/io/__init__.py +0 -0
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/io/input.py +1 -1
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/io/input_humid_air.py +1 -1
- {pyfluids-2.8.2 → pyfluids-3.0.0/src}/pyfluids/io/outputs_validator.py +0 -0
pyfluids-3.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyfluids
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: CoolProp wrapper for Python
|
|
5
|
+
Keywords: CoolProp,fluids,mixtures,humid,air,thermophysical,properties,thermodynamics
|
|
6
|
+
Author: Vladimir Portyanikhin
|
|
7
|
+
Author-email: Vladimir Portyanikhin <v.portyanikhin@ya.ru>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Intended Audience :: Education
|
|
12
|
+
Classifier: Intended Audience :: Manufacturing
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Natural Language :: English
|
|
16
|
+
Classifier: Operating System :: MacOS
|
|
17
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
19
|
+
Classifier: Operating System :: Unix
|
|
20
|
+
Classifier: Programming Language :: Python
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
27
|
+
Classifier: Programming Language :: Python :: Implementation
|
|
28
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
29
|
+
Classifier: Topic :: Education
|
|
30
|
+
Classifier: Topic :: Scientific/Engineering
|
|
31
|
+
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
|
|
32
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
33
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
34
|
+
Requires-Dist: coolprop==7.2.0
|
|
35
|
+
Requires-Python: >=3.11, <3.15
|
|
36
|
+
Project-URL: homepage, https://github.com/portyanikhin/pyfluids
|
|
37
|
+
Project-URL: source, https://github.com/portyanikhin/pyfluids
|
|
38
|
+
Project-URL: releasenotes, https://github.com/portyanikhin/pyfluids/releases
|
|
39
|
+
Project-URL: documentation, https://github.com/portyanikhin/pyfluids
|
|
40
|
+
Description-Content-Type: text/markdown
|
|
41
|
+
|
|
42
|
+
# pyfluids
|
|
43
|
+
|
|
44
|
+
[](https://github.com/portyanikhin/pyfluids)
|
|
45
|
+
[](https://pypi.org/project/pyfluids)
|
|
46
|
+
[](https://pypi.org/project/pyfluids)
|
|
47
|
+
[](https://github.com/portyanikhin/pyfluids/actions/workflows/ci.yml)
|
|
48
|
+
[](https://app.codecov.io/gh/portyanikhin/pyfluids)
|
|
49
|
+
|
|
50
|
+
[CoolProp](https://www.coolprop.org) wrapper for Python
|
pyfluids-3.0.0/PyPI.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# pyfluids
|
|
2
|
+
|
|
3
|
+
[](https://github.com/portyanikhin/pyfluids)
|
|
4
|
+
[](https://pypi.org/project/pyfluids)
|
|
5
|
+
[](https://pypi.org/project/pyfluids)
|
|
6
|
+
[](https://github.com/portyanikhin/pyfluids/actions/workflows/ci.yml)
|
|
7
|
+
[](https://app.codecov.io/gh/portyanikhin/pyfluids)
|
|
8
|
+
|
|
9
|
+
[CoolProp](https://www.coolprop.org) wrapper for Python
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
[
|
|
1
|
+
[project]
|
|
2
2
|
name = "pyfluids"
|
|
3
|
-
version = "
|
|
4
|
-
description = "
|
|
5
|
-
authors = [
|
|
6
|
-
"Vladimir Portyanikhin <v.portyanikhin@ya.ru>",
|
|
7
|
-
]
|
|
8
|
-
license = "MIT"
|
|
3
|
+
version = "3.0.0"
|
|
4
|
+
description = "CoolProp wrapper for Python"
|
|
9
5
|
readme = "PyPI.md"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
requires-python = ">=3.11, <3.15"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
authors = [{ name = "Vladimir Portyanikhin", email = "v.portyanikhin@ya.ru" }]
|
|
13
9
|
keywords = [
|
|
14
10
|
"CoolProp",
|
|
15
11
|
"fluids",
|
|
@@ -35,11 +31,10 @@ classifiers = [
|
|
|
35
31
|
"Programming Language :: Python",
|
|
36
32
|
"Programming Language :: Python :: 3",
|
|
37
33
|
"Programming Language :: Python :: 3 :: Only",
|
|
38
|
-
"Programming Language :: Python :: 3.9",
|
|
39
|
-
"Programming Language :: Python :: 3.10",
|
|
40
34
|
"Programming Language :: Python :: 3.11",
|
|
41
35
|
"Programming Language :: Python :: 3.12",
|
|
42
36
|
"Programming Language :: Python :: 3.13",
|
|
37
|
+
"Programming Language :: Python :: 3.14",
|
|
43
38
|
"Programming Language :: Python :: Implementation",
|
|
44
39
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
45
40
|
"Topic :: Education",
|
|
@@ -48,23 +43,26 @@ classifiers = [
|
|
|
48
43
|
"Topic :: Scientific/Engineering :: Chemistry",
|
|
49
44
|
"Topic :: Scientific/Engineering :: Physics",
|
|
50
45
|
]
|
|
51
|
-
|
|
52
|
-
{ include = "pyfluids" },
|
|
53
|
-
]
|
|
46
|
+
dependencies = ["CoolProp==7.2.0"]
|
|
54
47
|
|
|
55
|
-
[
|
|
56
|
-
|
|
57
|
-
CoolProp = "7.1.0"
|
|
58
|
-
tomli = "2.2.1"
|
|
48
|
+
[dependency-groups]
|
|
49
|
+
dev = ["pytest", "pytest-asyncio", "pytest-cov", "ruff", "ty"]
|
|
59
50
|
|
|
60
|
-
[
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
51
|
+
[project.urls]
|
|
52
|
+
homepage = "https://github.com/portyanikhin/pyfluids"
|
|
53
|
+
source = "https://github.com/portyanikhin/pyfluids"
|
|
54
|
+
releasenotes = "https://github.com/portyanikhin/pyfluids/releases"
|
|
55
|
+
documentation = "https://github.com/portyanikhin/pyfluids"
|
|
56
|
+
|
|
57
|
+
[build-system]
|
|
58
|
+
requires = ["uv_build~=0.11"]
|
|
59
|
+
build-backend = "uv_build"
|
|
64
60
|
|
|
65
61
|
[tool.pytest.ini_options]
|
|
66
62
|
asyncio_default_fixture_loop_scope = "function"
|
|
67
63
|
|
|
68
|
-
[
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
[tool.ruff.lint]
|
|
65
|
+
ignore = ["F403", "F405"]
|
|
66
|
+
|
|
67
|
+
[tool.ty.analysis]
|
|
68
|
+
allowed-unresolved-imports = ["CoolProp.CoolProp"]
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
+
import tomllib
|
|
4
5
|
from configparser import ConfigParser
|
|
6
|
+
from dataclasses import dataclass
|
|
5
7
|
from os.path import abspath
|
|
6
8
|
from pathlib import Path
|
|
9
|
+
from typing import NoReturn, cast
|
|
7
10
|
|
|
8
|
-
import tomli
|
|
9
|
-
|
|
10
|
-
from .pyfluids_config import PyFluidsConfig
|
|
11
11
|
from .singleton import Singleton
|
|
12
12
|
from .units_system import UnitsSystem
|
|
13
13
|
|
|
14
|
-
__all__ = ["
|
|
14
|
+
__all__ = ["Config", "ConfigBuilder"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@dataclass
|
|
18
|
+
class Config:
|
|
19
|
+
"""pyfluids configuration."""
|
|
20
|
+
|
|
21
|
+
units_system: UnitsSystem = UnitsSystem.SIWithCelsiusAndPercents
|
|
15
22
|
|
|
16
23
|
|
|
17
24
|
# noinspection PyBroadException
|
|
18
|
-
class
|
|
19
|
-
"""
|
|
25
|
+
class ConfigBuilder(metaclass=Singleton):
|
|
26
|
+
"""pyfluids configuration builder."""
|
|
20
27
|
|
|
21
28
|
def __init__(self):
|
|
22
|
-
"""
|
|
23
|
-
self.__config:
|
|
29
|
+
"""pyfluids configuration builder."""
|
|
30
|
+
self.__config: Config | None = None
|
|
24
31
|
self.__config_names: list[str] = [
|
|
25
32
|
"pyfluids.ini",
|
|
26
33
|
"pyfluids.json",
|
|
@@ -43,11 +50,11 @@ class PyFluidsConfigBuilder(metaclass=Singleton):
|
|
|
43
50
|
|
|
44
51
|
@property
|
|
45
52
|
def __config_data(self) -> str:
|
|
46
|
-
return self.__config_file.read_text(encoding="utf-8")
|
|
53
|
+
return cast(Path, self.__config_file).read_text(encoding="utf-8")
|
|
47
54
|
|
|
48
|
-
def build(self) ->
|
|
55
|
+
def build(self) -> Config:
|
|
49
56
|
"""
|
|
50
|
-
Build
|
|
57
|
+
Build pyfluids configuration.
|
|
51
58
|
|
|
52
59
|
If the configuration file is not found or an incorrect
|
|
53
60
|
configuration is found in the files "pyproject.toml" or "tox.ini",
|
|
@@ -68,26 +75,26 @@ class PyFluidsConfigBuilder(metaclass=Singleton):
|
|
|
68
75
|
def _reset(self):
|
|
69
76
|
self.__config = None
|
|
70
77
|
|
|
71
|
-
def __create_default_config(self) ->
|
|
72
|
-
self.__config =
|
|
78
|
+
def __create_default_config(self) -> Config:
|
|
79
|
+
self.__config = Config()
|
|
73
80
|
return self.__config
|
|
74
81
|
|
|
75
|
-
def __create_config_from_dict(self, config_dict: dict) ->
|
|
82
|
+
def __create_config_from_dict(self, config_dict: dict) -> Config:
|
|
76
83
|
config_dict["units_system"] = UnitsSystem[config_dict["units_system"]]
|
|
77
|
-
self.__config =
|
|
84
|
+
self.__config = Config(**config_dict)
|
|
78
85
|
return self.__config
|
|
79
86
|
|
|
80
|
-
def __load_config_from_ini_file(self) ->
|
|
87
|
+
def __load_config_from_ini_file(self) -> Config:
|
|
81
88
|
try:
|
|
82
89
|
config_parser = ConfigParser()
|
|
83
|
-
config_parser.read(self.__config_file)
|
|
90
|
+
config_parser.read(cast(Path, self.__config_file))
|
|
84
91
|
return self.__create_config_from_dict(dict(config_parser.items("pyfluids")))
|
|
85
92
|
except Exception:
|
|
86
|
-
if self.__config_file.name.startswith("pyfluids"):
|
|
93
|
+
if cast(Path, self.__config_file).name.startswith("pyfluids"):
|
|
87
94
|
self.__raise_invalid_config_exception()
|
|
88
95
|
return self.__create_default_config()
|
|
89
96
|
|
|
90
|
-
def __load_config_from_json_file(self) ->
|
|
97
|
+
def __load_config_from_json_file(self) -> Config:
|
|
91
98
|
try:
|
|
92
99
|
return self.__create_config_from_dict(
|
|
93
100
|
json.loads(self.__config_data)["pyfluids"]
|
|
@@ -95,16 +102,16 @@ class PyFluidsConfigBuilder(metaclass=Singleton):
|
|
|
95
102
|
except Exception:
|
|
96
103
|
self.__raise_invalid_config_exception()
|
|
97
104
|
|
|
98
|
-
def __load_config_from_toml_file(self) ->
|
|
105
|
+
def __load_config_from_toml_file(self) -> Config:
|
|
99
106
|
try:
|
|
100
107
|
return self.__create_config_from_dict(
|
|
101
|
-
|
|
108
|
+
tomllib.loads(self.__config_data)["tool"]["pyfluids"]
|
|
102
109
|
)
|
|
103
110
|
except Exception:
|
|
104
111
|
return self.__create_default_config()
|
|
105
112
|
|
|
106
|
-
def __raise_invalid_config_exception(self):
|
|
113
|
+
def __raise_invalid_config_exception(self) -> NoReturn:
|
|
107
114
|
raise ValueError(
|
|
108
|
-
"Invalid
|
|
115
|
+
"Invalid pyfluids configuration! "
|
|
109
116
|
f"Check your configuration file: {self.__config_file}"
|
|
110
117
|
)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
from .
|
|
2
|
-
from .pyfluids_config_builder import PyFluidsConfigBuilder
|
|
1
|
+
from .config import Config, ConfigBuilder
|
|
3
2
|
from .units_system import UnitsSystem
|
|
4
3
|
|
|
5
4
|
__all__ = ["UnitConverter"]
|
|
@@ -10,7 +9,7 @@ class UnitConverter:
|
|
|
10
9
|
|
|
11
10
|
def __init__(self):
|
|
12
11
|
"""Unit converter."""
|
|
13
|
-
self.__config:
|
|
12
|
+
self.__config: Config = ConfigBuilder().build()
|
|
14
13
|
|
|
15
14
|
@property
|
|
16
15
|
def units_system(self) -> UnitsSystem:
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
# cSpell:disable
|
|
2
|
+
|
|
1
3
|
from enum import Enum
|
|
2
4
|
|
|
3
|
-
from .mix import Mix
|
|
4
5
|
from ..config import UnitConverter
|
|
5
|
-
|
|
6
|
+
from .mix import Mix
|
|
6
7
|
|
|
7
8
|
__all__ = ["FluidsList"]
|
|
8
9
|
|
|
@@ -11,11 +12,11 @@ class FluidsList(Enum):
|
|
|
11
12
|
"""List of CoolProp fluids.
|
|
12
13
|
|
|
13
14
|
See more info about CoolProp `pure and pseudo-pure fluids
|
|
14
|
-
<
|
|
15
|
+
<https://www.coolprop.org/fluid_properties/PurePseudoPure.html>`_,
|
|
15
16
|
`incompressible fluids
|
|
16
|
-
<
|
|
17
|
+
<https://www.coolprop.org/fluid_properties/Incompressibles.html>`_
|
|
17
18
|
and `predefined mixtures
|
|
18
|
-
<
|
|
19
|
+
<https://www.coolprop.org/coolprop/HighLevelAPI.html#predefined-mixtures>`_.
|
|
19
20
|
"""
|
|
20
21
|
|
|
21
22
|
# Pure and pseudo-pure fluids
|
|
@@ -425,7 +426,7 @@ class FluidsList(Enum):
|
|
|
425
426
|
|
|
426
427
|
@property
|
|
427
428
|
def coolprop_backend(self) -> str:
|
|
428
|
-
"""
|
|
429
|
+
"""Default type of CoolProp backend."""
|
|
429
430
|
return self.__coolprop_backend
|
|
430
431
|
|
|
431
432
|
@property
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
from abc import ABC, abstractmethod
|
|
5
|
+
from typing import Self, cast
|
|
5
6
|
|
|
6
7
|
import CoolProp
|
|
7
8
|
from CoolProp import AbstractState
|
|
@@ -18,7 +19,7 @@ class AbstractFluid(ABC):
|
|
|
18
19
|
@abstractmethod
|
|
19
20
|
def __init__(self):
|
|
20
21
|
"""Base class of fluids."""
|
|
21
|
-
self._backend: AbstractState
|
|
22
|
+
self._backend: AbstractState
|
|
22
23
|
self._inputs: list[Input] = []
|
|
23
24
|
self.__compressibility: float | None = None
|
|
24
25
|
self.__conductivity: float | None = None
|
|
@@ -308,11 +309,11 @@ class AbstractFluid(ABC):
|
|
|
308
309
|
"""Returns a new fluid instance with no defined state."""
|
|
309
310
|
raise NotImplementedError # pragma: no cover
|
|
310
311
|
|
|
311
|
-
def clone(self) ->
|
|
312
|
+
def clone(self) -> Self:
|
|
312
313
|
"""Performs deep (full) copy of the fluid instance."""
|
|
313
314
|
return self.with_state(*self._inputs)
|
|
314
315
|
|
|
315
|
-
def with_state(self, first_input: Input, second_input: Input) ->
|
|
316
|
+
def with_state(self, first_input: Input, second_input: Input) -> Self:
|
|
316
317
|
"""
|
|
317
318
|
Returns a new fluid instance with a defined state.
|
|
318
319
|
|
|
@@ -325,7 +326,7 @@ class AbstractFluid(ABC):
|
|
|
325
326
|
if self.__specified_phase is not None:
|
|
326
327
|
fluid.specify_phase(self.__specified_phase)
|
|
327
328
|
fluid.update(first_input, second_input)
|
|
328
|
-
return fluid
|
|
329
|
+
return cast(Self, fluid)
|
|
329
330
|
|
|
330
331
|
def update(self, first_input: Input, second_input: Input):
|
|
331
332
|
"""
|
|
@@ -368,7 +369,7 @@ class AbstractFluid(ABC):
|
|
|
368
369
|
self.__surface_tension = None
|
|
369
370
|
self.__temperature = None
|
|
370
371
|
|
|
371
|
-
def specify_phase(self, phase: Phases) ->
|
|
372
|
+
def specify_phase(self, phase: Phases) -> Self:
|
|
372
373
|
"""
|
|
373
374
|
Specify the phase state for all further calculations.
|
|
374
375
|
|
|
@@ -379,7 +380,7 @@ class AbstractFluid(ABC):
|
|
|
379
380
|
self.__specified_phase = phase
|
|
380
381
|
return self
|
|
381
382
|
|
|
382
|
-
def unspecify_phase(self) ->
|
|
383
|
+
def unspecify_phase(self) -> Self:
|
|
383
384
|
"""
|
|
384
385
|
Unspecify the phase state and go back to calculating it based on the inputs.
|
|
385
386
|
|
|
@@ -389,7 +390,7 @@ class AbstractFluid(ABC):
|
|
|
389
390
|
self.__specified_phase = None
|
|
390
391
|
return self
|
|
391
392
|
|
|
392
|
-
def isentropic_compression_to_pressure(self, pressure: float) ->
|
|
393
|
+
def isentropic_compression_to_pressure(self, pressure: float) -> Self:
|
|
393
394
|
"""
|
|
394
395
|
The process of isentropic compression to given pressure.
|
|
395
396
|
|
|
@@ -405,7 +406,7 @@ class AbstractFluid(ABC):
|
|
|
405
406
|
|
|
406
407
|
def compression_to_pressure(
|
|
407
408
|
self, pressure: float, isentropic_efficiency: float
|
|
408
|
-
) ->
|
|
409
|
+
) -> Self:
|
|
409
410
|
"""
|
|
410
411
|
The process of compression to given pressure.
|
|
411
412
|
|
|
@@ -432,7 +433,7 @@ class AbstractFluid(ABC):
|
|
|
432
433
|
),
|
|
433
434
|
)
|
|
434
435
|
|
|
435
|
-
def isenthalpic_expansion_to_pressure(self, pressure: float) ->
|
|
436
|
+
def isenthalpic_expansion_to_pressure(self, pressure: float) -> Self:
|
|
436
437
|
"""
|
|
437
438
|
The process of isenthalpic expansion to given pressure.
|
|
438
439
|
|
|
@@ -446,7 +447,7 @@ class AbstractFluid(ABC):
|
|
|
446
447
|
)
|
|
447
448
|
return self.with_state(Input.pressure(pressure), Input.enthalpy(self.enthalpy))
|
|
448
449
|
|
|
449
|
-
def isentropic_expansion_to_pressure(self, pressure: float) ->
|
|
450
|
+
def isentropic_expansion_to_pressure(self, pressure: float) -> Self:
|
|
450
451
|
"""
|
|
451
452
|
The process of isentropic expansion to given pressure.
|
|
452
453
|
|
|
@@ -462,7 +463,7 @@ class AbstractFluid(ABC):
|
|
|
462
463
|
|
|
463
464
|
def expansion_to_pressure(
|
|
464
465
|
self, pressure: float, isentropic_efficiency: float
|
|
465
|
-
) ->
|
|
466
|
+
) -> Self:
|
|
466
467
|
"""
|
|
467
468
|
The process of expansion to given pressure.
|
|
468
469
|
|
|
@@ -491,7 +492,7 @@ class AbstractFluid(ABC):
|
|
|
491
492
|
|
|
492
493
|
def cooling_to_temperature(
|
|
493
494
|
self, temperature: float, pressure_drop: float = 0
|
|
494
|
-
) ->
|
|
495
|
+
) -> Self:
|
|
495
496
|
"""
|
|
496
497
|
The process of cooling to given temperature.
|
|
497
498
|
|
|
@@ -507,9 +508,7 @@ class AbstractFluid(ABC):
|
|
|
507
508
|
)
|
|
508
509
|
return self.__heat_transfer_to_temperature(temperature, pressure_drop)
|
|
509
510
|
|
|
510
|
-
def cooling_to_enthalpy(
|
|
511
|
-
self, enthalpy: float, pressure_drop: float = 0
|
|
512
|
-
) -> AbstractFluid:
|
|
511
|
+
def cooling_to_enthalpy(self, enthalpy: float, pressure_drop: float = 0) -> Self:
|
|
513
512
|
"""
|
|
514
513
|
The process of cooling to given enthalpy.
|
|
515
514
|
|
|
@@ -526,7 +525,7 @@ class AbstractFluid(ABC):
|
|
|
526
525
|
|
|
527
526
|
def heating_to_temperature(
|
|
528
527
|
self, temperature: float, pressure_drop: float = 0
|
|
529
|
-
) ->
|
|
528
|
+
) -> Self:
|
|
530
529
|
"""
|
|
531
530
|
The process of heating to given temperature.
|
|
532
531
|
|
|
@@ -542,9 +541,7 @@ class AbstractFluid(ABC):
|
|
|
542
541
|
)
|
|
543
542
|
return self.__heat_transfer_to_temperature(temperature, pressure_drop)
|
|
544
543
|
|
|
545
|
-
def heating_to_enthalpy(
|
|
546
|
-
self, enthalpy: float, pressure_drop: float = 0
|
|
547
|
-
) -> AbstractFluid:
|
|
544
|
+
def heating_to_enthalpy(self, enthalpy: float, pressure_drop: float = 0) -> Self:
|
|
548
545
|
"""
|
|
549
546
|
The process of heating to given enthalpy.
|
|
550
547
|
|
|
@@ -559,7 +556,7 @@ class AbstractFluid(ABC):
|
|
|
559
556
|
)
|
|
560
557
|
return self.__heat_transfer_to_enthalpy(enthalpy, pressure_drop)
|
|
561
558
|
|
|
562
|
-
def bubble_point_at_pressure(self, pressure: float) ->
|
|
559
|
+
def bubble_point_at_pressure(self, pressure: float) -> Self:
|
|
563
560
|
"""
|
|
564
561
|
Bubble point at given pressure.
|
|
565
562
|
|
|
@@ -568,7 +565,7 @@ class AbstractFluid(ABC):
|
|
|
568
565
|
"""
|
|
569
566
|
return self.with_state(Input.pressure(pressure), Input.quality(0))
|
|
570
567
|
|
|
571
|
-
def bubble_point_at_temperature(self, temperature: float) ->
|
|
568
|
+
def bubble_point_at_temperature(self, temperature: float) -> Self:
|
|
572
569
|
"""
|
|
573
570
|
Bubble point at given temperature.
|
|
574
571
|
|
|
@@ -578,7 +575,7 @@ class AbstractFluid(ABC):
|
|
|
578
575
|
"""
|
|
579
576
|
return self.with_state(Input.temperature(temperature), Input.quality(0))
|
|
580
577
|
|
|
581
|
-
def dew_point_at_pressure(self, pressure: float) ->
|
|
578
|
+
def dew_point_at_pressure(self, pressure: float) -> Self:
|
|
582
579
|
"""
|
|
583
580
|
Dew point at given pressure.
|
|
584
581
|
|
|
@@ -592,7 +589,7 @@ class AbstractFluid(ABC):
|
|
|
592
589
|
),
|
|
593
590
|
)
|
|
594
591
|
|
|
595
|
-
def dew_point_at_temperature(self, temperature: float) ->
|
|
592
|
+
def dew_point_at_temperature(self, temperature: float) -> Self:
|
|
596
593
|
"""
|
|
597
594
|
Dew point at given temperature.
|
|
598
595
|
|
|
@@ -607,9 +604,7 @@ class AbstractFluid(ABC):
|
|
|
607
604
|
),
|
|
608
605
|
)
|
|
609
606
|
|
|
610
|
-
def two_phase_point_at_pressure(
|
|
611
|
-
self, pressure: float, quality: float
|
|
612
|
-
) -> AbstractFluid:
|
|
607
|
+
def two_phase_point_at_pressure(self, pressure: float, quality: float) -> Self:
|
|
613
608
|
"""
|
|
614
609
|
Two phase point at given pressure.
|
|
615
610
|
|
|
@@ -626,7 +621,7 @@ class AbstractFluid(ABC):
|
|
|
626
621
|
first: AbstractFluid,
|
|
627
622
|
second_specific_mass_flow: float,
|
|
628
623
|
second: AbstractFluid,
|
|
629
|
-
) ->
|
|
624
|
+
) -> Self:
|
|
630
625
|
"""
|
|
631
626
|
The mixing process.
|
|
632
627
|
|
|
@@ -706,7 +701,7 @@ class AbstractFluid(ABC):
|
|
|
706
701
|
|
|
707
702
|
def __heat_transfer_to_temperature(
|
|
708
703
|
self, temperature: float, pressure_drop: float
|
|
709
|
-
) ->
|
|
704
|
+
) -> Self:
|
|
710
705
|
self.__check_pressure_drop(pressure_drop)
|
|
711
706
|
return self.with_state(
|
|
712
707
|
Input.pressure(self.pressure - pressure_drop),
|
|
@@ -715,7 +710,7 @@ class AbstractFluid(ABC):
|
|
|
715
710
|
|
|
716
711
|
def __heat_transfer_to_enthalpy(
|
|
717
712
|
self, enthalpy: float, pressure_drop: float
|
|
718
|
-
) ->
|
|
713
|
+
) -> Self:
|
|
719
714
|
self.__check_pressure_drop(pressure_drop)
|
|
720
715
|
return self.with_state(
|
|
721
716
|
Input.pressure(self.pressure - pressure_drop),
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from typing import Self
|
|
4
|
+
|
|
3
5
|
from CoolProp import AbstractState
|
|
4
6
|
|
|
5
|
-
from .abstract_fluid import AbstractFluid
|
|
6
7
|
from ..config import UnitsSystem
|
|
7
8
|
from ..enums import FluidsList, Mix
|
|
9
|
+
from .abstract_fluid import AbstractFluid
|
|
8
10
|
|
|
9
11
|
__all__ = ["Fluid"]
|
|
10
12
|
|
|
@@ -12,13 +14,21 @@ __all__ = ["Fluid"]
|
|
|
12
14
|
class Fluid(AbstractFluid):
|
|
13
15
|
"""Pure/pseudo-pure fluid or binary mixture."""
|
|
14
16
|
|
|
15
|
-
def __init__(
|
|
17
|
+
def __init__(
|
|
18
|
+
self,
|
|
19
|
+
name: FluidsList,
|
|
20
|
+
fraction: float | None = None,
|
|
21
|
+
coolprop_backend: str | None = None,
|
|
22
|
+
):
|
|
16
23
|
"""
|
|
17
24
|
Pure/pseudo-pure fluid or binary mixture.
|
|
18
25
|
|
|
19
26
|
:param name: Selected fluid name.
|
|
20
27
|
:param fraction: Mass-based or volume-based fraction for binary mixtures
|
|
21
28
|
[by default, %; you can change this using the configuration file].
|
|
29
|
+
:param coolprop_backend: CoolProp backend to be used
|
|
30
|
+
(e.g., 'HEOS', 'INCOMP', 'REFPROP', 'IF97', etc.).
|
|
31
|
+
If provided, overrides the default one defined for the fluid name.
|
|
22
32
|
:raises ValueError: If fraction is invalid.
|
|
23
33
|
"""
|
|
24
34
|
super().__init__()
|
|
@@ -31,22 +41,29 @@ class Fluid(AbstractFluid):
|
|
|
31
41
|
f"{'{0:g}'.format(name.fraction_max)}]{self._fraction_unit}. "
|
|
32
42
|
f"Entered value = {'{0:g}'.format(fraction)}{self._fraction_unit}."
|
|
33
43
|
)
|
|
34
|
-
if
|
|
35
|
-
|
|
44
|
+
if name.pure:
|
|
45
|
+
resolved_fraction = (
|
|
46
|
+
100 if self.units_system == UnitsSystem.SIWithCelsiusAndPercents else 1
|
|
47
|
+
)
|
|
48
|
+
else:
|
|
49
|
+
if fraction is None:
|
|
50
|
+
raise ValueError("Need to define fraction!")
|
|
51
|
+
resolved_fraction = fraction
|
|
36
52
|
self.__name = name
|
|
37
|
-
self.__fraction =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
53
|
+
self.__fraction = resolved_fraction
|
|
54
|
+
self.__coolprop_backend = (
|
|
55
|
+
coolprop_backend
|
|
56
|
+
if coolprop_backend is not None
|
|
57
|
+
else self.__name.coolprop_backend
|
|
41
58
|
)
|
|
42
59
|
self._backend = AbstractState(
|
|
43
|
-
self.
|
|
60
|
+
self.__coolprop_backend, self.__name.coolprop_name
|
|
44
61
|
)
|
|
45
62
|
if not self.__name.pure:
|
|
46
63
|
self.__set_fraction()
|
|
47
64
|
|
|
48
65
|
def factory(self) -> Fluid:
|
|
49
|
-
return Fluid(self.__name, self.__fraction)
|
|
66
|
+
return Fluid(self.__name, self.__fraction, self.__coolprop_backend)
|
|
50
67
|
|
|
51
68
|
@property
|
|
52
69
|
def name(self) -> FluidsList:
|
|
@@ -61,13 +78,18 @@ class Fluid(AbstractFluid):
|
|
|
61
78
|
"""
|
|
62
79
|
return self.__fraction
|
|
63
80
|
|
|
81
|
+
@property
|
|
82
|
+
def coolprop_backend(self) -> str:
|
|
83
|
+
"""Type of CoolProp backend."""
|
|
84
|
+
return self.__coolprop_backend
|
|
85
|
+
|
|
64
86
|
def mixing(
|
|
65
87
|
self,
|
|
66
88
|
first_specific_mass_flow: float,
|
|
67
89
|
first: AbstractFluid,
|
|
68
90
|
second_specific_mass_flow: float,
|
|
69
91
|
second: AbstractFluid,
|
|
70
|
-
) ->
|
|
92
|
+
) -> Self:
|
|
71
93
|
if not self.__is_valid_fluids_for_mixing(first, second):
|
|
72
94
|
raise ValueError("The mixing process is possible only for the same fluids!")
|
|
73
95
|
return super().mixing(
|
|
@@ -96,11 +118,18 @@ class Fluid(AbstractFluid):
|
|
|
96
118
|
and first.fraction == second.fraction
|
|
97
119
|
)
|
|
98
120
|
|
|
99
|
-
def __eq__(self, other:
|
|
121
|
+
def __eq__(self, other: object) -> bool:
|
|
100
122
|
return isinstance(other, Fluid) and hash(self) == hash(other)
|
|
101
123
|
|
|
102
|
-
def __ne__(self, other:
|
|
124
|
+
def __ne__(self, other: object) -> bool:
|
|
103
125
|
return not self.__eq__(other)
|
|
104
126
|
|
|
105
127
|
def __hash__(self) -> int:
|
|
106
|
-
return hash(
|
|
128
|
+
return hash(
|
|
129
|
+
(
|
|
130
|
+
self.__name.coolprop_name,
|
|
131
|
+
self.__fraction,
|
|
132
|
+
self.__coolprop_backend,
|
|
133
|
+
super().__hash__(),
|
|
134
|
+
)
|
|
135
|
+
)
|
|
@@ -2,9 +2,9 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from CoolProp import AbstractState
|
|
4
4
|
|
|
5
|
-
from .abstract_fluid import AbstractFluid
|
|
6
5
|
from ..config import UnitsSystem
|
|
7
6
|
from ..enums import FluidsList
|
|
7
|
+
from .abstract_fluid import AbstractFluid
|
|
8
8
|
|
|
9
9
|
__all__ = ["Mixture"]
|
|
10
10
|
|
|
@@ -85,10 +85,10 @@ class Mixture(AbstractFluid):
|
|
|
85
85
|
"""
|
|
86
86
|
return self.__fractions
|
|
87
87
|
|
|
88
|
-
def __eq__(self, other:
|
|
88
|
+
def __eq__(self, other: object) -> bool:
|
|
89
89
|
return isinstance(other, Mixture) and hash(self) == hash(other)
|
|
90
90
|
|
|
91
|
-
def __ne__(self, other:
|
|
91
|
+
def __ne__(self, other: object) -> bool:
|
|
92
92
|
return not self.__eq__(other)
|
|
93
93
|
|
|
94
94
|
def __hash__(self) -> int:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
+
from typing import Self, cast
|
|
4
5
|
|
|
5
6
|
from CoolProp.HumidAirProp import HAPropsSI
|
|
6
7
|
|
|
@@ -178,7 +179,7 @@ class HumidAir:
|
|
|
178
179
|
"""Returns a new humid air instance with no defined state."""
|
|
179
180
|
return HumidAir()
|
|
180
181
|
|
|
181
|
-
def clone(self) ->
|
|
182
|
+
def clone(self) -> Self:
|
|
182
183
|
"""Performs deep (full) copy of the humid air instance."""
|
|
183
184
|
return self.with_state(*self._inputs)
|
|
184
185
|
|
|
@@ -187,7 +188,7 @@ class HumidAir:
|
|
|
187
188
|
first_input: InputHumidAir,
|
|
188
189
|
second_input: InputHumidAir,
|
|
189
190
|
third_input: InputHumidAir,
|
|
190
|
-
) ->
|
|
191
|
+
) -> Self:
|
|
191
192
|
"""
|
|
192
193
|
Returns a new humid air instance with a defined state.
|
|
193
194
|
|
|
@@ -199,7 +200,7 @@ class HumidAir:
|
|
|
199
200
|
"""
|
|
200
201
|
humid_air = self.factory()
|
|
201
202
|
humid_air.update(first_input, second_input, third_input)
|
|
202
|
-
return humid_air
|
|
203
|
+
return cast(Self, humid_air)
|
|
203
204
|
|
|
204
205
|
def update(
|
|
205
206
|
self,
|
|
@@ -240,7 +241,7 @@ class HumidAir:
|
|
|
240
241
|
|
|
241
242
|
def dry_cooling_to_temperature(
|
|
242
243
|
self, temperature: float, pressure_drop: float = 0
|
|
243
|
-
) ->
|
|
244
|
+
) -> Self:
|
|
244
245
|
"""
|
|
245
246
|
The process of cooling without dehumidification to given temperature.
|
|
246
247
|
|
|
@@ -254,7 +255,7 @@ class HumidAir:
|
|
|
254
255
|
|
|
255
256
|
def dry_cooling_to_enthalpy(
|
|
256
257
|
self, enthalpy: float, pressure_drop: float = 0
|
|
257
|
-
) ->
|
|
258
|
+
) -> Self:
|
|
258
259
|
"""
|
|
259
260
|
The process of cooling without dehumidification to given enthalpy.
|
|
260
261
|
|
|
@@ -267,7 +268,7 @@ class HumidAir:
|
|
|
267
268
|
|
|
268
269
|
def wet_cooling_to_temperature_and_relative_humidity(
|
|
269
270
|
self, temperature: float, relative_humidity: float, pressure_drop: float = 0
|
|
270
|
-
) ->
|
|
271
|
+
) -> Self:
|
|
271
272
|
"""
|
|
272
273
|
The process of cooling with dehumidification
|
|
273
274
|
to given temperature and relative humidity ratio.
|
|
@@ -289,7 +290,7 @@ class HumidAir:
|
|
|
289
290
|
|
|
290
291
|
def wet_cooling_to_temperature_and_absolute_humidity(
|
|
291
292
|
self, temperature: float, humidity: float, pressure_drop: float = 0
|
|
292
|
-
) ->
|
|
293
|
+
) -> Self:
|
|
293
294
|
"""
|
|
294
295
|
The process of cooling with dehumidification
|
|
295
296
|
to given temperature and absolute humidity ratio.
|
|
@@ -310,7 +311,7 @@ class HumidAir:
|
|
|
310
311
|
|
|
311
312
|
def wet_cooling_to_enthalpy_and_relative_humidity(
|
|
312
313
|
self, enthalpy: float, relative_humidity: float, pressure_drop: float = 0
|
|
313
|
-
) ->
|
|
314
|
+
) -> Self:
|
|
314
315
|
"""
|
|
315
316
|
The process of cooling with dehumidification
|
|
316
317
|
to given enthalpy and relative humidity ratio.
|
|
@@ -331,7 +332,7 @@ class HumidAir:
|
|
|
331
332
|
|
|
332
333
|
def wet_cooling_to_enthalpy_and_absolute_humidity(
|
|
333
334
|
self, enthalpy: float, humidity: float, pressure_drop: float = 0
|
|
334
|
-
) ->
|
|
335
|
+
) -> Self:
|
|
335
336
|
"""
|
|
336
337
|
The process of cooling with dehumidification
|
|
337
338
|
to given enthalpy and absolute humidity ratio.
|
|
@@ -351,7 +352,7 @@ class HumidAir:
|
|
|
351
352
|
|
|
352
353
|
def heating_to_temperature(
|
|
353
354
|
self, temperature: float, pressure_drop: float = 0
|
|
354
|
-
) ->
|
|
355
|
+
) -> Self:
|
|
355
356
|
"""
|
|
356
357
|
The process of heating to given temperature.
|
|
357
358
|
|
|
@@ -365,9 +366,7 @@ class HumidAir:
|
|
|
365
366
|
temperature, False, pressure_drop
|
|
366
367
|
)
|
|
367
368
|
|
|
368
|
-
def heating_to_enthalpy(
|
|
369
|
-
self, enthalpy: float, pressure_drop: float = 0
|
|
370
|
-
) -> HumidAir:
|
|
369
|
+
def heating_to_enthalpy(self, enthalpy: float, pressure_drop: float = 0) -> Self:
|
|
371
370
|
"""
|
|
372
371
|
The process of heating to given enthalpy.
|
|
373
372
|
|
|
@@ -380,7 +379,7 @@ class HumidAir:
|
|
|
380
379
|
|
|
381
380
|
def humidification_by_water_to_relative_humidity(
|
|
382
381
|
self, relative_humidity: float
|
|
383
|
-
) ->
|
|
382
|
+
) -> Self:
|
|
384
383
|
"""
|
|
385
384
|
The process of humidification by water (isenthalpic)
|
|
386
385
|
to given relative humidity ratio.
|
|
@@ -395,7 +394,7 @@ class HumidAir:
|
|
|
395
394
|
InputHumidAir.relative_humidity(relative_humidity),
|
|
396
395
|
)
|
|
397
396
|
|
|
398
|
-
def humidification_by_water_to_absolute_humidity(self, humidity: float) ->
|
|
397
|
+
def humidification_by_water_to_absolute_humidity(self, humidity: float) -> Self:
|
|
399
398
|
"""
|
|
400
399
|
The process of humidification by water (isenthalpic)
|
|
401
400
|
to given absolute humidity ratio.
|
|
@@ -411,7 +410,7 @@ class HumidAir:
|
|
|
411
410
|
|
|
412
411
|
def humidification_by_steam_to_relative_humidity(
|
|
413
412
|
self, relative_humidity: float
|
|
414
|
-
) ->
|
|
413
|
+
) -> Self:
|
|
415
414
|
"""
|
|
416
415
|
The process of humidification by steam (isothermal)
|
|
417
416
|
to given relative humidity ratio.
|
|
@@ -426,7 +425,7 @@ class HumidAir:
|
|
|
426
425
|
InputHumidAir.relative_humidity(relative_humidity),
|
|
427
426
|
)
|
|
428
427
|
|
|
429
|
-
def humidification_by_steam_to_absolute_humidity(self, humidity: float) ->
|
|
428
|
+
def humidification_by_steam_to_absolute_humidity(self, humidity: float) -> Self:
|
|
430
429
|
"""
|
|
431
430
|
The process of humidification by steam (isothermal)
|
|
432
431
|
to given absolute humidity ratio.
|
|
@@ -446,7 +445,7 @@ class HumidAir:
|
|
|
446
445
|
first: HumidAir,
|
|
447
446
|
second_specific_mass_flow: float,
|
|
448
447
|
second: HumidAir,
|
|
449
|
-
) ->
|
|
448
|
+
) -> Self:
|
|
450
449
|
"""
|
|
451
450
|
The mixing process.
|
|
452
451
|
|
|
@@ -526,10 +525,10 @@ class HumidAir:
|
|
|
526
525
|
OutputsValidator(value).validate()
|
|
527
526
|
return value
|
|
528
527
|
|
|
529
|
-
def __eq__(self, other:
|
|
528
|
+
def __eq__(self, other: object) -> bool:
|
|
530
529
|
return isinstance(other, HumidAir) and hash(self) == hash(other)
|
|
531
530
|
|
|
532
|
-
def __ne__(self, other:
|
|
531
|
+
def __ne__(self, other: object) -> bool:
|
|
533
532
|
return not self.__eq__(other)
|
|
534
533
|
|
|
535
534
|
def __hash__(self) -> int:
|
|
@@ -547,7 +546,7 @@ class HumidAir:
|
|
|
547
546
|
|
|
548
547
|
def __dry_heat_transfer_to_temperature(
|
|
549
548
|
self, temperature: float, cooling: bool, pressure_drop: float = 0
|
|
550
|
-
) ->
|
|
549
|
+
) -> Self:
|
|
551
550
|
self.__check_temperature(temperature, cooling)
|
|
552
551
|
self.__check_dew_temperature(temperature)
|
|
553
552
|
self.__check_pressure_drop(pressure_drop)
|
|
@@ -559,7 +558,7 @@ class HumidAir:
|
|
|
559
558
|
|
|
560
559
|
def __dry_heat_transfer_to_enthalpy(
|
|
561
560
|
self, enthalpy: float, cooling: bool, pressure_drop: float = 0
|
|
562
|
-
) ->
|
|
561
|
+
) -> Self:
|
|
563
562
|
self.__check_enthalpy(enthalpy, cooling)
|
|
564
563
|
self.__check_dew_enthalpy(enthalpy)
|
|
565
564
|
self.__check_pressure_drop(pressure_drop)
|
|
@@ -574,7 +573,7 @@ class HumidAir:
|
|
|
574
573
|
first_input: InputHumidAir,
|
|
575
574
|
second_input: InputHumidAir,
|
|
576
575
|
pressure_drop: float = 0,
|
|
577
|
-
):
|
|
576
|
+
) -> Self:
|
|
578
577
|
if first_input.coolprop_key == "T":
|
|
579
578
|
self.__check_temperature(
|
|
580
579
|
self._unit_converter.convert_temperature_from_si(first_input.value),
|
|
@@ -597,7 +596,7 @@ class HumidAir:
|
|
|
597
596
|
|
|
598
597
|
def __humidification_to(
|
|
599
598
|
self, first_input: InputHumidAir, second_input: InputHumidAir
|
|
600
|
-
) ->
|
|
599
|
+
) -> Self:
|
|
601
600
|
result = self.with_state(
|
|
602
601
|
InputHumidAir.pressure(self.pressure), first_input, second_input
|
|
603
602
|
)
|
|
@@ -26,10 +26,10 @@ class AbstractInput(ABC):
|
|
|
26
26
|
"""Input value in SI units."""
|
|
27
27
|
return self.__value
|
|
28
28
|
|
|
29
|
-
def __eq__(self, other:
|
|
29
|
+
def __eq__(self, other: object) -> bool:
|
|
30
30
|
return isinstance(other, AbstractInput) and hash(self) == hash(other)
|
|
31
31
|
|
|
32
|
-
def __ne__(self, other:
|
|
32
|
+
def __ne__(self, other: object) -> bool:
|
|
33
33
|
return not self.__eq__(other)
|
|
34
34
|
|
|
35
35
|
def __hash__(self) -> int:
|
pyfluids-2.8.2/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Vladimir Portyanikhin
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
pyfluids-2.8.2/PKG-INFO
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: pyfluids
|
|
3
|
-
Version: 2.8.2
|
|
4
|
-
Summary: Simple, full-featured, lightweight CoolProp wrapper for Python
|
|
5
|
-
License: MIT
|
|
6
|
-
License-File: LICENSE
|
|
7
|
-
Keywords: CoolProp,fluids,mixtures,humid,air,thermophysical,properties,thermodynamics
|
|
8
|
-
Author: Vladimir Portyanikhin
|
|
9
|
-
Author-email: v.portyanikhin@ya.ru
|
|
10
|
-
Requires-Python: >=3.9,<3.14
|
|
11
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Classifier: Intended Audience :: Education
|
|
14
|
-
Classifier: Intended Audience :: Manufacturing
|
|
15
|
-
Classifier: Intended Audience :: Science/Research
|
|
16
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
-
Classifier: Natural Language :: English
|
|
18
|
-
Classifier: Operating System :: MacOS
|
|
19
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
20
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
21
|
-
Classifier: Operating System :: Unix
|
|
22
|
-
Classifier: Programming Language :: Python
|
|
23
|
-
Classifier: Programming Language :: Python :: 3
|
|
24
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
25
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
26
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
27
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
28
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
29
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
30
|
-
Classifier: Programming Language :: Python :: Implementation
|
|
31
|
-
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
32
|
-
Classifier: Topic :: Education
|
|
33
|
-
Classifier: Topic :: Scientific/Engineering
|
|
34
|
-
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
|
|
35
|
-
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
36
|
-
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
37
|
-
Requires-Dist: CoolProp (==7.1.0)
|
|
38
|
-
Requires-Dist: tomli (==2.2.1)
|
|
39
|
-
Project-URL: Documentation, https://github.com/portyanikhin/PyFluids
|
|
40
|
-
Project-URL: Homepage, https://github.com/portyanikhin/PyFluids
|
|
41
|
-
Project-URL: Repository, https://github.com/portyanikhin/PyFluids
|
|
42
|
-
Description-Content-Type: text/markdown
|
|
43
|
-
|
|
44
|
-
# 
|
|
45
|
-
|
|
46
|
-
[](https://github.com/portyanikhin/PyFluids/actions/workflows/build-tests.yml)
|
|
47
|
-
[](https://github.com/portyanikhin/PyFluids/actions/workflows/codeql-analysis.yml)
|
|
48
|
-
[](https://pypi.org/project/pyfluids/)
|
|
49
|
-
[](https://pypi.org/project/pyfluids/)
|
|
50
|
-
[](https://github.com/portyanikhin/PyFluids/blob/master/LICENSE)
|
|
51
|
-
[](https://codecov.io/gh/portyanikhin/PyFluids)
|
|
52
|
-
[](https://github.com/psf/black)
|
|
53
|
-
|
|
54
|
-
Simple, full-featured, lightweight [CoolProp](http://www.coolprop.org) wrapper for Python.
|
|
55
|
-
|
|
56
|
-
_**See [full documentation](https://github.com/portyanikhin/PyFluids).**_
|
pyfluids-2.8.2/PyPI.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# 
|
|
2
|
-
|
|
3
|
-
[](https://github.com/portyanikhin/PyFluids/actions/workflows/build-tests.yml)
|
|
4
|
-
[](https://github.com/portyanikhin/PyFluids/actions/workflows/codeql-analysis.yml)
|
|
5
|
-
[](https://pypi.org/project/pyfluids/)
|
|
6
|
-
[](https://pypi.org/project/pyfluids/)
|
|
7
|
-
[](https://github.com/portyanikhin/PyFluids/blob/master/LICENSE)
|
|
8
|
-
[](https://codecov.io/gh/portyanikhin/PyFluids)
|
|
9
|
-
[](https://github.com/psf/black)
|
|
10
|
-
|
|
11
|
-
Simple, full-featured, lightweight [CoolProp](http://www.coolprop.org) wrapper for Python.
|
|
12
|
-
|
|
13
|
-
_**See [full documentation](https://github.com/portyanikhin/PyFluids).**_
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
from .pyfluids_config import *
|
|
2
|
-
from .pyfluids_config_builder import *
|
|
3
|
-
from .unit_converter import *
|
|
4
|
-
from .units_system import *
|
|
5
|
-
|
|
6
|
-
__all__ = (
|
|
7
|
-
pyfluids_config.__all__
|
|
8
|
-
+ pyfluids_config_builder.__all__
|
|
9
|
-
+ unit_converter.__all__
|
|
10
|
-
+ units_system.__all__
|
|
11
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|