I have a hole in an infinite plate and a code that generates a finite element mesh of it. I need more elements concentrated near the hole, because the solution varies more at this region. The issue here is that in Mesh 1 is missing some elements near the hole. The only diference between the codes is that in one i have specified MeshOrder->order
, and in the other don't. Why is that?
Mesh 1 code:
Needs["NDSolve`FEM`"]
order = 2;
R = 10;
RF = 200;
mesh = ToElementMesh[
ImplicitRegion[
R <= Sqrt[x x + y y] && RF >= Sqrt[x x + y y] , {x, y}], {{0,
RF}, {0, RF}}, "MeshOrder" -> order,
MeshRefinementFunction ->
Function[{vertices, area},
Block[{x, y}, {x, y} = Mean[vertices];
If[(Sqrt[x x + y y] >= R && Sqrt[x x + y y] <= 1.5 R), area > 1,
area > 5000]]]]
mesh["Wireframe"]
Mesh 2 code:
mesh = ToElementMesh[
ImplicitRegion[
R <= Sqrt[x x + y y] && RF >= Sqrt[x x + y y] , {x, y}], {{0,
RF}, {0, RF}},
MeshRefinementFunction ->
Function[{vertices, area},
Block[{x, y}, {x, y} = Mean[vertices];
If[(Sqrt[x x + y y] >= R && Sqrt[x x + y y] <= 1.5 R), area > 1,
area > 5000]]]]
mesh["Wireframe"]