Member Stiffness Modification#

../../../../_images/member_stiffness_modification.png

Modelling a concrete frame with member stiffness modifications to check impact on the deflection:

  • Create a single-bay 2D concrete frame

  • Apply different bending stiffness factors to the beam and columns

  • Create two ULS design situations with unreduced and reduced stiffness

  • Generate load combinations and assign the structure modification

  • Calculate the model and retrieve maximum vertical member deformation for both combinations

Keywords:
frame member stiffness modification structure modification load combination member deformation
from math import inf

from dlubal.api import common, rfem

# -------------------------------------------------------
# Parametric concrete portal frame with member stiffness
# modifications:
#   - beam:    0.35 * EI
#   - columns: 0.70 * EI
#
# Assumptions:
#   - single-bay 2D frame in the global XZ plane
#   - Z-up coordinate system
#   - fixed supports at column bases
#   - C30/37 rectangular cross-sections for columns and beam
#   - stiffness reduction is applied to both local bending axes
#   - two ULS design situations are generated:
#       1) unreduced stiffness
#       2) reduced stiffness from the structure modification
# -------------------------------------------------------

# Editable parameters (SI units)
MODEL_NAME = "member_stiffness_modification"

FRAME_SPAN = 6.0
FRAME_HEIGHT = 3.5
MATERIAL = "C30/37"

COLUMN_CSS_WIDTH = 0.30
COLUMN_CSS_HEIGHT = 0.30
COLUMN_EI_FACTOR = 0.70
BEAM_CSS_WIDTH = 0.30
BEAM_CSS_HEIGHT = 0.60
BEAM_EI_FACTOR = 0.35

SELF_WEIGHT_ACTIVE = True
BEAM_DISTRIBUTED_LOAD = -20_000.0  # N/m, global Z direction


def define_structure() -> list:
    """Define and return the frame geometry, material, sections, and supports."""

    return [
        rfem.structure_core.Material(
            no=1,
            name=MATERIAL,
        ),
        rfem.structure_core.CrossSection(
            no=1,
            type=rfem.structure_core.CrossSection.TYPE_PARAMETRIC_MASSIVE_I,
            material=1,
            b=COLUMN_CSS_WIDTH,
            h=COLUMN_CSS_HEIGHT,
        ),
        rfem.structure_core.CrossSection(
            no=2,
            type=rfem.structure_core.CrossSection.TYPE_PARAMETRIC_MASSIVE_I,
            material=1,
            b=BEAM_CSS_WIDTH,
            h=BEAM_CSS_HEIGHT,
        ),
        # Nodes
        rfem.structure_core.Node(no=1, coordinate_1=0.0, coordinate_2=0.0, coordinate_3=0.0),
        rfem.structure_core.Node(no=2, coordinate_1=FRAME_SPAN, coordinate_2=0.0, coordinate_3=0.0),
        rfem.structure_core.Node(no=3, coordinate_1=0.0, coordinate_2=0.0, coordinate_3=FRAME_HEIGHT),
        rfem.structure_core.Node(no=4, coordinate_1=FRAME_SPAN, coordinate_2=0.0, coordinate_3=FRAME_HEIGHT),
        # Lines
        rfem.structure_core.Line(no=1, definition_nodes=[1, 3]),
        rfem.structure_core.Line(no=2, definition_nodes=[2, 4]),
        rfem.structure_core.Line(no=3, definition_nodes=[3, 4]),
        # Members: 1-2 columns, 3 beam
        rfem.structure_core.Member(no=1, line=1, cross_section_start=1),
        rfem.structure_core.Member(no=2, line=2, cross_section_start=1),
        rfem.structure_core.Member(no=3, line=3, cross_section_start=2),
        rfem.types_for_nodes.NodalSupport(
            no=1,
            nodes=[1, 2],
            spring=common.Vector3d(x=inf, y=inf, z=inf),
            rotational_restraint=common.Vector3d(x=inf, y=inf, z=inf),
        ),
    ]


def member_stiffness_modification(no: int, name: str, factor: float):
    """Create a member stiffness modification for bending stiffness EI."""

    return rfem.types_for_members.MemberStiffnessModification(
        no=no,
        user_defined_name_enabled=True,
        name=name,
        type=rfem.types_for_members.MemberStiffnessModification.TYPE_PARTIAL_STIFFNESSES_FACTORS,
        factor_of_axial_stiffness=1.0,
        factor_of_bending_y_stiffness=factor,
        factor_of_bending_z_stiffness=factor,
        partial_stiffness_factor_of_shear_y_stiffness=1.0,
        partial_stiffness_factor_of_shear_z_stiffness=1.0,
        partial_stiffness_factor_of_torsion_stiffness=1.0,
        partial_stiffness_factor_of_weight=1.0,
    )


def define_stiffness_modification() -> list:
    """Define member modifications and assign them to columns and beam."""

    return [
        member_stiffness_modification(
            no=1,
            name=f"Columns: {COLUMN_EI_FACTOR:.2f} EI",
            factor=COLUMN_EI_FACTOR,
        ),
        member_stiffness_modification(
            no=2,
            name=f"Beam: {BEAM_EI_FACTOR:.2f} EI",
            factor=BEAM_EI_FACTOR,
        ),
        rfem.structure_advanced.StructureModification(
            no=1,
            user_defined_name_enabled=True,
            name="Reduced member bending stiffness",
            modify_stiffnesses_members=True,
            modify_stiffnesses_member_table=rfem.structure_advanced.StructureModification.ModifyStiffnessesMemberTable(
                rows=[
                    rfem.structure_advanced.StructureModification.ModifyStiffnessesMemberTableRow(
                        no=1,
                        description=f"Columns {COLUMN_EI_FACTOR:.2f} EI",
                        member_modification=1,
                        members=[1, 2],
                    ),
                    rfem.structure_advanced.StructureModification.ModifyStiffnessesMemberTableRow(
                        no=2,
                        description=f"Beam {BEAM_EI_FACTOR:.2f} EI",
                        member_modification=2,
                        members=[3],
                    ),
                ]
            ),
        ),
    ]


def define_loading() -> list:
    """Define loads, combination wizards, and two ULS design situations."""

    return [
        rfem.loading.StaticAnalysisSettings(
            no=1,
            analysis_type=rfem.loading.StaticAnalysisSettings.ANALYSIS_TYPE_GEOMETRICALLY_LINEAR,
        ),
        rfem.loading.LoadCase(
            no=1,
            name="Permanent loads",
            action_category=rfem.loading.LoadCase.ACTION_CATEGORY_PERMANENT_G,
            static_analysis_settings=1,
            self_weight_active=SELF_WEIGHT_ACTIVE,
        ),
        rfem.loads.MemberLoad(
            no=1,
            load_case=1,
            members=[3],
            load_type=rfem.loads.MemberLoad.LOAD_TYPE_FORCE,
            load_distribution=rfem.loads.MemberLoad.LOAD_DISTRIBUTION_UNIFORM,
            load_direction=rfem.loads.MemberLoad.LOAD_DIRECTION_GLOBAL_Z_OR_USER_DEFINED_W_TRUE_LENGTH,
            magnitude=BEAM_DISTRIBUTED_LOAD,
        ),
        rfem.loading.CombinationWizard(
            no=1,
            user_defined_name_enabled=True,
            name="Combinations - unreduced stiffness",
            static_analysis_settings=1,
            generate_combinations=rfem.loading.CombinationWizard.GENERATE_COMBINATIONS_LOAD_COMBINATIONS,
        ),
        rfem.loading.CombinationWizard(
            no=2,
            user_defined_name_enabled=True,
            name="Combinations - reduced stiffness",
            static_analysis_settings=1,
            generate_combinations=rfem.loading.CombinationWizard.GENERATE_COMBINATIONS_LOAD_COMBINATIONS,
            structure_modification_enabled=True,
            structure_modification=1,
        ),
        rfem.loading.DesignSituation(
            no=1,
            user_defined_name_enabled=True,
            name="ULS - unreduced stiffness",
            design_situation_type=rfem.loading.DesignSituation.DESIGN_SITUATION_TYPE_STR_PERMANENT_AND_TRANSIENT_6_10,
            combination_wizard=1,
            active=True,
        ),
        rfem.loading.DesignSituation(
            no=2,
            user_defined_name_enabled=True,
            name="ULS - reduced stiffness",
            design_situation_type=rfem.loading.DesignSituation.DESIGN_SITUATION_TYPE_STR_PERMANENT_AND_TRANSIENT_6_10,
            combination_wizard=2,
            active=True,
        ),
    ]


with rfem.Application() as rfem_app:

    print(f"\nCreating model: {MODEL_NAME}")
    rfem_app.create_model(name=MODEL_NAME)

    base_data = rfem_app.get_base_data()
    base_data.main.surfaces_active = False
    base_data.combinations_settings.combination_wizard_active = True
    base_data.general_settings.global_axes_orientation = (
        rfem.BaseData.GeneralSettings.GLOBAL_AXES_ORIENTATION_ZUP
    )
    rfem_app.set_base_data(base_data=base_data)

    rfem_app.delete_all_objects()
    rfem_app.create_object_list(
        define_structure()
        + define_stiffness_modification()
        + define_loading()
    )

    rfem_app.generate_combinations()

    load_combinations = rfem_app.get_object_list([rfem.loading.LoadCombination()])
    print("\nGenerated Load Combinations:")
    for load_combination in load_combinations:
        structure_modification = (
            load_combination.structure_modification
            if load_combination.structure_modification_enabled
            else "none"
        )
        print(
            f"CO{load_combination.no}: "
            f"{load_combination.name}, "
            f"structure modification: {structure_modification}"
        )

    calculation_info = rfem_app.calculate_all(skip_warnings=True)
    print(f"\nCalculation Succeeded:\n{calculation_info.succeeded}")

    print("\nMaximum vertical member deflection by load combination:")
    for load_combination in load_combinations:
        member_deformation_df = rfem_app.get_results(
            results_type=rfem.results.STATIC_ANALYSIS_MEMBERS_LOCAL_DEFORMATIONS,
            filters=[
                rfem.results.ResultsFilter(
                    column_id="loading",
                    filter_expression=f"CO{load_combination.no}",
                ),
            ],
        ).data

        max_u_z = member_deformation_df["u_z"].abs().max()
        print(f"CO{load_combination.no}: Max |u_z|: {max_u_z}")