Professional Documents
Culture Documents
FDM Part2
FDM Part2
The Dirichlet BC, also known as the Type 1 BC, is expressed as follows:
(54)
The Neumann-type boundary condition, also known as the type 2 boundary condition, expresses the
value of the flux or the gradient of the function at the boundaries of the domain . It is expressed
as follows:
(55)
Flow calculation:
Figure 4
22
(56)
(57)
(58)
Equation 58 is perfectly valid, but it is only accurate to first order. We prefer the second approach,
which is more accurate to second order.
2. Second Approach:
Consider the following Taylor series expansion:
(59)
To approximate the flux to order 2, multiply equation 56 by 4 and subtract equation 59 to obtain:
(60)
(61)
(62)
23
3. Third Approach
Approximation 62 is more accurate than 58, since it is second-order. However, by writing 62,
equation 39 is not verified at node 1. In order to verify both 55 and 39, let's rewrite equations 56
and 59 as follows:
(63)
(64)
(65)
Rearranging 65 we obtain:
(66)
(67)
Equations 58, 62 and 67 are all valid and reflect the Neumann-type boundary condition. However,
expression 67 is more precise, as it is second-order and verifies differential equation 39, and is the
one we will adopt.
(68)
24
et are constants.
68 is rewritten as follows:
(69)
(70)
(71)
By rearranging 71 we get:
(72)
(73)
25
2.4. Generalization to the 2D case
So far we've applied FDM to the simple one-dimensional case. To generalize SFM to the 2D case,
let's consider the following Poisson's equation:
(74)
Figure 5: Domain
26
(75)
(76)
Equation 76 is similar to equation 42, except that the total derivative has been replaced by the
partial derivative.
(77)
(78)
(79)
27
(80)
(81)
equation 81 is only valid inside the domain , on the boundaries we'll have to use boundary
conditions.
Let's assume that the omega domain is subject to the following boundary conditions:
On the left wall :
(82)
(83)
(84)
(85)
➢ It is assumed that Dirichlet-type boundary conditions override all other forms of BC, so the
left-hand BC will be imposed on the node at the bottom left corner. Similarly, the BC of the
upper wall will be imposed at the node of the upper right corner.
➢ For the top left node, we will apply one of the two Dirichlet BCs or an average of the two.
28
➢ To apply Robin's BCs to the lower wall, we'll use formula 73, but this time along the y-axis,
which gives us :
(86)
All the nodes of the lower wall except those of the two corners have neighbours on the left and on
the right. Formula 79 is thus valid, so we write :
(87)
To satisfy the partial differential equation on the lower wall, we will therefore replace 86 and 87 in
equation 74, which gives us for the lower wall :
(88)
88 is valid
For the right wall, we'll use formula 67 according to the notation in figure 6, as well as formula 79:
(89)
Formula 89 applies to the right wall except at the two corner nodes
Figure 6
For the node of the right corner of the low wall we will use a combination of terms according to x
of 89 and the term according to y of 88 we obtain :
29
(90)
2°) An equation equivalent to equation 54 to represent the Dirichlet BC on the left wall:
5°) for the node at the right-hand corner of the bottom wall.
6°) Equation 90 for the right corner node of the bottom wall
Finally, before writing our system of equations in matrix form, we'll use the numbering of the nodes
in the domain as specified in figure 7
Figure 7
(91)
30
The various equations must be rewritten using the following notation:
(92)
31