thermofluids 2.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.
- thermofluids-2.0.0/.idea/.gitignore +8 -0
- thermofluids-2.0.0/.idea/workspace.xml +7 -0
- thermofluids-2.0.0/PKG-INFO +29 -0
- thermofluids-2.0.0/README.md +14 -0
- thermofluids-2.0.0/pyproject.toml +29 -0
- thermofluids-2.0.0/src/thermofluids/Base/Quantity.py +16 -0
- thermofluids-2.0.0/src/thermofluids/Base/Statepoint.py +1191 -0
- thermofluids-2.0.0/src/thermofluids/Base/__init__.py +0 -0
- thermofluids-2.0.0/src/thermofluids/Base/thermofluids_registry.txt +5 -0
- thermofluids-2.0.0/src/thermofluids/Fluids/Drag.py +169 -0
- thermofluids-2.0.0/src/thermofluids/Fluids/Moody.py +57 -0
- thermofluids-2.0.0/src/thermofluids/Fluids/PressureDrop.py +322 -0
- thermofluids-2.0.0/src/thermofluids/Fluids/Re.py +88 -0
- thermofluids-2.0.0/src/thermofluids/Fluids/__init__.py +4 -0
- thermofluids-2.0.0/src/thermofluids/HeatTransfer/Gr.py +12 -0
- thermofluids-2.0.0/src/thermofluids/HeatTransfer/NTU.py +45 -0
- thermofluids-2.0.0/src/thermofluids/HeatTransfer/Nusselt.py +59 -0
- thermofluids-2.0.0/src/thermofluids/HeatTransfer/Ra.py +22 -0
- thermofluids-2.0.0/src/thermofluids/HeatTransfer/TwoPhase.py +249 -0
- thermofluids-2.0.0/src/thermofluids/HeatTransfer/__init__.py +6 -0
- thermofluids-2.0.0/src/thermofluids/HeatTransfer/lmtd.py +32 -0
- thermofluids-2.0.0/src/thermofluids/ProcessEquipment/Column.py +1004 -0
- thermofluids-2.0.0/src/thermofluids/ProcessEquipment/Compressor.py +167 -0
- thermofluids-2.0.0/src/thermofluids/ProcessEquipment/Ejector.py +145 -0
- thermofluids-2.0.0/src/thermofluids/ProcessEquipment/HeatExchanger.py +109 -0
- thermofluids-2.0.0/src/thermofluids/ProcessEquipment/IsoCompressor.py +124 -0
- thermofluids-2.0.0/src/thermofluids/ProcessEquipment/Pipe.py +21 -0
- thermofluids-2.0.0/src/thermofluids/ProcessEquipment/Pump.py +109 -0
- thermofluids-2.0.0/src/thermofluids/ProcessEquipment/Turbine.py +53 -0
- thermofluids-2.0.0/src/thermofluids/ProcessEquipment/Valve.py +35 -0
- thermofluids-2.0.0/src/thermofluids/ProcessEquipment/__init__.py +3 -0
- thermofluids-2.0.0/src/thermofluids/Utilities/FlowDiagram.py +111 -0
- thermofluids-2.0.0/src/thermofluids/Utilities/__init__.py +1 -0
- thermofluids-2.0.0/src/thermofluids/__init__.py +3 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: thermofluids
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: Physically-consistent thermal and fluids modeling tools
|
|
5
|
+
Project-URL: Homepage, https://gitlab.com/ericksonla/thermofluids
|
|
6
|
+
Author: Luke Erickson, Russell Goldfarbmuren
|
|
7
|
+
Author-email: russell@rebound-tech.com
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Requires-Python: >3.11
|
|
12
|
+
Requires-Dist: coolprop
|
|
13
|
+
Requires-Dist: pint
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# Thermofluids
|
|
17
|
+
|
|
18
|
+
Thermofluids makes modeling thermofluid systems easier. The essential element is the `statepoint`. `statepoint` objects work like physical statepoints: they have two independent variables, many dependent variables, and sometimes extensive variables. You can use them like this:
|
|
19
|
+
````python
|
|
20
|
+
sp = Statepoint(fluid='water', # define a fluid
|
|
21
|
+
t=25.0, # define one independent variable
|
|
22
|
+
p=1.0, # define a second independent variable
|
|
23
|
+
m=0.1) # define extensive varible
|
|
24
|
+
|
|
25
|
+
sp.rho, sp.h, sp.visc
|
|
26
|
+
# (<Quantity(997.047039, 'kilogram / meter ** 3')>, <Quantity(104.918893, 'kilojoule / kilogram')>, <Quantity(0.000890022674, 'kilogram / meter / second')>)
|
|
27
|
+
````
|
|
28
|
+
|
|
29
|
+
A set of functions are made available to analyze statepoint systems in physically meaningful ways.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Thermofluids
|
|
2
|
+
|
|
3
|
+
Thermofluids makes modeling thermofluid systems easier. The essential element is the `statepoint`. `statepoint` objects work like physical statepoints: they have two independent variables, many dependent variables, and sometimes extensive variables. You can use them like this:
|
|
4
|
+
````python
|
|
5
|
+
sp = Statepoint(fluid='water', # define a fluid
|
|
6
|
+
t=25.0, # define one independent variable
|
|
7
|
+
p=1.0, # define a second independent variable
|
|
8
|
+
m=0.1) # define extensive varible
|
|
9
|
+
|
|
10
|
+
sp.rho, sp.h, sp.visc
|
|
11
|
+
# (<Quantity(997.047039, 'kilogram / meter ** 3')>, <Quantity(104.918893, 'kilojoule / kilogram')>, <Quantity(0.000890022674, 'kilogram / meter / second')>)
|
|
12
|
+
````
|
|
13
|
+
|
|
14
|
+
A set of functions are made available to analyze statepoint systems in physically meaningful ways.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "thermofluids"
|
|
3
|
+
version = "2.0.0"
|
|
4
|
+
authors = [
|
|
5
|
+
{ email = "russell@rebound-tech.com"},
|
|
6
|
+
{ name="Luke Erickson, Russell Goldfarbmuren"}
|
|
7
|
+
]
|
|
8
|
+
description = "Physically-consistent thermal and fluids modeling tools"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">3.11"
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Programming Language :: Python :: 3",
|
|
13
|
+
"Operating System :: OS Independent"
|
|
14
|
+
]
|
|
15
|
+
license = "MIT"
|
|
16
|
+
license-files = ["LICENSE"]
|
|
17
|
+
dependencies = [
|
|
18
|
+
"CoolProp",
|
|
19
|
+
"pint"
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
[build-system]
|
|
24
|
+
requires =["hatchling >= 1.26"]
|
|
25
|
+
build-backend = "hatchling.build"
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
Homepage = "https://gitlab.com/ericksonla/thermofluids"
|
|
29
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import pint
|
|
2
|
+
import importlib
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
pint_unit_registry = pint.UnitRegistry()
|
|
6
|
+
del pint_unit_registry._units['R']
|
|
7
|
+
txt_path = importlib.resources.files('thermofluids.Base') / 'thermofluids_registry.txt'
|
|
8
|
+
pint_unit_registry.load_definitions(txt_path)
|
|
9
|
+
pint_unit_registry.formatter.default_format = ".4g~P"
|
|
10
|
+
Quantity = pint_unit_registry.Quantity
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
if __name__ == '__main__':
|
|
14
|
+
qty = Quantity(10., 'TR')
|
|
15
|
+
print(f"{qty:P}")
|
|
16
|
+
print(qty.to('kW'))
|