1

I am running a 3D solid model in Abaqus Python script, which is supposed to be analyzed for 200 times as the model has been arranged in a for loop (for i in range(0,199):). Sometimes, I receive the following error and then the analysis terminates. I can't realize the reason.

Odb_0=session.openOdb(name='Job-1'+'.odb')

odberrror: the .lck file for the output database D:/abaqus/Model/Job-1.odb indicates that the analysis Input File Processor is currently modifying the database. The database cannot be opened at this time.

It is noted that all the variables including "Odb_0" and .... are deleted at the end of each step of the loop prior to starting the further one.

James Z
  • 12,209
  • 10
  • 24
  • 44
  • do you keep reopening your session, can you post more code? – Anna Semjén Dec 11 '20 at 17:26
  • Many thanks for your notice. After a lot of try and errors, I found out that in some iterations with randomly generated input values, some of the mesh elements (Hex) fail for no apparent reason. So, in such conditions, I decided to employ Tet mesh elements instead, despite the fact that it can introduce some approximations to our analyses. This approach solved the previous issue although the following error is received only in few further iterations: "VisError: No xy data was extracted using the provided options." – Mohsen Abyani Dec 12 '20 at 18:05
  • @Mohsen Abyani You might have no ODB data loaded or you did not define/set up the output while building your model. as an example, I usually get VisError, when I try to extract some data about the connectors, but the connector output was not defined in the pre-processing stage. – Mike Mar 10 '21 at 07:28

2 Answers2

1

I don't believe your problem will be helped by a change in element type.

The message and the .lck file say that there's an access deadlock in the database. The output file lost out and cannot update the .odb database.

I'm not sure what database Abaqus uses. I would have guessed that the input stream would have scanned the input file and written whatever records were necessary to the database before the solution and output processing began.

duffymo
  • 305,152
  • 44
  • 369
  • 561
0

From the Abaqus documentation

The lock file (job_name.lck) is written whenever an output database file is opened with write access, including when an analysis is running and writing output to an output database file. The lock file prevents you from having simultaneous write permission to the output database from multiple sources. It is deleted automatically when the output database file is closed or when the analysis that creates it ends.

When you are deleting your previous analysis you should be sure that all processes connected with that simulation have been terminated. There are several possibilities to do so:

  • Launching simulation through subprocess.popen could give you much more control over the process (e.g. waiting until it ends, writing of a specific log, etc.);
  • Naming your simulations differently (e.g. 'Job-1', 'Job-2', etc.) and deleting old ones with a delay (e.g. deleting 'Job-1' while 'Job-3' has started);
  • Less preferable: using the time module
Roman Zh.
  • 985
  • 2
  • 6
  • 20
  • Thanks for your notices. I think naming the job of each simulation differently (e.g. 'Job-1', 'Job-2', etc.) and deleting each one at the end of each step helped me solve the problem. – Mohsen Abyani Dec 15 '20 at 18:06
  • Could you accept the answer in this case? – Roman Zh. Dec 16 '20 at 10:53