Mathematica Asked by sgzslg on June 25, 2021
I’m using ImportMesh
in FEMAddOns package. When I imported the following mesh created in Abaqus
the following warning occurred:
ToElementMesh::femimq: The element mesh has insufficient quality of 0.`. A quality estimate below 0. may be caused by a wrong ordering of element incidents or self-intersecting elements.
Did I do something wrong?
.inp file:
*Heading
** Job name: qyyjianhua Model name: Model-1
** Generated by: Abaqus/CAE 2021
*Preprint, echo=NO, model=NO, history=NO, contact=NO
**
** PARTS
**
*Part, name=Part-1
*End Part
**
**
** ASSEMBLY
**
*Assembly, name=Assembly
**
*Instance, name=Part-1-1, part=Part-1
*Node
1, 2., 0.
2, 0., 0.
3, -10., 20.
4, 10., 20.
5, -10., -20.
6, 8., 0.
7, 10., 0.
8, 10., -20.
9, 1.73205078, 1.
10, 1., 1.73205078
11, 0., 2.
12, -1., 1.73205078
13, -1.73205078, 1.
14, -2., 0.
15, -1.73205078, -1.
16, -1., -1.73205078
17, 0., -2.
18, 1., -1.73205078
19, 1.73205078, -1.
20, 5.80853033, 20.
21, 0.460017532, 20.
22, -4.81056213, 20.
23, -10., 15.2503662
24, -10., 10.5661907
25, -10., 5.77517176
26, -10., 0.000233809158
27, -10., -5.78195906
28, -10., -10.4485788
29, -10., -15.2008629
30, -5.4511385, -20.
31, -0.266591698, -20.
32, 4.89586306, -20.
33, 10., -15.2480021
34, 10., -10.5735025
35, 10., -5.77517176
36, 9., 0.
37, 6.76777697, 4.26581717
38, 3.84405661, 7.01592684
39, 0.126907557, 7.9989934
40, -3.68013692, 7.10328054
41, -6.75329113, 4.28871298
42, -8., -0.00162268954
43, -6.779356, -4.24739122
44, -3.84456635, -7.01564741
45, -0.10826461, -7.99926758
46, 3.67319083, -7.10687494
47, 6.72185373, -4.33782005
48, 10., 5.78195906
49, 10., 10.4810152
50, 10., 15.2338905
51, -8.04919815, 5.55550385
52, -8.91226673, 0.00748880301
53, 0.235863537, 11.5949564
54, 0.38208425, 15.5542936
55, -8.02860165, -5.55888891
56, 7.90317488, 5.71555376
57, -0.219827414, -15.5265503
58, -0.155475363, -11.5651379
59, 7.83845663, -5.81884718
60, -5.17192221, 10.6761541
61, -4.89879417, 15.3694239
62, 5.46685171, 10.4651871
63, 5.68823671, 15.3231401
64, -5.45252848, -10.4385748
65, -5.34113503, -15.2527342
66, 5.18739414, -10.7079449
67, 4.96575165, -15.3679714
68, 2., 0.
69, 8., 0.
70, 9., 0.
71, 10., 0.
72, 1.93185163, 0.517638087
73, 0.433012694, 0.25
74, 0.5, 0.
75, 1.41421354, 1.41421354
76, 0.25, 0.433012694
77, 0., 0.5
78, 0.517638087, 1.93185163
79, -0.517638087, 1.93185163
80, -0.25, 0.433012694
81, -1.41421354, 1.41421354
82, -0.433012694, 0.25
83, -0.5, 0.
84, -1.93185163, 0.517638087
85, -1.93185163, -0.517638087
86, -0.433012694, -0.25
87, -1.41421354, -1.41421354
88, -0.25, -0.433012694
89, 0., -0.5
90, -0.517638087, -1.93185163
91, 0.517638087, -1.93185163
92, 0.25, -0.433012694
93, 1.41421354, -1.41421354
94, 0.433012694, -0.25
95, 0.5, 0.
96, 1.93185163, -0.517638087
97, -7.40124464, 4.92210865
98, -8.48073196, 2.78149629
99, -8.45613289, 0.00293305679
100, -7.68222904, 2.2323432
101, -9.02459908, 5.66533756
102, -10., 2.8877027
103, -9.45613289, 0.003861306
104, -10., 8.170681
105, -6.61056042, 8.11582947
106, -7.58596134, 10.621172
107, -5.40319824, 5.89961433
108, -4.42602968, 8.8897171
109, -1.83219409, 7.78736591
110, 0.181385547, 9.79697514
111, -2.46802926, 11.1355553
112, 0.308973908, 13.574625
113, -2.2583549, 15.4618587
114, -5.03535843, 13.022789
115, 0.421050906, 17.7771473
116, -2.17527223, 20.
117, -4.85467815, 17.6847115
118, -7.40528107, 20.
119, -10., 17.6251831
120, -7.44939709, 15.3098946
121, -10., 12.9082785
122, -9.0143013, -5.67042398
123, -8.47043419, -2.77570009
124, -10., -2.8908627
125, -7.40397882, -4.90314007
126, -7.68856144, -2.21043491
127, 5.48119783, 5.82721806
128, 7.33547592, 4.99068546
129, 6.68501329, 8.09037018
130, 4.65545416, 8.74055672
131, 8.95158768, 5.74875641
132, 10., 8.13148689
133, 7.73342609, 10.4731007
134, 10., 12.8574524
135, 7.84411812, 15.2785149
136, 5.57754421, 12.8941631
137, 10., 17.6169453
138, 7.9042654, 20.
139, 5.74838352, 17.6615696
140, 3.13427401, 20.
141, 3.03516054, 15.4387169
142, 2.8513577, 11.0300713
143, 2.04542017, 7.734097
144, -5.48932981, -5.81955814
145, -6.7405653, -7.99873161
146, -4.64854717, -8.72711086
147, -10., -8.11526871
148, -7.726264, -10.4435768
149, -10., -12.8247204
150, -7.67056751, -15.226799
151, -5.39683151, -12.8456545
152, -10., -17.6004314
153, -7.72556925, -20.
154, -5.39613676, -17.6263676
155, -2.85886502, -20.
156, -0.243209556, -17.7632751
157, -2.78048134, -15.3896427
158, -0.187651396, -13.5458441
159, -2.80400181, -11.0018559
160, -0.131869987, -9.78220272
161, -2.03668737, -7.73640108
162, 8.45158768, 2.85777688
163, 9.5, 0.
164, 10., 2.89097953
165, 7.6857729, 2.22011089
166, 8.5, 0.
167, 10., -8.17433739
168, 8.91922855, -5.79700947
169, 6.51292515, -8.26339626
170, 7.59369707, -10.6407242
171, 7.28015518, -5.07833385
172, 5.37876892, -5.9218955
173, 4.43029261, -8.90740967
174, 1.83746183, -7.78612471
175, 2.5159595, -11.1365414
176, 2.372962, -15.4472609
177, 5.0765729, -13.0379581
178, 2.31463575, -20.
179, 4.93080711, -17.6839867
180, 7.44793129, -20.
181, 10., -17.6240005
182, 7.48287582, -15.3079872
183, 10., -12.9107523
184, 8.41922855, -2.90942359
185, 8.5, 0.
186, 7.67381334, -2.26110268
187, 10., -2.88758588
188, 9.5, 0.
189, 5., 0.
190, 4.22695208, -2.66891003
191, 2.33659554, -4.41946268
192, -0.0541323051, -4.99963379
193, -2.42228317, -4.37384892
194, -4.25570345, -2.62369561
195, -5., -0.000811344769
196, -4.24267101, 2.64435649
197, -2.34006834, 4.41766548
198, 0.0634537786, 4.99949646
199, 2.4220283, 4.37398863
200, 4.24991369, 2.63290858
201, 5., 0.
202, 0., 0.
203, 0., 0.
204, 0., 0.
205, 0., 0.
206, 0., 0.
207, 0., 0.
208, 0., 0.
209, 0., 0.
210, 0., 0.
211, 0., 0.
212, 0., 0.
213, 0., 0.
214, 0., 0.
215, 0., 0.
216, 0., 0.
217, 0., 0.
218, 0., 0.
219, 0., 0.
220, 0., 0.
221, 0., 0.
222, 0., 0.
223, 0., 0.
224, 0., 0.
225, 0., 0.
*Element, type=CPS8R
1, 41, 51, 52, 42, 97, 98, 99, 100
2, 51, 25, 26, 52, 101, 102, 103, 98
3, 24, 25, 51, 60, 104, 101, 105, 106
4, 51, 41, 40, 60, 97, 107, 108, 105
5, 40, 39, 53, 60, 109, 110, 111, 108
6, 53, 54, 61, 60, 112, 113, 114, 111
7, 54, 21, 22, 61, 115, 116, 117, 113
8, 22, 3, 23, 61, 118, 119, 120, 117
9, 61, 23, 24, 60, 120, 121, 106, 114
10, 27, 55, 52, 26, 122, 123, 103, 124
11, 55, 43, 42, 52, 125, 126, 99, 123
12, 38, 37, 56, 62, 127, 128, 129, 130
13, 56, 48, 49, 62, 131, 132, 133, 129
14, 49, 50, 63, 62, 134, 135, 136, 133
15, 50, 4, 20, 63, 137, 138, 139, 135
16, 20, 21, 54, 63, 140, 115, 141, 139
17, 63, 54, 53, 62, 141, 112, 142, 136
18, 53, 39, 38, 62, 110, 143, 130, 142
19, 44, 43, 55, 64, 144, 125, 145, 146
20, 55, 27, 28, 64, 122, 147, 148, 145
21, 28, 29, 65, 64, 149, 150, 151, 148
22, 29, 5, 30, 65, 152, 153, 154, 150
23, 30, 31, 57, 65, 155, 156, 157, 154
24, 65, 57, 58, 64, 157, 158, 159, 151
25, 58, 45, 44, 64, 160, 161, 146, 159
26, 48, 56, 70, 71, 131, 162, 163, 164
27, 56, 37, 69, 70, 128, 165, 166, 162
28, 34, 35, 59, 66, 167, 168, 169, 170
29, 59, 47, 46, 66, 171, 172, 173, 169
30, 46, 45, 58, 66, 174, 160, 175, 173
31, 58, 57, 67, 66, 158, 176, 177, 175
32, 57, 31, 32, 67, 156, 178, 179, 176
33, 32, 8, 33, 67, 180, 181, 182, 179
34, 67, 33, 34, 66, 182, 183, 170, 177
35, 47, 59, 36, 6, 171, 184, 185, 186
36, 59, 35, 7, 36, 168, 187, 188, 184
37, 6, 1, 19, 47, 189, 96, 190, 186
38, 47, 19, 18, 46, 190, 93, 191, 172
39, 46, 18, 17, 45, 191, 91, 192, 174
40, 45, 17, 16, 44, 192, 90, 193, 161
41, 44, 16, 15, 43, 193, 87, 194, 144
42, 43, 15, 14, 42, 194, 85, 195, 126
43, 42, 14, 13, 41, 195, 84, 196, 100
44, 41, 13, 12, 40, 196, 81, 197, 107
45, 40, 12, 11, 39, 197, 79, 198, 109
46, 39, 11, 10, 38, 198, 78, 199, 143
47, 38, 10, 9, 37, 199, 75, 200, 127
48, 37, 9, 68, 69, 200, 72, 201, 165
49, 68, 9, 2, 202, 72, 73, 214, 74
50, 203, 2, 9, 10, 215, 73, 75, 76
51, 11, 204, 203, 10, 77, 216, 76, 78
52, 11, 12, 205, 204, 79, 80, 217, 77
53, 206, 205, 12, 13, 218, 80, 81, 82
54, 14, 207, 206, 13, 83, 219, 82, 84
55, 14, 15, 208, 207, 85, 86, 220, 83
56, 209, 208, 15, 16, 221, 86, 87, 88
57, 17, 210, 209, 16, 89, 222, 88, 90
58, 17, 18, 211, 210, 91, 92, 223, 89
59, 212, 211, 18, 19, 224, 92, 93, 94
60, 1, 213, 212, 19, 95, 225, 94, 96
*Nset, nset=Set-1, generate
1, 225, 1
*Elset, elset=Set-1, generate
1, 60, 1
** Section: Section-1
*Solid Section, elset=Set-1, material=Material-1
,
*End Instance
**
*Nset, nset=Set-1, instance=Part-1-1
1, 6, 7, 36, 68, 69, 70, 71, 74, 95, 163, 166, 185, 188, 189, 201
202, 213
*Elset, elset=Set-1, instance=Part-1-1
26, 27, 35, 36, 37, 48, 49, 60
*Nset, nset=Set-5, instance=Part-1-1
5, 8, 30, 31, 32, 153, 155, 178, 180
*Elset, elset=Set-5, instance=Part-1-1
22, 23, 32, 33
*Nset, nset=_PickedSet6, internal, instance=Part-1-1
1, 2, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 68, 72, 73
74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89
90, 91, 92, 93, 94, 95, 96, 202, 203, 204, 205, 206, 207, 208, 209, 210
211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225
*Elset, elset=_PickedSet6, internal, instance=Part-1-1, generate
49, 60, 1
*Nset, nset=_PickedSet7, internal, instance=Part-1-1
2,
*Elset, elset=_Surf-1_S2, internal, instance=Part-1-1
7, 15
*Elset, elset=_Surf-1_S1, internal, instance=Part-1-1
8, 16
*Surface, type=ELEMENT, name=Surf-1
_Surf-1_S2, S2
_Surf-1_S1, S1
*Nset, nset=_PickedSet6-1_, internal, instance=Part-1-1
1, 2, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 68, 72, 73
74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89
90, 91, 92, 93, 94, 95, 96, 202, 203, 204, 205, 206, 207, 208, 209, 210
211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225
*Nset, nset=_PickedSet7-1_, internal, instance=Part-1-1
2,
*End Assembly
**
** MATERIALS
**
*Material, name=Material-1
*Elastic
21000., 0.3
** ----------------------------------------------------------------
**
** STEP: Step-1
**
*Step, name=Step-1, nlgeom=YES
*Static
1., 1., 1e-05, 1.
**
** BOUNDARY CONDITIONS
**
** Name: BC-1 Type: 对称/反对称/完全固定
*Boundary
Set-5, PINNED
**
** LOADS
**
** Name: Load-1 Type: Pressure
*Dsload
Surf-1, P, -100.
**
** OUTPUT REQUESTS
**
*Restart, write, frequency=0
**
** FIELD OUTPUT: F-Output-1
**
*Output, field, variable=PRESELECT
*Output, history, frequency=0
**
** HISTORY OUTPUT: H-Output-1
**
*Contour Integral, crack name=H-Output-1_Crack-1, contours=5, crack tip nodes, type=K FACTORS
_PickedSet6-1_, _PickedSet7-1_, -1., 0., 0.
*End Step
The underlying issue is essentially the same as indicated in user21's answer under your previous question. The last 12 elements in your mesh have made use of 2
nd node for multiple times, thus their qualities are 0
:
Needs["FEMAddOns`"]
mesh = ImportMesh@(* file path *)
(* ToElementMesh::femimq *)
mesh@"Quality"
(*
…… 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}}
*)
mesh["MeshElements"][[1, 1, -12 ;;]]
(* {{1, 9, 2, 2, 68, 69, 2, 70}, {2, 2, 9, 10, 2, 69, 71, 72},
{11, 2, 2, 10, 73, 2, 72, 74}, {11, 12, 2, 2, 75, 76, 2, 73},
{2, 2, 12, 13, 2, 76, 77, 78}, {14, 2, 2, 13, 79, 2, 78, 80},
{14, 15, 2, 2, 81, 82, 2, 79}, {2, 2, 15, 16, 2, 82, 83, 84},
{17, 2, 2, 16, 85, 2, 84, 86}, {17, 18, 2, 2, 87, 88, 2, 85},
{2, 2, 18, 19, 2, 88, 89, 90}, {1, 2, 2, 19, 70, 2, 90, 91}} *)
I know nothing about Abaqus and don't know if this mesh is legal therein, but it's not allowed in Mathematica, at least now:
With[{u = u[x, y]},
NDSolveValue[{-Laplacian[u, {x, y}] == 1, DirichletCondition[u == 0, True]},
u, {x, y} ∈ mesh]]
(* ElementMeshInterpolation::fememtlq *)
(* Unevaluated ElementMeshInterpolation[…] returned. *)
wrongindex = {1, 2, 2, 19, 70, 2, 90, 91};
wrongcoord = mesh["Coordinates"][[wrongindex]]
ToElementMesh["Coordinates" -> wrongcoord, "MeshElements" -> {QuadElement@{wrongindex}}]
(* ToElementMesh::fembdel *)
(* ToElementMesh::femtemnm: A mesh could not be generated. *)
(* $Failed *)
Anyway, for this specific problem, it's easy to repair the mesh, all we need to do is to remove the duplicate nodes and use TriangleElement
to rebuild these elements:
{trindex, quadindex} =
GatherBy[DeleteDuplicates /@ mesh["MeshElements"][[1, 1]] // Sort, Length]
repairedmesh =
ToElementMesh["Coordinates" -> mesh["Coordinates"],
"MeshElements" -> {QuadElement@quadindex, TriangleElement@trindex}]
Answered by xzczd on June 25, 2021
This is more of an issue of ImportMesh than anything else. In principal it could collapse elements. But you can do this yourself:
Needs["FEMAddOns`"]
mesh = ImportMesh["test.inp"]
ToElementMesh::femimq: The element mesh has insufficient quality of 0.`. A quality estimate below 0. may be caused by a wrong ordering of element incidents or self-intersecting elements.
Now, we reconstruct the mesh with collapsed elements:
{tri, quad} =
SplitBy[SortBy[
DeleteDuplicates /@
Join @@ ElementIncidents[mesh["MeshElements"]], Length],
Length];
mesh2 = ToElementMesh["Coordinates" -> mesh["Coordinates"],
"MeshElements" -> {TriangleElement[tri], QuadElement[quad]}];
mesh2["Wireframe"]
This currently does not take care of the markers but that's not impossible to do either.
Answered by user21 on June 25, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP