Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

probelm occur when Using Function :create_matrix in 2D situation #5

Closed
mrzhaojyi opened this issue Jan 19, 2015 · 5 comments
Closed
Assignees

Comments

@mrzhaojyi
Copy link

Hi, Dear.Kristoffer

I try to generate a 2D mesh with finite thickness and I found phon.mesh_tools.create_matrix.create_matrix(mesh, thickness, order) is able to achieve that. But when I run the code:

create_matrix(mesh, 0.0001)
create_matrix is EXPERIMENTAL!
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/phon/mesh_tools/create_matrix.py", line 55, in create_matrix
create_cohesive_elements(mesh)
File "/usr/local/lib/python2.7/dist-packages/phon/mesh_tools/create_cohesive_elements.py", line 73, in create_cohesive_elements
grain_id_1 = grains_connected_to_face[0]

IndexError: list index out of range

Could you tell me how to solve it?

@KristofferC KristofferC self-assigned this Jan 19, 2015
@KristofferC KristofferC reopened this Jan 19, 2015
@KristofferC
Copy link
Owner

There was a bug where create_matrix didn't call create_cohesive_elements with the correct mesh_dimension.

However, I have only tested create_matrix for 3D and as the code is right now it will not work for 2D. I added an error check for this now. I will try make it work for 2D today.

@mrzhaojyi
Copy link
Author

Thanks a lot!

Best regards
JIngyi

On Mon, Jan 19, 2015 at 3:54 AM, KristofferC notifications@github.com
wrote:

There was a bug where create_matrix didn't call create_cohesive_elements
with the correct mesh_dimension.

However, I have only tested create_matrix for 3D and as the code is right
now it will not work for 2D. I added an error check for this now. I will
try make it work for 2D today.


Reply to this email directly or view it on GitHub
#5 (comment).

@KristofferC
Copy link
Owner

I've been busy with some other stuff so haven't gotten around looking at it carefully. Will try get it done tomorrow or in the weekend.

@KristofferC
Copy link
Owner

Okey, I started fixing some stuff: This is how it looks like now.
2d_cohes

Note, that the only thing that is happening is that nodes in interfaces are moved in their normal direction. No remeshing is being done which means that if you either have a too big thickness or that you have a very fine mesh you will get elements with bad quality.

I will later experiment with adding a Laplacian smoothing to each grain which will hopefully help with the element quality.

While doing this I also found a quite severe bug with the abaqus exporting for 2d cohesive elements. Abaqus makes a very weird choice in the way their 2d cohesive elements are ordered which lead to this:
abaq

However, that should be fixed now. I will keep the issue open until I have tried the Laplacian smoothing.

@mrzhaojyi
Copy link
Author

It looks good. Again, Thanks a lot for your help

On Fri, Jan 23, 2015 at 12:21 PM, KristofferC notifications@github.com
wrote:

Okey, I started fixing some stuff: This is how it looks like now.
[image: 2d_cohes]
https://cloud.githubusercontent.com/assets/1282691/5879040/22bf680a-a32c-11e4-8e0c-581d6ef8f08b.png

Note, that the only thing that is happening is that nodes in interfaces
are moved in their normal direction. No remeshing is being done which means
that if you either have a too big thickness or that you have a very fine
mesh you will get elements with bad quality.

I will later experiment with adding a Laplacian smoothing to each grain
which will hopefully help with the element quality.

While doing this I also found a quite severe bug with the abaqus exporting
for 2d cohesive elements. Abaqus makes a very weird choice in the way their
2d cohesive elements are ordered which lead to this:
[image: abaq]
https://cloud.githubusercontent.com/assets/1282691/5879095/910f5054-a32c-11e4-9e1f-6092241f37ae.png

However, that should be fixed now. I will keep the issue open until I have
tried the Laplacian smoothing.


Reply to this email directly or view it on GitHub
#5 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants