In order to create a nonlinear element, such as a member end release with a diagram or failure, it is necessary to create the member end release first. If RFEM knows the member end release, it can be obtained using the IMemberEndRelease interface. This interface uses the methods GetData() and SetData(). Both methods are able to read out or write simple member end release data of the MemberEndRelease type as well as the nonlinearity data.
In the following example, the release is first activated for the x-direction in the member end release, then the WorkingDiagramType is set as the nonlinearity in the x-direction. After transferring these data to RFEM using the Prepare-Finish-Modification block, it creates the nonlinearity internally. To enter the data, the existing data are first obtained from the interface of the member end release using GetData().
After entering the data (NonlinearityDiagram), it is transferred again using SetData():
Sub SetNLDiagram()
Dim model As RFEM5.modelSet model = GetObject(, "RFEM5.Model")
On Error GoTo e
Dim iApp As RFEM5.ApplicationSet iApp = model.GetApplication
iApp.LockLicenseiApp.Show
Dim iModelData As RFEM5.iModelDataSet iModelData = model.GetModelData
' modify member end release' set nonlinearity "Diagram" for x translationDim iMemHing As RFEM5.IMemberHingeSet iMemHing = iModelData.GetMemberHinge(1, AtNo)
Dim memHing As RFEM5.MemberHingememHing = iMemHing.GetData()memHing.TranslationalConstantX = 0memHing.TranslationalNonlinearityX = WorkingDiagramType
' Set new dataiModelData.PrepareModificationiMemHing.SetData memHingiModelData.FinishModification
' create diagramDim tbl1() As DoubleReDim tbl1(1, 1)tbl1(0, 0) = 0 ' u-xtbl1(0, 1) = 0 ' P-x
tbl1(1, 0) = 0.02 ' u-x (mm)tbl1(1, 1) = 2000 ' P-x (N)
Dim nldHing As RFEM5.NonlinearityDiagramnldHing.ForceType = StiffnessDiagramForceType.NoneStiffnessForcenldHing.PositiveZoneType = DiagramAfterLastStepType.TearingDiagramTypenldHing.PositiveZone = tbl1nldHing.Symmetric = True
Dim iNldiag As RFEM5.INonlinearityDiagramSet iNldiag = iMemHing.GetNonlinearity(AlongAxisX)
' Set new dataiModelData.PrepareModificationiNldiag.SetData nldHingiModelData.FinishModification
e: If Err.Number <> 0 Then MsgBox Err.description, , Err.Source
model.GetApplication.UnlockLicense
End Sub
The procedure is similar for nodal supports and other nonlinearities.