Question

In: Computer Science

For any gas whose internal energy depends on temperature only, the relation between pressure p, molar...

For any gas whose internal energy depends on temperature only, the relation between pressure p, molar volume v, and absolute temperature T can be approximated by using the Ideal Gas law: ??=?? where R is the universal gas constant. If p is measured in atmospheres, v in liters/mole, and T in Kelvin, then R=0.08205 ????? ?????? ?.
However, for certain physical conditions (notably high T and/or high p), gases may behave in a nonideal way. A more general description of their behavior is given by the following higher-order approximation, known as the Beattie-Bridgeman Equation: ?=???+??2+??3+??4,
where ?,?,and ? are temperature dependent quantities given as follows: ?=?0??−?0−???2 ; ?=−?0???+?0?−?0???2 ; ?=?0????2.
Constants ?0,?0,?,?,and ? have been determined by fitting curves to experimental data. For methane (CH4), the values of the constants (in units consistent with the ones above) are: ?0=2.2769; ?0=0.05587; ?=0.01855; ?=−0.01857; and ?−12.81?4.
a. (24 points) Write a program that, when given T in kelvin and p in atmospheres, uses Muller’s Method to solve the Beattie-Bridgeman Equation for the molar volume of CH4. You are not required use complex variables, but you should include a section in your program that checks to see whether ??+1 is complex, and, if it is, stops the method. Close initial guesses chosen in part b will allow you to find the root without venturing into the complex plane. Try to reduce the number of function evaluations.
Before the iteration begins, your program should print the starting estimates ?−2,?−1,?0 and their corresponding ?(?) values. At each iteration, your program should print out the iteration number (?),??,?(??), and the quantity |??−??−1||??|. Implement a convergence criterion of the form: |??−??−1||??|≤?,?ℎ??? ?=10−5
When your program finishes running, it should either print out the converged solution and the number of iterations required, or else it should print out a statement that a solution could not be found (perhaps because the method found a complex ??+1.
b. (8 points) Run your program for the following data (note that there are 10 possible combinations): ?=500 and 1500 ?,with ?=1,5,10,50 and 100 atm. In each case, choose your own starting points (perhaps using the Ideal EoS).

Solutions

Expert Solution


Related Solutions

The average kinetic energy of the molecules in a gas sample depends only on the temperature,...
The average kinetic energy of the molecules in a gas sample depends only on the temperature, T. But given the same kinetic energies, a lighter molecule will move faster than a heavier molecule. Where R=8.314 J/(mol·K) and ℳ is molar mass in kilograms per mole. Note that a joule is the same as a kg·m2/s2. What is the rms speed of O2 molecules at 429 K? What is the rms speed of He atoms at 429 K? Glycine is an...
The average kinetic energy of the molecules in a gas sample depends only on the temperature,...
The average kinetic energy of the molecules in a gas sample depends only on the temperature, T. But given the same kinetic energies, a lighter molecule will move faster than a heavier molecule. What is the rms speed of Cl2 molecules at 347 K? What is the rms speed of He atoms at 347 K?
Express partial molar temperature and partial molar pressure in terms of temperature and pressure of the...
Express partial molar temperature and partial molar pressure in terms of temperature and pressure of the mixture. Explain your result
Thermodynamic question Derive relation between saturated vapor pressure and temperature. and apply the relation to the...
Thermodynamic question Derive relation between saturated vapor pressure and temperature. and apply the relation to the case of water.
1.) Define standard temperature and pressure(STP). What is the value of the molar volume of any...
1.) Define standard temperature and pressure(STP). What is the value of the molar volume of any ideal gas at STP? 2.) What type of reaction is used to determine the yield of hydrogen gas in this experiment? Explain choice. 3.) How many grams of hydrogen can be expected from complete reaction of 1.0 g of Mg? Show work!
Use critical temperature and pressure for oxygen gas to determine critical molar volume assuming a) ideal...
Use critical temperature and pressure for oxygen gas to determine critical molar volume assuming a) ideal gas  L/mole b) van der Waals gas  L/mole c) Redlich-Kwong gas  L/mole
The pressure in a car tyre depends on the temperature of the in the tyre. When...
The pressure in a car tyre depends on the temperature of the in the tyre. When the air temperature is 27C, the gage pressure is 210 KPa. If the volume of the of the tyre is 0.025 m3, determine the pressure rise in the tyre when the air temperature rises to 57C. With the tyre temperature at 57C, determine the mass of air which must be bled off in order to decrease the pressure to its original value. Take the...
Assume solution A-B and their mean molar volume Vm, under constant temperature T and pressure P,...
Assume solution A-B and their mean molar volume Vm, under constant temperature T and pressure P, is given by: Vm = 100xA + 80xB + 2.5xAxB Evaluate relative integral volume of mixing ∆V M with respect to composition and draw schematic sketch with respect to xA.
What is the difference between work function and electron affinity energy? Is there any relation between...
What is the difference between work function and electron affinity energy? Is there any relation between work function and electron affinity energy?
In a potential vorticity problem, obtain a relation between pressure difference , area and potential temperature...
In a potential vorticity problem, obtain a relation between pressure difference , area and potential temperature increment. Please solve only if you are absolutely sure.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT