Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you please help me find the error in my code for part C, the question is above^ Can you answer everything in part C
Can you please help me find the error in my code for part C, the question is above^
Can you answer everything in part C please
% Given P = [0.1,0.1); % Pressure [MPa] V = [1,0.5]; % Volume [m3] % Part b Vvec = linspace (V(1), V(2), 100); Pvec = 0.1.*ones (size (Vvec)); B = @(V) -0.2*V.^2+0.3*V; c = @(V) -0.6*V.^3+0.7*V.^2; % Part C Area = trapz (Vvec, Pvec.*10.^6); Area = trapz (V,B. *10.^6); Area = trapz (Vic) L UU 0.25 o O State 1 State 2 0.18 0.16 0.14 Pressure [MPa] 0.06 0.04 0.02 0.5 1.5 Volume [m3] a. Using Matlab, plot the two state points in the figure below on a P-V diagram, where the x-axis is volume (V) and the y-axis is pressure (P). Make sure to label your axes and make the font large enough to read. Add a legend to indicate the two states. P = 0.1 MPa V =1m M = 1kg P = 0.1 MPa V2 = 0.5m M = 1kg b. When you look at your plot, you can imagine that there are an infinite number of lines that connect State 1 and State 2. That means that there are an infinite number of paths or thermodynamic processes to get from State 1 to State 2. Let's plot three of them in one plot, add these three functions between your two state points that you plotted in the first part. a. P=0.1 b. P=-0.2V2 +0.3V c. P=-0.6V +0.772 c. One of the things we're going to find is the area under the path lines in a P-V diagram have a really important meaning and tell us something about the energy transfer mechanisms during the process. Integrate under each of the curves from State 1 to State 2 in the last part. Do the integration first analytically and then numerically using the trapezoidal method (Matlab function trapz). Compare the answers and discuss the answers and the differences between the three pathsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started