You want to create a graph showing the relationship of an ideal gas between pressure (P) and temperature (T). Allow the initial temperature to be 270 kelvin. The range of temperatures to be modeled ranges from 270 to 480 kelvin. Control the scale of the abscissa so the range is shown from 250 to 500 kelvin.
Model two gases:
- Nitrogen (formula, N2; molecular weight, 28 grams per mole), using a 12-liter tank with an initial pressure of 2.5 atmospheres.
- Oxygen (formula, O2; molecular weight, 32 grams per mole), using a 15-liter tank with an initial pressure of 4 atmospheres.
After drawing the graph for nitrogen and oxygen, model a third gas, with information entered by the user. Assume the volume is 12 liters.
Ask the user to enter the name of the gas [Example: Chlorine]
Ask the user to enter the initial pressure in the tank measured at 270 kelvin [Example: 3 atm]
Ask the user to enter the temperature of interest [Example: 400 kelvin]. The user is interested in a temperature in the range of 270 to 480 kelvin.
Output the following information to the Command Window:
At a temperature of TTT kelvin for GGG, the pressure is P.P atm.
where:
- TTT is the temperature of interest entered by the user;
- GGG is the name of the gas; and
- P.P is the pressure at that temperature shown to one decimal place.
Add the user-entered gas to the graph, showing the pressure over the range of temperatures from 270 to 480 kelvin. In addition to the single graph with three data series, create an additional figure window with a set of subplots showing each data series as an individual subplot.
Your output should be similar to the following:
In the Command Window:
Enter the name of the gas: Chlorine
Enter the initial pressure [atm] : 3
Enter the temp of interest [K]: 400
At a temperature of 400 kelvin, chlorine has a pressure of 4.4 atm.
The figures should appear similar to the following. The colors and line types may vary.
Want to see the full answer?
Check out a sample textbook solutionChapter 17 Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
- A cylindrical specimen of aluminum is pulled in tension. Use the stress v. strain plot below for this specimen of Al to answer parts (a) - (f). Hint: Each strain increment is 0.004. Be sure to include your engineering problem solving method per the class rubric. 400 350 300 250 Stress (MPa) 200 150 100 50 Aluminum (Stress v. Strain) 0 0 0.02 0.04 0.06 0.08 Strain 0.1 0.12 0.14 0.16 a. Compute the modulus of elasticity. b. Determine the yield strength at a strain offset of 0.002. c. Determine the tensile strength of this metal. d. Compute the ductility in percent elongation. e. Compute the modulus of resilience. f. Determine the elastic strain recovery for an unloaded stress of 340 MPa.arrow_forwardConsider a single crystal of silver oriented such that a tensile stress is applied along a [112] direction. If slip occurs on a (011) plane and in a [111] direction and is initiated at an applied tensile stress of 15.9 MPa, compute the critical resolved shear stress.arrow_forwardA hypothetical component must not fail when a tensile stress of 15.25 MPa is applied. Determine the maximum allowable internal crack length if the surface energy of the component is 1.50 J/m2. Assume a modulus of elasticity of 350 GPa.arrow_forward
- Fresh air at 21.1 C in which partial pressure of water vapor is 0.018 atmosphere is blown at the rate of 214 m3/h first through a preheater and then adiabatically saturated in spray chambers to 100% saturation and again reheated this reheated air has humidity of 0.024 kg water vapor per kg dry air. It is assumed that the fresh air and the air leaving the re-heater have the same percentage humidity. Determine:- a- The temperature of preheater, spray-chamber and re-heater b- Heat requirement for preheating and re-heating 11:39 مarrow_forwardThe answer to the problem is 7.24 N. Please show me how to get the final answerarrow_forwardThe answer to the problem is 17.9N. Please show me how to get the final answerarrow_forward
- The answer to the problem is 2.93 ft/s. Please show me how to get the final answerarrow_forwardExample(3): 0.15 kg/s steam at atmospheric pressure and superheated to 400 K is bled into an air stream at 320 K and 20 per cent relative humidity. What is the temperature, enthalpy, and relative humidity of the mixed stream if the air is flowing at 5 kg/ s? How much steam would be required to provide an exit temperature of 330 K and what would be the humidity of this mixture? 11:39 مarrow_forwardThe answer to the problem is 31.3rad/s. Please show me how to get the final answerarrow_forward
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY