KristofferC / Phon

Insert cohesive elements between grains in microstructures
MIT License
29 stars 19 forks source link

Error while exporting cohesive elements in a hexahedral mesh #10

Closed SagarChandra closed 8 years ago

SagarChandra commented 8 years ago

Dear Proff. Kristoffer,

Congratulations for such a nice code, Phon! While exporting cohesive elements using a .inp file from Neper, i get the following error:-

from phon.io.read.read_from_abaqus_inp import read_from_abaqus_inp from phon.mesh_tools.create_cohesive_elements import create_cohesive_elements from phon.io.write.export_to_abaqus import export_to_abaqus mesh = read_from_abaqus_inp("cube_10grains.inp") create_cohesive_elements(mesh, mesh_dimension=3) export_to_abaqus("cohesive.inp", mesh, write_2d_elements=False) Traceback (most recent call last): File "", line 1, in File "phon/io/write/export_to_abaqus.py", line 79, in export_to_abaqus (element_dictionary_inverse[(element_type, "abaqus")] in elements_1d)): KeyError: ('CPE4', 'abaqus')

I am attaching the .inp file which contains hexahedral elements. Am i making some mistake in exporting?

Many thanks for your time. cube_10grains.txt

KristofferC commented 8 years ago

The reason for this is that I don't think abaqus has any quadrilateral cohesive elements so I haven't added any element name to export it to. Do you have any documentation about quadrilateral cohesive elements in Abaqus?

SagarChandra commented 8 years ago

Dear Proff.,

The documentation of Abaqus 6.10 displays Abaqus's capability of inserting quadrilateral cohesive elements:-

http://abaqusdoc.ucalgary.ca/books/usb/default.htm?startat=pt01ch02s02aus10.html#usb-int-ielement-cohesive

Input File Usage: Use the following option to specify the element number and the nodes that define the element:

_ELEMENT http://abaqusdoc.ucalgary.ca/books/key/key-link.htm#usb-kws-melement, TYPE=_name*

For example, the following lines create COH3D8 element number 11 that has node numbers 1, 2, 3, 4, 1001, 1002, 1003, and 1004:

_ELEMENT http://abaqusdoc.ucalgary.ca/books/key/key-link.htm#usb-kws-melement, TYPE=_COH3D8* 11, 1, 2, 3, 4, 1001, 1002, 1003, 1004

On Mon, May 9, 2016 at 3:04 PM, Kristoffer Carlsson < notifications@github.com> wrote:

The reason for this is that I don't think abaqus has any quadrilateral cohesive elements so I haven't added any element name to export it to. Do you have any documentation about quadrilateral cohesive elements in Abaqus?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/KristofferC/Phon/issues/10#issuecomment-217818888

KristofferC commented 8 years ago

Please try with the new Phon, I added a change. Note that I am not 100% sure that the order of the nodes in the cohesive elements are correct so make sure you check that in Abaqus.

SagarChandra commented 8 years ago

Dear Proff.,

It runs fine now. Many thanks for your help and the latest patch.

Sorry to bring drag into this discussion, but i can't see the cohesive elements with a finite thickness. (only faces shown). The output after importing in Abaqus (after hiding the individual grains) is shown below:-

[image: Inline image 1]

As can be seen, the inserted cohesive elements don't have a finite width. Did i miss an option to prescribe a finite width to the cohesive elements while parsing and meshing in Phon.? I expect the result to be something like (with hex elements):- (below images taken from your thesis:- Modelling of three dimensional microstructures including grain boundary mechanisms)

[image: Inline image 2] [image: Inline image 3]

I am sorry if this is a basic question. Am i wrong somewhere? Many thanks for your help.

On Mon, May 9, 2016 at 4:19 PM, Kristoffer Carlsson < notifications@github.com> wrote:

Please try with the new Phon, I added a change. Note that I am not 100% sure that the order of the nodes in the cohesive elements are correct so make sure you check that in Abaqus.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/KristofferC/Phon/issues/10#issuecomment-217833716

KristofferC commented 8 years ago

The cohesive elements will initially have zero thickness. To get the image in my thesis I applied a force in the normal direction to the cube so that the grains move away from each other. After that the cohesive elements have a finite thickness and the cohesive elements can be seen.

SagarChandra commented 8 years ago

Dear proff.,

Thank you very much for the clarification. The doubt is resolved now. On May 9, 2016 5:24 PM, "Kristoffer Carlsson" notifications@github.com wrote:

The cohesive elements will initially have zero thickness. To get the image in my thesis I applied a force in the normal direction to the cube so that the grains move away from each other. After that the cohesive elements have a finite thickness and the can be seen.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/KristofferC/Phon/issues/10#issuecomment-217844594