0
$\begingroup$

I want to create a mesh of 6 noded triangular elements ( 2 nd order element) on a rectangular domain as shown. (0,0) can be seen at left bottom corner with the whole mesh in the positive quadrant.

500 Element Regular 6 noded Triangular Mesh on 254 by 101.6 Sq.mm

I tried the following

<< NDSolve`FEM`
m2 = ToElementMesh[Rectangle[{0, 0}, {254, 101.6}], 
   "MeshElementType" -> TriangleElement, 
   MaxCellMeasure -> {"Area" -> 2000/4}, "MeshOrder" -> 2];
Show[m2["Wireframe"], 
 m2["Wireframe"["MeshElement" -> "PointElements", 
   "MeshElementIDStyle" -> Red]]]

The output is Random 2nd order triangular mesh

My problem is

  1. I want a regular mesh as shown in the top figure (not a random one as seen in the bottom figure).
  2. I want to display all the interior node numbers & element numbers in the mesh. In the bottom figure, only the boundary nodes are numbered.
  3. I am looking for control over the number of elements on the x & y axes.

Please help.

$\endgroup$
3
  • $\begingroup$ Does anyone know where I can get the answer? $\endgroup$ Feb 26 at 13:50
  • 1
    $\begingroup$ Have you tried anything? What exactly is the problem? There are similar examples in the documentation. $\endgroup$
    – user21
    Feb 28 at 6:16
  • $\begingroup$ @user21 I edited the question. Please help. $\endgroup$ Mar 4 at 14:45

1 Answer 1

2
$\begingroup$

Look at the documentation: Start with ToElementMesh#188109273 (paste this into the help system), then use a rule like {i1_Integer,i2_,i3_,i4}->{{i1,i2,i3},{i3,i4,i1}} to convert the incidents to triangles. You can use MeshOrderAlteration to get a second order mesh. You can display the element numbers in each element, but for all node numbers you have to write something like i=1;Graphics[Text[i++,#]&/@mesh["Coordinates"]]

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.