Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with an easy script

Status
Not open for further replies.

pitagoras15

Industrial
Oct 2, 2014
16
Hi there,

I need some help with a project that I am involved in. It is the study of the heat transfer of a drilling. I need to make a script that make a simulation of the heat transfer while the drill goes into the piece. (See the image to understand)

I have already done the first simulation, and with it, I have created a .py as ordered as I could. What I need now is to know how to create a loop of this job, making each one deeper. I think is easy, but I can't find any information about this. I read PYTHON SCRIPTS FOR ABAQUS LEARN BY EXAMPLE, but the preview version is not enough for what I want.

If anybody could say me anywhere I can find information, or any similar example, It would be really helpful to me. If anybody have any idea of how to solve it, even better of course.

I upload an image of what I need to do and I also attach the .py file of the first simulation.

Thanks very much for reading this.

iqt9TXFgj
 
Replies continue below

Recommended for you

Hi,

In your newly created script for the first simulation, all you have to do is replace the depth information in the geometry as a parameter. Then using different values for that parameter manually, or iterating in a loop, you will create multiple input files. And then you can submit all those together.

Regards
 
Hi,

Thanks for your reply. The problem is that I don't know how to do a loop and I don't know how to name parameters to the depth information. Do you know any example I could use to see how it is done?

Regards.
 
Hi,

I do know how to parameterice the coordinates for the deepness, but I do not know how to do it for for example the name of the job, that should be changing like: job1, job2, job3... Also, I need to know how to do it with the Model name. Do you know what I mean?

Regards.
 
You can always put everything inside a loop, an example for three depths:

depths = [d1,d2,d3]
for n in range(3):
depth = depths[n]​
jobname = 'job-' + str(n+1)​
<Your code, replacing the appropriate parameters>​

I did (n+1) because "n" will start at 0.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor