homework 2

# homework 2 - plot(t,pv,t,pi legend'van der Waals...

This preview shows pages 1–6. Sign up to view the full content.

02/02/07 ASE 201 Homework #2 1) r = input( 'The radius of the circle is ' ); a = pi*r^2; p = 2*pi*r; str = [ 'The area of the circle is ' num2str(a) '\nThe perimeter of the circle is ' num2str(p)]; fprintf(str);

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2) x = [0:.1:2]; p = (3.*x.^2 - x.^3)./4; disp(num2str(p)); plot (x,p); The depth of submersion for a cork ball is roughly .61x. depth of submersion for a wooden ball is roughly .77x. (graph on next page)
3) a = input( 'Enter "a" for the gas ' ); b = input( 'Enter "b" for the gas ' ); r = 8.314; n = 2; v = .000800; t = [250:5:350]; pv = (((v./(v-n.*b)) - n.*a./r.*t.*v).*n.*r.*t)./v; pi = n.*r.*t./v;

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: plot(t,pv, '-' ,t,pi, '--' ); legend( 'van der Waals equation' , 'ideal gas equation' , 'tl' ); xlabel ( 'Temperature (K)' ); ylabel ( 'Pressure (pa)' ); The van der Waals equation and the equation for ideal gasses never quite agree. However, the accuracy of the ideal gas law varies according to the gas. The ideal gas equation for H 2 O is the closest to being accurate, followed by He and then CO 2 . Regardless of the gas, the ideal gas equation gets less accurate at higher temperatures and pressures. He H 2 O CO 2...
View Full Document

## This note was uploaded on 04/15/2008 for the course ASE 201 taught by Professor Hayes during the Spring '07 term at University of Texas.

### Page1 / 6

homework 2 - plot(t,pv,t,pi legend'van der Waals...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online