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

  Plot the pressure surface versus latitude and longitude

Plot the pressure surface versus latitude and longitude as a surface plot

  Determine the stability status for the digital system

Sketch the z-plane pole-zero plot and determine the stability status for the following digital system.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Symmetry in the rod

matlab programming

  An efficient human identification using gait analysis

An Efficient Human Identification Using Gait Analysis, Apply specific approach for Pattern Recognition,Implement this approach in MATLAB,Compare and discuss the results with others.

  Write a function in matlab

write a function in MATLAB

  Plot way forms for the subsequent modulation schemes

Plot way forms for the subsequent modulation schemes using Matlab

  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

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Compute the eigenvalues and eigenvectors of the matrix

Compute the eigenvalues and eigenvectors of the matrix

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