×
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 the inp file?

Writing the inp file?

Writing the inp file?

(OP)
Hi

A seemingly simple question this time, but the manual isn't being helful today:
I have a script that imports some geometry into Abaqus CAE, generates the necessary meshes, materials, interactions, etc. Generally right down to the point where I only have to submit the job.
Now I'd like the script to write out the inp file, like I can do from the menu in CAE. But this action isn't recorded in the rec file. I'm sure there's a scripting command to write an input file for a given model or job, but I can't seem to find it.

Thanks in Advance

RE: Writing the inp file?

Check out Section 23.4.2 of the Abaqus Scripting Reference Manual (Job commands)

RE: Writing the inp file?

(OP)
23.4.2 is about setValues(...) and BodyConcentrationFlux objects, no trace of Job commands.

However, thanks to your hint, I was able to locate '22.1.6 writeInput()', which I suspect is exactly what I was looking for. Thanks.

I suspect the discrepancy stems from us looking at two different versions. I was referring to the 6.5 Manual.

RE: Writing the inp file?

(OP)
Ok, so writeInput() seems to be the correct method, by I have no clue how the syntax should look. The manual doesn't give any usage example.
I've tried:

mdb.Job['Job-1'].writeInput()

with Job-1 being the name of my test job, but it only produces an error:

TypeError: unscriptable object

If I click 'Write Input' in the job manager, the .inp file is written without any problems. Can someone show me what I'm doing wrong?

RE: Writing the inp file?

Dear rmettier

I believe the correct script in your case should be:

mdb.jobs['Job-1'].writeInput()

I hope this helps

bfillery

RE: Writing the inp file?

In general, after you perform some function in CAE, you can look at the end of the abaqus.rpy file to see the syntax of the command that performs that function.

RE: Writing the inp file?

rmettier,
As a guide, methods such as "Job" that have a capital letter  are constructors. The writeInput() method operates on an object which you have to reference from a container, which in general is lowercase and plural "jobs"... Perhaps this makes sense? ;)

RE: Writing the inp file?

(OP)
It works! Thank you all. I was almost there, but got lost in the capitals and lowercases.
Having a short, one line, example of the syntax in the manual would be a great help sometimes.

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