k. m. isaac professor of aerospace...
TRANSCRIPT
8/29/01 Topic 3 Discretization of PDE 1
AE/ME 339
K. M. IsaacProfessor of Aerospace Engineering
8/29/01 Topic 3 Discretization of PDE 2
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
Dicretization of Partial Differential Equations (CLW: 7.2, 7.3)
We will follow a procedure similar to the one used in the previous classWe consider the unsteady vorticity transport equation, noting that the equation is non-linear.
8/29/01 Topic 3 Discretization of PDE 3
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
Vorticity vector:
ux
i
�
�
�
vy
j
�
�
�
wz
k
�
�
�
_ _ _curl v v� � ���
Is a measure of rotational effects.
�� 2� �where is the local angular velocity of a fluid
element.
=
8/29/01 Topic 3 Discretization of PDE 4
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
For 2-D incompressible flow, the vorticity transport equation is given by
���� 2
���
��
�
��
�
� vy
vx
ut
(1)
2
2
2
22
yx �
��
�
���
���
� - kinematic viscosity ���
����
���
�
sm2
8/29/01 Topic 3 Discretization of PDE 5
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
As in the case of ODE ,the partial derivatives can be discretizedUsing Taylor series
� � � � � �
� �
� �� � n
n
Ryxuy
kx
hn
yxuy
kx
h
yxuy
kx
hyxukyhxu
����
����
�
�
��
�
�
����
����
�
�
��
�
�
����
����
�
�
��
�
����
�
,!1
1
..................................,!2
1
,,,
1
2
(2)
8/29/01 Topic 3 Discretization of PDE 6
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
( ) nnR O h k� �� �
� �(3)
We can expand in Taylor series for the 8 neighboring points of(i,j) using (i,j) as the central point.
8/29/01 Topic 3 Discretization of PDE 7
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
� � � �xxxxxxjiji uxuxxuuu
32
,,1�
��
�����
� � � �xxxxxxjiji uxuxxuuu
32
,,1�
��
�����
(5)
(4)
8/29/01 Topic 3 Discretization of PDE 8
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
2
2
,xuu
xuu xxx
�
��
�
��Here etc.
Note: all derivatives are evaluated at (i,j)
Rearranging the equations yield the following finite differenceformulas for the derivatives at (i,j).
� �1 , ,i j i ju uu O xx x
���
� � �� �
(6)
8/29/01 Topic 3 Discretization of PDE 9
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
� �, 1,i j i ju uu O xx x
�
��� � �
� �
(7)
� �21, 1,
2i j i ju uu O x
x x� �
�� � �� � �� � �
(8)
� �� �
221, , 1,
22
2i j i j i ju u uu O xx x
� �� �� � �� � �
� � �(9)
8/29/01 Topic 3 Discretization of PDE 10
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
Eq.(6) is known as the forward difference formula.
Eq.(7) is known as the backward difference formula.
Eq.(8) and (9) are known as central difference formulas.
Compact notation:
1 1, ,2 2
,
i j i j
x i j
u uu
x�
� �
�
��
(10)
8/29/01 Topic 3 Discretization of PDE 11
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
The Heat conduction problem (ID)
x x
T Tk k xx x x
� � �� �� � � �� �
� � � �xx
Tkx
��
�
x x+�x
Consider unit area in the direction normal to x.Energy balance for a CV of cross section of area 1 and length �x:
Volume of CV, dV = 1 �x
8/29/01 Topic 3 Discretization of PDE 12
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
Change in temperature during time interval �t, = �T
Increase in energy of CV :
1 pTx c t HOTt
��
� � � � ��
This should be equal to the net heat transfer across the two faces
x x x
T T Tk t k k x t HOTx x x x
� �� � � �� �� � � � � � � � � � �
� � � � �� �
8/29/01 Topic 3 Discretization of PDE 13
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
Equating the two and canceling �t �x gives
pT Tc kt x x
�� � �� �
� � �� �� � ��
Note: higher order tems (HOT) have been dropped.If we assume k=constant, we get
2
2pT Tc kt x
�� �
�� �
8/29/01 Topic 3 Discretization of PDE 14
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
2 2
2 2p
T k T Tt c x x
��
� � �� �
� � �Or
p
kc
��
� is the thermal diffusivity.Where
Letting � = x/L, and � = �t/L2, the above equation becomes
2
2
T T� �
� ��
� �
8/29/01 Topic 3 Discretization of PDE 15
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
The above is a Parabolic Partial Differential Equation.
2
2
xu
tu
�
��
�
�(11)
8/29/01 Topic 3 Discretization of PDE 16
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
Physical problem
A rod insulated on the sides with a given temperature distributionat time t = 0 .Rod ends are maintained at specified temperature at all time.Solution u(x,t) will provide temperature distribution along the rodAt any time t > 0.
2
2
xu
tu
�
��
�
�10,0 ttlx ����
8/29/01 Topic 3 Discretization of PDE 17
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
IC:
)()0,( xfxu � lx ��0 (12)
BC:
)(),()(),0(
1
0
tgtlutgtu
�
� 10 tt ��
10 tt ��(13)
8/29/01 Topic 3 Discretization of PDE 18
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
Difference Equation
Solution involves establishing a network of Grid points as shown in the figure in the next slide.
Grid spacing: ,Mlx ��
Ntt 1
��
8/29/01 Topic 3 Discretization of PDE 19
8/29/01 Topic 3 Discretization of PDE 20
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
M,N are integer values chosen based on required accuracyand available computational resources.
Explicit form of the difference equation
� �2,1,,1,1, 2
xuuu
tuu ninininini
�
���
�
���� (14)
Define 2( )t
x�
��
�
8/29/01 Topic 3 Discretization of PDE 21
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
Then
� �, 1 1, , 1,1 2i n i n i n i nu u u u� � �� � �� � � � (15)
Circles indicate grid points involved in space differenceCrosses indicate grid points involved in time difference.
8/29/01 Topic 3 Discretization of PDE 22
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
Note:At time t=0 all values � �ii xfu �0, are known (IC).
In eq.(15) if all niu , are known at time level tn, , 1i nu�
can be calculated explicitly.
Thus all the values at a time level (n+1) must be calculated beforeadvancing to the next time level.
Note: If all IC and BC do not match at (0,0) and )0,(l , it should behandled in the numerical procedure.Select one or the other for the numerical calculation.There will be a small error present because of this inconsistency.
8/29/01 Topic 3 Discretization of PDE 23
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
Convergence of Explicit Form.
Remember that the finite difference form is an approximation.The solution also will be an approximation.
The error introduced due to only a finite number of terms in theTaylor series is known as truncation error, ��
The solution is said to converge if
0� � when , 0x t� � �
Error is also introduced because variables are represented by a finite number of digits in the computer.This is known as round-off error.
8/29/01 Topic 3 Discretization of PDE 24
Computational Fluid Dynamics (AE/ME 339) K. M. IsaacMAEEM Dept., UMR
as
Therefore, the solution converges.
2[( ) ]O x� � �
0� � 0x� �
From the above
For the explicit method, the truncation error, � is