Scripts for merging instances in Abaqus and error 193
Scripts for merging instances in Abaqus and error 193
(OP)
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:
I have tried also the following script:
In both cases, I get this error when the merging should happen and Abaqus crashes:
If I do not use tuple and I specify all the single instance names, everything runs fine:
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:
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.
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:
CODE --> 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:
CODE --> 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 --> DOS
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:
CODE --> 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 --> DOS
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.





RE: Scripts for merging instances in Abaqus and error 193
It should be no problem to create such a tuple that worked automatically.
RE: Scripts for merging instances in Abaqus and error 193
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:
CODE --> 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)