Jacobian check using macro

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi all

I am very new to tcl and macro making and was trying to create a macro for checking the jacobian.

Using the help file from hypermesh desktop reference guide this is what i did:

 


(Documents) 72 % *createmark elems 1 'displayed'

(Documents) 72 % *createmark elems 2

(Documents) 74 % *elementtestjacobian (elements,1,0.7,2,2,0,'jacobain')

 

this gives an error of 'unknown entity type found'.

 

so i tried doing this:

 


(Documents) 72 % *createmark elems 1 'displayed'

(Documents) 72 % *createmark elems 2

(Documents) 73 % *elementtestjacobian (elements, $1 ,0.7, $2 ,2,0,'jacobain')

 

but this gave an error of 'can't read 2 no such variable found'.

 

I have done exactly what was mentioned in help file then why I am getting error?

<?xml version="1.0" encoding="UTF-8"?>post-33620-0-24254900-1430727743_thumb.p

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2015

    Hi Bavana,

     

    Do you see 'xxx elements have selected' when you place the elements on the mark 1?

     

    Looks like the elements are not selected from the display.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2015

    It works no problem for me. 

    Here's my TCL script :


    *createmark elements 1 'displayed'
    *createmark elements 2
    *elementtestjacobian elements 1 0.7 2 2 1 '2D Element Jacobian'

    And I got the picture:

     

    <?xml version="1.0" encoding="UTF-8"?>post-889-0-75396200-1430732607_thumb.png

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2015

    Dear sir

    Thanks for the script you gave me. I guess the entire difference was of the brackets I was using which you didn't use. 

    The script is working perfect now.

    Thanks again.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2015

    Hi,

       How would I retrieve all the values in the check elems (warpage,aspect,skew, etc) in a variable

  • tinh
    tinh Altair Community Member
    edited December 2015

    Hi,

       How would I retrieve all the values in the check elems (warpage,aspect,skew, etc) in a variable

     

    Hi

    there is not direct command to return those values

    you can make a tcl script to append each value into the variable

    to retrieve each value, using hm_getentityvalue

    or you can make a template to write them to a file, and read it into the variable

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2015

     Hi,

     

       You can use [hm_get2delemchecktestval warpage2d] to get the values.