Skip to main content

Merging with Scripts in Abaqus

Submitted by Barlume on

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:

[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)[/code]

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)                        [/code]

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.[/code]

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)[/code]

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.[/code]

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.

 

I found the error.
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)[/code]

Fri, 11/06/2015 - 06:22 Permalink