1068x
001571
2020-07-20

[EN] KB 001639 | Transformation of Rib into Surface Model with Result Beam Using VBA

Topic:
Transformation of Rib into Surface Model with Result Beam Using VBA

Notes:
If a rib is part of a nonlinear design or is rigidly connected to following walls, a surface should be used for the modeling instead of a member. So that the rib can still be designed as a member, a result member with the correct eccentricity is required, which transforms the surface internal forces into member internal forces.

Description:
Since modeling such a surface-based rib with the result member is significantly more complicated than creating a member of the "rib" type, the following program in EXCEL-VBA will convert the member-based rib into a surface model, including the result member.

To transform a rib into a surface model, the following steps are necessary:

1.
Read out rib parameters (cross-section, orientation, etc.)
2.
Create Rib Surface
3.
Create Result Beam
4.
Delete Rib Member

In the following text, we will show excerpts from the entire source code as examples. You can download the complete code at the end of this article.

Read out Rib Parameters

You have the option to select the rib to be transformed by selecting it from the program interface. To do this, it is necessary to work with the EnableSelections function. As long as EnableSelections is activated with true, only selected elements are read from RFEM. The readout of the selected member looks like this.

' get interface of active model
Set iMod = iApp.GetActiveModel

' get interface of (structural) model data
Dim iModData As RFEM5.IModelData2
Set iModData = iMod.GetModelData

' get selected member
iModData.EnableSelections True

Dim mems() As RFEM5.Member
Dim selMem As RFEM5.Member
mems = iModData.GetMembers
selMem = mems(0)

iModData.EnableSelections False

The following parameters are required for the rib modeling:

Rib cross-section, surface numbers, and effective widths
Rib Orientation
Rib Material

In RFEM, a rib is a member type. When you utilize the programming via the COM interface, you have to get the data of a rib via two different interfaces. On one hand, there is the interface for the member and on the other hand, there is the interface for the rib. The interface to a rib can be obtained via IModelData.GetRib. GetRib expects the rib number contained in the member via Member.RibNo.

' get parameters of rib
' #####################
Dim iRb As RFEM5.IRib
Set iRb = iModData.GetRib(selMem.RibNo, AtNo)

Dim selRb As RFEM5.Rib
selRb = iRb.GetData

Dim rbCrsc As RFEM5.RibCrossSection
rbCrsc = iRb.GetRibCrossSection

The interface to the rib offers two different elements: the general rib data via the Rib Structure and the rib cross-section data via RibCrossSection. Rib contains the surface numbers, the position of the rib, and the effective widths. RibCrossSection contains the description and the dimensions of the internal rib cross-section, which is also used by RF-CONCRETE Members (ITCU).

In addition, the orientation is required, which is available via the local axis system of the member. You access the axis system via the interface to the member. The IMemer.GetLocalCoordinateSystem function returns the CoordinateSystem structure.

Dim cosy As RFEM5.CoordinateSystem
cosy = iModData.GetMember(selMem.no, AtNo).GetLocalCoordinateSystem(0#).GetData

GetLocalCoordinateSystem still expects the x-location of the member, which has been set to 0.0 or the start here. In addition to the mentioned parameters, the material of the member is also required, which can be obtained via the cross-section of the member.

Dim selCrsc As RFEM5.CrossSection
selCrsc = iModData.GetCrossSection(selMem.StartCrossSectionNo, AtNo).GetData

Create Rib Surface

The program is initially created only for straight ribs on the positive z-side. Since the rib can also be at oblique planes, you should create the surface using the member orientation. The variable cosy for the local member axis system includes the direction vector for the local z-axis cosy.AxisZ with its three values, x, y, and z. This vector is normalized so that, multiplied by the height of the rib, it indicates the distance and direction of the bottom edge of the rib. For the boundary lines of the rib surface, this vector is multiplied by the rib height and added to the start and end nodes. This results in the two end nodes of the bottom edge line of the rib surface. Note the following: the rib height also includes half the surface thickness of the effective width. For simplification, only the surface thickness of the first side (-y in the local axis system) from the rib cross-section is used (UpperLeftFlangeThickness). After the nodes are available, you can generate the boundary...



;