Question

Code to Matlab
Make two plots on one page. mo ad tle veloclty as a function of time for 0sts4s. 33 The ideal gas equation states that PV RT 400 En van der Waals equation where P is the pressure, V is the volume, T is the temperature, R 0.08206 (L atm) (mol K) is the gas constant, and n is the number of moles. Real gases, especially at high pressures, deviate from this behavior. Their response can be modeled with the deal Gag oqualion 002 04 0608 Volume, (L)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Given data,

n=number of moles (Assume n=1)

P=Pressure (atm)

V=Volume (L) (0.065 <= V <=1)

T=Temperature (Assume T = 20C = 293K)

R=Gas constant = 0.08206 (L atm )/(mol K)

For CO2 ,

a = L2 atm / mol2

b = 0.04267 L/mol

Put all values in MATLAB command (define variables as given above)

>> n=1;R=0.08206;T=293;V=[0.065:0.005:1];

>> a=3.592;b=0.04267; %CO2 properties

>> P=(n*R*T)./V; % Ideal gas equation

>> Pw=((n*R*T)./(V-n*b))-((n^2*a)./(V.^2)); % Real gas equation

>> plot(V,P,'r',V,Pw,'k','LineWidth',2)
>> grid on
>> xlabel('Volume (L)');
>> ylabel('Pressure (atm)');
>> legend('Ideal Gas Eqaution','van der Waals Equation')

This will return a plot as shown in figure

ldeal Gas Eqaution van der Waals Equation 400 300.. 咢200 150... 1001 _ . 50 0.6 0.7 0.8 0.9 0.5 Volume (L) 0 0.2 0.3 0.4

Add a comment
Know the answer?
Add Answer to:
Code to Matlab Make two plots on one page. mo ad tle veloclty as a function...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The ideal gas law describes the relationship among the volume of an ideal gas (V), its...

    The ideal gas law describes the relationship among the volume of an ideal gas (V), its pressure (P), its absolute temperature (T), and number of moles (n): PV=nRT Under standard conditions, the ideal gas law does a good job of approximating these properties for any gas. However, the ideal gas law does not account for all the properties of real gases such as intermolecular attraction and molecular volume, which become more pronounced at low temperatures and high pressures. The van...

  • Consider example 14.1. What is the ratio of the mass of a single molecule of the ideal gas in the example, to its (molec...

    Consider example 14.1. What is the ratio of the mass of a single molecule of the ideal gas in the example, to its (molecular velocity)2? Be sure that you're using the correct units and to include R in your function. (Hint: Your answer should be m/u2 = ??) 535 One mole of an ideal gas at 0°C and 1.00 atm pressure contains 6.022 x 10 molecules (Avogadro's number) and occupies a volume of 22.414 L. A good States of Matter...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT