Matlab code to solve for temperature and pressure variation

Assignment Help MATLAB Programming
Reference no: EM134991

5 kg of air is limited in the piston-cylinder device, originally at pressure of 2MPa and a specific volume of 0.08m3/kg. The air then expands, as an ideal gas, through a polytropic process, with variable values of n, to a final specific volume of 0.30m3/kg.

Objective:

Write down the MATLAB code to solve for temperature and pressure variation throughout the expansion process and to evaluate work and heat produced in processes for variable values of n.

Procedure:

1) Started by defining the temperature at the initial state and then define the temperature and pressure at the final state. Sketch rough graph of what the process looks like on P-v coordinates. Write out by hand the equations and steps you would take to evaluate the actual P, T, and v at all points along the process. Identify unknowns, equations, constants and calculation orders.

2) Using your hand calculations as guide, write the simple MATLAB m-file to calculate properties at points along the process (minimum of 20 points, but must be a variable which can be changed) using one of the values of n (I recommend using n=1.5). Plot P-v and T-v diagrams for the process using MATLAB.

3) Calculate work performed for process by integrating the curve of pressure versus specific volume. Use the "trapezoidal area method" for calculating integral.

4) Assume that specific internal energy for the air in this problem can be defined as the function of temperature as follows:

u(T)=(1.0344∗10-4)∗T2+(6.4476∗10-1)∗T+(1.3727∗102)

Add code to your MATLAB program to calculate the specific internal energy for process using the information of the pressure and specific volume at each state

5) Using conservation of energy and the work calculated, determine amount of heat transferred for each process.

6) Write the loop in the code to analyze the different values of n, or run the code for the different values of n asked for below.

Deliverables

1) MATLAB code (m-file) that calculates the state variables P, v, T, and u for the defined process, and that calculates the work and heat for each process.

2) On the same graph, plot of P-v for this process with 4 different values of n: 1, 1.4, 1.5, 1.8.

3) Plot of P-v and T-v for n=1.5 on a single graph. Use the function plotyy.

5) Table summarizing results of work and heat as a function of n.

6) A brief paragraph detailing what you learned in this exercise and how useful you think these skills will be for your future as an engineer.

Reference no: EM134991

Questions Cloud

Electronic discovery in civil actions : Explain and discuss the problems presented by electronic discovery in civil actions and how the law has responded.
What legal issues are shown by large scale data breaches : What legal issues are shown by large scale data breaches, and how should the law respond? Answers should crucially analyse the issues raised in each case.
Applying om techniques to your organization : Find out in your organization an aspect of the operational process which could benefit from use of one or more of the given techniques: business or predictive analytics, dashboards, decision support systems and supply chain management.
Calculate descriptive statistics for each stock : Calculate descriptive statistics for each stock and the S&P 500. Comment on your results. Which stocks are the most volatile? Calculate the value of beta for each stock.
Matlab code to solve for temperature and pressure variation : Write down the MATLAB code to solve for temperature and pressure variation throughout the expansion process and to evaluate work and heat produced in processes for variable values of n.
Financial statement analysis : Prepare income statements and vertical common-size balance sheets for both companies - Prepare ratio analyses
What would you do differently from ge : Suppose that you were the Chief Quality Officer in charge of developing an empowerment programme. What would you do differently from GE?
Examine the operations of each company : Examine the operations of each company.  How is the company doing in this present economic environment?  Is the world economy affecting the company?  How?
Timer interrupt to coordinate peripherals on microcontroller : The timer interrupts to coordinate peripherals on the microcontroller. Use code from prior labs to drive the peripherals and will make minor modifications to use the interrupts.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Plot way forms for the subsequent modulation schemes

Plot way forms for the subsequent modulation schemes using Matlab

  Mat lab programming problem

In case the problem in the code I want you to modify it give the correct temperature.

  Compute the power spectral density vector

Compute the power spectral density vector. Plot the spectrogram using the same parameters as in lecture.

  Write a functions

The function range basis takes a matrix A as input, and outputs a basis (again written as columns) for the range space of A.

  Determine the inputs, outputs, relevant formulas

determine the inputs, outputs, relevant formulas

  Write project report and provide cross-synthesis

Write project report and provide Cross-synthesis.

  Least squares

For homework consider the points (0,0), (1,2), (2,3), (3,9), ( 4,17), (5,24), (6,37). (1) Use Matlab to find the least squares best fit with a line.  Turn in A, y and c and a plot like the one above.  Also (2) use Matlab to find the least square best..

  Import the data into matlab and name the array ace_data

Parameter is related to the energy of the storm, since kinetic energy is proportional to velocity squared. However, it does not take into account the size of the storm, which would be necessary for a true total energy estimate.

  Develop a simulation program

Develop a simulation program

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Finds the value of a using a numerical method

Finds the value of a using a numerical method

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd