fuellib 0.1.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.
- fuellib-0.1.0/LICENSE +28 -0
- fuellib-0.1.0/PKG-INFO +126 -0
- fuellib-0.1.0/README.md +89 -0
- fuellib-0.1.0/fuellib/__init__.py +1118 -0
- fuellib-0.1.0/fuellib/_data_locator.py +76 -0
- fuellib-0.1.0/fuellib/build_docs.py +63 -0
- fuellib-0.1.0/fuellib/clean_docs.py +50 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/decane_init.csv +2 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/dodecane_init.csv +2 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/hefa-S1_init.csv +3 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/hefa-WE-SAF-262714_init.csv +33 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/hefa-came_init.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/hefa-mfat_init.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/hefa-tall_init.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/heptane-decane_init.csv +3 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/heptane_init.csv +2 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/jet-a_init.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/posf10264_T30_init.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/posf10264_init.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/posf10289_init.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/posf10325_init.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/posf11498_init.csv +14 -0
- fuellib-0.1.0/fuellib/data/fuelData/gcData/posf4658_init.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/decane.csv +2 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/dodecane.csv +2 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/hefa-S1.csv +3 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/hefa-WE-SAF-262714.csv +33 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/hefa.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/heptane-decane.csv +3 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/heptane.csv +2 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/jet-a.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/posf10264.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/posf10289.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/posf10325.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/posf11498.csv +14 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/posf4658.csv +68 -0
- fuellib-0.1.0/fuellib/data/fuelData/groupDecompositionData/refCompounds.csv +90 -0
- fuellib-0.1.0/fuellib/data/fuelData/propertiesData/decane.csv +37 -0
- fuellib-0.1.0/fuellib/data/fuelData/propertiesData/dodecane.csv +33 -0
- fuellib-0.1.0/fuellib/data/fuelData/propertiesData/hefa-S1.csv +20 -0
- fuellib-0.1.0/fuellib/data/fuelData/propertiesData/hefa-WE-SAF-262714.csv +20 -0
- fuellib-0.1.0/fuellib/data/fuelData/propertiesData/hefa-jet-a-blends.csv +10 -0
- fuellib-0.1.0/fuellib/data/fuelData/propertiesData/heptane.csv +39 -0
- fuellib-0.1.0/fuellib/data/fuelData/propertiesData/posf10264.csv +22 -0
- fuellib-0.1.0/fuellib/data/fuelData/propertiesData/posf10289.csv +24 -0
- fuellib-0.1.0/fuellib/data/fuelData/propertiesData/posf10325.csv +22 -0
- fuellib-0.1.0/fuellib/data/fuelData/propertiesData/posf11498.csv +22 -0
- fuellib-0.1.0/fuellib/data/fuelData/refCompounds.csv +90 -0
- fuellib-0.1.0/fuellib/data/gcmTableData/gcmTable.csv +15 -0
- fuellib-0.1.0/fuellib/exporters/__init__.py +9 -0
- fuellib-0.1.0/fuellib/exporters/converge.py +675 -0
- fuellib-0.1.0/fuellib/exporters/pele.py +730 -0
- fuellib-0.1.0/fuellib/format_code.py +45 -0
- fuellib-0.1.0/fuellib.egg-info/PKG-INFO +126 -0
- fuellib-0.1.0/fuellib.egg-info/SOURCES.txt +62 -0
- fuellib-0.1.0/fuellib.egg-info/dependency_links.txt +1 -0
- fuellib-0.1.0/fuellib.egg-info/entry_points.txt +6 -0
- fuellib-0.1.0/fuellib.egg-info/requires.txt +14 -0
- fuellib-0.1.0/fuellib.egg-info/top_level.txt +1 -0
- fuellib-0.1.0/pyproject.toml +82 -0
- fuellib-0.1.0/setup.cfg +4 -0
- fuellib-0.1.0/tests/test_accuracy.py +103 -0
- fuellib-0.1.0/tests/test_api.py +336 -0
- fuellib-0.1.0/tests/test_source_docstrings.py +126 -0
fuellib-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Alliance for Energy Innovation, LLC
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
fuellib-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fuellib
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: FuelLib: A Python library for Group Contribution Method (GCM) calculations of fuel properties
|
|
5
|
+
Author-email: NLR <david.montgomery@nlr.gov>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Repository, https://github.com/NatLabRockies/FuelLib
|
|
8
|
+
Project-URL: Issues, https://github.com/NatLabRockies/FuelLib/issues
|
|
9
|
+
Project-URL: Documentation, https://NatLabRockies.github.io/FuelLib
|
|
10
|
+
Keywords: fuel,thermodynamics,group-contribution,properties
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering
|
|
22
|
+
Requires-Python: >=3.8
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: numpy>=1.19.0
|
|
26
|
+
Requires-Dist: pandas>=1.0.0
|
|
27
|
+
Requires-Dist: scipy>=1.5.0
|
|
28
|
+
Requires-Dist: importlib-resources>=5.0; python_version < "3.9"
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: black>=26.3.1; extra == "dev"
|
|
31
|
+
Requires-Dist: pytest>=6.0; extra == "dev"
|
|
32
|
+
Requires-Dist: matplotlib>=3.0; extra == "dev"
|
|
33
|
+
Requires-Dist: sphinx>=4.0; extra == "dev"
|
|
34
|
+
Requires-Dist: sphinx-rtd-theme>=1.0; extra == "dev"
|
|
35
|
+
Requires-Dist: sphinxcontrib-bibtex>=2.0; extra == "dev"
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
|
|
38
|
+
# FuelLib
|
|
39
|
+
[](https://isocpp.org/)
|
|
40
|
+
[](https://doi.org/10.11578/dc.20250317.1)
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+

|
|
44
|
+
|
|
45
|
+
# Overview
|
|
46
|
+
FuelLib (SWR-25-26) utilizes the tables and functions of the Group Contribution Method (GCM) as proposed by [Constantinou and Gani (1994)](https://doi.org/10.1002/aic.690401011) and [Constantinou, Gani and O'Connel (1995)](https://doi.org/10.1016/0378-3812(94)02593-P), with additional physical properties discussed in [Govindaraju & Ihme (2016)](https://doi.org/10.1016/j.ijheatmasstransfer.2016.06.079). The code is based on Pavan B. Govindaraju's [Matlab implementation](https://github.com/gpavanb-old/GroupContribution) of the GCM, and has been expanded to include additional thermodynamic properties and mixture properties. The fuel library contains gas chromatography (GC x GC) data for a variety of fuels ranging from simple single component fuels to complex jet fuels. The GC x GC data for POSF jet fuels comes from [Edwards (2020)](https://apps.dtic.mil/sti/pdfs/AD1093317.pdf).
|
|
47
|
+
|
|
48
|
+
## Citing this Work
|
|
49
|
+
If you use FuelLib in your research, please cite the following software record:
|
|
50
|
+
|
|
51
|
+
~~~
|
|
52
|
+
Montgomery, David, Appukuttan, Sreejith, Yellapantula, Shashank, Perry, Bruce, and Binswanger, Adam. FuelLib (Fuel Library) [SWR-25-26]. Computer Software. https://github.com/NatLabRockies/FuelLib. USDOE Office of Energy Efficiency and Renewable Energy (EERE), Office of Sustainable Transportation. Vehicle Technologies Office (VTO). 27 Feb. 2025. Web. doi:10.11578/dc.20250317.1.
|
|
53
|
+
~~~
|
|
54
|
+
|
|
55
|
+
## Installation
|
|
56
|
+
|
|
57
|
+
1. **Clone the repository:**
|
|
58
|
+
~~~
|
|
59
|
+
git clone https://github.com/NatLabRockies/FuelLib.git
|
|
60
|
+
cd FuelLib
|
|
61
|
+
~~~
|
|
62
|
+
|
|
63
|
+
2. **Create and activate the conda environment:**
|
|
64
|
+
~~~
|
|
65
|
+
conda create --name fuellib-env python numpy pandas scipy matplotlib
|
|
66
|
+
conda activate fuellib-env
|
|
67
|
+
~~~
|
|
68
|
+
|
|
69
|
+
3. **Install FuelLib:**
|
|
70
|
+
|
|
71
|
+
**Option A: Basic installation**:
|
|
72
|
+
~~~
|
|
73
|
+
pip install -e .
|
|
74
|
+
~~~
|
|
75
|
+
|
|
76
|
+
**Option B: Full development installation** (includes documentation, testing, and formatting tools):
|
|
77
|
+
~~~
|
|
78
|
+
pip install -e ".[dev]"
|
|
79
|
+
~~~
|
|
80
|
+
|
|
81
|
+
This will install FuelLib and make the command-line exporters (`fl-export-pele` and `fl-export-converge`) available in your environment. If you installed with `[dev]`, you can also use `fl-build-docs` and `fl-clean-docs` to manage documentation, and `fl-format` to format code.
|
|
82
|
+
|
|
83
|
+
## Running the Code
|
|
84
|
+
This repository includes multiple tutorials of ways to use FuelLib. We recommend starting with the basic tutorial, `tutorials/basic.py`, which is documented at [https://NatLabRockies.github.io/FuelLib/tutorials.html#introduction]. The script `tutorials/mixtureProperties.py` calculates a given mixture's density, viscosity and vapor pressure from GC x GC data. The results are plotted against data from NIST and [Edwards (2020)](https://apps.dtic.mil/sti/pdfs/AD1093317.pdf).
|
|
85
|
+
|
|
86
|
+
### Command-Line Exporters
|
|
87
|
+
After installing FuelLib with `pip install -e .`, you can use the command-line exporters to generate fuel properties for CFD simulations:
|
|
88
|
+
|
|
89
|
+
- `fl-export-pele`: Export fuel properties for PelePhysics simulations
|
|
90
|
+
- `fl-export-converge`: Export fuel properties for Converge simulations
|
|
91
|
+
|
|
92
|
+
For example:
|
|
93
|
+
```bash
|
|
94
|
+
fl-export-pele -f posf10264
|
|
95
|
+
fl-export-converge -f posf10325
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Run `fl-export-pele -h` or `fl-export-converge -h` for detailed usage information.
|
|
99
|
+
|
|
100
|
+
# Contributing
|
|
101
|
+
New contributions are always welcome. If you have an idea for a new feature follow these steps:
|
|
102
|
+
1. Fork the main repository
|
|
103
|
+
2. Create a `newFeature` branch that contains your changes
|
|
104
|
+
3. Update the sphinx documentation in `newFeature`
|
|
105
|
+
4. Format the source code files using the provided CLI command:
|
|
106
|
+
~~~
|
|
107
|
+
fl-format
|
|
108
|
+
~~~
|
|
109
|
+
(Requires installing with `pip install -e ".[dev]"`. Uses Black version `26.3.1`.)
|
|
110
|
+
5. Open a Pull Request (PR) from `newFeature` on your fork to branch `main` FuelLib repository.
|
|
111
|
+
|
|
112
|
+
## Sphinx Documentation
|
|
113
|
+
This repository uses [Sphinx](https://www.sphinx-doc.org/en/master/usage/quickstart.html) to generate documentation.
|
|
114
|
+
|
|
115
|
+
To build the documentation, first install FuelLib with development support:
|
|
116
|
+
~~~
|
|
117
|
+
pip install -e ".[dev]"
|
|
118
|
+
~~~
|
|
119
|
+
|
|
120
|
+
Then use the provided CLI command:
|
|
121
|
+
~~~
|
|
122
|
+
fl-build-docs
|
|
123
|
+
~~~
|
|
124
|
+
|
|
125
|
+
The HTML documentation will be generated in `docs/_build/html/`. Open `docs/_build/html/index.html` in your web browser to view it.
|
|
126
|
+
|
fuellib-0.1.0/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# FuelLib
|
|
2
|
+
[](https://isocpp.org/)
|
|
3
|
+
[](https://doi.org/10.11578/dc.20250317.1)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
# Overview
|
|
9
|
+
FuelLib (SWR-25-26) utilizes the tables and functions of the Group Contribution Method (GCM) as proposed by [Constantinou and Gani (1994)](https://doi.org/10.1002/aic.690401011) and [Constantinou, Gani and O'Connel (1995)](https://doi.org/10.1016/0378-3812(94)02593-P), with additional physical properties discussed in [Govindaraju & Ihme (2016)](https://doi.org/10.1016/j.ijheatmasstransfer.2016.06.079). The code is based on Pavan B. Govindaraju's [Matlab implementation](https://github.com/gpavanb-old/GroupContribution) of the GCM, and has been expanded to include additional thermodynamic properties and mixture properties. The fuel library contains gas chromatography (GC x GC) data for a variety of fuels ranging from simple single component fuels to complex jet fuels. The GC x GC data for POSF jet fuels comes from [Edwards (2020)](https://apps.dtic.mil/sti/pdfs/AD1093317.pdf).
|
|
10
|
+
|
|
11
|
+
## Citing this Work
|
|
12
|
+
If you use FuelLib in your research, please cite the following software record:
|
|
13
|
+
|
|
14
|
+
~~~
|
|
15
|
+
Montgomery, David, Appukuttan, Sreejith, Yellapantula, Shashank, Perry, Bruce, and Binswanger, Adam. FuelLib (Fuel Library) [SWR-25-26]. Computer Software. https://github.com/NatLabRockies/FuelLib. USDOE Office of Energy Efficiency and Renewable Energy (EERE), Office of Sustainable Transportation. Vehicle Technologies Office (VTO). 27 Feb. 2025. Web. doi:10.11578/dc.20250317.1.
|
|
16
|
+
~~~
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
1. **Clone the repository:**
|
|
21
|
+
~~~
|
|
22
|
+
git clone https://github.com/NatLabRockies/FuelLib.git
|
|
23
|
+
cd FuelLib
|
|
24
|
+
~~~
|
|
25
|
+
|
|
26
|
+
2. **Create and activate the conda environment:**
|
|
27
|
+
~~~
|
|
28
|
+
conda create --name fuellib-env python numpy pandas scipy matplotlib
|
|
29
|
+
conda activate fuellib-env
|
|
30
|
+
~~~
|
|
31
|
+
|
|
32
|
+
3. **Install FuelLib:**
|
|
33
|
+
|
|
34
|
+
**Option A: Basic installation**:
|
|
35
|
+
~~~
|
|
36
|
+
pip install -e .
|
|
37
|
+
~~~
|
|
38
|
+
|
|
39
|
+
**Option B: Full development installation** (includes documentation, testing, and formatting tools):
|
|
40
|
+
~~~
|
|
41
|
+
pip install -e ".[dev]"
|
|
42
|
+
~~~
|
|
43
|
+
|
|
44
|
+
This will install FuelLib and make the command-line exporters (`fl-export-pele` and `fl-export-converge`) available in your environment. If you installed with `[dev]`, you can also use `fl-build-docs` and `fl-clean-docs` to manage documentation, and `fl-format` to format code.
|
|
45
|
+
|
|
46
|
+
## Running the Code
|
|
47
|
+
This repository includes multiple tutorials of ways to use FuelLib. We recommend starting with the basic tutorial, `tutorials/basic.py`, which is documented at [https://NatLabRockies.github.io/FuelLib/tutorials.html#introduction]. The script `tutorials/mixtureProperties.py` calculates a given mixture's density, viscosity and vapor pressure from GC x GC data. The results are plotted against data from NIST and [Edwards (2020)](https://apps.dtic.mil/sti/pdfs/AD1093317.pdf).
|
|
48
|
+
|
|
49
|
+
### Command-Line Exporters
|
|
50
|
+
After installing FuelLib with `pip install -e .`, you can use the command-line exporters to generate fuel properties for CFD simulations:
|
|
51
|
+
|
|
52
|
+
- `fl-export-pele`: Export fuel properties for PelePhysics simulations
|
|
53
|
+
- `fl-export-converge`: Export fuel properties for Converge simulations
|
|
54
|
+
|
|
55
|
+
For example:
|
|
56
|
+
```bash
|
|
57
|
+
fl-export-pele -f posf10264
|
|
58
|
+
fl-export-converge -f posf10325
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Run `fl-export-pele -h` or `fl-export-converge -h` for detailed usage information.
|
|
62
|
+
|
|
63
|
+
# Contributing
|
|
64
|
+
New contributions are always welcome. If you have an idea for a new feature follow these steps:
|
|
65
|
+
1. Fork the main repository
|
|
66
|
+
2. Create a `newFeature` branch that contains your changes
|
|
67
|
+
3. Update the sphinx documentation in `newFeature`
|
|
68
|
+
4. Format the source code files using the provided CLI command:
|
|
69
|
+
~~~
|
|
70
|
+
fl-format
|
|
71
|
+
~~~
|
|
72
|
+
(Requires installing with `pip install -e ".[dev]"`. Uses Black version `26.3.1`.)
|
|
73
|
+
5. Open a Pull Request (PR) from `newFeature` on your fork to branch `main` FuelLib repository.
|
|
74
|
+
|
|
75
|
+
## Sphinx Documentation
|
|
76
|
+
This repository uses [Sphinx](https://www.sphinx-doc.org/en/master/usage/quickstart.html) to generate documentation.
|
|
77
|
+
|
|
78
|
+
To build the documentation, first install FuelLib with development support:
|
|
79
|
+
~~~
|
|
80
|
+
pip install -e ".[dev]"
|
|
81
|
+
~~~
|
|
82
|
+
|
|
83
|
+
Then use the provided CLI command:
|
|
84
|
+
~~~
|
|
85
|
+
fl-build-docs
|
|
86
|
+
~~~
|
|
87
|
+
|
|
88
|
+
The HTML documentation will be generated in `docs/_build/html/`. Open `docs/_build/html/index.html` in your web browser to view it.
|
|
89
|
+
|