Query Young's Modulus, Poisson's ratio in Ansys profile
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
Is there any way I can successfuly query all the attributes assigned to the material, irrespective of solver setings?
Thanks!
Answers
-
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
0 -
Hi
Query attribute name by
hm_attributelistall mats 3 name
0 -
@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
0 -
Altair Forum User 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
0 -
Altair Forum User 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.)
0 -
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.
0 -
Altair Forum User 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.
0