Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Writing the inp file?

Status
Not open for further replies.

rmettier

Geotechnical
Oct 6, 2006
63
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
 
Replies continue below

Recommended for you

Check out Section 23.4.2 of the Abaqus Scripting Reference Manual (Job commands)
 
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.
 
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?
 
Dear rmettier

I believe the correct script in your case should be:

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

I hope this helps

bfillery
 
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.
 
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? ;)
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor