×
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

Help with an easy script

Help with an easy script

Help with an easy script

(OP)
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.

RE: Help with an easy script

(OP)

RE: Help with an easy script

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

RE: Help with an easy script

(OP)
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.

RE: Help with an easy script

(OP)
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.

RE: Help with an easy script

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.

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