Lecture 7

advertisement
Lecture 7
FEM in 2D: Non-rectangular Domains
(Lecture notes taken by Shijun Yin and Peng Song)
 Membrane problem with Delaunay triangles via ray and grid nodes.
To generate nodes via ray, set flag = 0 in gennodcircle.m.
1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-1
-0.5
0
0.5
1
The following thin and slim triangles may cause large round-off errors.
To generate nodes via grid, set flag = 1 in gennodcircle.m.
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-0.5
1
0
0.5
1

Membrane problem on an ellipse x 2 
y2
1
4
Here one must modify the code in gennodcircle.m under the flag = 1. Use x = cos(θ) and
y = 2sin(θ). See homework set two.

Heat problem for insulated pipe
du
0
dn
n
70F
u y  0
212F
u y  0
Consider  K u  f with the above boundary conditions. Here K corresponds to relatively small
thermal conductivity of the insulated material separating the hot pipe and the surrounding region. Run
fem2d.m setting flag =1 to get the following grid and solution.
2
1.8
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0
0.5
1
1.5
2
2.5
2.5
220
2
200
180
1.5
160
140
1
120
0.5
100
80
0
60
0.5
2
1.5
1
-0.5
1
1.5
0.5
2

0
0
0.5
1
Heat problem for cooling fin attached to a pipe.
This is a generalized case from above example when C  0
2c
 K u  (usur  u )
H
K u  Cu  70C
3
1.5
2
The boundary conditions are the same as in the insulated pipe. Here the thermal conductivity
will be large because the material will be made from some metal, and it is desired to conduct
heat from the fin to the surrounding region.

Ideal flow about an obstacle.
  u0 w
  u0 y
x  0
 y  u0
 0
For more details, refer to Section 3.4 in “Computational Mathematics”, by Robert White.
Here  is the stream function.Given velocity function, vel  (u , v)
We are trying to solve the following problem,
  0
  (  v , u )
The 2D ideal flow u  u ( x, y ) , v  v( x, y ) has the following properties:
(a). Steady-state.
(b). Incompressible:
ux  vy  0
vx  u y  0 .
(c). Irrotational (no circulation):
From incompressibility, we can there exists a stream function such that   (v, u ) , which is based on Green’s
theorem. To see this, note
 u
x
 ( v y )  Ñ
 vdx  udy  0 since ux  v y  0 .
( x, y )
4
( x0 , y0 )
Let
 
( x, y )
( x0 , y0 )
vdx  udy
Then  x  v ,  y  u , or   (v, u ) .
Next use the irrotational condition.
vx  u y  0
This implies
( x ) x  ( y ) y  0 or   0 .
Finally we show the tangent lines to the curves are parallel to the paths of the flow. Let
d
 ( x, y )   ( x( ), y ( ))  C and compute
 0.
d
 dx dy 
Consider tangent vector to this path  ,  . Then,
 d d 
d
dx
dy
 dx dy 
 x
 y
   v, u   
,   0.
d
d
d
 d d 
This means the tangent vector is perpendicular to the vector normal to the velocity vector.
(
dx dy
, )
d d
( x( ), y( ))
Run fem2d.m and set flag = 2 to get the following grids and solution.
2.5
2.5
2
2
1.5
1.5
5
1
1
0.5
0.5
0
0
-0.5
-0.5
0
0.5
1
1.5
2
2.5
3
3.5
4
0
0.5
1
1.5
2
2.5
3
3.5
4
Download