×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Scripts for merging instances in Abaqus and error 193

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:

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

The tuple of keys is different then that tuple that worked.

It should be no problem to create such a tuple that worked automatically.

RE: Scripts for merging instances in Abaqus and error 193

(OP)
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:

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) 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources