Bolt

class pypbomb.Bolt

Methods relating to bolt calculations and property lookup.

classmethod calculate_safety_factors(max_pressure, window_area, num_bolts, thread_size, thread_class, bolt_max_tensile, plate_max_tensile, engagement_length, unit_registry=<pint.registry.UnitRegistry object>)

Calculates bolt and plate safety factors for viewing window bolts

Parameters:
  • max_pressure (pint.Quantity or Tuple[float, str]) – Tube maximum pressure

  • window_area (pint.Quantity or Tuple[float, str]) – Window area exposed to high pressure environment

  • num_bolts (int or np.ndarray) – Number of bolts used to secure each viewing window

  • thread_size (str) – Size of threads to be evaluated, e.g. 1/4-20 or 1 1/2-6

  • thread_class (str) – Class of threads to be evaluated, "2" or "3". ("A" or "B" are automatically appended for internal/external threads)

  • bolt_max_tensile (pint.Quantity or Tuple[float, str]) – Pint quantity of bolt (ext. thread) tensile failure stress

  • plate_max_tensile (pint.Quantity or Tuple[float, str]) – Pint quantity of plate (int. thread) tensile failure stress

  • engagement_length (pint.Quantity or Tuple[float, str]) – Pint quantity of total thread engagement length

  • unit_registry (pint.UnitRegistry) – Keeps output consistent with parent registry, avoiding conflicts

Returns:

Dictionary giving factors of safety for window bolts and the plate

that they are screwed into. Keys:

  • "bolt"

  • "plate"

Return type:

dict

static calculate_stress_areas(thread_size, thread_class, bolt_max_tensile, plate_max_tensile, engagement_length, unit_registry)

Calculates internal and external thread stress areas using formulas in Machinery’s Handbook, 26th edition.

Parameters:
  • thread_size (str) – Size of threads to be evaluated, e.g. "1/4-20" or "1 1/2-6"

  • thread_class (str) – Class of threads to be evaluated, "2" or "3". ("A" or "B" are automatically appended for internal/external threads)

  • bolt_max_tensile (pint.Quantity or Tuple[float, str]) – Pint quantity of bolt (external thread) tensile failure stress

  • plate_max_tensile (pint.Quantity or Tuple[float, str]) – Pint quantity of plate (internal thread) tensile failure stress

  • engagement_length (pint.Quantity or Tuple[float, str]) – Pint quantity of total thread engagement length

  • unit_registry (pint.UnitRegistry) – Unit registry for managing units to prevent conflicts with parent unit registry

Returns:

Dictionary with the following keys:

  • "plate area": Stress area of internal threads within the plate

  • "screw area": Stress area of external threads on the screw

  • "minimum engagement": Minimum engagement length causing screw to fail in tension rather than shear, thus preventing the plate from stripping.

Return type:

dict

static get_thread_property(thread_property, thread_size, thread_class, unit_registry)

Finds a thread property, such as minor diameter, using a dataframe from import_thread_specs(). import_thread_specs is not directly called here to save time by not reading from disk every time a property is requested.

Parameters:
  • thread_property (str) – Property that is desired, such as "minor diameter"

  • thread_size (str) – Thread size for desired property, such as "1/4-20" or "1 1/2-6"

  • thread_class (str) – Thread class: "2B" or "3B" for internal threads, "2A" or "3A" for external threads

  • unit_registry (pint.UnitRegistry) – Unit registry for managing units to prevent conflicts with parent unit registry

Returns:

Property requested, as a pint quantity with units of inches

Return type:

pint.Quantity