Professional Documents
Culture Documents
Outline
• Pre-processing
– Geometry modelling
– Grid generation
– Boundary conditions
• Solution
– Solution of the governing equations
• Post-processing
– Presenting the results
– Computations of desired quantities
Grid Generation
OR
No!
• Structured grids
• The grid points follow certain pattern and hence is
possible to use some simple notation to represent the
grid points.
• Unstructured grids
• No pattern is followed by the grid points and its
neighbors hence the nodal points have to be counted
serially.
Structured Grids
• Algebraic methods
1≤ ξ ≤ 2
0 ≤η ≤1
Physical Plane
Computational Plane
Algebraic Methods Example 2
Transformation
ξ= +x 0.5 0 ≤ ξ ≤1
η=
y 0 ≤η ≤1
1 − x2
Physical
Plane
Computational Plane
Grid Clustering
ξ= +x 0.5
y2
η=
1 − x2
η=1 D η=1 C
D C
ξ=0 ξ=1
ξ=1
ξ=0
η=0
B
A A η=0 B
(x,y) (ξ,η)
Algebraic Mapping
Consider the simply connected domain with sides AB, BC,
CD and DA are given by the equations f1 (x, y) = 0, f2(x, y) = 0,
f3(x, y) = 0 and f4(x, y) = 0 respectively.
ξ −f 4 ( x, y ) /{ f 4 ( x, y ) f 2 ( x, y )}
Transfinite Interpolation
1≤ ξ ≤ 2
0 ≤η ≤1
1 1
=
=ξ x 1, ξy 0, η=
= and
y
ymax ξ 2
d ( ymax )
−
d 1 dx 2 xy 2η
ηx =
y =y = −2 =
dx ymax ( ymax ) 2
( ymax ) ξ
Transformation Relation
Coordinate transformation implies
Or
dx xξ xη dξ
= y
dy ξ yη dη
−1
ξ x ξ y xξ xη 1 yη − xη
η = =
x η y yξ yη
| J | − yξ xξ
−1
ξ x ξy ξ z xξ xη xζ
η x ηy η z = yξ yη yζ
ζ
x ζy ζ z zξ zη zζ
Lengths, Areas and Volumes
= e dl × e dl
kdA ξ ξ η η
eξ dlξ = i dx + jdy = i xξ dξ + jyξ dξ
eη dlη = i dx + jdy = i xη dη + jyη dη
( )
kdA = eξ dlξ × eη dlη = k xξ yη − yξ xη dξdη = k | J | dξdη
( )(
)
dv = eζ dlζ . eξ dlξ × eη dlη =| J | dξdηdζ
Transformation of Derivatives
∂ ∂ ∂ ∂ ∂ ∂
= +ξ x ηx = +ξ y ηy
∂x ∂ξ ∂η ∂y ∂ξ ∂η
∂2 ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂
= ξx + ηx = ξx ξx +ηx +ηx ξx +ηx
∂x 2
∂x ∂ξ ∂η ∂ξ ∂ξ ∂η ∂η ∂ξ ∂η
∂2 ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂
= ξy + ηy = ξy ξ y +η y +η y ξ y +η y
∂y 2
∂y ∂ξ ∂η ∂ξ ∂ξ ∂η ∂η ∂ξ ∂η
∂ ∂
∇ 2 = (∇ 2ξ ) + ( ∇ 2η ) +
∂ξ ∂η
∂ 2
∂ 2
∂ 2
(ξ x2 + ξ y2 ) ∂ξ 2 + (η x2 + η y2 ) ∂η 2 + 2 (ξ xη x + ξ yη y ) ∂ξ∂η
Drawback of the Algebraic grids
W = F(Z) or Z = G(W)
where Z = X+iY and W = U+iV
z = x + iy = ½ (ρεiφ + ε-iφ / ρ)
x = ½ (ρ + 1 / ρ) cos φ; y = ½ (ρ − 1 / ρ) sin φ
Schwartz Christoffel Transformation
z = C ∫ ( w − u1 ) k1 ( w − u2 ) k2 ...( w − un ) kn dw + K
Where ki = αι / π −1
∑
n
It is easy to show that , i =1
ki = − 2
Schwartz Christoffel Transformation
Differential Equation Based Schemes
x x(ξ ,η ) dx xξ xη d ξ ∂( f , y)
y= y (ξ ,η ) ⇒ dy=
yη dη ∂ (ξ ,η ) ( yη fξ − yξ fη )
yξ =fx =
∂ ( x, y ) J
ξ x ξ y xξ xη
−1
1 yη − xη ∂ (ξ ,η )
η = =
x η y yξ yη
| J | − yξ xξ ∂ ( x, f )
∂ (ξ ,η ) (− xη fξ + xξ fη )
=fy =
ξ x ξy ξ z xξ xη xζ
−1
∂ ( x, y ) J
η x ηy η z = yξ yη yζ ∂ (ξ ,η )
ζ
x ζy ζ z zξ zη zζ
Inverse Mapping Theorem
ξ ξ ( x, y )
If the component functions of η = η ( x, y ) are continuously
xξ xη
differentiable at a point, say, (x0, y0), and the Jacobi matrix y yη
is
ξ
non singular at (x0, y0) then there exists a disk N0 about (x0, y0) such
x x(ξ ,η ) ξ x ξ y xξ xη
−1
that the inverse function y = y (ξ ,η ) holds good and η η = y
holds
x y ξ yη
It is apparent that the IMT guarantees the existence only in a local fashion.
Elliptic Solvers
• Delaunay triangulation
What is Delaunay Triangulation?
Triangulation of
• an n-sided polygon contains n-2 triangles
3 2 3 2
T2
4 1 4 T3 T1 1
T4
5 6 5 6
Number of Nodes : 6
Number of Triangles : 4
Result
Boundary triangulation
- need not be geometrically the best
- skewed triangles lead to bad approximation
DELAUNAY TRIANGULATION
α β2
2
α
β1
6
α
1
e β4 e'
α β3
5 Edge - flip
α β5
3 α
β6
4
nn : Number of nodes
nt : Number of triangles
Step 1 3 2
Perform boundary T2
triangulation of the
4
T3 T1 1
given domain and obtain the
lists NC,AL,TCN
T4
5 6
Min-maximization Algorithm
Step 2
Initialise flag = no;
Where
flag = yes if an edge swapping occurs in that iteration
no otherwise
Min-maximization Algorithm…(contd)
Step 3 3 2
for i = 1 to nn
T2
get a triangle T that has vertex i;
Ts := T; T3
4 T1 1
T4
Note : T is obtained from TCN[nn]
Ts : Triangle from which traversal 5 6
starts
Min-maximization Algorithm…(contd)
• Taking triangle T as
reference, left, right and
opposite neighbours of T Tl
with respect to node i are
denoted by Tl ,Tr,To T
i To
respectively.
Step 4
if(type[i]=0)
while(Tr != Null) T : = Tr
Ts = Null
To T 1
endif
Step 5
do
if (circumcircle_test ( T,To ) = YES)
flag = YES;
swap eo; To T 1
if (type[i] = 0)
while(Tr != Null) T : = Tr;
else Ts := T;
continue;
else T := Tl ;
while(T != Ts); No swapping is done
Min-maximization Algorithm………(contd)
Step 4
if (circumcircle_test (T,To) = YES)
flag = YES;
swap eo;
if (type[i] = 0)
T 1
while(Tr != Null) T : = Tr;
else Ts := T;
continue;
else T := Tl ;
while(T != Ts); No triangle to the left. Moving to node 2
Min-maximization Algorithm………(contd)
Step 3
for i = 1 to nn 2
Step 4
2
if (circumcircle_test (T,To) = YES)
flag = YES;
swap eo;
T
if (type[i] = 0)
eo
while(Tr != Null) T : = Tr;
To
else Ts := T;
continue;
else T := Tl;
while(T != Ts);
Min-maximization Algorithm………(contd)
Step 4
2
if (circumcircle_test (T,To) = YES)
flag = YES;
swap eo; T
if (type[i] = 0)
while(Tr != Null) T : = Tr;
else Ts := T;
continue;
else T := Tl;
while(T != Ts);
Min-maximization Algorithm………(contd)
Step 4
2
if (circumcircle_test (T,To) = YES)
flag = YES; T
swap eo;
if (type[i] = 0)
while(Tr != Null) T : = Tr;
else Ts := T;
continue;
else T := Tl;
while(T != Ts);
After Min-maximization………………
3 2
T2
4 T4 T1 1
T3
5 6
Step 1
Initialise the list r[t]=0 for all triangles t
Set flag = 0
Step 2 3 2
for i= 1 to nt
if (r[t] = 2) continue
4 1
find the coordinates of centroid
calculate dmin
if(dmin>alpha * f) calculate amin
5 6
Refinement Algorithm..(contd.)
Note :
dmin = min {d1,d2,d3} amin = min {a1,a2,a3}
where di = distance of vertex i of the triangle from
its centroid
ai = distance of the centroid of the triangle
from the centroids of its neighbors if they are noted
already for refinement
Refinement Algorithm..(contd.)
Step 3 3 2
if (dmin > f)
if(amin > f) 7
include the centroid as the new node
4 1
set r[t]=1, flag =1
else r[t]=2
else r[t]=2
endfor 5 6
Refinement Algorithm..(contd.)
Step 4 3 2
if (flag = 0) break;
set p = nt 7
for i = 1 to nt 4 1
if(r[t]=1)
replace triangle t by 3 triangles
set r[t]=r[p+1]=r[p+2]=0
p=p+2 5 6
endif
endfor
Refinement Algorithm..(contd.)
Step 5 3 2
set nt = p
7
min-maximize the triangles connected
to the new nodes alone* 1
4
while (flag =1) repeat steps 2 to 5
5 6
* Whenever the common edge of two triangles is swapped, set r[ ]=0
for those two triangles as they have to be tested for refinement
Refinement Algorithm..(contd.)
3 2 3 2
7 7
8 8
4 1 4 1
9 9
5 6 5 6
3 2 3 2
3
7 7
8
8
10 1 10 1
4 4
9 9
5 6 5 6
3 2
7
8
10 1
4
9
5 6
Refined mesh
Mesh Relaxation
7 7
8 8
10 1 1
4 4
9 9 10
5 6 5 6
3 2
77
8
1
4
9 10
5 6
Mesh Smoothing…(contd.)
3 2
8
1
4
9 10
5 6
Mesh Smoothing…(contd.)
3 2
7
8
1
4 9
10
5 6
Mesh Smoothing…(contd.)
3 2
7
8
1
4 9
10
5 6
Mesh Smoothing…(contd.)
3 2
8
1
4 9
10
5 6
sryedida@iitm.ac.in
Illustration……..(contd.)
sryedida@iitm.ac.in
Illustration……..(contd.)
sryedida@iitm.ac.in
Illustration……..(contd.)
sryedida@iitm.ac.in
Illustration……..(contd.)
sryedida@iitm.ac.in
Illustration……..(contd.)
sryedida@iitm.ac.in
Illustration……..(contd.)
sryedida@iitm.ac.in
Illustration……..(contd.)
sryedida@iitm.ac.in
Illustration……..(contd.)
Illustration ……..(contd.)
sryedida@iitm.ac.in
Illustration ……..(contd.)
sryedida@iitm.ac.in
Illustration……..(contd.)
sryedida@iitm.ac.in
Illustration……..(contd.)