Create beautiful fluid property diagrams using CoolProp and matplotlib
Project description
Create custom and beautiful Fluid Property Diagrams with fluprodia. The package implements fluid property data from CoolProp [1]. Plotting is handled by matplotlib [2], all calculations are performed with numpy [3]. The list of fluids available can be found at CoolProp.
fluprodia is licensed under the MIT software license.
docs |
|
---|---|
package |
Installation and Usage
pip install fluprodia
>>> from fluprodia import FluidPropertyDiagram
>>> import matplotlib.pyplot as plt
>>> diagram = FluidPropertyDiagram(fluid='H2O')
>>> diagram.set_unit_system(T='°C', h='kJ/kg', p='bar')
>>> diagram.calc_isolines()
>>> fig, ax = plt.subplots(1, figsize=(8, 5))
>>> diagram.draw_isolines(diagram_type='Ts', fig=fig, ax=ax, x_min=0, x_max=8000, y_min=0, y_max=700)
>>> plt.tight_layout()
>>> fig.savefig('Ts_diagram_H2O.svg')
>>> fig.savefig('Ts_diagram_H2O.png', dpi=300)
>>> fig, ax = plt.subplots(1, figsize=(8, 5))
>>> diagram = FluidPropertyDiagram(fluid='R290')
>>> diagram.set_unit_system(T='°C', h='kJ/kg', p='bar')
>>> diagram.calc_isolines()
>>> diagram.draw_isolines(diagram_type='logph', fig=fig, ax=ax, x_min=0, x_max=800, y_min=1e-1, y_max=1e2)
>>> plt.tight_layout()
>>> fig.savefig('logph_diagram_R290.png', dpi=300)
>>> fig.savefig('logph_diagram_R290.svg')
Documentation
For further examples and usage please refer to the online documentation at https://fluprodia.readthedocs.io/.
Citation
Every version of fluprodia is archived at zenodo. You can cite the latest or a specific version. For citation info and more details please go to the zenodo entry of fluprodia.
References
This software depends on the packages CoolProp, matplolib and numpy.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.