Skip to content

chs_profile

structural_sections.steel.profile_definitions.chs_profile

Circular Hollow Section (CHS) profile.

Classes:

  • CHSProfile

    Representation of a Circular Hollow Section (CHS) profile.

structural_sections.steel.profile_definitions.chs_profile.CHSProfile dataclass

CHSProfile(
    *,
    outer_diameter: MM,
    wall_thickness: MM,
    name: str = "CHS Profile",
    plotter: Callable[[Profile], Figure] = plot_shapes,
)

Bases: Profile

Representation of a Circular Hollow Section (CHS) profile.

Attributes:

  • outer_diameter (MM) –

    The outer diameter of the CHS profile [mm].

  • wall_thickness (MM) –

    The wall thickness of the CHS profile [mm].

  • name (str) –

    The name of the profile. Default is "CHS Profile".

  • plotter (Callable[[Profile], Figure]) –

    The plotter function to visualize the profile (default: plot_shapes).

structural_sections.steel.profile_definitions.chs_profile.CHSProfile.inner_diameter class-attribute instance-attribute

inner_diameter: MM = field(init=False)

The inner diameter of the CHS profile [mm].

structural_sections.steel.profile_definitions.chs_profile.CHSProfile.max_thickness property

max_thickness: MM

Maximum element thickness of the profile [mm].

structural_sections.steel.profile_definitions.chs_profile.CHSProfile.name class-attribute instance-attribute

name: str = 'CHS Profile'

The name of the profile.

structural_sections.steel.profile_definitions.chs_profile.CHSProfile.outer_diameter instance-attribute

outer_diameter: MM

The outer diameter of the CHS profile [mm].

structural_sections.steel.profile_definitions.chs_profile.CHSProfile.plotter class-attribute instance-attribute

plotter: Callable[[Profile], Figure] = plot_shapes

The plotter function to visualize the profile.

structural_sections.steel.profile_definitions.chs_profile.CHSProfile.wall_thickness instance-attribute

wall_thickness: MM

The wall thickness of the CHS profile [mm].

structural_sections.steel.profile_definitions.chs_profile.CHSProfile.with_corrosion

with_corrosion(
    corrosion_outside: MM = 0, corrosion_inside: MM = 0
) -> CHSProfile

Apply corrosion to the CHS-profile and return a new CHS-profile instance.

The name attribute of the new instance will be updated to reflect the total corrosion applied including any previous corrosion indicated in the original name.

Parameters:

  • corrosion_outside (MM, default: 0 ) –

    Corrosion to be subtracted from the outer diameter [mm] (default: 0).

  • corrosion_inside (MM, default: 0 ) –

    Corrosion to be added to the inner diameter [mm] (default: 0).

Returns:

  • CHSProfile

    The adjusted CHS profile considering corrosion effects.

Raises:

  • ValueError

    If the profile has fully corroded.

Source code in blueprints/structural_sections/steel/profile_definitions/chs_profile.py
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
def with_corrosion(self, corrosion_outside: MM = 0, corrosion_inside: MM = 0) -> CHSProfile:
    """Apply corrosion to the CHS-profile and return a new CHS-profile instance.

    The name attribute of the new instance will be updated to reflect the total corrosion applied
    including any previous corrosion indicated in the original name.

    Parameters
    ----------
    corrosion_outside : MM, optional
        Corrosion to be subtracted from the outer diameter [mm] (default: 0).
    corrosion_inside : MM, optional
        Corrosion to be added to the inner diameter [mm] (default: 0).

    Returns
    -------
    CHSProfile
        The adjusted CHS profile considering corrosion effects.

    Raises
    ------
    ValueError
        If the profile has fully corroded.
    """
    raise_if_negative(corrosion_outside=corrosion_outside)
    raise_if_negative(corrosion_inside=corrosion_inside)

    if corrosion_inside == 0 and corrosion_outside == 0:
        return self

    adjusted_outer_diameter = self.outer_diameter - 2 * corrosion_outside
    adjusted_thickness = self.wall_thickness - corrosion_outside - corrosion_inside

    if adjusted_thickness <= FULL_CORROSION_TOLERANCE:
        raise ValueError("The profile has fully corroded.")

    name = update_name_with_corrosion(self.name, corrosion_inside=corrosion_inside, corrosion_outside=corrosion_outside)

    return CHSProfile(
        outer_diameter=adjusted_outer_diameter,
        wall_thickness=adjusted_thickness,
        name=name,
        plotter=self.plotter,
    )