Cancel
Showing results for 
Search instead for 
Did you mean: 

Local Material/Element Coordinate System Question for Contoured/Elliptical Meshes

Experimenter
Experimenter

Hi all,

 

I am analyzing an ellipctical composite structure in FEMAP, I need to have local coordinate element coordinate systems that follow the contour of the part so I can interpret my results. From what I remember in NX Simcenter there is a way to create local element coordinate systems following the contour of a part quite easily with just a few clicks, but I am not sure how to do this in FEMAP. Right now, the only way I know to solve this problem is an imperfect solution of creating a bunch of manual cylindrical coordinate systems to use, which would be difficult and timeconsuming(Not to mention not completely correct).

 

Does anyone know of a better way to do this? I am imagining a function where you define a curve or the surface and then FEMAP auto-generates a coordinate system for each individual element, but nothing like that may exist.

4 REPLIES
Highlighted

Re: Local Material/Element Coordinate System Question for Contoured/Elliptical Meshes

Siemens Phenom Siemens Phenom
Siemens Phenom

It sounds like you have underlying geometry that you would like to align the element material direction with either the U or V direction of these surfaces.  This API will prompt you for surfaces, and then a Yes/No Question that corresponds to U or V.  It then updates the Material Angle of every 3, 4, 6, or 8 noded shell attached to those surfaces to those U or V directions -

 

The HTML Clipboard

Sub Main
    Dim App As femap.model
    Set App = feFemap()

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

    Dim alignU As Boolean

    Dim feSurf As femap.Surface
    Set feSurf = App.feSurface

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

    Dim feElem As femap.Elem
    Set feElem = App.feElem

    Dim elCG As Variant

    Dim uVec As Variant
    Dim vVec As Variant

    Dim u As Double
    Dim v As Double

    If suSet.Select( FT_SURFACE, True, "Pick Surface(s) to Align Attached Shell Material Angles") = FE_OK Then

        If MsgBox( "Yes for U Direction, No for V", vbYesNo) = vbYes Then
            alignU = True
        Else
            alignU = False
        End If

        While feSurf.NextInSet( suSet.ID ) = FE_OK
            elSet.Clear
            elSet.AddRule( feSurf.ID, FGD_ELEM_ATSURFACE)
            feElem.Reset
            While feElem.NextInSet( elSet.ID) = FE_OK
                If feElem.topology = FTO_TRIA3 Or feElem.topology = FTO_TRIA6 Or feElem.topology = FTO_QUAD4 Or feElem.topology = FTO_QUAD8 Then
                    If feElem.GetCentroid( elCG ) = FE_OK Then
                        If feSurf.XYZToParam( elCG, u, v ) = FE_OK Then
                            If feSurf.Tangents( u, v, uVec, vVec ) = FE_OK Then
                                If alignU Then
                                    App.feModifyMaterialAngle( -feElem.ID, 1, uVec, 0, 0, 0.0 )
                                Else
                                    App.feModifyMaterialAngle( -feElem.ID, 1, vVec, 0, 0, 0.0 )
                                End If
                            End If
                        End If
                    End If
                End If
            Wend
        Wend
    End If
End Sub

Re: Local Material/Element Coordinate System Question for Contoured/Elliptical Meshes

Experimenter
Experimenter

Thanks for the reply. Yes that is exactly what I am trying to do and your API would be perfect if it weren't for the fact that I created my brick elements from a swept set of plane elements, so they are not attached to any surfaces. 

Re: Local Material/Element Coordinate System Question for Contoured/Elliptical Meshes

Creator
Creator

Hi,

you can assign material direction to elements directly  without associativity with surfaces.

Then simply transform results into material direction to get additional output vectors.

Additional_outVec_Material_dir_.pngResults for elements after transformationDisplay_Material_dir_.pngShow material directionsMaterial_dir_reansform.pngAssign material direction to elements

Tadeusz

Re: Local Material/Element Coordinate System Question for Contoured/Elliptical Meshes

Experimenter
Experimenter

Yes I am aware you can do that. No coordinate system I could assign to the material would accurately define the elliptical shape though, so I would have to manually create coordinate systems for each row of elements which would be time consuming and I was trying to see if there was an easier way. Also, your method only works for plate elements and I am working with bricks. I may rebuild my part based off surfaces and see if that API works.