File Exchange

## Ideal Air Properties

version 1.0.0.0 (9.03 KB) by Jared Miller

### Jared Miller (view profile)

Interpolates and outputs air properties that follow the ideal gas law given an input value.

Updated 14 Aug 2009

This program interpolates air properties following the Ideal Gas Law from the gas table A22 and A22e in the textbook Fundamentals of Engineering Thermodynamics by Moran, Shapiro (6th edition)

### Cite As

Jared Miller (2020). Ideal Air Properties (https://www.mathworks.com/matlabcentral/fileexchange/25030-ideal-air-properties), MATLAB Central File Exchange. Retrieved .

Nate Li

### Nate Li (view profile)

Gabriella Zarragoitia

### Gabriella Zarragoitia (view profile)

This code is easy to follow thanks to the many comments left by the author. At times, it can be confusing which units are being outputted if the user is not looking at the function. We took one star away because it could be more user friendly, but the code is accurate and runs properly.

Tanvi Rao

### Tanvi Rao (view profile)

The code was concise, efficient and performed all of the expected tasks. Overall, the code worked well, however, there are slight improvements that could be made. Some improvements that would increase the quality of the code are: keeping significant figures consistent between the input and output values, as well as keeping the decimal places consistent between the textbook table and the code table to reduce rounding error in the interpolated values.

Kelsey Richardson

### Kelsey Richardson (view profile)

The code worked well and was easy to follow. The small errors in the data tables occasionally caused incorrect interpolated points, but overall the output appeared very accurate. Some additional updates to the function would be helpful.

Julian Reidenauer

Celest Villagran

Anthony Dragun

Jessie Sun

Alex Marks

### Alex Marks (view profile)

A simple addition to this program makes it much more useful. Add "IdealAir = " between "function" and "IdealAir(...)" to have the value be returned and usable

Alex Marks

### Alex Marks (view profile)

What are the units of relative pressure?

Marjorie Dininger

### Marjorie Dininger (view profile)

The code works well and is easy to use. As everyone else has mentioned, there are some errors in the tables.

Marjorie Dininger

Aayush Prasanna

Shezaz Hannan

### Shezaz Hannan (view profile)

The code is clean and simple. It allows for the calculation of several thermodynamic values provided that another significant value is known. The data has some errors, however, as noted by other commenters. This is very useful and well-written code, but could use an update.

SteveC

### SteveC (view profile)

I checked the SI table, apart from the errata found by skewcrap, I found that the table

- Is missing rows of T = 770 and T = 790.
- At T = 1800, vr = 3.944

Panuluk Boonrueng

### Panuluk Boonrueng (view profile)

How to write code?

skewcrap

### skewcrap (view profile)

second error found:

h(T=550K) should be 554.74

skewcrap

### skewcrap (view profile)

there is an error in the tabulated enthalpy values:

h(T=630K) = 683.63 is WRONG
it should be 638.63

Jason

### Jason (view profile)

I get error
>> IdealAir
Error using IdealAir (line 58)
Not enough input arguments.

do I have to input the table myself?
where can I get the table with numbers in them? I am referring to the access file:
a22eng, a22si

Ross

### Ross (view profile)

To allow the output of a variable:

"Simply change the first line of code so that the output is the value
which is found.

function IdealAir=IdealAir(xi,prop1,prop2,unit)

And you can comment out the last line which simply displays the unit on
screen.

%displays on screen (optional step)
% disp([prop2,' = ',num2str(IdealAir)]); "

Puriwat Athichoktanaparn

### Puriwat Athichoktanaparn (view profile)

##### MATLAB Release Compatibility
Created with R2007a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux