pyflange.bolts

The bolts module contains objects representing the bolt, washer and nut fastener components. In particular it contains

  • A MetricBolt class that generates generic bolts with metric screw thread and a StandardMetricBolt function that generates MetricBolt objects with standard properties.

  • A FlatWasher class that generates generic flat washer and a ISOFlatWasher frunction that returns a FlatWasher with standard dimensions.

  • A HexNut class that generates a generic hexagonal nut, a ISOHExNut function that generates a HexNut with ISO 4032 dimensions`` and a RoundNut function that generates a standard flanged HexNut.

class pyflange.bolts.BoltCrossSection(diameter: float)
class pyflange.bolts.MetricBolt(nominal_diameter: float, thread_pitch: float, yield_stress: float, ultimate_tensile_stress: float, elastic_modulus: float = 210000000000.0, poissons_ratio: float = 0.3, shank_length: float = 0, shank_diameter_ratio: float = 1, stud: bool = False)

Generates a generic bolt with metric screw thread accoridng ISO 68-1, defined by the following parameters:

  • nominal_diameterfloat

    The outermost diameter of the screw thread.

  • thread_pitchfloat

    The pitch of the metric thread.

  • yield_stressfloat

    Nominal yield stress (0.2% strain limit) of the bolt material.

  • ultimate_tensile_stressfloat

    Nominal ultimate tensile stress of the bolt material.

  • elastic_modulusfloat [optional]

    The Young’s modulus of the bolt material. If omitted, it defaults to 210e9 N/m². Notice that the default value assumes that the chosen unit for distance is m and the chosen unit for forces is N. If that’s not the case, you should enter the proper value of this parameter.

  • poissons_ratiofloat [optional]

    The Poisson’s ratio of the bolt material. If omitted, it defaults to 0.30.

  • shank_lengthfloat [optional]

    The length of the shank. If omitted, it defaults to 0.

  • shank_diameter_ratiofloat [optional]

    The ratio between the shank diameter and the bolt nominal diameter. If omitted, it defaults to 1, which means that the shank hs the nominal diameter.

  • studbool [optional]

    True if this is a stud bolt, False if it is not. If omitted, it defaults to False.

The parameters must be expressed in a consistent system of units. For example, if you chose to input distances in mm and forces in N, then stresses must be expressed in N/mm². All the bolt attributes and methods will return values consistently with the input units of measurement.

All the input parameters are also available as attributes of the generated object (e.g. bolt.shank_length, bolt.yield_stress, etc.).

This instances of this calss are designed to be immutable, which means than changing an attribute after creating an object is not a good idea. If you need a different bolt with different attributes, create a new one.

property designation

Bolt designation string, which is, for example, "M16" for a bolt with nominal diameter 16 mm.

property shank_diameter

Diameter of the shank.

property thread_height

Height of the metric thread fundamental triangle (H), as defined in ISO 68-1:1998.

property thread_basic_minor_diameter

Basic minor diameter (d1) as defined in ISO 68-1:1998.

property thread_basic_pitch_diameter

Basic minor diameter (d2) as defined in ISO 68-1:1998.

property thread_minor_diameter

Minor diameter (d3) as defined in ISO 898-1:2013.

property nominal_cross_section

Bolt cross-section with nominal diameter

property shank_cross_section

Bolt shank cross-section

property thread_cross_section

Bolt cross-section used for tensile calculations

Ref. ISO 891-1:2013, section 9.1.6.1

property shear_modulus

Shear modulus G, calculated from the Young’s modulus and Poisson’s ratio, under the assumption of isotropic and elastic bolt material.

ultimate_tensile_capacity(standard='Eurocode')

Returns the design ultimate tensile force that the bolt can take, according to a given standard.

Currently the only standard available is “Eurocode”, which is also the default value of the standard parameter.

axial_stiffness(length)

Given a clamped length, returns the axial stiffness of the bolt, according to VDI 2230, Part 1, Section 5.1.1.1.

bending_stiffness(length)

Given a clamped length, returns the bending stiffness of the bolt, according to VDI 2230, Part 1, Section 5.1.1.2.

property shank_cross_section_area

Area of the shank transversal cross-section.

DEPRECATED: use bolt.shank_cross_section.area instead

property nominal_cross_section_area

Area of a circle with nominal diameter.

DEPRECATED: use bolt.nominal_cross_section.area instead

property tensile_cross_section_area

Tensile stress area, according to ISO 891-1:2013, section 9.1.6.1

DEPRECATED: use bolt.thread_cross_section.area instead

property tensile_moment_of_resistance

Tensile moment of resistance, according to ISO 891-1:2013, section 9.1.6.1

DEPRECATED: use bolt.thread_cross_section.elastic_section_modulus instead

pyflange.bolts.StandardMetricBolt(designation, material_grade, shank_length=0.0, shank_diameter_ratio=1.0, stud=False)

This function provides a convenient way for creating MetricBolt object, given the standard geometry designation (e.g. “M20”) and the standard material grade designation (e.g. “8.8”).

The required parameters are:

  • designationstr

    The metric screw thread designation. The allowed values are: ‘M4’, ‘M5’, ‘M6’, ‘M8’, ‘M10’, ‘M12’, ‘M14’, ‘M16’, ‘M18’, ‘M20’, ‘M22’, ‘M24’, ‘M27’, ‘M30’, ‘M33’, ‘M36’, ‘M39’, ‘M42’, ‘M45’, ‘M48’, ‘M52’, ‘M56’, ‘M60’, ‘M64’, ‘M72’, ‘M80’, ‘M90’, ‘M100’.

    This parameter corresponds to a standard nominal diameter and a relevant thread pitch value (i.e. the standard coarse pitch value).

  • material_gradestr

    The material grade designation. The allowed values are: ‘4.6’, ‘4.8’, ‘5.6’, ‘5.8’, ‘6.8’, ‘8.8’, ‘9.8’, ‘10.9’ and ‘12.9’ for carbon-steel bolts; ‘A50’, ‘A70’, ‘A80’ and ‘A100’ for austenitic bolts; ‘D70’, ‘D80’ and ‘D100’ for duplex bolts; ‘C50’, ‘C70’, ‘C80’ and ‘C110’ for martensitic bolts; ‘F45’ and ‘F60’ for ferritic bolts.

    This parameter corresponds to a standard set of the paraters yield_stress, ultimate_tensile_stress, elastic_modulus and poissons_ratio.

  • shank_lengthfloat [optional]

    The length of the shank. If omitted, it defaults to 0.

  • shank_diameter_ratiofloat [optional]

    The ratio between the shank diameter and the bolt nominal diameter. If omitted, it defaults to 1, which means that the shank hs the nominal diameter.

  • studbool [optional]

    True if this is a stud bolt, False if it is not. If omitted, it defaults to False.

class pyflange.bolts.FlatWasher(outer_diameter: float, inner_diameter: float, thickness: float, elastic_modulus: float = 210000000000.0, poissons_ratio: float = 0.3)

Generates a generic flat washer.

  • outer_diameterfloat

    The outer diameter of the washer.

  • inner_diameterfloat

    The hole diameter of the washer.

  • elastic_modulusfloat [optional]

    The Young’s modulus of the washer material. If omitted, it defaults to 210e9 N/m². Notice that the default value assumes that the chosen unit for distance is m and the chosen unit for forces is N. If that’s not the case, you should enter the proper value of this parameter.

  • poissons_ratiofloat [optional]

    The Poisson’s ratio of the washer material. If omitted, it defaults to 0.30.

The parameters must be expressed in a consistent system of units. For example, if you chose to input distances in mm and forces in N, then stresses must be expressed in N/mm². All the bolt attributes and methods will return values consistently with the input units of measurement.

All the input parameters are also available as attributes of the generated object (e.g. washer.thickness, washer.poissons_ratio, etc.).

This instances of this calss are designed to be immutable, which means than changing an attribute after creating an object is not a good idea. If you need a different washer with different attributes, create a new one.

property area

Area of the washer flat surface

property axial_stiffness

The compressive stiffness of the washer: t / EA

pyflange.bolts.ISOFlatWasher(designation)

Standard washer according to ISO 7089

Returns a washer having the standard dimensions defined in ISO 7089, given the corresponding metric bolt designation.

For example, ISOFlatWasher("M16") will return a FlatWasher instance with outer diameter 30 mm, hole diameter 17 mm and thickness 3 mm.

class pyflange.bolts.HexNut(nominal_diameter: float, thickness: float, inscribed_diameter: float, circumscribed_diameter: float, bearing_diameter: float, elastic_modulus: float = 210000000000.0, poissons_ratio: float = 0.3)

Generates a generic flat washer.

  • nominal_diameterfloat

    The nominal diameter of the inner thread.

  • thicknessfloat

    The height of the bolt.

  • inscribed_diameterfloat

    The diameter of the circle inscribed in the hexagon. Correponds to the distance between two opposite flats.

  • circumscribed_diameterfloat

    The diameter of the circle circumscribed in the hexagon. Correponds to the distance between two opposite vertices..

  • bearing_diametergloat

    The outer diameter of the circular contatact surface between nut and washer.

  • elastic_modulusfloat [optional]

    The Young’s modulus of the nut material. If omitted, it defaults to 210e9 N/m². Notice that the default value assumes that the chosen unit for distance is m and the chosen unit for forces is N. If that’s not the case, you should enter the proper value of this parameter.

  • poissons_ratiofloat [optional]

    The Poisson’s ratio of the nut material. If omitted, it defaults to 0.30.

The parameters must be expressed in a consistent system of units. For example, if you chose to input distances in mm and forces in N, then stresses must be expressed in N/mm². All the bolt attributes and methods will return values consistently with the input units of measurement.

All the input parameters are also available as attributes of the generated object (e.g. washer.thickness, washer.poissons_ratio, etc.).

This instances of this calss are designed to be immutable, which means than changing an attribute after creating an object is not a good idea. If you need a different nut with different attributes, create a new one.

pyflange.bolts.ISOHexNut(designation)

Standard Hex Nut

Returns an ISO 4032 HexNut, given the metric designation. For example: nut = ISOHexNut('M16')

pyflange.bolts.RoundNut(designation)

Standard Hex Nut

Returns a Standard Flanged HexNut, given the metric designation. For example: nut = RoundNut('M42')