KristofferC / Phon

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

having trouble on generating cohesive elements. #19

Closed dutblue closed 7 years ago

dutblue commented 7 years ago

Dear Kristoffer I met a trouble on generating cohesive elements. I have input those oders just as the introduction recommend

from phon.io_tools.read.read_from_abaqus_inp import read_from_abaqus_inp from phon.mesh_tools.create_cohesive_elements import create_cohesive_elements from phon.io_tools.write.export_to_abaqus import export_to_abaqus mesh = read_from_abaqus_inp("myfile.inp") create_cohesive_elements(mesh, mesh_dimension=3) export_to_abaqus("cohesive_file.inp", mesh, write_2d_elements=False)

but when I opened the generated file, I havn't seen any cohesive elements from cohesive file sets just as the example shows below. image

dutblue commented 7 years ago

qq 20161221030304 here is my generated file sets.

KristofferC commented 7 years ago

What version of Neper are you using? Can you give a small example of your input file so I can run it myself to try it out?

This is what I just did and it works:

Neper:

neper -T -n 2  
neper -M n2-id1.tess -dim all -format inp  

Python file:

from phon.io_tools.read.read_from_abaqus_inp import read_from_abaqus_inp
from phon.io_tools.write.export_to_abaqus import export_to_abaqus
from phon.mesh_tools.create_cohesive_elements import create_cohesive_elements

inputfile = "n2-id1.inp"
mesh = read_from_abaqus_inp(inputfile, verbose=0)
create_cohesive_elements(mesh, 3)
export_to_abaqus("n2-id1_coh.inp", mesh, write_2d_elements=False)

Generated input file: https://gist.github.com/KristofferC/d3470978f01958aea7143f5eb8f9cbed

As you can see, it includes cohesive elements (of type COH3D6) and also the element set *Elset, elset=cohes1_2

dutblue commented 7 years ago

Thank you for your reply, I'm using neper 3.0.1 I just use neper to generate a simple polycrystalline model, but seems the cohesive sets still haven't shows up.. neper -T -n 100 neper -M n100.tess -format inp

here is my input file n100_tess

and here is the cohesive element generated file n100_tess

KristofferC commented 7 years ago

Try to add the -dim all flag to neper -M like I did.

dutblue commented 7 years ago

hi Kristoffer Thank you for your reply, The Phon worked pretty well after I add -dim all to the neper -M , But if I build the model with too much crystals with -dim all the neper would crash. Seems that is not your problem:)