Skip to main content

A set of tools for designing large flanges.

Project description

PyFlange Python Package

This package has the ambitious goal of providing all the tools engineers need for the design of large bolted flanges such as the flanges used in offshore wind for connecting the turbine tower to the foundation.

Far from achieving its goal, this package currently contains only an implementation of Marc Seidel's polynomial model for predicting bolt forces and moments due to shell pull.

This package has beend developed within the Bolt and Beoutiful GROW project by KCI, Siemens Gamesa and TNO.

The rest of this documentation will show how to get started and where to find extra documentation.

Getting Started

Once the Bolt and Beautiful project gets closed, this package will be released to the public with GPLv3 license and will be installable via

pip install pyflange

Until then, the source needs to stay closed and accessible to a limited number of people such as yourself. Therefore you need to install the wheel package after downloading it from GitHub.

cd <path/to/whl/package>
pip install pyflange-0.1.0-py3-none-any.whl

Package version (0.1.0 in the example above) to be adjusted to the latest.

After installing the package, you can import it in your python code as start using it. First of all, you need to create a FlangeSegment object as shown below.

# Create the bolt object
from pyflange.bolts import MetricBolt
M80 = StandardMetricBolt("M80", "10.9", shank_length=0.270, stud=True)

# Define the gap parameters
from pyflange.gap import gap_height_distribution
D = 7.50                        # meters, flange outer diameter
gap_angle = pi/6                # 30 deg gap angle
gap_length = gap_angle * D/2    # outer length of the gap
u_tol = 0.0014                  # flatness tolerance in mm/mm
gap_dist = gap_height_distribution(D, u_tol, gap_length)    # lognormal distribution

# Create the FlangeSegment model
from pyflange.flangesegments import PolynomialLFlangeSegment
Nb = 120    # number of bolts
fseg = PolyNomialFlangeSegment(
    a = 0.2325,             # distance between inner face of the flange and center of the bolt hole
    b = 0.1665,             # distance between center of the bolt hole and center-line of the shell
    s = 0.0720,             # shell thickness
    t = 0.2000,             # flange thickness
    c = 2*pi/Nb * (D - 0.072)/2,    # shell arc length
    R = D/2,                # shell outer curvature radius

    Zg = -14795000 / Nb,    # load applied to the flange segment shell at rest
                            # (normally dead weight of tower + RNA, divided by the number of bolts)

    bolt = M80,             # bolt object created above
    Fv = 2876000,           # design bolt preload, after preload losses

    Do = 0.086,             # bolt hole diameter
    Dw = 0.140,             # washer diameter

    gap_height = gap_dist.ppf(0.95),    # maximum longitudinal gap height, 95% quantile
    gap_angle = gap_angle)              # longitudinal gap length

# Assert if the flange-segment fails with failure mode B.
# If not, an exception will be raised. 
fseg.validate(470e6, 450e6)

Notice that a consistent set of units of measurements has been used for inputs, namely: meter for distances, radians for angles and newton for forces. It is not required to always use these units (meter, newton), but you should choose your units and always apply them consistently.

Once you have your fseg object, you can obtain the bolt forces and moments as follows:

Fs = fseg.bolt_axial_force(3500)    # bolt force corresponding to shell pull Z = 3500 N
Ms = fseg.bolt_bending_moment(2000) # bolt bending moment corresponding to shell pull Z = 2000 N

The argumment Z, passed to bolt_axial_force and bolt_bending_moment can also be a numpy array. In that case an array of Fs and Ms value will be returned.

import numpy as np
Z = np.array([2000, 2500, 3000])
Fs = fseg.bolt_axial_force(Z)       # return the numpy array (Fs(2000), Fs(2500), Fs(3000))
Ms = fseg.bolt_bending_moment(Z)    # return the numpy array (Ms(2000), Ms(2500), Ms(3000))

Learn More

For more details, read the pyflage API documentation.

Testing

Once you clone this package, you can run the unit tests (assuming you have already the pytest module installed) as follows:

cd <path-to-package>
py -m pytest

License

pyFlange - python library for large flanges design Copyright (C) 2024 KCI The Engineers B.V., Siemens Gamesa Renewable Energy B.V., Nederlandse Organisatie voor toegepast-natuurwetenschappelijk onderzoek TNO.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License, as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more details.

You should have received a copy of the GNU General Public License version 3 along with this program. If not, see https://www.gnu.org/licenses/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyflange-0.1.2.tar.gz (13.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyflange-0.1.2-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file pyflange-0.1.2.tar.gz.

File metadata

  • Download URL: pyflange-0.1.2.tar.gz
  • Upload date:
  • Size: 13.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for pyflange-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9c7b96e66b0bccb41637aa4e8ec76660e543b05dbea860d8b20b4f9a4c5a4d8a
MD5 328646caa491e015f11c8c8de4e96aa2
BLAKE2b-256 89c70c4f690522a726bf30e011086d1609adff5224f126d2cfa9581c9ecea345

See more details on using hashes here.

File details

Details for the file pyflange-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyflange-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for pyflange-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e4f2a5bc825382132dc3ee20f37c5b06f735ddab1467153aad6c35154c78fbca
MD5 6e12b99eca25df0e49b3270c32e07bde
BLAKE2b-256 6f6265ec2f283fbbf394770b000e4174d3bc3cda9bf21953fa7428af46253f4f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page