CONM2 mass unit updation

Udhay Rohith
Udhay Rohith Altair Community Member
edited October 2020 in Community Q&A

Hello All,

 

I am doing LS Dyna to Nastran/Optistruct conversion job (Modal analysis set up only). I want to convert the CONM2 (mass)elements units (ton --> kg). Is there any easy and less time consuming way to do that (using Macro etc.,)?

 

Since this original LS Dyna version is created using some other software, the mass distribution is varying among the nodes (which means each node have different additional mass), I cannot able to update the mass elements with 1d--> masses-->update option (also there are more than 1000 mass elements)

 

Thanks,

Udhay

Answers

  • tinh
    tinh Altair Community Member
    edited September 2016

    Hi it's very easy

    file updatemassunit.tcl :

     

    *createmarkpanel elems 1 'Select mass elements:'

    *createmark elems 2 'by config' mass

    *markintersection elems 1 elems 2

    if {[set Total [hm_marklength elems 1]]} {tk_messageBox -message 'Mass not selected' -icon error; return}

    *entityhighlighting 0

    hm_blockmessages 1

    foreach MassId [hm_getmark elems 1] {

       hm_usermessage 'Updating [incr Count]/$Total ...'

       set Mass [hm_getentityvalue elems $MassId mass 0]

       set Mass [expr {1000*$Mass}]

       *createmark elems 1 $MassId

       *massmagnitudeupdate 1 $Mass 0

    }

    *entityhighlighting 1

    hm_blockmessages 0