1215x
004484
2020-07-07

面应力(通过 RF-COM)

如何通过RF-COM显示面的应力?


回复:

通过COM 接口可以显示面的应力。 Zuerst braucht man das Interface zum Modell (IModel) und danach das Interface zur Berechnung (ICalculation2). Über dieses Interface kann dann das Interface für die Ergebnisse (IResults2) geholt werden:

Sub stresses_surfaces_example()
Dim iApp As RFEM5.Application
Dim iModel As RFEM5.model
Set iModel = GetObject(, "RFEM5.Model")

On Error GoTo E

If Not iModel Is Nothing Then
    '   get interface from model
    Set iApp = iModel.GetApplication
    iApp.LockLicense
    
    '   get interface from calculation
    Dim iCalc As RFEM5.ICalculation2
    Set iCalc = iModel.GetCalculation
    
    '   get interface from results from loadcase 1
    Dim iRes As RFEM5.IResults2
    Set iRes = iCalc.GetResultsInFeNodes(LoadCaseType, 1)
    
    '   get equivalent stresses
    Dim str_equ() As RFEM5.SurfaceEquivalentStresses
    str_equ = iRes.GetSurfaceEquivalentStresses(1, AtNo, VonMisesHypothesis)
    
End If

E:
If Err.Number <> 0 Then
    MsgBox Err.Number & " " & Err.description
End If

If Not iApp Is Nothing Then
    iApp.UnlockLicense
End If

Die Funktion GetSurfaceEquivalentStresses verlangt die Angabe der Berechnungshypothese. Im obigen Fall werden die Ergebnisse der von-Mises-Spannung ausgelesen. Zu beachten ist, dass die COM-Schnittstelle hier SI-Einheiten verwendet, sodass die Spannung in N/m² übergeben wird.


作者

Günthel 先生为Dlubal 软件客户提供技术支持。

链接
下载


;