exerpy 0.0.1__py3-none-any.whl → 0.0.3__py3-none-any.whl
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.
- exerpy/__init__.py +2 -4
- exerpy/analyses.py +597 -297
- exerpy/components/__init__.py +3 -0
- exerpy/components/combustion/base.py +157 -114
- exerpy/components/component.py +8 -8
- exerpy/components/heat_exchanger/base.py +593 -256
- exerpy/components/heat_exchanger/condenser.py +353 -166
- exerpy/components/heat_exchanger/simple.py +575 -225
- exerpy/components/heat_exchanger/steam_generator.py +153 -123
- exerpy/components/helpers/cycle_closer.py +61 -34
- exerpy/components/helpers/power_bus.py +117 -0
- exerpy/components/nodes/deaerator.py +221 -102
- exerpy/components/nodes/drum.py +50 -39
- exerpy/components/nodes/flash_tank.py +218 -43
- exerpy/components/nodes/mixer.py +296 -115
- exerpy/components/nodes/splitter.py +173 -0
- exerpy/components/nodes/storage.py +130 -0
- exerpy/components/piping/valve.py +351 -139
- exerpy/components/power_machines/generator.py +105 -38
- exerpy/components/power_machines/motor.py +111 -39
- exerpy/components/turbomachinery/compressor.py +181 -63
- exerpy/components/turbomachinery/pump.py +182 -63
- exerpy/components/turbomachinery/turbine.py +182 -74
- exerpy/functions.py +388 -263
- exerpy/parser/from_aspen/aspen_config.py +57 -48
- exerpy/parser/from_aspen/aspen_parser.py +373 -280
- exerpy/parser/from_ebsilon/__init__.py +2 -2
- exerpy/parser/from_ebsilon/check_ebs_path.py +15 -19
- exerpy/parser/from_ebsilon/ebsilon_config.py +329 -227
- exerpy/parser/from_ebsilon/ebsilon_functions.py +205 -38
- exerpy/parser/from_ebsilon/ebsilon_parser.py +392 -255
- exerpy/parser/from_ebsilon/utils.py +16 -11
- exerpy/parser/from_tespy/tespy_config.py +32 -1
- exerpy/parser/from_tespy/tespy_parser.py +151 -0
- {exerpy-0.0.1.dist-info → exerpy-0.0.3.dist-info}/METADATA +45 -4
- exerpy-0.0.3.dist-info/RECORD +48 -0
- exerpy-0.0.1.dist-info/RECORD +0 -44
- {exerpy-0.0.1.dist-info → exerpy-0.0.3.dist-info}/WHEEL +0 -0
- {exerpy-0.0.1.dist-info → exerpy-0.0.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -31,8 +31,8 @@ if __ebsilon_path__ is not None:
|
|
|
31
31
|
def is_ebsilon_available() -> bool:
|
|
32
32
|
"""
|
|
33
33
|
Check if Ebsilon functionality is available.
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
Returns:
|
|
36
36
|
bool: True if Ebsilon is available, False otherwise.
|
|
37
37
|
"""
|
|
38
|
-
return __ebsilon_available__
|
|
38
|
+
return __ebsilon_available__
|
|
@@ -4,20 +4,17 @@ Utilities to check Ebsilon installation.
|
|
|
4
4
|
This module provides functions to check the Ebsilon installation
|
|
5
5
|
and validate the EBS environment variable.
|
|
6
6
|
"""
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
import os
|
|
9
9
|
import sys
|
|
10
|
-
from typing import Optional
|
|
11
|
-
from typing import Tuple
|
|
12
10
|
|
|
13
|
-
from exerpy.parser.from_ebsilon import __ebsilon_available__
|
|
14
|
-
from exerpy.parser.from_ebsilon import __ebsilon_path__
|
|
11
|
+
from exerpy.parser.from_ebsilon import __ebsilon_available__, __ebsilon_path__
|
|
15
12
|
|
|
16
13
|
|
|
17
|
-
def check_ebsilon_installation() ->
|
|
14
|
+
def check_ebsilon_installation() -> tuple[bool, str | None]:
|
|
18
15
|
"""
|
|
19
16
|
Check if Ebsilon is correctly installed and available.
|
|
20
|
-
|
|
17
|
+
|
|
21
18
|
Returns:
|
|
22
19
|
Tuple[bool, Optional[str]]: A tuple containing:
|
|
23
20
|
- A boolean indicating if Ebsilon is available
|
|
@@ -26,15 +23,15 @@ def check_ebsilon_installation() -> Tuple[bool, Optional[str]]:
|
|
|
26
23
|
# Check if the EBS environment variable is set
|
|
27
24
|
if __ebsilon_path__ is None:
|
|
28
25
|
return False, "The EBS environment variable is not set."
|
|
29
|
-
|
|
26
|
+
|
|
30
27
|
# Check if the path exists
|
|
31
28
|
if not os.path.exists(__ebsilon_path__):
|
|
32
29
|
return False, f"The path specified by EBS environment variable does not exist: {__ebsilon_path__}"
|
|
33
|
-
|
|
30
|
+
|
|
34
31
|
# Check if EbsOpen can be imported
|
|
35
32
|
if not __ebsilon_available__:
|
|
36
33
|
return False, "EbsOpen module could not be imported. Please check your Ebsilon installation."
|
|
37
|
-
|
|
34
|
+
|
|
38
35
|
# All checks passed
|
|
39
36
|
return True, None
|
|
40
37
|
|
|
@@ -42,22 +39,21 @@ def check_ebsilon_installation() -> Tuple[bool, Optional[str]]:
|
|
|
42
39
|
def validate_ebsilon_requirements() -> None:
|
|
43
40
|
"""
|
|
44
41
|
Validate that all requirements for using Ebsilon functionality are met.
|
|
45
|
-
|
|
42
|
+
|
|
46
43
|
Prints status messages and usage instructions.
|
|
47
|
-
|
|
44
|
+
|
|
48
45
|
Raises:
|
|
49
46
|
RuntimeError: If running on a non-Windows platform.
|
|
50
47
|
"""
|
|
51
48
|
# Check if running on Windows
|
|
52
|
-
if sys.platform !=
|
|
49
|
+
if sys.platform != "win32":
|
|
53
50
|
raise RuntimeError(
|
|
54
|
-
"Ebsilon functionality is only available on Windows platforms. "
|
|
55
|
-
f"Current platform: {sys.platform}"
|
|
51
|
+
"Ebsilon functionality is only available on Windows platforms. " f"Current platform: {sys.platform}"
|
|
56
52
|
)
|
|
57
|
-
|
|
53
|
+
|
|
58
54
|
# Check Ebsilon installation
|
|
59
55
|
is_available, message = check_ebsilon_installation()
|
|
60
|
-
|
|
56
|
+
|
|
61
57
|
if is_available:
|
|
62
58
|
print(f"✓ Ebsilon is properly installed and available at: {__ebsilon_path__}")
|
|
63
59
|
else:
|
|
@@ -65,10 +61,10 @@ def validate_ebsilon_requirements() -> None:
|
|
|
65
61
|
print("\nTo enable Ebsilon functionality:")
|
|
66
62
|
print("1. Ensure Ebsilon Professional is installed on your system")
|
|
67
63
|
print("2. Set the EBS environment variable to the Ebsilon installation path")
|
|
68
|
-
print(
|
|
64
|
+
print(' - Windows: setx EBS "C:\\Path\\To\\Ebsilon"')
|
|
69
65
|
print("3. Restart your Python environment or IDE")
|
|
70
66
|
|
|
71
67
|
|
|
72
68
|
if __name__ == "__main__":
|
|
73
69
|
# When run as a script, perform a full validation and output results
|
|
74
|
-
validate_ebsilon_requirements()
|
|
70
|
+
validate_ebsilon_requirements()
|