Metadata-Version: 2.4
Name: thermsolve
Version: 0.1.0
Summary: A Python package for thermodynamic calculations, unit operations, and substance properties.
Author-email: Titus Loftin <loftintitus@utexas.edu>
License: MIT License
        
        Copyright (c) 2025 Titus Loftin
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# ThermSolve

An extensible, lightweight thermophysical property library for chemical and process engineering.

Thermsolve makes it easy to retrieve temperature-dependent properties of common fluids, gases, and materials — with unit safety, validity ranges, and custom substance support.

---

## Features

- Look up Cp, viscosity, density, boiling/melting point, enthalpy, entropy, etc.
- Temperature-dependent property fitting/interpolation
- Fully unit-aware (using Pint)
- Built-in and user-defined property database (JSON/CSV)
- Range warnings when extrapolating properties

---

## To-do
- [ ] Core `Substance` class for property access
- [ ] Build initial CSV/JSON database for ~20 common substances
- [ ] Add temperature-dependent interpolation (Cp, viscosity, etc.)
- [ ] Integrate Pint for unit-aware values
- [ ] Implement property validity range checking
- [ ] Enable user-defined substances from JSON, CSV, or dict
- [ ] Add CLI tool for property lookup
- [ ] Create optional SQLite backend for scalable storage
- [ ] Add plotting functions for property trends (e.g., Cp vs T)
- [ ] Include citation metadata for each property source (e.g., NIST, DIPPR)
- [ ] Export properties to JSON, LaTeX, and human-readable tables

## Future
- [ ] API for fetching data

## Example

```python
from thermsolve import Substance

ethanol = Substance("ethanol")
cp = ethanol.cp(T=300)       # Specific heat [J/kg-K]
mu = ethanol.viscosity(T=350)
bp = ethanol.boiling_point()

# Add a custom substance
my_material = Substance.from_dict({
    "name": "KCl",
    "cp": {"type": "constant", "value": 800, "units": "J/kg-K"},
    "melting_point": 1040,
    "density": 1980
})
