×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Python command to load temperature dependent material properties

Python command to load temperature dependent material properties

Python command to load temperature dependent material properties

(OP)
Hello all,

I want to input my material properties through my python script from a tabulated file (Located in C:/Temp/Steel.txt). The command needs a tweak after the table portion of the following command:

mdb.models[Modelname].materials[Steel].Elastic(table=((200000.0, 0.3, 20), ))

however I would need your help on how to solve my issue.

Thank you very much!

RE: Python command to load temperature dependent material properties

You have to fill something like this automatically:
mdb.models[Modelname].materials[Steel].Elastic(table=((200000.0, 0.3, 20), (180000, 0.28, 100)))


So you do it by replacing it with a variable:
mdb.models[Modelname].materials[Steel].Elastic(table=(x))

And now you have to create x to fit in there. x can be a list or a tuple. The content is number of tuples. So x looks like this:
x=[(E1,PR1,T1),(E2,PR2,T2)]


To get that you can create a list [E1,PR1,T1] and convert that afterward to a tuple. Now you can add that tuple to the list x.

RE: Python command to load temperature dependent material properties

(OP)
Thanks! Made it work this way... Took some time until I understand how tuples work....

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources