Upload
padmanathan
View
232
Download
1
Embed Size (px)
Citation preview
8/10/2019 Eliptic Grid Generation
1/40
Elliptic Mesh Generation
An introduction to mesh generation
Part IV : elliptic meshing
Jean-Franois Remacle
Department of Civil Engineering,
Universit catholique de Louvain, Belgium
Jean-Franois Remacle Mesh Generation
http://find/http://goback/8/10/2019 Eliptic Grid Generation
2/40
Elliptic Mesh Generation
Curvilinear Meshes
Basic conceptA curvilinear mesh is build using a parametric space
Sponge analogy
Let us consider the real coordonates (x,y)and a parametric space (u,v).
The transformationx =x(u,v)and y =y(u,v)has to be build.
Jean-Franois Remacle Mesh Generation
http://find/8/10/2019 Eliptic Grid Generation
3/40
Elliptic Mesh Generation
Curvilinear Meshes
The transformation transforms a cartesian mesh in the parametric space into
a structured mesh in the real space with the following properties:
Two non intersecting lines in the parametric space do not cross in thereal space,
The mesh adapts to the boundary of on the real space,
The mesh has not to be orthogonal in the real space.
Jean-Franois Remacle Mesh Generation
http://find/8/10/2019 Eliptic Grid Generation
4/40
Elliptic Mesh Generation
Curvilinear Meshes
The transformation transforms a cartesian mesh in the parametric space into
a structured mesh in the real space with the following properties:
Two non intersecting lines in the parametric space do not cross in thereal space,
The mesh adapts to the boundary of on the real space,
The mesh has not to be orthogonal in the real space.
Jean-Franois Remacle Mesh Generation
http://find/8/10/2019 Eliptic Grid Generation
5/40
Elliptic Mesh Generation
Curvilinear Meshes
The transformation transforms a cartesian mesh in the parametric space into
a structured mesh in the real space with the following properties:
Two non intersecting lines in the parametric space do not cross in thereal space,
The mesh adapts to the boundary of on the real space,
The mesh has not to be orthogonal in the real space.
Jean-Franois Remacle Mesh Generation
Elli ti M h G ti
http://find/8/10/2019 Eliptic Grid Generation
6/40
Elliptic Mesh Generation
Curvilinear Meshes
The transformation transforms a cartesian mesh in the parametric space into
a structured mesh in the real space with the following properties:Two non intersecting lines in the parametric space do not cross in the
real space,
The mesh adapts to the boundary of on the real space,
The mesh has not to be orthogonal in the real space.
The advantage of curvilinear meshes are numerous. They are usually high
quality/very regular meshes. Yet, the sponge analogy cannot be applied
easily to complex domains.
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://find/8/10/2019 Eliptic Grid Generation
7/40
Elliptic Mesh Generation
Transfinite Interpolation
Let us consider a simply connected 2D manifold that is bounded by 4
curves ci(t), i=1. . . ,4.
We consider the four corners Pi,j that are the intersections if curves ciand cj.
We look for a transformation that maps the unit square in the
parametric space into the domain of interest.
We suppose that curves c1 and c3 will be the mapping of the vertical
segmentsv =0 andv =1.
We suppose that curvesc2 and
c4 will be the mapping of the horizontal
segmentsu =0 andu=1.
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://find/8/10/2019 Eliptic Grid Generation
8/40
Elliptic Mesh Generation
Transfinite Interpolation
Let us try the following intuitive formula
S(u,v) = (1 v)c1(u) +vc3(u) + (1 u)c4(v) +uc2(v)
Let us see if we get back the boundaries of the domain
S(u, 0) = c1(u) + (1 u)c4(0) +uc2(0)
S(u, 1) = c3(u) + (1 u)c4(1) +uc2(1)
S(0,v) = (1 v)c1(0) +vc3(0) +c4(v)
S(1,v) = (1 v)c1(1) +vc3(1) +c2(v)
Let us identify the four corners
c1(0) = c4(0) = P1,4 c1(1) = c2(0) = P1,2
c2(1) = c3(1) = P2,3 c3(0) = c4(1) = P3,4
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://find/8/10/2019 Eliptic Grid Generation
9/40
Elliptic Mesh Generation
Transfinite Interpolation
Taking into account the corners
S(u, 0) = c1(u) + (1 u)P1,4+uP1,2 = c1(u)
S(u, 1) = c3(u) + (1 u)P3,4+uP2,3 = c3(u)
S(0,v) = (1 v)P1,4+vP3,4+c4(v) = c4(v)
S(1,v) = (1 v)P1,2+vP2,3+c2(v) = c2(v)
Let us try an alternative formula
S(u,v) = (1 v)c1(u) +vc3(u) + (1 u)c2(v) +uc4(v) (1 u)(1 v)P1,4+uvP2,3+u(1 v)P1,2+ (1 u)vP3,4
.
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://find/8/10/2019 Eliptic Grid Generation
10/40
Elliptic Mesh Generation
Transfinite Interpolation
S(u,v) = (1 v)c1(u) +vc3(u) + (1 u)c2(v) +uc4(v) (1 u)(1 v)P1,4+uvP2,3+u(1 v)P1,2+ (1 u)vP3,4
.
Taking into account corners
S(u, 0) = c1(u) + (1 u)P1,4+uP1,2 (1 u)P1,4uP1,2= c1(u)
S(u, 1) = c3(u) + (1 u)P3,4+uP2,3 (1 u)P3,4uP2,3= c3(u)
S(0,v) = (1 v)
P1,4+v
P3,4+
c4(v) (1 v)P1,4v
P3,4=
c4(v)
S(1,v) = (1 v)P1,2+vP2,3+c2(v) (1 v)P1,2vP2,3= c2(v)
This formula is correct, it is called the transfinite interpolation formula.
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://find/8/10/2019 Eliptic Grid Generation
11/40
p
Transfinite Interpolation
Using a transfinite interpolation does not guarantee that the mapping ispositive, i.e. the relation det |iSj| > 0 is not guaranteed, see some examples
withgmsh.
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://find/8/10/2019 Eliptic Grid Generation
12/40
Transfinite Interpolation
Transfinite interpolation exists for 3-sides shapes,
S(u,v) = uc2(v) + (1 v)c1(u) +vc3(v) u(1 v)P1,2+uvP2,3
.
Transfinite interpolation exists for 3D shapes.
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://find/8/10/2019 Eliptic Grid Generation
13/40
Elliptic meshes
It is not always simple to devise an explicit formula for the mesh
mapping,
With the transfinite interpolation, mesh lines may cross each others,
leading to a wrong mesh
PDE based mesh have been developped in order to avoid those
difficulties
Two kind of approaches are possible, using either an hyperbolic PDE,
or using anellipticPDE. This last approach is now studied.
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://goforward/http://find/http://goback/8/10/2019 Eliptic Grid Generation
14/40
Elliptic meshes : Thermal Analogy
Let us consider the same 4-sided domain as the one we used for
transfinite meshing,
We build mesh lines using a thermal analogy : mesh lines are
superimposed with the isolines of temperature.
Steady state heat equation has to be solved.
Two sides of the domain are adiabatical and a constant temperature isimposed on the two other sides.
!
" "
!
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://goforward/http://find/http://goback/8/10/2019 Eliptic Grid Generation
15/40
Elliptic meshes : Thermal Analogy
We have to build up a PDE system that will lead to two families of
(orthogonal) mesh lines. Fo that purpose, two thermal problems will be
defined:1 The first family is constructed using the isolines of temperatures1 of
a thermal problem in which two opposite sides are adiabatical, i.e.
n1=0. The temperature is set to be constant on each of the two
other sides: 1=1 on the first side and1=0 on the other side. The
temperature field1 has to satisfy the Laplace equation inside thedomain :
21=0
2 The second family is constructed using the isolines of temperatures 2of the adjoint thermal problem in which adiabatic sides are replaced by
constant temperature sides and where constant temperature sides arereplaced by adiabatic sides. The co-temperature field2 satisfies the
Laplace equation as well :
22=0
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://goforward/http://find/http://goback/8/10/2019 Eliptic Grid Generation
16/40
Elliptic meshes : Thermal Analogy
The two families of mesh lines will have the right properties, thanks to the
properties of the solutions of the Laplace equation:
The maximum principle : any solution of the Laplace equation has its
maximum on the boundaries (no local maxima is allowed),
The solution is unique,The solution belongs toH1, it is smooth,
Iso-contours cannot intersect,
Iso-contours stay inside the domain (obvious for a PDE, not for a
general mapping),
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://goforward/http://find/http://goback/8/10/2019 Eliptic Grid Generation
17/40
Elliptic meshes : Thermal Analogy
The two families of mesh lines will have the right properties, thanks to the
properties of the solutions of the Laplace equation:
The maximum principle : any solution of the Laplace equation has its
maximum on the boundaries (no local maxima is allowed),
The solution is unique,
The solution belongs toH1, it is smooth,
Iso-contours cannot intersect,
Iso-contours stay inside the domain (obvious for a PDE, not for a
general mapping),
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://goforward/http://find/http://goback/8/10/2019 Eliptic Grid Generation
18/40
Elliptic meshes : Formulation
The resulting mesh equations are two boundary value problems. We
have to find1 and2 solution of
2i=0 , i=1,2.
boundary conditions are
Boundary 1 2c1 1(x,y) =0 n2(x,y) =0
c2 n1(x,y) =0 2(x,y) =0
c3 1(x,y) =1 n2(x,y) =0c4 n1(x,y) =0 2(x,y) =1
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://goforward/http://find/http://goback/8/10/2019 Eliptic Grid Generation
19/40
Elliptic meshes : Formulation
Problem : the equations have to be solved in the real space.
Disappointingly, solving such PDE requires... a mesh!
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://goforward/http://find/http://goback/8/10/2019 Eliptic Grid Generation
20/40
Elliptic meshes : Formulation
This issue is addresded by the inversion of variablesx and y and 1 and
2,
The problem is solved in the space of temperatures 1 and2 and the
unknowns are the positions of the mesh in the real space x and y,
For a pair of temperatures(1,2), we look the point(x,y)in the
physical space where this temperature occurs.
Because of the properties of the Laplace operator, the exist such a
point(x,y)for any pair(1,2)for which 0 1 1 and for which
0 2 1
This is equivalent to the following change of variables
x=x1=x1(1,2) and y=x2=x2(1,2)
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
http://goforward/http://find/http://goback/8/10/2019 Eliptic Grid Generation
21/40
Elliptic meshes : Formulation
This issue is addresded by the inversion of variablesx and y and 1 and
2,
The problem is solved in the space of temperatures 1 and2 and the
unknowns are the positions of the mesh in the real space x and y,
For a pair of temperatures(1,2), we look the point(x,y)in the
physical space where this temperature occurs.
Because of the properties of the Laplace operator, the exist such a
point(x,y)for any pair(1,2)for which 0 1 1 and for which
0 2 1
This is equivalent to the following change of variables
x=x1=x1(1,2) and y=x2=x2(1,2)
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
Elli i h F l i
http://find/8/10/2019 Eliptic Grid Generation
22/40
Elliptic meshes : Formulation
This issue is addresded by the inversion of variablesx and y and 1 and
2,
The problem is solved in the space of temperatures 1 and2 and the
unknowns are the positions of the mesh in the real space x and y,
For a pair of temperatures(1,2), we look the point(x,y)in the
physical space where this temperature occurs.
Because of the properties of the Laplace operator, the exist such a
point(x,y)for any pair(1,2)for which 0 1 1 and for which
0 2 1
This is equivalent to the following change of variables
x=x1=x1(1,2) and y=x2=x2(1,2)
Jean-Franois Remacle Mesh Generation
http://find/8/10/2019 Eliptic Grid Generation
23/40
Elliptic Mesh Generation
Elli ti h F l ti
8/10/2019 Eliptic Grid Generation
24/40
Elliptic meshes : Formulation
This issue is addresded by the inversion of variablesx and y and 1 and
2,
The problem is solved in the space of temperatures 1 and2 and the
unknowns are the positions of the mesh in the real space x and y,
For a pair of temperatures(1,2), we look the point(x,y)in the
physical space where this temperature occurs.
Because of the properties of the Laplace operator, the exist such a
point(x,y)for any pair(1,2)for which 0 1 1 and for which
0 2 1
This is equivalent to the following change of variables
x=x1=x1(1,2) and y=x2=x2(1,2)
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
Elli ti h F l ti
http://goforward/http://find/http://goback/8/10/2019 Eliptic Grid Generation
25/40
Elliptic meshes : Formulation
We use the chain derivative rule to compute
xj=
2
j=1
j
j
xiand
2
xixk=
2
j=1
2
l=1
2
jl
l
xk
j
xi
In expanded form
2
x21= 2
21
1
x1
2
+ 2 2
12
1
x1
2
x1
+ 2
22
2
x1
2
.
2
x22= 2
21
1
x2
2+ 2
2
12
1
x2
2
x2
+ 2
22
2
x2
2.
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
Elli ti h F l ti
http://find/8/10/2019 Eliptic Grid Generation
26/40
Elliptic meshes : Formulation
The Laplace operator is written as
2 = 2
21
1
x1
2
+
1
x2
2
+ 2 2
12
1
x1
2
x1+1
x2
2
x2
+
+ 2
22
2
x1
2+
2
x2
2.
Therefore, in 2D, the PDEs that have to be solved can be written as
2x12
12x221
+ 2
2x1
122x2
12
+
2x12
22x222
=0.
with
=
1
x1
2+
1
x2
2, =
1
x1
2
x1+1
x2
2
x2, =
2
x1
2+
2
x2
2
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
Elliptic meshes : Formulation
http://find/8/10/2019 Eliptic Grid Generation
27/40
Elliptic meshes : Formulation
Note that
=J2
x11
2
+x12
2
=1
x1
2
+1
x2
2
,
= J2x11
x21
+x12
x22
=1
x1
2
x1+1
x2
2
x2,
=J2
x21
2+
x22
2=
2
x1
2+
2
x2
2,
with
J=det[jxi]
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
Elliptic meshes : Formulation
http://find/8/10/2019 Eliptic Grid Generation
28/40
Elliptic meshes : Formulation
The equations that have to be solved for the mesh problem are coupled and
non-linear! They can only be solved using numerical methods. There exists
several techniques to solve such systems. We are not going to detail all the
methods that are available (this is could be the subject of another course).
We are going to illustrate some basic principles. Two items will be detailed
hereThe numerical discretization of the mesh equations in the parametric
space(1,2),Their resolution.
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
Elliptic meshes : Formulation
http://find/8/10/2019 Eliptic Grid Generation
29/40
Elliptic meshes : Formulation
We assume that the mesh in the parametric space is a mnfinite
difference mesh. The mesh is uniform in the sense that the spacings and
in both directions are constant.
f
fi+1,j fi1,j2
f
fi,j+1 fi,j12
2f
2
fi+1,j 2fi,j +fi1,j2
2f
2
fi,j+1 2fi,j +fi,j12
2f
fi+1,j+1 fi+1,j1 fi1,j+1+fi1,j1
4
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
Elliptic meshes : Formulation
http://goforward/http://find/http://goback/8/10/2019 Eliptic Grid Generation
30/40
Elliptic meshes : Formulation
We recall the mesh equations
2x1212x22
1
+ 2 2x112
2x212
+ 2x122
2x22
2
=0.Their discrete version can be written, for any vertex (i,j)of the mesh in the
parametric space, as
[xi+1,j 2xi,j+xi1,j ]+ [xi,j+1 2xi,j+ xi,j1]
2 [xi+1,j+1 xi1,j+1 xi+1,j1+xi1,j1] = 0
[yi+1,j 2yi,j+ yi
1,j] +
[yi,j+1 2yi,j+yi,j
1]2 [yi+1,j+1 yi1,j+1 yi+1,j1+yi1,j1] = 0
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
Elliptic meshes : Resolution
http://find/8/10/2019 Eliptic Grid Generation
31/40
Elliptic meshes : Resolution
With the numerical evaluation of coefficients , and
= (xi,j+1 xi,j1)
2 + (yi,j+1 yi,j1)2
(2)2
= (xi+1,j xi1,j)
2 + (yi+1,j yi1,j)2
(2)2
= (xi+1,j xi1,j)(xi,j+1 xi,j1)
(4)2
+(yi+1,j yi1,j)(yi,j+1 yi,j1)
(4)2
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
Elliptic meshes : Resolution
http://find/8/10/2019 Eliptic Grid Generation
32/40
Elliptic meshes : Resolution
Applying the formulation to the mnnodes of the finite difference mesh,
we obtain a coupled system of non linear equations. In fact, , and
are all functions of the unknowns, i.e. the position of the nodes in the realspace. Several methods are available for solving such a system. They can be
classified in two categories:
1 direct methods,
2 iterative methods.
The choice of the method is essentially based on the following criterion
The CPU time cost and the memory cost,
The ability of the method to converge to the solution,
The relative ease of programming !
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
Elliptic meshes : Resolution
http://find/8/10/2019 Eliptic Grid Generation
33/40
Elliptic meshes : Resolution
Direct methods are not the choice that is usually made for building elliptic
meshes. Direct methods have the advantage of ensuring the convergence in
a finite number of step (yet this not true for non-linear systems). Theirprincipal drawback is their memory signature and their (relative)
complexity.
Iterative methods have the following advantages:
1 They are usually easier to code,
2 They are well adapted to structured grids,
The following smoothers are often used for building elliptic meshes
Point Jacobi iteration,
Block Jacobi iteration (the block may be a line or a column of nodes),
ADIs, i.e. alternated direction implicit !
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
Elliptic meshes : Point Jacobi Iteration
http://find/8/10/2019 Eliptic Grid Generation
34/40
Elliptic meshes : Point Jacobi Iteration
We look for the values of the variables x and y, notedx andy at node
(i,j)verifying
xi+1,j 2x
i,j+ x+
i1,j
+
xi,j+1 2x
i,j+ x+
i,j1
2xi+1,j+1 xi1,j+1 x
+i+1,j1+x
+i1,j1
= 0
yi+1,j 2y
i,j+y+
i1,j
+
yi,j+1 2y
i,j+ y+
i,j1
2yi+1,j+1 yi1,j+1 y
+
i+1,j1+y+
i1,j1
= 0
Here,x andy are for the values ofx and y at the previous sweep and x
andy are the values at the present sweep. The linearization of the
coefficients consist in using previous values ofx and y in , and .
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
Elliptic meshes : Over relaxation
http://find/8/10/2019 Eliptic Grid Generation
35/40
Elliptic meshes : Over relaxation
We know thatx and y are updated by doing
x=x+ (xx) and y=y+ (yy).
Over relaxing the system consist in doing
x+ =x+(xx) and y+ =y+(yy).
with 1. Current values are computed as
xi,j=xi,j+Cxi,j/ and y
i,j=yi,j+Cyi,j/.
with the corrections
Cxi,j=x+
i,jxi,j and Cyi,j=y+
i,jyi,j.
Jean-Franois Remacle Mesh Generation
http://find/8/10/2019 Eliptic Grid Generation
36/40
Elliptic Mesh Generation
Elliptic meshes : Boundary conditions
8/10/2019 Eliptic Grid Generation
37/40
p y
We do not want to move the boundary nodes. The way to implement it is
very simple : do not apply any corrections to those nodes
Cx1, j = Cxm, j = 0
Cy1, j = Cym, j = 0
Those are Dirichlet boundary conditions.
Jean-Franois Remacle Mesh Generation
http://find/8/10/2019 Eliptic Grid Generation
38/40
Elliptic Mesh Generation
Elliptic meshes : Line Jacobi Iteration
8/10/2019 Eliptic Grid Generation
39/40
p
Iterative process can be accelerated using a more implicit method. We
cound compute one line at a time
valeurs courantes
valeurs ltape n + 1
valeurs ltape n
j+1
i-1 i i+1
j
j-1
The resulting system is tridiagonal and ad hoc linear solvers can be used for
accelerating the process.
Jean-Franois Remacle Mesh Generation
Elliptic Mesh Generation
Elliptic meshes : Line Jacobi Iteration
http://find/8/10/2019 Eliptic Grid Generation
40/40
p
The system of equations can be assembled solved using the following finite
difference formula.
xi+1,j 2x
i,j+ x
i1,j
+
xi,j+1 2x
i,j+ x+i,j1
2xi+1,j+1 xi1,j+1 x
+i+1,j1+x
+i1,j1
= 0
yi+1,j 2y
i,j+ y
i1,j
+
yi,j+1 2y
i,j+ y+i,j1
2yi+1,j+1 yi1,j+1 y
+
i+1
,j1
+y+i1
,j1
= 0
Jean-Franois Remacle Mesh Generation
http://find/