ABAQUS-Python : cyclic application of 3 static steps
ABAQUS-Python : cyclic application of 3 static steps
(OP)
plain and simple: I have 3 seperate Static steps (each with their own loading conditions) and I want ABAQUS to run them in a loop for 50 times. how can I get this done?! i.e. step1,step2,step3,step1,step2,step3,...
more info: each step should be run for 1 increment, so the whole analysis should be done in 150 increments. this seems irrelevant but I am running urdfil and usdfld subroutines on this model.
to solve this problem for 5 loops (15 increments) , i have written a python script that creates 15 seperate steps. but for 150 steps, that approach does not seem optimized and will lead to big file size (150steps, 150loadings) so i am looking for a better approach.
my previous approach:
this python script (1) creates 15 static steps (2) copies the 3 seperate loadings into desires step (3) deactivates the load in the next step
result:

this approach works but it is not practical for 150 steps. so i am looking for a way to creat 3 steps and run them in a loop.
any help is appreciated.
more info: each step should be run for 1 increment, so the whole analysis should be done in 150 increments. this seems irrelevant but I am running urdfil and usdfld subroutines on this model.
to solve this problem for 5 loops (15 increments) , i have written a python script that creates 15 seperate steps. but for 150 steps, that approach does not seem optimized and will lead to big file size (150steps, 150loadings) so i am looking for a better approach.
my previous approach:
this python script (1) creates 15 static steps (2) copies the 3 seperate loadings into desires step (3) deactivates the load in the next step
CODE --> Python
for i in range(15):
mdb.models['Model-1'].StaticStep(amplitude=STEP, maxNumInc=1, name='Steps-%d'%(i+1),
noStop=OFF, previous='Steps-%d'%(i), timeIncrementationMethod=FIXED)
for i in range(5):
mdb.models['Model-1'].Load(name='Load-1-%d'%(i+1), objectToCopy=
mdb.models['Model-1'].loads['Load-1'], toStepName='Steps-%d'%(3*i+1))
mdb.models['Model-1'].loads['Load-1-%d'%(i+1)].deactivate('Steps-%d'%(3*i+2))
mdb.models['Model-1'].Load(name='Load-2-%d'%(i+1), objectToCopy=
mdb.models['Model-1'].loads['Load-2'], toStepName='Steps-%d'%(3*i+2))
mdb.models['Model-1'].loads['Load-2-%d'%(i+1)].deactivate('Steps-%d'%(3*i+3))
mdb.models['Model-1'].Load(name='Load-3-%d'%(i+1), objectToCopy=
mdb.models['Model-1'].loads['Load-3'], toStepName='Steps-%d'%(3*i+3))
mdb.models['Model-1'].loads['Load-3-%d'%(i+1)].deactivate('Steps-%d'%(3*i+4)) result:

this approach works but it is not practical for 150 steps. so i am looking for a way to creat 3 steps and run them in a loop.
any help is appreciated.





RE: ABAQUS-Python : cyclic application of 3 static steps
*********************************************************
Are you new to this forum? If so, please read these FAQs:
http://www.eng-tips.com/faqs.cfm?fid=376
http://www.eng-tips.com/faqs.cfm?fid=1083
RE: ABAQUS-Python : cyclic application of 3 static steps
RE: ABAQUS-Python : cyclic application of 3 static steps
IceBreaker,
I don't think I can, cuz I need the subroutines to do their thing after each loading, so having several steps is unavoidable as subroutines only run after each step.
btw i saw you were wondering why does usdfld run twice after each step. could you find the answer? it is really annoying and leads to a number of complications.
Mustaine3,
could you please explain more about "creating the 49 cycles on ASCII level with Python" ?
I am not very experienced with python, do you mean what I did above? or something else?
thanks
RE: ABAQUS-Python : cyclic application of 3 static steps
I am not sure what having steps has to do with *Amplitude. Back when I was a power user of Abaqus, I ran some models with hundreds of steps in them with/without subroutines.
*********************************************************
Are you new to this forum? If so, please read these FAQs:
http://www.eng-tips.com/faqs.cfm?fid=376
http://www.eng-tips.com/faqs.cfm?fid=1083
RE: ABAQUS-Python : cyclic application of 3 static steps
No, I mean something else.
When you write out the Input File from A/CAE to you hard disk, then you can open that file with an ASCII-editor to see the Abaqus keyword. Then you could modify the file and submit it with a command line to the solver.
Python has nice capabilities to modify ASCII files, so this is an option. Every Python tutorial explains how to read text from a file, work with that and write it back or in a new ASCII file.
RE: ABAQUS-Python : cyclic application of 3 static steps
what I meant was: even though the *amplitude may help with the high number of loadings, it still won't help me get rid of 150 time steps! I am trying to find a way to cycle through those 3 step; if so, then no need to define 150loads or use *amplitude.
I have to add: But if I don't find a way and I am forced to define 150 steps, then using the *amplitude is a better idea than what I did above, I will surely use it, thanks.
yes it is really annoying, given the fact that I am using 100s of increments and each for 1 iteration, then every increment calls usdfld twice literally! (but not urdfil)
if you have something like i=i+1 in your routine (and "i" is defined in a seperate module), it will be increased by 2 every increment! and this will cause convergence issues. I have worked my way around this problem, but this may a pitfall to many users. tnx for your comment.
Mustaine,
I think this is the solution I am looking for.
I tried to add a few python commands to the *.inp file (adding a "for" loop before "step") but abaqus didn't run it, so i guess this is not as simple as it looks.
Just to get me started, would you please tell me which one of the input files (if not *.inp) is the one I have to edit? (file format?)
Does abaqus help documentation hold any section about this approach and the python commands we can use?
tnx
RE: ABAQUS-Python : cyclic application of 3 static steps
Noooo! An Abaqus input file is no python script. It has it's own format and commands, that have nothing to do with python.
I mean you can use a python script to manipulate this file or create a second file with Abaqus commands and link it to the first one.
The Abaqus Users Manual and Keyword Reference Manual have information about the Abaqus commands and format.