Directions Use the Publish button/command in MATLAB to generate PDF files of your scripts. Submit your MATLAB files (.m)

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Directions Use the Publish button/command in MATLAB to generate PDF files of your scripts. Submit your MATLAB files (.m)

Post by answerhappygod »

Directions Use The Publish Button Command In Matlab To Generate Pdf Files Of Your Scripts Submit Your Matlab Files M 1
Directions Use The Publish Button Command In Matlab To Generate Pdf Files Of Your Scripts Submit Your Matlab Files M 1 (69.41 KiB) Viewed 23 times
Directions Use The Publish Button Command In Matlab To Generate Pdf Files Of Your Scripts Submit Your Matlab Files M 2
Directions Use The Publish Button Command In Matlab To Generate Pdf Files Of Your Scripts Submit Your Matlab Files M 2 (41.2 KiB) Viewed 23 times
Directions Use The Publish Button Command In Matlab To Generate Pdf Files Of Your Scripts Submit Your Matlab Files M 3
Directions Use The Publish Button Command In Matlab To Generate Pdf Files Of Your Scripts Submit Your Matlab Files M 3 (41.05 KiB) Viewed 23 times
Directions Use The Publish Button Command In Matlab To Generate Pdf Files Of Your Scripts Submit Your Matlab Files M 4
Directions Use The Publish Button Command In Matlab To Generate Pdf Files Of Your Scripts Submit Your Matlab Files M 4 (33.6 KiB) Viewed 23 times
Directions Use The Publish Button Command In Matlab To Generate Pdf Files Of Your Scripts Submit Your Matlab Files M 5
Directions Use The Publish Button Command In Matlab To Generate Pdf Files Of Your Scripts Submit Your Matlab Files M 5 (47.55 KiB) Viewed 23 times
Directions Use The Publish Button Command In Matlab To Generate Pdf Files Of Your Scripts Submit Your Matlab Files M 6
Directions Use The Publish Button Command In Matlab To Generate Pdf Files Of Your Scripts Submit Your Matlab Files M 6 (38.95 KiB) Viewed 23 times
Directions Use the Publish button/command in MATLAB to generate PDF files of your scripts. Submit your MATLAB files (.m) and the published PDFs to Blackboard. Note that the .m files should run when opened on any computer. I Background for part 1 and 2: You are an engineer with NASA on a team tasked with developing a habitat suitable for human life on Mars. Within your team, you specialize in thermodynamics and will be utilizing a non-ideal gas law to better understand the Martian environment. Based on your advanced knowledge of thermodynamics, you have selected a three-parameter equation of state, presented below in Equation 1, where a, b, and a are physically informed constants, P is pressure in kPa, R is the specific gas constant in kJ/kg*K, T is temperature in K, and v is the specific volume in m'/kg. Recall: density p= 1/v. RT P = v-b K Value K≤ 10 10<K ≤ 15 K> 15 aa v(v + b) While the values for P, R, T, and v will be given or solved for, the values of the constants depend on a constant K, which can be obtained as the sum of the numeric values of your abc123. For example, if your ID is abc123, K = 1+2+3. Table 1 shows the values of the parameters depending on the value of K. Be sure to use the correct values in your problem setup to avoid losing points. b 0.192 0.189 0.186 Equation 1 a 0.775 0.785 0.795 Table 1. Thermodynamic constants for different K values. a 0.000857 0.000861 0.000859 The structural engineers on your team are utilizing finite element analysis (FEA) to determine if the habitat they designed will be stable on the surface of Mars. To do this, they need to know what the density, p, of the atmosphere is where the habitat will be located. Based on information obtained by the Curiosity Rover, you know that the pressure P = 620 Pa and the temperature T= 205 K. Additionally, you know that the specific gas constant of the Martian atmosphere is K = 0.192 kJ/kg-K
Part 1: Determine a suitable root finding method (100 pts) In this section, you will need to determine the best suited method to find the root of the equation, (i.e., determine p so that f(p) 0) using the thermodynamic constants in Table 1 as well as Equation 1. 2 Submissions for this 1. ii. iii. part include: Using an "if" statement, determine the values of a, b, and a based on your value of K (10) pts). Choose any one bracketing method and any one open method from the list below and use "for" loops to set them up (60 pts). a. Bracketing methods: i. Bisection method ii. False position method b. Open method: i. Newton Raphson method ii. Modified Newton Raphson method iii. Secant method Make a comparison between results obtained with both methods (30 pts). a. Provide a comparison of accuracy between the 2 methods using the error on the last iteration. b. Provide a comparison of computational efficiency between 2 methods using the Tic Toc method. c. Discuss which of the methods is the better option for root finding based on the comparisons.
9 2 Part 2: Automate the process using a function (100 pts) Now that you have determined the best root finding method, it is time for the next task! In this case, you will still work with Equation I but now both density p and temperature T, are going to vary. You will use your knowledge of functions to create MATLAB functions using the expression below: Submissions for this part include: i. ii. f(v.T.P.R)= iv. RT aa v-b v(v + b) P Equation 2 Use the script from Part 1 and convert it into a function file that (60 pts): a. Takes T, K, P, and R as inputs. A b. Determines for which p. f(v.T, P, R) 0 using your choice of root finding methods from Part 1. Recall: p = 1/v 2 c. Gives p as an output. In a separate .m file, use a "for" loop such that each iteration is a different 7' value and call the function file to determine p for each iteration. Create a matrix to store the values of T and p in after each iteration (20 pts). Run the .m file with T= 100: 1:300 K (10 pts). Plot p vs. 7, including axis labels, a title, grid lines, as well as a linewidth of 2 (10 pts). D
Part 3: Systems of linear equations (100 pts) Consider the following system of linear equations presented below in Equation 3: 10a-b+2c= 6 -a +11b-c + 3d = 25 2a-b+10c-c=-11 3b c + 8d 15 Equation 3 Submissions for this part include: Solve the system on linear equations using the Gauss-Seidel method in MATLAB. Consider a random initial guess (with values between 0 and 1) and perform iterations until the approximate percent error is less then 0.01 percent for all the unknowns in the system of linear equations (60 pts). HINT: a "while" loop will be helpful for this exercise. i. Confirm your answer is correct by solving the system of linear equations using a direct method such as Gauss elimination, Cramer's rule, or the inverse of the coefficient matrix. You should use MATLAB for this problem (40 pts).
Part 4: Nonlinear regression (100 pts) The data presented below in Table 2 follows the nonlinear relationship presented below in Equation 4. X y i. 11. 0.1 0.73 iii. y = axex Use MATLAB to determine the values of constants a and ß that minimize the sum of the squares of errors between the predictions of the nonlinear functional relationship and the data. iv. 0.2 0.4 1.27 1.41 Table 2: x and y data for nonlinear regression analysis 0.6 1.26 0.9 1.3 1.5 0.85 0.53 0.36 Submissions for this part include: Linearize the data (20 pts) Plot the linearized data and fit a linear equation to the linearized data. Be sure to include axis labels, a legend and title in your plot (30 pts). Equation 4 1.8 1.7 0.28 0.17 Use the linear regression coefficients to calculate the values of a and B. Display your answer using fprintf (30 pts). Plot the raw (nonlinearized) data against Equation 4 and comment on the goodness of the fit. As before, your plot should include axis labels, a legend and title (20 pts). 3
Part 5: Interpolation (100 pts) The volumetric flow rate of water in a long pipe is related to pressure using the Hagen-Poiseuille equation (Q=f(P)). However, this relationship is relatively inaccurate, and you decide to collect experimental data for interpolation instead. This data is presented below in Table 3 and MATLAB should be used for all parts of this exercise. Pressure P [kPa] 15 25 Flow Rate Q [mL/s] 15.4 39.6 53.3 58.4 66.1 73.2 Table 3: Experimental flow rate and pressure data 35 45 65 80 Submissions for this part include: i. Using a second-order interpolation polynomial and the method of linear equations, determine the flow rate of the water when the pressure P = 50 kPa (60 pts). ii. Plot the raw data, the interpolation polynomial, and the estimated flow rate at P = 50 kPa in a single figure. This figure should include axis labels, a legend, and title (40 pts).
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply