Jump to content
Sign in to follow this  
Roshan Shiveshwar

Query Young's Modulus, Poisson's ratio in Ansys profile

Recommended Posts

Hi ,

 

I am trying to query  Young's Moduls, Poisson's ratio of a material Ansys profile.

The following command doesn't seem to work - 

        set E [hm_getvalue materials id=$mat_id dataname=E];
        set Nu [hm_getvalue materials id=$mat_id dataname=Nu];

 

I also tried the following

image.png.d2c003d16a153519666ae313d8f32f3b.png

 

Is there any way I can successfuly query all the attributes assigned to the material, irrespective of solver setings?

 

Thanks!

Share this post


Link to post
Share on other sites

@tinh: on my 2019.1 Hypermesh, this command does not work. In the help I see:

hm_attributelistall

Returns a list of all attribute IDs, names, types or type names for the current template.

Syntax : hm_attributelistall value

Type : HyperMesh Tcl Query

Description : Returns a list of all attribute IDs, names, types or type names for the current template.
Inputs

value
    The type of list to return. Valid values are: 
    id - the attribute ID 
    name - the attribute name 
    type - the attribute type number 
    typename - the attribute type string

 

Share this post


Link to post
Share on other sites
1 minute ago, Q.Nguyen-Dai said:

@tinh: on my 2019.1 Hypermesh, this command does not work. In the help I see:


hm_attributelistall

Returns a list of all attribute IDs, names, types or type names for the current template.

Syntax : hm_attributelistall value

Type : HyperMesh Tcl Query

Description : Returns a list of all attribute IDs, names, types or type names for the current template.
Inputs

value
    The type of list to return. Valid values are: 
    id - the attribute ID 
    name - the attribute name 
    type - the attribute type number 
    typename - the attribute type string

 

 

I think he meant

hm_attributelist mats 3 name

 

Share this post


Link to post
Share on other sites
On 2/7/2020 at 7:23 PM, Q.Nguyen-Dai said:

Which "Card image" do you use for your material?  If you use "MATERIAL", you can try:

 


hm_getvalue mat id=1 dataname=MP_EX_VAL2

 

 

Thanks Q.Nguyen-Dai !

If the profile was Abaqus, I believe I have to use the following:

hm_getvalue mat id=1 dataname=Young

Now, since I want to write a code which is profile independent, I am wondering if there is a generic query command. (Atleast for basic properties such as Density, Young's modulus, Poisson's ratio etc.)

 

Share this post


Link to post
Share on other sites

Yes, I am sorry for the mistake!

I mean hm_attributelist mats 3 name

 

@Roshan Shiveshwar if you want a generic way, you will have to filter tokens like E , young in attrib names

As i see, attrib names of profiles are not same. That means you should store them in a dict. 

 

Share this post


Link to post
Share on other sites
1 hour ago, tinh said:

Yes, I am sorry for the mistake!

I mean hm_attributelist mats 3 name

 

@Roshan Shiveshwar if you want a generic way, you will have to filter tokens like E , young in attrib names

As i see, attrib names of profiles are not same. That means you should store them in a dict. 

 

Yes. Even I felt the same. Create a custom library of required attrib names and use them as needed.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...