Menu
support@authoritypapers.com
+1(805) 568 7317

use c a particularly simple sbstraction of a gas views the gas as a material witha p 5153076

A particularly simple sbstraction of a gas views the gas as a material witha prossure dependent volume. In this abstraction,double in Gaa(double a, double aB) class VanDerwaalecaleulator publia Gas iGa loat ivolume [1001 float iPreasure (1001 loat iuse c++

A particularly simple sbstraction of a gas views the gas as a material witha prossure dependent volume. In this abstraction, the actual chemical composition of the gas is unimportant as only its physical properties are of practical interest. Develop a class that implements a physical abstraction of a gas in which the only relevant propertics are its Van der Waals constants a and b and the problem is to determine both the pressure and the volume of the gas given a fixed temperature and number of moles, n. The relationship between these quantities is given by the Van dor Waals equation of state P+-b)RT For oxygca gas, the Van der Waals constants are a 0.027 P. atm/mo? and b 0.0024 Lmul, while the gas constant R 0.0821 atm/(mol K). For these values use your program to graph the dependenee of pressure on volume for nI mole of gas for volumes fhem 1 to 10 liters. Use 100 points in your graph. Hand in your program and the graph Your program should tulke the following fom #inelude double in Gaa(double a, double aB) class VanDerwaalecaleulator publia Gas iGa loat ivolume [1001 float iPreasure (1001 loat iTenperature float iNuaberorMoles int imumberotrointa VanDerWaalaCalculatorGas aCaa, double anininunVolume, double aMaiunVolume, double aTerperature, double aNumberofNoles, int aumberofPoints) Use the Van der aals formala to generate the preesure veetor void generatePressure () Graph the pressure as a funetion of volune void draw main Gas oygan(0.027, 0.0014) int nunberof Points 100; tloat ninimumVolume 1 loat maximumVolume 10 Eloat temperature 300 loat mumberofMoles 1 VanDerwaaletalculator VDw(Oxygen, minimumVolume, maxinumVolume, temperature, nunberoroles, nunberofPointe) VDw.generatePreasure) VDN.dra)

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon
"GET15"

Order Now