Skip to content

rhs_profile

structural_sections.steel.profile_definitions.rhs_profile

RHS- and SHS-Profile.

Classes:

  • RHSProfile

    Representation of an SHS or RHS profile.

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile dataclass

RHSProfile(
    *,
    total_width: MM,
    total_height: MM,
    left_wall_thickness: MM,
    right_wall_thickness: MM,
    top_wall_thickness: MM,
    bottom_wall_thickness: MM,
    top_right_inner_radius: MM = 0,
    top_left_inner_radius: MM = 0,
    bottom_right_inner_radius: MM = 0,
    bottom_left_inner_radius: MM = 0,
    top_right_outer_radius: MM = 0,
    top_left_outer_radius: MM = 0,
    bottom_right_outer_radius: MM = 0,
    bottom_left_outer_radius: MM = 0,
    name: str = "RHS-Profile",
    plotter: Callable[[Profile], Figure] = plot_shapes,
)

Bases: Profile

Representation of an SHS or RHS profile.

Attributes:

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.bottom_left_inner_radius class-attribute instance-attribute

bottom_left_inner_radius: MM = 0

The inner radius of the bottom left corner [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.bottom_left_outer_radius class-attribute instance-attribute

bottom_left_outer_radius: MM = 0

The outer radius of the bottom left corner [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.bottom_right_inner_radius class-attribute instance-attribute

bottom_right_inner_radius: MM = 0

The inner radius of the bottom right corner [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.bottom_right_outer_radius class-attribute instance-attribute

bottom_right_outer_radius: MM = 0

The outer radius of the bottom right corner [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.bottom_wall_inner_width class-attribute instance-attribute

bottom_wall_inner_width: MM = field(init=False)

The inner width of the bottom wall [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.bottom_wall_outer_width class-attribute instance-attribute

bottom_wall_outer_width: MM = field(init=False)

The outer width of the bottom wall [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.bottom_wall_thickness instance-attribute

bottom_wall_thickness: MM

The thickness of the bottom wall [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.left_wall_inner_height class-attribute instance-attribute

left_wall_inner_height: MM = field(init=False)

The inner height of the left wall [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.left_wall_outer_height class-attribute instance-attribute

left_wall_outer_height: MM = field(init=False)

The outer height of the left wall [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.left_wall_thickness instance-attribute

left_wall_thickness: MM

The thickness of the left wall [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.max_thickness property

max_thickness: MM

Maximum element thickness of the profile [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.name class-attribute instance-attribute

name: str = 'RHS-Profile'

The name of the profile.

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.plotter class-attribute instance-attribute

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

The plotter function to visualize the profile.

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.right_wall_inner_height class-attribute instance-attribute

right_wall_inner_height: MM = field(init=False)

The inner height of the right wall [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.right_wall_outer_height class-attribute instance-attribute

right_wall_outer_height: MM = field(init=False)

The outer height of the right wall [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.right_wall_thickness instance-attribute

right_wall_thickness: MM

The thickness of the right wall [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.top_left_inner_radius class-attribute instance-attribute

top_left_inner_radius: MM = 0

The inner radius of the top left corner [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.top_left_outer_radius class-attribute instance-attribute

top_left_outer_radius: MM = 0

The outer radius of the top left corner [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.top_right_inner_radius class-attribute instance-attribute

top_right_inner_radius: MM = 0

The inner radius of the top right corner [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.top_right_outer_radius class-attribute instance-attribute

top_right_outer_radius: MM = 0

The outer radius of the top right corner [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.top_wall_inner_width class-attribute instance-attribute

top_wall_inner_width: MM = field(init=False)

The inner width of the top wall [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.top_wall_outer_width class-attribute instance-attribute

top_wall_outer_width: MM = field(init=False)

The outer width of the top wall [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.top_wall_thickness instance-attribute

top_wall_thickness: MM

The thickness of the top wall [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.total_height instance-attribute

total_height: MM

The total height of the profile [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.total_width instance-attribute

total_width: MM

The total width of the profile [mm].

structural_sections.steel.profile_definitions.rhs_profile.RHSProfile.with_corrosion

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

Apply corrosion to the RHS- or SHS-profile and return a new RHS- or SHS-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:

  • RHSProfile

    A new RHS- or SHS-profile instance with the applied corrosion.

Raises:

  • ValueError

    If the profile has fully corroded.

Source code in blueprints/structural_sections/steel/profile_definitions/rhs_profile.py
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
def with_corrosion(self, corrosion_outside: MM = 0, corrosion_inside: MM = 0) -> RHSProfile:
    """Apply corrosion to the RHS- or SHS-profile and return a new RHS- or SHS-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
    -------
    RHSProfile
        A new RHS- or SHS-profile instance with the applied corrosion.

    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

    total_width = self.total_width - 2 * corrosion_outside
    total_height = self.total_height - 2 * corrosion_outside

    top_wall_thickness = self.top_wall_thickness - corrosion_outside - corrosion_inside
    bottom_wall_thickness = self.bottom_wall_thickness - corrosion_outside - corrosion_inside
    left_wall_thickness = self.left_wall_thickness - corrosion_outside - corrosion_inside
    right_wall_thickness = self.right_wall_thickness - corrosion_outside - corrosion_inside

    top_right_inner_radius = self.top_right_inner_radius + corrosion_inside
    top_left_inner_radius = self.top_left_inner_radius + corrosion_inside
    bottom_right_inner_radius = self.bottom_right_inner_radius + corrosion_inside
    bottom_left_inner_radius = self.bottom_left_inner_radius + corrosion_inside
    top_right_outer_radius = max(self.top_right_outer_radius - corrosion_outside, 0)
    top_left_outer_radius = max(self.top_left_outer_radius - corrosion_outside, 0)
    bottom_right_outer_radius = max(self.bottom_right_outer_radius - corrosion_outside, 0)
    bottom_left_outer_radius = max(self.bottom_left_outer_radius - corrosion_outside, 0)

    if any(
        thickness < FULL_CORROSION_TOLERANCE
        for thickness in (
            top_wall_thickness,
            bottom_wall_thickness,
            left_wall_thickness,
            right_wall_thickness,
        )
    ):
        raise ValueError("The profile has fully corroded.")

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

    return RHSProfile(
        total_width=total_width,
        total_height=total_height,
        left_wall_thickness=left_wall_thickness,
        right_wall_thickness=right_wall_thickness,
        top_wall_thickness=top_wall_thickness,
        bottom_wall_thickness=bottom_wall_thickness,
        top_right_inner_radius=top_right_inner_radius,
        top_left_inner_radius=top_left_inner_radius,
        bottom_right_inner_radius=bottom_right_inner_radius,
        bottom_left_inner_radius=bottom_left_inner_radius,
        top_right_outer_radius=top_right_outer_radius,
        top_left_outer_radius=top_left_outer_radius,
        bottom_right_outer_radius=bottom_right_outer_radius,
        bottom_left_outer_radius=bottom_left_outer_radius,
        name=name,
        plotter=self.plotter,
    )