Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 27 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
27
Dung lượng
851,48 KB
Nội dung
Section 5: Finite Volume Methods for the Navier Stokes Equations In this initial lecture we introduce the two-dimensional Navier-Stokes Equations continuity equation: 𝜕𝜌 𝜕(𝜌𝑢) 𝜕(𝜌𝑣) + + =0 𝜕𝑡 𝜕𝑥 𝜕𝑦 x-momentum: 𝜌( 𝜕𝑢 𝜕𝑢 𝜕𝑢 𝜕𝑝 𝜕 𝜕𝑢 𝜕 𝜕𝑢 𝜕𝑣 +𝑢 +𝑣 )=− + + 𝜆∇ ∙ 𝑢̅) + (2𝜇 [𝜇 ( + )] 𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑥 y-momentum: 𝜌( 𝜕𝑣 𝜕𝑣 𝜕𝑣 𝜕𝑝 𝜕 𝜕𝑢 𝜕𝑣 𝜕 𝜕𝑣 +𝑢 +𝑣 )=− + + 𝜆∇ ∙ 𝑢̅) [𝜇 ( + )] + (2𝜇 𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑦 The above equations are expressed in what is known as the non-conservative form For implementation of the finite-volume method, the conservation-law form is appropriate The equivalent equations in conservation law form appear as follows: x-momentum 𝜕(𝜌𝑢) 𝜕(𝜌𝑢𝑢) 𝜕(𝜌𝑣𝑢) 𝜕𝑝 𝜕 𝜕𝑢 𝜕 𝜕𝑢 𝜕𝑣 + + =− + + 𝜆∇ ∙ 𝑢̅) + (2𝜇 [𝜇 ( + )] 𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑥 y-momentum 𝜕(𝜌𝑣) 𝜕(𝜌𝑢𝑣) 𝜕(𝜌𝑣𝑣) 𝜕𝑝 𝜕 𝜕𝑢 𝜕𝑣 𝜕 𝜕𝑣 + + =− + + 𝜆∇ ∙ 𝑢̅) [𝜇 ( + )] + (2𝜇 𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑦 How? Let’s look at the unsteady and convection terms of the x-momentum equation: 𝜕(𝜌𝑢) 𝜕(𝜌𝑢𝑢) 𝜕(𝜌𝑣𝑢) + + ≡ 𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜌 𝜕𝑢 𝜕𝜌 𝜕(𝜌𝑢) 𝜕𝑣 𝜕𝑢 𝜕(𝜌𝑣) +𝑢 +𝑢 + 𝜌𝑢 + 𝜌𝑣 +𝑢 𝜕𝑡 𝜕𝑡 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦 Note the terms highlighted in red represent the continuity equation multiplied by u, hence sum to zero Hence the two forms of expressing the left side of the momentum equations are equivalent The momentum equations may also be rearranged on the right side as: 𝜌( 𝜌( 𝜕𝑢 𝜕𝑢 𝜕𝑢 +𝑢 +𝑣 )= 𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑝 𝜕 𝜕𝑢 𝜕 𝜕𝑢 𝜕 𝜕𝑢 𝜕 𝜕𝑣 𝜕 (𝜆∇ ∙ 𝑢̅) − + (𝜇 ) + (𝜇 ) + [ (𝜇 ) + (𝜇 )] + 𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑣 𝜕𝑣 𝜕𝑣 +𝑢 +𝑣 )= 𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑝 𝜕 𝜕𝑣 𝜕 𝜕𝑣 𝜕 𝜕𝑣 𝜕 𝜕𝑢 𝜕 (𝜆∇ ∙ 𝑢̅) − + (𝜇 ) + (𝜇 ) + [ (𝜇 ) + (𝜇 )] + 𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑦 For each equation, the viscous terms (in the square brackets) sum to zero for a constant property, incompressible flow, as does the last term in the equations How? Let’s look at the terms from the x-momentum equation: 𝜕 𝜕𝑢 𝜕 𝜕𝑣 𝜕 𝜕𝑢 𝜕 𝜕𝑣 𝜕 𝜕𝑢 𝜕𝑣 [ (𝜇 ) + (𝜇 )] ≡ (𝜇 ) + (𝜇 ) ≡ 𝜇 ( + ) 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑦 Finally, denoting the bracketed viscous terms and the 2nd viscosity coefficient terms as Sx and Sy respectively, the momentum equations may be written in conservation-law form as: x-momentum 𝜕(𝜌𝑢) 𝜕𝑝 + ∇ ∙ (𝜌𝑢̅𝑢) = − + ∇ ∙ (𝜇∇𝑢) + 𝑆𝑥 𝜕𝑡 𝜕𝑥 y-momentum 𝜕(𝜌𝑣) 𝜕𝑝 + ∇ ∙ (𝜌𝑢̅𝑣) = − + ∇ ∙ (𝜇∇𝑣) + 𝑆𝑦 𝜕𝑡 𝜕𝑦 For a constant property, incompressible flow the source terms are zero Finite Volume Method To implement the finite volume method, we integrate this form of the governing equations over a control volume By applying the Gauss divergence theorem we convert the convective and viscous volume integral terms to surface integrals For the x-momentum equation: ∫[∇ ∙ (𝜌𝑢̅𝑢)] 𝑑𝑉 = ∫ 𝜌𝑢(𝑢̅ ∙ 𝑛̂) 𝑑𝐴 and ∫[∇ ∙ (𝜇∇𝑢)]𝑑𝑉 = ∫(𝜇∇𝑢) ∙ 𝑛̂𝑑𝐴 The pressure gradient term is evaluated as a volume integral The x-momentum equation becomes: ∫ 𝜌𝑢(𝑢̅ ∙ 𝑛̂) 𝑑𝐴 = − ∫ 𝜕𝑝 𝑑𝑉 + ∫(𝜇∇𝑢) ∙ 𝑛̂𝑑𝐴 𝜕𝑥 Similarly for the y-momentum equation: ∫ 𝜌𝑣(𝑢̅ ∙ 𝑛̂) 𝑑𝐴 = − ∫ 𝜕𝑝 𝑑𝑉 + ∫(𝜇∇𝑣) ∙ 𝑛̂𝑑𝐴 𝜕𝑦 In the following lectures we will look at the evaluation of these integrals over a control volume However, our first step, discussed in the next lecture, is to look at the placement of the unknowns on the mesh The Semi-Implicit Method for Pressure-Linked Equation (SIMPLE) Procedure 1) Guess values for u, v, p 2) Solve the momentum equations for u and v The resulting velocities will satisfy momentum, but not mass conservation 3) Solve a pressure correction equation for a pressure correction p’ 4) Update the guessed pressure using the just-computed pressure correction, p’ 5) Update the velocities resulting from the solution to the momentum equations with velocity corrections, u’ and v’ (which are directly related to the computed pressure correction, p’) These new velocities will now satisfy mass conservation, but no longer satisfy momentum 6) Go back to step where the guessed values are now the results from steps (for pressure) and (for velocities) The process continues until convergence to a pressure distribution that, when used in the momentum equations, results in both mass conserving and momentum conserving velocities out of the momentum solvers In the following lectures we will derive: 1) the discretized momentum equations 2) expressions for velocity corrections in terms of pressure corrections 3) the discretized continuity equation, which leads to the pressure correction equation Discretization of x-momentum equation: ∫ 𝜌𝑢(𝑢̅ ∙ 𝑛̂) 𝑑𝐴 = − ∫ 𝜕𝑝 𝑑𝑉 + ∫(𝜇∇𝑢) ∙ 𝑛̂𝑑𝐴 𝜕𝑥 𝜌𝑢𝑢|𝑒𝑤 Δ𝑦 + 𝜌𝑣𝑢|𝑛𝑠 Δ𝑥 = 𝜕𝑢 𝑒 𝜕𝑢 𝑛 (𝑃𝑤 − 𝑃𝑒 )Δ𝑦 + 𝜇 | ∆𝑦 + 𝜇 | ∆𝑥 𝜕𝑥 𝑤 𝜕𝑦 𝑠 Define: 𝑚̇𝑒 = (𝜌𝑢)𝑒 Δ𝑦 𝑚̇𝑤 = (𝜌𝑢)𝑤 Δ𝑦 𝑚̇𝑛 = (𝜌𝑣 )𝑛 Δ𝑥 𝑚̇𝑠 = (𝜌𝑣 )𝑠 Δ𝑥 Rewrite the discretized equation as: 𝑚̇𝑒 𝑢𝑒 − 𝑚̇𝑤 𝑢𝑤 + 𝑚̇𝑛 𝑢𝑛 − 𝑚̇𝑠 𝑢𝑠 = 𝑈𝐸 − 𝑈𝑃 𝑈𝑃 − 𝑈𝑊 (𝑃𝑤 − 𝑃𝑒 )Δ𝑦 + 𝜇𝑒 Δ𝑦 − 𝜇𝑤 Δ𝑦 + (𝛿𝑥 )𝑒 (𝛿𝑥 )𝑤 𝑈𝑁 − 𝑈𝑃 𝑈𝑃 − 𝑈𝑆 𝜇𝑛 Δ𝑥 − 𝜇𝑠 Δ𝑥 (𝛿𝑦)𝑛 (𝛿𝑦)𝑠 Group the coefficients of 𝑈𝑃 : 𝑚̇𝑒 𝑢𝑒 − 𝑚̇𝑤 𝑢𝑤 + 𝑚̇𝑛 𝑢𝑛 − 𝑚̇𝑠 𝑢𝑠 = 𝜇𝑒 Δ𝑦 𝜇𝑤 Δ𝑦 𝜇𝑛 Δ𝑥 𝜇𝑠 Δ𝑥 (𝑃𝑤 − 𝑃𝑒 )Δ𝑦 − [ + + + ]𝑈 + (𝛿𝑥 )𝑒 (𝛿𝑥 )𝑤 (𝛿𝑦)𝑛 (𝛿𝑦)𝑠 𝑃 𝜇𝑒 Δ𝑦 𝜇𝑤 Δ𝑦 𝜇𝑛 Δ𝑥 𝜇𝑠 Δ𝑥 𝑈 + 𝑈 + 𝑈 + 𝑈 (𝛿𝑥 )𝑒 𝐸 (𝛿𝑥 )𝑤 𝑊 (𝛿𝑦)𝑛 𝑁 (𝛿𝑦)𝑠 𝑆 Need to interpolate to find face values for 𝑈𝑒 , 𝑈𝑤 , 𝑈𝑛 , 𝑈𝑠 We will use 1st order upwinding hence flow direction must be taken into account We use the max function for that: 𝑚𝑎𝑥[𝑚̇𝑒 , 0]𝑈𝑃 − 𝑚𝑎𝑥 [−𝑚 ̇ 𝑒 , 0]𝑈𝐸 + 𝑚𝑎𝑥[−𝑚̇𝑤 , 0]𝑈𝑃 − 𝑚𝑎𝑥[𝑚̇𝑤 , 0]𝑈𝑊 + 𝑚𝑎𝑥[𝑚̇𝑛 , 0]𝑈𝑃 − 𝑚𝑎𝑥[−𝑚 ̇ 𝑛 , 0]𝑈𝑁 + 𝑚𝑎𝑥[−𝑚̇𝑠 , 0]𝑈𝑃 − 𝑚𝑎𝑥[𝑚̇𝑠 , 0]𝑈𝑆 = 𝜇𝑒 Δ𝑦 𝜇𝑤 Δ𝑦 𝜇𝑛 Δ𝑥 𝜇𝑠 Δ𝑥 (𝑃𝑤 − 𝑃𝑒 )Δ𝑦 − [ + + + ]𝑈 + (𝛿𝑥 )𝑒 (𝛿𝑥 )𝑤 (𝛿𝑦)𝑛 (𝛿𝑦)𝑠 𝑃 𝜇𝑒 Δ𝑦 𝜇𝑤 Δ𝑦 𝜇𝑛 Δ𝑥 𝜇𝑠 Δ𝑥 𝑈 + 𝑈 + 𝑈 + 𝑈 (𝛿𝑥 )𝑒 𝐸 (𝛿𝑥 )𝑤 𝑊 (𝛿𝑦)𝑛 𝑁 (𝛿𝑦)𝑠 𝑆 Recall we need to ensure that 𝐴𝑃 = 𝐴𝐸 + 𝐴𝑊 + 𝐴𝑁 + 𝐴𝑆 + (𝑚̇𝑒 − 𝑚̇𝑤 + 𝑚̇𝑛 − 𝑚̇𝑠 ) It currently doesn’t Note the difference in the signs within the max functions We can rewrite the terms multiplying 𝑈𝑃 as: 𝑚𝑎𝑥[𝑚̇𝑒 , 0] + 𝑚𝑎𝑥 [−𝑚̇𝑤 , 0] + { } 𝑈𝑃 ≡ 𝑚𝑎𝑥[𝑚̇𝑛 , 0] + 𝑚𝑎𝑥[−𝑚̇𝑠 , 0] 𝑚𝑎𝑥[−𝑚̇𝑒 , 0] + 𝑚𝑎𝑥[𝑚̇𝑤 , 0] + { 𝑚𝑎𝑥[−𝑚̇𝑛 , 0] + 𝑚𝑎𝑥[𝑚̇𝑠 , 0] + } 𝑈𝑃 (𝑚̇𝑒 − 𝑚̇𝑤 + 𝑚̇𝑛 − 𝑚̇𝑠 ) To check this, let’s assume a 1D flow west-to-east so that 𝑚̇𝑒 and 𝑚̇𝑤 are both positive: 𝑚̇𝑒 𝑈𝑃 = 𝑚̇𝑤 𝑈𝑃 + (𝑚̇𝑒 − 𝑚̇𝑤 )𝑈𝑃 or 𝑚̇𝑒 𝑈𝑃 = 𝑚̇𝑒 𝑈𝑃 If we assume flow from east-to-west so that 𝑚̇𝑒 and 𝑚̇𝑤 are both negative: 𝑚̇𝑤 𝑈𝑃 = 𝑚̇𝑒 𝑈𝑃 + (−𝑚̇𝑒 + 𝑚̇𝑤 )𝑈𝑃 or 𝑚̇𝑤 𝑈𝑃 = 𝑚̇𝑤 𝑈𝑃 Now, we can define our coefficients as: 𝐴𝑢𝐸 = 𝑚𝑎𝑥[−𝑚̇𝑒 , 0] + 𝐴𝑢𝑊 = 𝑚𝑎𝑥[𝑚̇𝑤 , 0] + 𝜇𝑤 Δ𝑦 (𝛿𝑥 )𝑤 𝐴𝑢𝑁 = 𝑚𝑎𝑥[−𝑚̇𝑛 , 0] + 𝐴𝑆𝑢 𝜇𝑒 Δ𝑦 (𝛿𝑥 )𝑒 𝜇𝑛 Δ𝑥 (𝛿𝑦)𝑛 𝜇𝑠 Δ𝑥 = 𝑚𝑎𝑥[𝑚̇𝑠 , 0] + (𝛿𝑦)𝑠 So that: 𝐴𝑢𝑃 = 𝐴𝑢𝐸 + 𝐴𝑢𝑊 + 𝐴𝑢𝑁 + 𝐴𝑆𝑢 + (𝑚̇𝑒 − 𝑚̇𝑤 + 𝑚̇𝑛 − 𝑚̇𝑠 ) The discretized x-momentum equation is then written as: 𝐴𝑢𝑃 𝑈𝑃 = 𝐴𝑢𝐸 𝑈𝐸 + 𝐴𝑢𝑊 𝑈𝑊 + 𝐴𝑢𝑁 𝑈𝑁 + 𝐴𝑆𝑢 𝑈𝑆 + (𝑃𝑤 − 𝑃𝑒 )Δ𝑦 10 Pressure Correction Procedure 𝐴𝑢𝑃𝑤 𝑈𝑤 = ∑ 𝐴𝑢𝑛𝑏 𝑈𝑛𝑏 + (𝑃𝑊 − 𝑃𝑃 )∆𝑦 𝑛𝑏 𝐴𝑢𝑃𝑒 𝑈𝑒 = ∑ 𝐴𝑢𝑛𝑏 𝑈𝑛𝑏 + (𝑃𝑃 − 𝑃𝐸 )∆𝑦 𝑛𝑏 𝐴𝑣𝑃𝑠 𝑉𝑠 = ∑ 𝐴𝑣𝑛𝑏 𝑉𝑛𝑏 + (𝑃𝑆 − 𝑃𝑃 )∆𝑥 𝑛𝑏 𝐴𝑣𝑃𝑛 𝑉𝑛 = ∑ 𝐴𝑣𝑛𝑏 𝑉𝑛𝑏 + (𝑃𝑃 − 𝑃𝑁 )∆𝑥 𝑛𝑏 13 Let * denote a guessed value, then write: ∗ ∗ 𝐴𝑢𝑃𝑤 𝑈𝑤∗ = ∑ 𝐴𝑢𝑛𝑏 𝑈𝑛𝑏 + (𝑃𝑊 − 𝑃𝑃∗ )∆𝑦 𝑛𝑏 ∗ 𝐴𝑢𝑃𝑒 𝑈𝑒∗ = ∑ 𝐴𝑢𝑛𝑏 𝑈𝑛𝑏 + (𝑃𝑃∗ − 𝑃𝐸∗ )∆𝑦 𝑛𝑏 ∗ 𝐴𝑣𝑃𝑛 𝑉𝑛∗ = ∑ 𝐴𝑣𝑛𝑏 𝑉𝑛𝑏 + (𝑃𝑃∗ − 𝑃𝑁∗ )∆𝑥 𝑛𝑏 ∗ 𝐴𝑣𝑃𝑠 𝑉𝑠∗ = ∑ 𝐴𝑣𝑛𝑏 𝑉𝑛𝑏 + (𝑃𝑆∗ − 𝑃𝑃∗ )∆𝑥 𝑛𝑏 Now define: 𝑈 = 𝑈∗ + 𝑈′ 𝑉 = 𝑉∗ + 𝑉′ 𝑃 = 𝑃∗ + 𝑃′ (i.e., U= guessed value + correction) Subtract the second set of equations from the first: ′ ′ 𝐴𝑢𝑃𝑤 𝑈𝑤′ = ∑ 𝐴𝑢𝑛𝑏 𝑈𝑛𝑏 + (𝑃𝑊 − 𝑃𝑃′ )∆𝑦 𝑛𝑏 etc This is an equation for the corrections to velocity and pressure 14 If we neglect the summation term: 𝑈𝑤′ ∆𝑦 ′ = 𝑢 (𝑃𝑊 − 𝑃𝑃′ ) 𝐴̃ 𝑃𝑤 𝑈𝑒′ ∆𝑦 ′ = 𝑢 (𝑃𝑃 − 𝑃𝐸′ ) 𝐴̃ 𝑃𝑒 𝑉𝑠′ = ∆𝑥 ′ (𝑃𝑆 − 𝑃𝑃′ ) 𝑣 𝐴̃ 𝑃𝑠 𝑉𝑛′ ∆𝑥 ′ = 𝑣 (𝑃𝑃 − 𝑃𝑁′ ) 𝐴̃ 𝑃𝑛 These are known as the velocity correction equations Note that all the 𝐴𝑢𝑃𝑤 , etc for the corrections need to be the 𝑢 tilde values in the computer code, i.e., 𝐴̃ 𝑃𝑤 , our iteration equation use the tilde value of the Ap’s 15 Next, let’s look at the (steady) continuity equation: 𝜕(𝜌𝑢) 𝜕(𝜌𝑣) + =0 𝜕𝑥 𝜕𝑦 Discretize using the finite volume approach: [(𝜌𝑈)𝑒 − (𝜌𝑈)𝑤 ]Δ𝑦 + [(𝜌𝑉 )𝑛 − (𝜌𝑉 )𝑠 ]Δ𝑥 = Substitute: 𝑈 = 𝑈∗ + 𝑈′ 𝑉 = 𝑉∗ + 𝑉′ 𝑃 = 𝑃∗ + 𝑃′ (𝜌𝑈𝑒∗ + 𝜌𝑈𝑒′ − 𝜌𝑈𝑤∗ − 𝜌𝑈𝑤′ )Δ𝑦 + (𝜌𝑉𝑛∗ + 𝜌𝑉𝑛′ − 𝜌𝑉𝑠∗ − 𝜌𝑉𝑠′ )Δ𝑥 = Gather the “starred” and “prime” terms: (𝜌𝑈𝑒′ − 𝜌𝑈𝑤′ )Δ𝑦 + (𝜌𝑉𝑛′ − 𝜌𝑉𝑠′ )Δ𝑥 + [(𝜌𝑈𝑒∗ − 𝜌𝑈𝑤∗ )Δ𝑦 + (𝜌𝑉𝑛∗ − 𝜌𝑉𝑠∗ )Δ𝑥 ] = The portion in yellow represents a “mass source term,” S Now substitute velocity corrections: 𝜌Δ𝑦 ′ 𝜌Δ𝑦 ′ 𝜌Δ𝑥 ′ ′ ′ ′) ( ) ( ) ( 𝑃 − 𝑃 − 𝑃 − 𝑃 + 𝑃 − 𝑃 − 𝑃 𝐸 𝑊 𝑃 𝑃 𝑁 𝑢 𝑢 𝑣 ̃ ̃ ̃ 𝐴 𝐴 𝐴 𝑃𝑒 𝑃𝑤 𝑃𝑛 𝜌Δ𝑥 ′ (𝑃𝑆 − 𝑃𝑃′ ) + 𝑆 = 𝑣 𝐴̃ 𝑃𝑠 Gather the 𝑃𝑃′ terms on the left side, the remainder on the right: 16 𝜌Δ𝑦 𝜌Δ𝑦 𝜌Δ𝑥 𝜌Δ𝑥 ′ ( 𝑢 + 𝑢 + 𝑣 + 𝑣 ) 𝑃𝑃 = 𝐴̃ 𝐴̃ 𝐴̃ 𝐴̃ 𝑃𝑒 𝑃𝑤 𝑃𝑛 𝑃𝑠 𝜌Δ𝑦 ′ 𝜌Δ𝑦 ′ 𝜌Δ𝑥 ′ 𝜌Δ𝑥 ′ 𝑃𝐸 + 𝑢 𝑃𝑊 + 𝑣 𝑃𝑁 + 𝑣 𝑃𝑆 − 𝑆 = 𝑢 ̃ 𝐴 𝐴̃ 𝐴̃ 𝐴̃ 𝑃𝑒 𝑃𝑤 𝑃𝑛 𝑃𝑠 or: ′ 𝐴𝑃 𝑃𝑃′ = 𝐴𝐸 𝑃𝐸′ + 𝐴𝑊 𝑃𝑊 + 𝐴𝑁 𝑃𝑁′ + 𝐴𝑆 𝑃𝑆′ − 𝑆 Now, putting into the form of an SOR scheme: 𝑃𝑃′ = 𝑃𝑃′ + 𝜔 ′ (𝐴𝐸 𝑃𝐸′ + 𝐴𝑊 𝑃𝑊 + 𝐴𝑁 𝑃𝑁′ + 𝐴𝑆 𝑃𝑆′ − 𝑆 − 𝐴𝑃 𝑃𝑃′ ) 𝐴𝑃 This is our equation over which we will iterate to find the pressure corrections 17 What about boundary conditions? We not change velocities on boundaries using velocity correction terms Hence, velocities normal to the boundaries must be set so that mass is conserved globally That is, on the east/west boundaries: 𝑈 ∗ = 𝑈 and 𝑈 ′ = This means that, for instance, on the east boundary: 𝑈𝑒′ = Δ𝑦 ′ ′ 𝑒 (𝑃𝑃 − 𝑃𝐸 ) ≡ 𝐴𝑃𝑢 Consequently, 𝑃𝑃′ = 𝑃𝐸′ We can force this in our code by setting the coefficient 𝐴𝐸 to zero along the entire east boundary, or equivalently by setting 𝐴𝑒𝑃𝑢 to a very large number (𝑖 𝑒 , 1030 ) Similarly for the other boundaries Note that the pressure update must be under relaxed: 𝑃𝑛𝑒𝑤 = 𝑃𝑜𝑙𝑑 + 𝛼𝑃′ where < 𝛼 < Velocities are also corrected using the velocity correction equation These corrections are not under relaxed as they conserve mass The corrections look like: 𝑈𝑒𝑛𝑒𝑤 = 𝑈𝑒𝑜𝑙𝑑 + 𝑈𝑒′ = 𝑈𝑒𝑜𝑙𝑑 + Δ𝑦 ′ (𝑃𝑃 − 𝑃𝐸′ ) 𝑢 𝐴̃ 𝑃𝑒 Note the pressure correction equation itself is linear, so it can be over relaxed, that is, < 𝜔 < 18 Suggested Index Notation (and what is used in Fortran code) 19 The Driven Cavity Problem 0