Orientation Vector for beam element - API

Creator
Creator

Hello everyone,

 

I have made some connections with help of The feMeshClosestLink method as you see below. The elements are created but it seems that it doesnt pick up the orientation vector. It is (0,0,0) when I list Element properties. What am I missing?

 

Thanks in advance,

 

/Adrian 

 

The HTML Clipboard

    Dim Beam_Prop As femap.Prop
    Set Beam_Prop = App.feProp
    Beam_Prop.type=FET_L_BEAM 'Beam
    Beam_Prop.matlID =Material_SS.ID
    Beam_Prop.title = "Doubling weld"
    Beam_Prop.flag(0)=False 'NOT tappered
    Beam_Prop.flagI(1)=5 'Circular Bar
    Beam_Prop.flagI(2)=1 'End A Original femap
    Beam_Prop.pval(40)=10
    Beam_Prop.ComputeStdShape(5,Beam_Prop.pval(40),0,0,True,True,False)
    Beam_Prop.Put(Beam_Prop.NextEmptyID)

Dim lineelement As femap.Elem Set lineelement = App.feElem lineelement.type=FET_L_BEAM lineelement.propID=Beam_Prop.ID lineelement.topology=0 lineelement.orientID=0 lineelement.MaterialAngleFlag=False lineelement.MaterialOrientType=0 lineelement.Put(lineelement.NextEmptyID)

App.Info_ActiveType( FT_ELEM )=lineelement.type
App.Info_ActiveID(FT_PROP)=lineelement.propID

Dim DOF(5) As Long DOF(0)=1 DOF(1)=1 DOF(2)=1 DOF(3)=1 DOF(4)=1 DOF(5)=1

Dim Orientationvector(2) As Double
Orientationvector(0)=0
Orientationvector(1)=0
Orientationvector(2)=1

App.feMeshClosestLink(NodesA.ID,NodesB.ID,3,Orientationvector,DOF,False)

4 REPLIES 4

Re: Orientation Vector for beam element - API

Siemens Phenom Siemens Phenom
Siemens Phenom

Use a Variant for the Orientation Vector and DOFs as shown below:

 

   Dim Beam_Prop As femap.Prop
    Set Beam_Prop = App.feProp
    Beam_Prop.type=FET_L_BEAM 'Beam
    Beam_Prop.matlID =Material_SS.ID
    Beam_Prop.title = "Doubling weld"
    Beam_Prop.flag(0)=False 'NOT tappered
    Beam_Prop.flagI(1)=5 'Circular Bar
    Beam_Prop.flagI(2)=1 'End A Original femap
    Beam_Prop.pval(40)=10
    Beam_Prop.ComputeStdShape(5,Beam_Prop.pval(40),0,0,True,True,False)
    Beam_Prop.Put(Beam_Prop.NextEmptyID)

Dim lineelement As femap.Elem Set lineelement = App.feElem lineelement.type=FET_L_BEAM lineelement.propID=Beam_Prop.ID lineelement.topology=0 lineelement.orientID=0 lineelement.MaterialAngleFlag=False lineelement.MaterialOrientType=0 lineelement.Put(lineelement.NextEmptyID)

App.Info_ActiveType( FT_ELEM )=lineelement.type
App.Info_ActiveID(FT_PROP)=lineelement.propID

Dim DOF(5) As Long
Dim DOFs as Variant DOF(0)=1 DOF(1)=1 DOF(2)=1 DOF(3)=1 DOF(4)=1 DOF(5)=1
DOFs = DOF

Dim Orientationvector(2) As Double
Dim Orientation as Variant

Orientationvector(0)=0
Orientationvector(1)=0
Orientationvector(2)=1
Orientation = Orientationvector

App.feMeshClosestLink(NodesA.ID,NodesB.ID,3,Orientation,DOFs,False)
Best Regards,
Chip Fricke
Principal Applications Engineer - Femap Product Development

Re: Orientation Vector for beam element - API

Siemens Phenom Siemens Phenom
Siemens Phenom

There is a bug in feMeshClosestLink( ) that is preventing the orientation vector from being properly set. It has been fixed and will be included in the V12.0.1 release in the near future. For now, about all you can do is use feMeshClosestLink( ) then assign the orientation to the elements after they are created using something like feModifyOrient( ) or retrieving the elements in an Element Object and setting each one.

 

In your case, adding code something like this around your call to feMeshClosestLink( ) should do the trick.  It just watches which elements were created and reapplies the same orientation vector to them.

The HTML Clipboard

  Dim t As femap.TrackData
    Set t = App.feTrackData

    Dim s As femap.Set
    Set s = App.feSet

    t.StartMesh()
    App.feMeshClosestLink(NodesA.ID,NodesB.ID,3,Orientationvector,DOF,False)

    t.Created( FT_ELEM, s.ID, True )
    s.Debug()
    App.feModifyOrient( s.ID, 1, 0, Orientationvector )

 

Sorry for the inconvenience.

Re: Orientation Vector for beam element - API

Siemens Phenom Siemens Phenom
Siemens Phenom

In my haste to send your reply, I missed turning off tracking in my sample... it should really have read...

 

The HTML Clipboard

    Dim t As femap.TrackData
    Set t = App.feTrackData

    Dim s As femap.Set
    Set s = App.feSet

    t.StartMesh()
    App.feMeshClosestLink(NodesA.ID,NodesB.ID,3,Orientationvector,DOF,False)

    t.Created( FT_ELEM, s.ID, True )
    t.StopAll()
    App.feModifyOrient( s.ID, 1, 0, Orientationvector )

Re: Orientation Vector for beam element - API

Creator
Creator

Thanks!