diff --git a/README.md b/README.md index 81b9e04..6faa752 100644 --- a/README.md +++ b/README.md @@ -14,30 +14,30 @@ This is a small spare time project for calculation of vessel depressurisation be A few choices is made to keep things simple to begin with: -- Coolprop is used as thermodynamic backend +- [Coolprop](http://www.coolprop.org/) is used as thermodynamic backend - Only pure substances are considered - Gas phase only -- No temperture startification in the gas phase +- No temperture stratification in the gas phase - No temperture gradient through vessel wall - Heat transfer is modelled as simple as possible Code will be as simple as possible - a single file to start with - no fancy module structure, no GUI, nothing - just a simple script with an input file. -These choices make the problem a lot more simple to solve, First of all the the pure substance Helmholtz energy based equation of state in coolprop offers a lot of convenience in terms of the property pairs/state variables that can be set independently. Using only a single gas phase species also means that component balances is redundant and 2 or 3-phase flash calculations are not required. That being said the principle used for a single component is more or less the same, even for multicomponent mixtures with potentially more than one phase. +These choices makes the problem a lot more simple to solve, First of all the the pure substance Helmholtz energy based equation of state (HEOS) in coolprop offers a lot of convenience in terms of the property pairs/state variables that can be set independently. Using only a single gas phase species also means that component balances is redundant and 2 or 3-phase flash calculations are not required. That being said the principle used for a single component is more or less the same, even for multicomponent mixtures with potentially more than one phase. Over time the code could evolve to implement the Stefan-Bolzmann fire duty equation as described in e.g. API521 / Scandpower guideline, pressure relief valve instead of blow down valve, pressurisation behaviour etc. ## Description The following methods are implemented: -- Isothermal i.e. constant tmeperature of the fluid during depressurisation (for a very slow process with a large heat reservoir) +- Isothermal i.e. constant temperature of the fluid during depressurisation (for a very slow process with a large heat reservoir) - Isenthalpic/Adiabatic (no heat transfer with surroundings, no work performed by the expanding fluid) - Isentropic (no heat transfer with surroundings, PV work performed by the expanding fluid) - Constant internal energy -- Energy balance, this is the most general case, and includes both the ability to transfer heat with surroundings as well as PV work is accounted for (PV work efficiency can be specied, but 100% or close to is recommended) +- Energy balance. This is the most general case and includes both the ability to transfer heat with surroundings as well as accounting for PV work (PV work efficiency can be specied, but 100% or close to is recommended) -A simple (naive) explicit Euler scheme is implemented to integrate the mass balance over time, with the mass rate being calculated from an orifice/valve equation. For each step then the mass relief/ left in the vessel is known. Since the volume is fixed, from the mass the density is directly given. For the simple methods (isentropic,isenthalpic,isenergetic etc), Coolprop allows specifying density and either H,S or U directly - this is very handy and normally onlt TP, PH, TS flash calculations are implemented, and you would need to code a second loop to make it into am UV, VH or SV calculation. Coolprop is very convenient for this, however for the cubic EOS it only supports a subset of state variables to be specified directly. +A simple (naive) explicit Euler scheme is implemented to integrate the mass balance over time, with the mass rate being calculated from an orifice/valve equation. For each step, the mass relief/ left in the vessel is known. Since the volume is fixed the mass density is directly given. For the simple methods (isentropic,isenthalpic,isenergetic etc), Coolprop allows specifying density and either H,S or U directly - this is very handy and normally only TP, PH, TS property pairs are implemented, and you would need to code a second loop to make it into am UV, VH or SV calculation. Coolprop is very convenient for this, however for a cubic EOS and for multicomponent Helmholtz energy EOS coolprop only supports a subset of state variables to be specified directly (T,P,quality). For this reason single component HEOS is the main target of this small project. -In case the "Energy balance" method is applied, the heat added from convection and work is accounted for. In this case some of the Coolprop convenience is lost and the P,T for the new time step is iteratively solved in a nested loop, with pressure being iterated to match the density, and an inner loop with an energy balance solved to estimate the final temperture. The two iteration loops can most likely be improved massively. +In case the "Energy balance" method is applied, the heat added from convection and work is accounted for. In this case some of the Coolprop convenience is lost and P,T for the new time step is iteratively solved in a nested loop, with pressure being iterated to match the density, and an inner loop with an energy balance solved to estimate the final temperture. The two iteration loops can most likely be improved massively. ## Basic usage The Yaml input file is edited to reflect the system of interest. For isothermal/isenthalpic/isentropic/isenergetic calculations the minimal input required are: @@ -79,6 +79,10 @@ The script is running on Windows 10 x64, with stock python installation from pyt - Relief valve (spring loaded) as an alternative to orifice depressurisation - Additional plots - More description +- Manual +- Example input files +- More validation cases with different gases +- Multi-component / multi-phase with cubic EOS (long term goal) ## References