Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Scripts for merging instances in Abaqus and error 193 1

Status
Not open for further replies.

barlume

Aerospace
Joined
Jun 10, 2015
Messages
15
Location
AU
I am writing a script to create a parametric analysis of my model.
My problem is that it is composed by many different unit cells, so I need to merge all of them in an automatic way through the script.

I am using this script:

Python:
a = mdb.models.rootAssembly
SingleInstances_List = mdb.models.rootAssembly.instances.keys()
SingleInstances_Tuple=tuple(SingleInstances_List)
a.InstanceFromBooleanMerge(name='Single_Unit', instances=SingleInstances_Tuple, mergeNodes=ALL,
                                    nodeMergingTolerance=0.1, domain=MESH, originalInstances=SUPPRESS)

I have tried also the following script:

Python:
a.InstanceFromBooleanMerge(name='SingleUnit', instances=([a.instances[SingleInstances_List[i]]
    for i in range(len(SingleInstances_List))], ), mergeNodes=ALL,                            
    nodeMergingTolerance=0.1, domain=MESH, originalInstances=SUPPRESS)

In both cases, I get this error when the merging should happen and Abaqus crashes:

Code:
Unexpected LoadLibraryA error 193
GUI detected error while waiting for ipc connection to close.
Unexpected LoadLibraryA error 193
Abaqus Error: Abaqus/CAE Kernel exited with an error.

If I do not use tuple and I specify all the single instance names, everything runs fine:

Python:
a.InstanceFromBooleanMerge(name='SingleUnit', instances=(
                                    a.instances['UnitCell_Centre-1'], a.instances['Back_Surface-1'],
                                    a.instances['Front_Surface-1'], a.instances['UnitCell_Centre-1-lin-2-1'],
                                    a.instances['UnitCell_Centre-1-lin-3-1'], ), mergeNodes=ALL,
                                    nodeMergingTolerance=0.1, domain=MESH, originalInstances=SUPPRESS)

The problem is that I would like to be able to change the number of unit cells for doing also some parametric analyses.

Even if I try to run the model without the GUI, I have a similar error:

Code:
Unexpected LoadLibraryA error 193
Abaqus Error: cae exited with an error.

Is there any mistake I should correct?
Is it a problem of my computer?

Thank you very much!

Gabriele

Ps. I have also installed Parallel studio, but if I start Abaqus and run the script without it, I get the same error.

EDIT: I edited the topic to make it more readable.
 
The tuple of keys is different then that tuple that worked.

It should be no problem to create such a tuple that worked automatically.
 
I agree with you Mustaine.
I was just too tired and had too many things to do.
Luckily today I found the error in 5 minutes just checking it again.

Just a comma...

The second method gave the same results as the last one, except for a comma and a square parenthesis.
While the second one was not important, the comma made Abaqus crash...

I hope this thread may be useful to other people!

The correct solution for merging all the parts in an assembly, then, is the following:

Python:
a = mdb.models.rootAssembly
SingleInstances_List = mdb.models.rootAssembly.instances.keys()
a.InstanceFromBooleanMerge(name='SingleUnit', instances=([a.instances[SingleInstances_List[i]]
    for i in range(len(SingleInstances_List))] ), mergeNodes=ALL,                            
    nodeMergingTolerance=0.1, domain=MESH, originalInstances=SUPPRESS)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top