How to assign 1 property per 1 element in Hypermesh?

Nik
Nik Altair Community Member
edited February 2024 in Community Q&A

Hello all.

I have a model with properties assigned to groups of elements: 1 property per several elements.

Is it possible to split these properties as follows:

1 element - 1 property.

Element ID = property ID.

 

I suppose it can be done using some scripts.

Or even the way using Excel import \ export will be helpful.

Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited July 2020

    How many elements do you have in your model?

     

  • Adriano_Koga
    Adriano_Koga
    Altair Employee
    edited July 2020

    it would be possible to create a script, for that, but maybe excel or some text editor would be enough depending on what you already have.

    I'm attaching a similar script, not completed, that does something similar to your request, if I remeber correclty.. 

     

     

     

    Unable to find an attachment - read this blog

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited July 2020

    Try this code:

     foreach eid $elemList { 	#creat property with pid=eid 	*setvalue elems id=$eid propertyid=$pid }

     

  • Nik
    Nik Altair Community Member
    edited July 2020

    How many elements do you have in your model?

     

    ~8000 elements and ~100 properties

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited July 2020

    How to assign 100 prop to 8000 elems? Based on some criteria ?

     

  • Nik
    Nik Altair Community Member
    edited July 2020

     

     

    Thank you.

    Now I can split all properties in a way that each element has its own property.

    So I have like 10000 properties. This is what I need.

    But I still don't know how to assign to each property ID of an element inside this property.

    Now I have Prop ID = 1 with Element ID = 2000 in it.

    My goal to have Prop ID = 2000 with element ID = 2000.

     

     

     

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited July 2020

    If you want to assign property ID=2000 to element ID=2000 AND if all properties exist already, use my following code:

     *createmarkpanel elements 1 'Select elements' set elemList [hm_getmark elements 1]  foreach eid $elemList {     *createmark props 1 $eid     set propList [hm_getmark props 1]     if { [llength $propList] == 1 } { 	   *setvalue elems id=$eid propertyid=$eid     } else {        puts 'Prop ID=$eid does not exist!'     } }

     

  • Nik
    Nik Altair Community Member
    edited July 2020

    It's almost what I need, but I have 2000 elements in ID range 10000 - 12000 (example) AND 2000 properties with ID range 1 - 1999.

    Element #10000 has property with ID = 23.

    Goal is to renumber current element property with ID of the element.

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited July 2020

    You can use 'Tool' => Renumber => Property,

    but this automatical method is dangereous and you can get wrong results with element.

    What's the difference between Prop 1 & Prop 2, shell thickness? Your elements are shell type?

     

  • Nik
    Nik Altair Community Member
    edited July 2020

    I have 3 elm types. 

    Crod/Cbar and Cshell.

    I did try Renumber tool, but in my case it's too time consuming to renumber properties 1 by 1.

     

    As I can see the process:

    1) choose element

    2) check the property assigned to this element

    3) now we have element ID and property ID.

    4) set property ID = element ID - where I stuck.

     

    But, as I understand there are 2 ID types in HM: solver ID and HM internal ID. 

    I tried *renumbersolverid properties 1 $elem_id 1 0 0 0 0 0 as it in command.tcl, but it doesn't work properly.

     

     

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited July 2020

    It's not a good idea to work on numbering (ID) of element/prop.

    You have to found another method: element type, thickness, location,... maybe in combining with element sets,...etc.

  • tinh
    tinh Altair Community Member
    edited July 2020

    In nastran, PID is equal EID by default if you don't assign property to element

    Don't use *commands in long 'for' loops, use 'puts' to write property cards to a file then import that file, it just takes a few seconds.

     

  • Nik
    Nik Altair Community Member
    edited July 2020

    Ok. Thank you for the help.

    I did what I want. 

    My script is attached.

     

    1) choose element

    2) store elem ID and prop ID

    3) create new property with PID = EID and Pname = EID

    4) update new property with stored data from old prop

    5) assign new property to element

    Unable to find an attachment - read this blog

  • RR FlightStuct
    RR FlightStuct New Altair Community Member
    edited February 2024

    You can do this using the Aerospace Tool. First you need to activate the tool by going to Preferences-User Profiles, on the box, select Aerospace Tool, then OK. The tool will now appear on the top bar.

    Next select Aerospace-Spatial ID manager-Property by Element ID

    Select the elements or all elements and proceed. A bit late but hope it 's useful

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.