timslings
Materials
- Jul 15, 2012
- 1
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
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