Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

An ideal gas obeys the ideal gas law as given as pV = NRT where p is the pressur

ID: 3820540 • Letter: A

Question

An ideal gas obeys the ideal gas law as given as pV = NRT where p is the pressure (kPa), V is the volume (L), N is the number of moles, T is the temperature (K), R is the ideal gas constant, i.e., R = 8.314 J K^-1 mol^-1. Write a Matlab script (pv_"WSU ID".m) that will plot the pressure as a function of volume with an increment of 0.05 L for N = 0.5 moles and T = 150, 300 and 600 K. function pv_"WSUID"(T) % T is the temperature matrix % Last Name: % First Name: close all end The script file should have an argument of T(matrix) as an input variable, to calculate the pressure array as well as to plot and label the results in the figure (see the sample plot below). Use the volume V = 0.1:0.05:1 (in liter). Your function should execute by typing the commands as shown below >> T = [150 300 600]; % Set the desired temperatures in K >> pv_"WSU ID"(T) % call your pv script

Explanation / Answer

%define tempurature
T1 =150; % Given the units of temperature in kelvin
T2 =300; % Given the of temperature in kelvin
T3 =600; % Given the units of temperature in kelvin
% define R
R=0.08206; % units L.atm.mol^-1
% define n
n=1;
% Given the array of volume in litres
V=0.1:.05:1;
% calculate the pressure disribution
for jj=1:length(V)   
P1(jj)=T1*R*n/V(jj);
P2(jj)=T2*R*n/V(jj);
P3(jj)=T3*R*n/V(jj);
end
% plot the graphs on the one axis
plot(V,P1,'b',V,P2,'r',V,P3,'r')

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote