kevindorma / psvpy

PSVs in Python
MIT License
2 stars 0 forks source link

About The Project

This project provides functions in Python for standard calculations for Pressure Safety Valve (PSV) flow rate and sizing. The intention is to use the routines in a Jupyter Notebook file for documenting engineering work.

The calculations should be adequate for engineering consulting work and preliminary sizing or rating. Definative sizing or rating calculations should be performed with methodologies or rating factors provided by the PSV manufacturer.

Built With

The code is written in Python (and is the authors first Python package uploaded to GitHub). The code is intended to be used in a Jupyter Notebook. I have not used the routines in a stand-alone Python environment.

Getting Started

The following lines of code are needed in a Jupyter Notebook (Python shell) to pull the unregistered package from GitHub and use the package.

TBD

Prerequisites

The package requires the following packages

Testing

The following code tests are available

Usage

Refer to the Jupyter Notebook file for an example of how the code is used.

For more examples, please refer to the Documentation

Functions are provided for rating and sizing of Steam, Vapour and Liquid PSVs. Units of measure used in the package are:

Functions

$$ Kd = 0.975 \, \mbox{discharge coefficient, can vary with mfg} \ Kb = 1.0 \, \mbox{do not consider backpressure derating} \ Kc = 1.0 \, \mbox{no derating for rupture disc} \ C = 0.03948 \sqrt{ k \left(\frac{2.0}{k+1}\right)^{(k+1)/(k-1)} } \, \mbox{API 520A fig 32} \ flux{kg/hr.mm2} = \frac{C Kd P Kb Kc}{\sqrt{T{kelvin} \times Z/MW}} $$

Utility functions

$$
F = 1.0 \, \mbox{no environmental credits} \ flowRate = \frac{C1 F A_{w,m2}^{0.82}}{1000 \Delta H} * 3600 \, \mbox{kg/h} \ \mbox{where} \ C1 = 70900 \, \mbox{if prompt fire fighting DOES NOT exist} \ C1 = 43200 \, \mbox{if prompt fire fighting exists} $$

Refer to the Jupyter notebook file PSVreliefExample.ipynb for working examples.

Roadmap

Contributing

Send me a note.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Kevin Dorma - @kevindorma - kevin@kevindorma.ca

Project Link: https://github.com/kevindorma/psvpy

Acknowledgements

Not sure who to acknowledge.