Related Resources: calculators

Pressure Vessel Calculator Python Script Application

Pressure Vessel Calculator Python Script Application

Use this code to calculate the stresses in cylindrical pressure vessels. A calculator class, Vessel , and a GUI class, PV_GUI , are provided.

The calculator is intended for use with relatively simple pressure housings, without fittings, welds, or variations in material. For more complex vessels, the calculator may be used as a first step for the overall stress levels, to be followed by specific analysis of stress concentrations.

Given the dimensions of the pressure vessel, the material strength, and the applied pressure, the von Mises stresses in the wall are calculated. A safety factor is determined using both the maximum von Mises stress and the average stress between the inner and outer wall surface. The average stress is limited to a smaller proportion of the maximum allowable stress, which requires that vessels with thinner walls have larger margins of safety.

The allowable stress value should be chosen to represent the worst-case material strength while in use. By default, the tensile yield stress should be appropriate. If the service temperature is significantly higher than room temperature, the allowable stress should be reduced to compensate for any loss of strength in the material. Similarly, if the tensile strength and compressive strength are significantly different, choose the strength value corresponding to the load case (i.e. tensile for internal pressure, compressive for external pressure).

Python code - This application requires knowledge of Python installation and code execution.

NOTE: 

Refunds are not awarded after Python files have been downloaded - review your membership agreement for details.
​Units (if utilized) utilized within calculators are either SI or Imperial (some enable both SI and Imperial) and member (you) are responsible for conversions. Ensure that you verify units utilized in excel application meet your requirements before downloading. 

Premium Membership Required for download

Download: Pressure Vessel Calculator Python Script Application

Output

Pressure Vessel Calculator 1

Pressure Vessel 2

Source

Python code - This application requires knowledge of Python installation and code execution.

No requirements outside the Python Standard Library

Support:

  • Engineers Edge has tested the basic functions and operation of this application using Python 3.11.9 and supporting modules.
  • Supporting Windows application "Visual Studio Code".
  • 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.

Related