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

Example fails to run #1

Open
CsatiZoltan opened this issue Dec 19, 2020 · 12 comments
Open

Example fails to run #1

CsatiZoltan opened this issue Dec 19, 2020 · 12 comments

Comments

@CsatiZoltan
Copy link

Since I couldn't use the program for my mesh (either .inp or .msh), I tried to reproduce the example mentioned in the README.

I typed scons and then

./mesh-generator --mesh-file dcb.msh --out-file dcb-solid.mesh --interface-file dcb-interface.mesh --interface
--notch 0 0 55 0

with the files copied to the proper directory (where the executable is). I get the following message printed to the terminal:

using default name for the ParaView file.

Reading Gmsh mesh file ...
Reading physical names...
Reading physical names...done!
Reading nodes...
Reading nodes...done!

2.6356e+13 2.6356e+13
6.95307e-310 6.95307e-310
4.67234e-310 4.67234e-310
Reading elements...
Segmentation fault (core dumped)
@dilekguzel
Copy link

I have got exactly the same problem and I am looking back to GmshReader and trying to understand the problem. elemType, matID and geoIDs cannot be defined. The update on 2 Feb 2019 told old msh files are not compatible since the gorups are labeled by integers not strings. But I am only using a random .msh file to see if it reads and unfortunately fails it. I also don't use scons but make command. Do you have a suggestion how to solve it?

@vinhphunguyen
Copy link
Owner

vinhphunguyen commented Jul 26, 2021 via email

@vinhphunguyen
Copy link
Owner

Or in other words, your Gmsh file must be like this:

$MeshFormat
2 2.2 0 8
3 $EndMeshFormat
4 $PhysicalNames
5 6
6 0 1 "pn1"
7 0 2 "pnt2"
8 1 3 "line1"
9 1 4 "line2"
10 2 5 "grp1"
11 2 6 "grp2"
12 $EndPhysicalNames
13 $Nodes
14 1203
15 1 0 0 0
16 2 100 0 0
17 3 100 1.5 0
18 4 0 1.5 0
19 5 0 -1.5 0
20 6 100 -1.5 0

@vinhphunguyen
Copy link
Owner

--mesh-file dcb.msh --out-file dcb-solid.mesh --interface-file dcb-interface.mesh --interface
--notch 0 0 55 0

Please get the updated code. I checked it, it works.

@dilekguzel
Copy link

Yes it is working exactly as you said, thank you for the answer and explanation.

@dilekguzel
Copy link

dilekguzel commented Aug 2, 2021

Hello Prof. Nguyen, for 3D models does the --interface work? I have got segmentation fault after the code goes to InterfaceBuilder and doFor3dMatInterface for a 9 point, 4 surface and 4 element case, (my example case) the code finds bulk1 and bulk2 for 4 times and later gives segmentation fault(core dumped). Do you have any suggestions regarding this? Because in your paper I have read you have obtained 3d different test cases. However when I use one-fiber-3D.msh file with the physical groups as you have described earlier I got again the same fault.

@dilekguzel
Copy link

The problem is caused by the fact that for another element that shares the same node code tries to create new nodes so overall duplicatedNodes are exceeding the limit. For example a 16 element problem which has 1 interface in the middle means there are 9 nodes duplicated and 8 elements are interface elements. But after the first 4 elements and we have again same nodes on the other side of the interface and those 4 cannot be treated in 3d. In 2d everything works but for 3d I think the treatment for the same nodes may be lacking or I cannot find a way. In your article "An open source program to generate zero-thickness cohesive interface elements", Figure 17a shows the material interface debonding, so I am probably missing something. Do you have any suggestions?

@vinhphunguyen
Copy link
Owner

Can u send me the geo file that you having problem? Not one-fiber-3D.geo as I got segmentation fault with it. In the past, it worked for 3D interfaces, but after many modifications I did not check 3D interface.

@vinhphunguyen
Copy link
Owner

Screen Shot 2021-08-03 at 12 52 44 pm

With this file:
Mesh.MshFileVersion = 2.2;

L=2;
W=2;
//mesh size
M=1;

n1 = 1;
n2 = 1;

// -------------------
// corner points
// -------------------

Point(1) = {0,0,0,M};
Point(2) = {L,0,0,M};
Point(3) = {L,W,0,M};
Point(4) = {0,W,0,M};
Point(5) = {0,0.5W,0,M};
Point(6) = {L,0.5
W,0,M};

// -------------------
// outer lines
// -------------------
Line(1) = {1,2};
Line(2) = {2,6};
Line(3) = {6,3};
Line(4) = {3,4};
Line(5) = {4,5};
Line(6) = {5,1};
Line(7) = {5,6};

Line Loop(1) = {1,2,-7,6};
Line Loop(2) = {7,3,4,5};

Transfinite Line{1,4,7} = n1;
Transfinite Line{2,6,3,5} = n2;

Transfinite Surface{1} = {1,2,7,6};
Transfinite Surface{2} = {7,3,4,5};

Recombine Surface{1};
Recombine Surface{2};

// -------------------
// Surfaces
// -------------------

Plane Surface(1) = {1};
Plane Surface(2) = {2};

//+
Extrude {0, 0, 1} {
Surface{2}; Surface{1}; Layers {1};Recombine;
}

// ----------------------
// Physcial quantities
// ----------------------

Physical Line("bottom") = {1}; // bottom edge
Physical Line("top") = {4}; // top edge

// Where the crack will grow and interface elements should be inserted
//Physical Line(777) = {1};
//Assigns different groups to elements of each physical surface
//Physical Volume("all") = {1,2};
Physical Volume("vol1") = {1};
Physical Volume("vol2") = {2};

I was able to generate interface elements for 3D without modifications to the current code.

@dilekguzel
Copy link

elem16

I have used tgis geometry but now that I am comparing with yours I am missing two physical lines.
//+
Point(2) = {0, 1, 0, 1.0};
//+
Point(3) = {1, 1, 0, 1.0};
//+
Point(4) = {-1, 1, 0, 1.0};
//+
Point(5) = {-1, 0, 0, 1.0};
//+
Point(6) = {-1, 1, 0, 1.0};
//+
Point(7) = {1, 0, 0, 1.0};
//+
Line(1) = {4, 2};
//+
Line(2) = {2, 1};
//+
Line(3) = {1, 5};
//+
Line(4) = {5, 4};
//+
Curve Loop(1) = {1, 2, 3, 4};
//+
Plane Surface(1) = {1};
//+
Line(5) = {2, 3};
//+
Line(6) = {3, 7};
//+
Line(7) = {7, 1};
//+
Curve Loop(2) = {5, 6, 7, -2};
//+
Plane Surface(2) = {2};
//+
Transfinite Curve {4, 1, 2, 3, 7, 6, 5} = 3 Using Progression 1;
//+
Transfinite Surface {1};
//+
Transfinite Surface {2};
//+
Recombine Surface {1, 2};
//+
Extrude {0, 0, 1} {
Surface{1}; Surface{2}; Layers{2}; Recombine;
}
//+
Physical Volume("lvol", 52) = {1};
//+
Physical Volume("rvol", 53) = {2};
untitled.geo 52,1 Bot

@dilekguzel
Copy link

I have also managed to obtain results for a vertical crack, a horizontal crack, complex shapes and the cylinder, structured mesh and tetrahedrons as well, I think the problem was the lack of physical lines. Now I don't think there is an issue.

@vinhphunguyen
Copy link
Owner

vinhphunguyen commented Aug 6, 2021 via email

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

3 participants