PROBLEM 1.1 STATEMENT Solve the set of equations using the decomposition method and AX=B: 5x 1 + 3x 2 + 4x 3 = 12 6x 1 + 3x 2 + 4x 3 = 15 7x 1 + 9x 2 + 2x 3 = 10 PROBLEM 1.2 STATEMENT 1 4 5 3 4 5 If A = [ 2 3 4] and B = [ 2 6 8] 6 7 9 6 2 4 Find 1. The Rank of Matrix A and B? 2. C=A/B If it is possible? 3. C=A B if it is possible? 4. C=A-B? 5. C=A+B? 6. Transpose of A and B? 7. Inverse of A and B, Is it same as the part (6)? 8. C=A\B if it is possible? PROBLEM 1.3 STATEMENT The piston-connection rod-crank mechanism is used in many engineering applications. In the mechanism shown in the following figure, the crank is rotating at a constant speed of 500 rpm. L1=120 mm (piston arm) and L2= 250 mm (Connecting rod). Ѳ
Calculate and plot the position, velocity, and acceleration of the piston for one revolution of the crank for 0 t 120s. Make the three plots on the same page. Set Ѳ=0 when t = 0 sec, r =L1, and c = 0.25. The displacement of the piston: x = rcos(θ) + (c 2 r 2 sin 2 (θ)) 1 2 r x = rθ 2 θ sin(2θ) sin(θ) 2(c 2 r 2 sin 2 (θ)) 1 2 The acceleration of the piston is (The velcoity of the piston) x = dx dt Note: θ = θ t, and θ = 2πn 60 PROBLEM 1.4 STATEMENT The amount M of medication can be governed as: dm dt = e km + P Where k is proportionality constant and P is the rate that medication is injected into the body. The medication rate P is 50 mg/h and k is 0.23. At initial time t = 0 hour, the medication M is 0. Using ode45 and ode 23 to plot the medication rate for the time interval from zero to 24 hours with one hour increment. In one plot, show the comparison results between ode 45 and ode 23 and legend each plots as legend ( ODE 45, ODE 23 )? PROBLEM 1.5 STATEMENT Use ode45 to plot the temperature of the thermocouple junction for t =0 to 2000 sec. The temperature of the thermocouple is governed by Where k = 20 w m. K, c p = 400 J kg. K dt dt = ha s ρvc p (T T inf ), and ρ = 85000 kg m 3, the air temperature T inf is 200 o C, h = 400 w m 2. K, T i = 25 o C at t = 0 s, V is the volume and A s is the surface area. If the analytical solution of this problem is: T = (T i T )e ha s ρvcp t + T
Note: Plot ode45 and the analytical solution in the same plot, legend each plot. V = πd3 6 and A s = πd2 4. PROBLEM 1.6 STATEMENT 1cm Using Finite Difference to plot a steady state temperature distribution for a duct for the fluid flow passes through the cavity of the duct at Tin =20 and all outside surfaces are at a hot temperature, 200C. T=20 ᵒC T=20ᵒC l=1m Tin=300ᵒC G h=1m H=2m Cold Flow T=20ᵒC L=2m T=20ᵒC Fig1.1 Flow Inside and outside a square duct G = 1 10 6 W m 3, k = 100 W m.k The governing equation is 2 T x 2 + 2 T y 2 = G k PROBLEM 1.7 STATEMENT A viscous fluid is contained between wide, parallel plates spaced a distance h apart as shown in Fig.1.2. The upper plate is fixed, and the bottom plate oscillates harmonically with a velocity amplitude U and frequencyω, U= 1 m/s. Determine the velocity profile in y-direction and plot it vs t, numerically.
Hint: Using Finite Difference Method and the dynamic viscosity of the fluid is 8.9 10-3 Pa.s and the density is 1000 kg/m 3, and h =0.5 m, at initial time take u = 0 everywhere and select Ny =500 and specify dt to be sure your code is stable..select the average dp kpa = 10 dx m Fig.1.2 Couette Flow u t = μ ρ ( 2 u y 2 + dp dx ) PROBLEM1.8. STATEMENT Plot all of those mathematical functions on one figure window for x various from zero to 1000. A. y 1 (x) = 1 1 + cos(πx) + 1 e x 1 x B. y 2 (x) = 1 1 + sin (πx) + 1 e x2 x 1 PROBLEM 1.9 STATEMENT (1D) (Transient) A. Solve the one dimensional transient ODE using finite difference method and specify the temperature values at each points (grids). dt dt = α d2 T dx 2, α = k cm2 2 = 17 10 ρc p sec Use initial temperature as Ti =30C, and Δt = 10 sec. Plot the temperature at various node for t = 100 sec, 260 sec, and 300 sec? PROBLEM 1.10 STATEMENT Find the integration and the differentiation of the following function: y(x) = xcos(x) + x 3 + ln (x)
PROBLEM 1.11 STATEMENT A 10 cm jet of water issues from a 1 m diameter tank. Assume that the velocity in the jet is 2gh m/s where h is the elevation of water surface above the outlet jet as shown in Fig.1.3. A. Use ode23 to solve dh dt = ρa j 2gh A T At t = 0 π(0.1) sec, = 1m and t changes from 0 to 100 sec, where A 2 ho T = π, Aj = and ρwater = 4 4 1000kg/m 3, determine the values of the level of water (h) at t =50 sec and at t =100 sec B. Plot the depth of water (h) vs the time (t), label your plot. Fig.1.3 A jet of water PROBLEM 1.12 STATEMENT A.Find the temperature distribution of the rectangular fin as shown in Fig.1.4 below analytically and numerically. The physical properties of the fin are (k = 20 W/m-K). The surrounding air has (h = 25 W/m 2 -k, T =25 C). The length of the fin (L) is 10.0 m and the depth (D) is 0.02 m and the width (W) is 0.02m, P=0.08 m, Ac = 0.0004m 2, M= hp ka c m -1.
Tb=100ᵒC T, h, air Tt=25ᵒC W X D Fig.1.4 Rectangular Fin d 2 T dx 2 = h P (T T ka ) c B. Compare your results with the analytical solution by plotting the numerical solution with the analytical solution in the same figure, show the legend for each curve and put the xlabel is x and ylabel is T. T a = (T t T ) + (T T b )e ML e ML e ML PROBLEM 1.13 STATEMENT e Mx + (T b T ) (T t T ) + (T T b )e ML e ML e ML e Mx + T A bathtub is being filled with water from a faucet. The rate of flow from the faucet is steady at 9 gal/min. The tube volume is approximated by a rectangular space as indicated in Fig.1.5. A. Use ode45 to solve h t = Q water h 2 10 A j At t = 0 sec, ho = 1 and t changes from 0 to 1000 sec, where Aj = 2ft 2. Qwater =9 gal/min, [1 gpm=0.002228 ft 3 /s], determine the values of the level of water (h) at t =50 sec and at t =100 sec. B. Plot the depth of water (h) vs the time (t), label your plot. Fig.1.5 A bathtub
PROBLEM 1.14 STATEMENT Q2. (35%) A. Using Finite difference method to solve one-dimensional second order differential equation for the plane wall as shown in Fig.1.6 (show your steps, such as the discretized domain, right and left boundary conditions) d 2 T dx 2 = G k, where G = 1000 W W, and k = 100 m3 m. K, T 1 = 200C, and T 2 = 30C B. Compare your results with the analytical solution by plotting the numerical solution with the analytical solution in the same figure, show the legend for each curve and put the xlabel is x and ylabel is T. T(x) = GL2 2k [x L (x L )2 ] (T 1 T 2 ) x + T L 1 Note: Take the number of the iteration, 10000, and the number of points (grids) in x-direction is 100. L=5m PROBLEM 1.15 STATEMENT 0 x L Fig1.6 A plane wall with heat generation A. Create an M-file or script to plot three related functions of x in one plot when the functions are: y 1 = 2 cos(x), y 2 = cos(x), and y 3 = 0.5 cos (x) In the interval 0 x 2π, label the axis, name each plots and title the plots as typical examples of multiple plots. B. Plot the functions, y1, y2, and y3 in one figure window, legend each figure and label the plot?