Unformatted text preview:

10 34 Numerical Methods Applied to Chemical Engineering Homework 1 Linear Algebraic Equation Sets Assigned Friday 9 6 02 Due Friday 9 13 02 1 Solution of a mass balance problem For the following separation system we know the inlet mass flowrate in Kg hr and the mass fractions of each species in the inlet stream 1 and each outlet streams 2 4 and 5 FIGURE 1 Process diagram for separation system Here we use the notation that iF is the mass flow rate of stream i and fraction of species j in stream i i w j is the mass We want to calculate the unknown mass flow rates of each outlet stream If we define the unknowns as 2 4 5 x1 F x2 F x3 F EQ 1 and set up the mass balances for 1 the total mass flow rate 2 the mass flow rate of species 1 3 the mass flow rate of species 2 September 13 2002 1 we obtain a set of three linear algebraic equations for the three unknown outlet flow rates Convert this set of equations to matrix form and solve the system by hand using Gaussian elimination with partial pivoting Make sure that you clearly identify what calculations you perform at each row and pivot operation 2 Solution of a 1 D transport problem with finite differences Background In this problem we consider the use of the method of finite differences to convert a boundary value problem from fluid mechanics into a set of linear algebraic equations We will then modify the standard Gaussian elimination method to solve the resulting linear system in a very efficient manner Consider the case of a Newtonian fluid undergoing laminar pressure driven flow between two parallel infinite flat plates separated by a distance B see figure below The bottom plate is stationary and the top plate moves at a constant velocity V up We know the value of the constant dynamic pressure gradient P x P p g r and wish to calculate the resulting velocity profile FIGURE 2 Pressure driven flow between two infinite parallel flat plates If we assume a velocity profile of the form v r t v x y e x the equation of continuity for an incompressible fluid and the Navier Stokes equation Dv P 2v Dt EQ 2 v 0 is satisfied automatically EQ 3 reduces to September 13 2002 2 P 0 x 2 d vx dy 2 EQ 4 subject to the no slip boundary conditions v x y 0 0 v x y B Vup EQ 5 This is a classic problem from fluid mechanics that is solved easily by integrating the differential equation twice and using the boundary conditions to specify the values of the constants of integration The resulting solution is y 1 P 2 v x y Vup y yB B 2 x EQ 6 We now wish to employ a numerical method to solve this problem by converting the boundary value problem into a set of algebraic equations For this particular problem there is little actual need to do so since an analytical solution is available We shall find however that the technique that we develop here can be used to obtain numerical approximations to the solution of boundary value problems even when no analytical solution exists For this example we use the conceptually simple method of finite differences that is based on the following definition of the derivative of a differentiable function f x df x x f x lim f x f x x EQ 7 f x x f x x lim f lim dx x x 2 x x 0 x 0 x 0 In the limit as x 0 all three finite difference approximations agree In the method of finite differences we use finite but small values of x in one of these approximations to convert the derivatives appearing in a differential equation to algebraic forms We shall study this method in more detail later however for now we merely note that the first approximation formula given above the central difference approximation is more accurate than the one sided differences Our differential equation in this example involves the second derivative of the velocity therefore we need to construct an algebraic approximation to this higher order derivative We place a grid of N points along the computational domain y 0 B see figure below at the locations September 13 2002 3 B y N 1 y j j y j 1 2 N EQ 8 FIGURE 3 Placement of grid points for finite difference computation At grid point j we use a central difference formula to approximate the local value of the second derivative of the velocity dv dv x x dy dy y j y 2 y j y 2 y 2 d vx dy 2 EQ 9 yj Here the values of the first derivatives are evaluated at the mid points between the grid locations We then use yet other central difference formulas for these mid point values dv x dy dv x dy EQ 10 yj vx yj 1 vx yj y y 2 EQ 11 yj vx yj vx yj 1 y y 2 to obtain the following approximation of the second derivative at each grid point 2 d vx dy 2 yj v x y j 1 2v x y j v x y j 1 2 y EQ 12 In general this algebraic approximation of the second derivative is not exact and one must reduce the value of y by increasing the number of grid points N until the magnitude of the approximation error is below some acceptable value For this particular problem since the true solution is a simple quadratic function we are lucky and this algebraic approximation is exact To solve a boundary value problem using the method of finite diffferences we formulate a set of N algebraic equations for the set of N unknowns y1 y2 yN For each grid September 13 2002 4 point we need a separate algebraic equation that we obtain by requiring the differential equation to hold locally 2 d vx P 0 2 x dy EQ 13 yj If we insert the central difference approximation for the second derivative the algebraic equation for grid point j is v x y j 1 2v x y j v x y j 1 P 0 2 x y We write this in a more compact form by defining the column vector v2 v as vx y1 v1 v EQ 14 vx y2 vN EQ 15 vx yN so that the algebraic equation for grid point j becomes 2 y P v j 1 2v j v j 1 x EQ 16 If we assemble these equations in matrix form we obtain the system v1 2 1 1 2 1 1 2 1 v2 v3 1 2 1 vN 1 1 2 v N G v0 G G G G vN 1 EQ 17 where 2 y P G x EQ 18 and v 0 v x y 0 v N 1 v x y B September 13 2002 EQ 19 5 To enforce the no …


View Full Document

MIT 10 34 - Homework 1 Linear Algebraic Equation Sets

Documents in this Course
Load more
Loading Unlocking...
Login

Join to view Homework 1 Linear Algebraic Equation Sets and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Homework 1 Linear Algebraic Equation Sets and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?