×
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

writing script for multiple steps

writing script for multiple steps

writing script for multiple steps

(OP)
hey guys,
I have written a script to create multiple SETS and I am now trying to do the same for STEPS. my first issue is that when creating a STEP, it requires a previous step. If i am creating a loop, I do not know how to get around this. So to create a step, starting from being named "line11" to "line30" I incorrectly have been using the code -

>>> setLabel = "line"
>>> elementLabel = 11
>>> labelLimit = 30
>>> for i in range(elementLabel, labelLimit+1):
... mdb.models["120708_validate"].HeatTransferStep(name=setLabel+str(i), previous="line 10", response=(TRANSIENT), timePeriod=5, maxNumInc=1000000, initialInc=0.001, minInc=.000001, deltmx=1)

but every time that loops, it puts the new value in front of line10, meaning that the order actually goes backwards, i.e.
Step10
Step30
Step29
Step28 and so on

So I need to create a script that puts it in the correct order.

Additionally, i need to create a script that allows the step loop to include two types of steps. My problem i am modelling in abaqus is a heat transfer issue and I need to turn on element sets as I go, so ideally I need to create a looping or ordering system that lets me go

"turn on line10"
"line10"
"turn on line 11"
"line11" and so on with each of these commands having different properties.

If you guys need anything clarifying please let me know because I know I can be unclear!

Thanks
Tim

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