212HomeWork9sol

# 212HomeWork9sol - Physics 212A Homework#9 Name 1 The web...

• Notes
• 8

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

Physics 212A Homework #9 Name: 1. The web site has thermodynamic data for many fluids and gases. a) Select Xenon as the species, choose saturation properties, temperature increments , and download the data . Use either Import or the ReadSpreadSheet function from the MathematicaHandbook to read the file into a Mathematica list. Take and Transpose are helpful in extracting the relevant columns from the table. Construct a plot of the vapor pressure of Xenon as a function of temperature in the range 165<T<289 K b) The vapor pressure of a fluid approximately follows an equation of the form Pvap=P0 ª - L T where T is the absolute temperature and L is approximately the latent heat of vaporization. Find the best fit values of P0 and L for the data of part a) using either FindFit or NonlinearModelFit. Construct a plot which compares your fit with the data. Using the Handbook package : xdata = ReadSpreadSheet @ "C:\\DownloadTrash\\fluid.txt" D ; Temperature H K L Pressure H MPa L Density H l mol l L Volume 165.00 0.10103 22.410 0.044622 - 0.0068259 - 0.0023179 - 0.013965 21.814 166.00 0.10696 22.360 0.044723 0.037624 0.042408 0.25468 21.747 167.00 0.11316 22.309 0.044826 0.082102 0.087174 0.52188 21.680 168.00 0.11963 22.257 0.044929 0.12661 0.13198 0.78766 21.615 169.00 0.12638 22.206 0.045033 0.17114 0.17684 1.0521 21.550 170.00 0.13343 22.155 0.045137 0.21571 0.22174 1.3151 21.486 171.00 0.14076 22.103 0.045243 0.26032 0.26669 1.5768 21.422 172.00 0.14841 22.051 0.045349 0.30496 0.31169 1.8372 21.360 173.00 0.15637 21.999 0.045456 0.34964 0.35675 2.0963 21.298 174.00 0.16464 21.947 0.045564 0.39436 0.40186 2.3541 21.237 175.00 0.17325 21.895 0.045673 0.43912 0.44703 2.6107 21.176 176.00 0.18220 21.842 0.045783 0.48393 0.49227 2.8662 21.116 177.00 0.19149 21.789 0.045894 0.52878 0.53757 3.1204 21.057 178.00 0.20114 21.737 0.046005 0.57368 0.58293 3.3735 20.999 179.00 0.21115 21.683 0.046118 0.61863 0.62837 3.6254 20.941 180.00 0.22153 21.630 0.046232 0.66364 0.67388 3.8763 20.884 181.00 0.23230 21.577 0.046346 0.70869 0.71946 4.1261 20.828 182.00 0.24345 21.523 0.046462 0.75381 0.76512 4.3748 20.772 183.00 0.25500 21.469 0.046579 0.79898 0.81085 4.6225 20.717 Read 125 Records arranged in 25 columns extract the temp and pressure columns : 8 temp, press < = Take @ Transpose @ xdata D , 2 D

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

88 165., 166., 167., 168., 169., 170., 171., 172., 173., 174., 175., 176., 177., 178., 179., 180., 181., 182., 183., 184., 185., 186., 187., 188., 189., 190., 191., 192., 193., 194., 195., 196., 197., 198., 199., 200., 201., 202., 203., 204., 205., 206., 207., 208., 209., 210., 211., 212., 213., 214., 215., 216., 217., 218., 219., 220., 221., 222., 223., 224., 225., 226., 227., 228., 229., 230., 231., 232., 233., 234., 235., 236., 237., 238., 239., 240., 241., 242., 243., 244., 245., 246., 247., 248., 249., 250., 251., 252., 253., 254., 255., 256., 257., 258., 259., 260., 261., 262., 263., 264., 265., 266., 267., 268., 269., 270., 271., 272., 273., 274., 275., 276., 277., 278., 279., 280., 281., 282., 283., 284., 285., 286., 287., 288., 289. < , 8 0.10103, 0.10696, 0.11316, 0.11963, 0.12638, 0.13343, 0.14076, 0.14841, 0.15637, 0.16464, 0.17325, 0.1822, 0.19149, 0.20114, 0.21115, 0.22153, 0.2323, 0.24345, 0.255, 0.26696, 0.27933, 0.29213, 0.30536, 0.31903, 0.33316, 0.34774, 0.36279, 0.37833, 0.39435, 0.41086, 0.42789, 0.44542, 0.46348, 0.48208, 0.50122, 0.52091, 0.54116, 0.56198, 0.58339, 0.60538, 0.62797, 0.65117, 0.67499, 0.69943, 0.72452, 0.75025, 0.77663, 0.80368, 0.83141, 0.85982, 0.88893, 0.91874, 0.94927, 0.98051, 1.0125, 1.0452, 1.0787, 1.1129, 1.148, 1.1838, 1.2203, 1.2577, 1.2959, 1.335, 1.3748, 1.4155, 1.4571, 1.4995, 1.5428, 1.587, 1.6321, 1.6781, 1.725, 1.7728, 1.8215, 1.8712, 1.9219, 1.9735, 2.0262, 2.0798, 2.1344, 2.19, 2.2466, 2.3043, 2.3631, 2.4229, 2.4838, 2.5457, 2.6088, 2.6729, 2.7382, 2.8047, 2.8723, 2.941, 3.0109, 3.082, 3.1544, 3.2279, 3.3027, 3.3788, 3.4561, 3.5347, 3.6146, 3.6958, 3.7784, 3.8623, 3.9476, 4.0344, 4.1225, 4.2121, 4.3032, 4.3958, 4.4899, 4.5856, 4.6829, 4.7818, 4.8824, 4.9847, 5.0888, 5.1947, 5.3025, 5.4124, 5.5243, 5.6384, 5.7549 << assemble them into {temp, pres} pairs for plotting and fitting tvsp = Transpose @8 temp, press <D ; tvspdataplot = ListPlot @ tvsp D 200 220 240 260 280 1 2 3 4 5 now fit to the suggested model nlfit = NonlinearModelFit @ tvsp, P0E^ H - L T L , 8 P0, L < , T, ConfidenceLevel fi 0.95 D FittedModel B 1315.43 ª - 1572.87 T F FindFit yields the same result : FindFit @ tvsp, P0E^ H - L T L , 8 P0, L < , T D 8 P0 fi 1315.43, L fi 1572.87 < 2 212HomeWork9sol.nb
fitplot = Plot @ P0E^ H - L T L . 8 P0 fi 1315.4282242407885`, L fi 1572.8741588054017` < , 8 T, 160, 300 < , PlotStyle fi Red D 180 200 220 240 260 280 300 1 2 3 4 5 6 7 Show @ fitplot, tvspdataplot D 180 200 220 240 260 280 300 1 2 3 4 5 6 7 The fit looks good. 2. a) The text of the Biblical book of Leviticus is in \$UserBaseDirectory<>"\\AddOns\\PTHBdata" in a file called "Leviticus.txt". Use ReadList and String to print out the first 15 records. Construct a list of all the words in the text, but don't display the result which is quite long.

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

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

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern