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)
- 3. An engine has three cylinders spaced at 120° to each other. The crank torque diagram can be simplified to a triangle having the following values: Angle 0° Torque (Nm) 0 (a) What is the mean torque? 60° 4500 180° 180° to 360° 0 0 (b) What moment of inertia of flywheel is required to keep the speed to within 180 ± 3 rpm? (c) If one cylinder of the engine is made inoperative and it is assumed that the torque for this cylinder is zero for all crank angles, determine the fluctuation in speed at 180rpm for the same flywheel. (a) 3375 Nm (b) 50kgm (c) ±21 rpmarrow_forwardProb 5. Determine the largest load P that can be applied to the frame without causing either the average normal stress or the average shear stress at section a-a to exceed o-150 MPa and 1-60 MPa, respectively. Member CB has a square cross section of 25 mm on each side. 2 m FAC 1.5 m Facarrow_forwardDerive the component transformation equations for tensors shown below where [C] = [BA] is the DCM (direction cosine matrix) from frame A to B. ^B [T] = [C]^A [T] [C]^Tarrow_forward
- Calculate for the vertical cross section moment of inertia for both Orientations 1 and 2 of a 1 x 1.5 in. horizontal hollow rectangular beam with wall thickness of t = 0.0625 in. Use the equation: I = ((bh^3)/12) - (((b-2t)(h-2t)^3)/12)arrow_forwardPlease answer 'yes' or 'no' and 'is' or 'is not' for the following:arrow_forwardConsider a large 23-cm-thick stainless steel plate (k = 15.1 W/m-K) in which heat is generated uniformly at a rate of 5 x 105 W/m³. Both sides of the plate are exposed to an environment at 30°C with a heat transfer coefficient of 60 W/m²K. The highest temperature will occur at surfaces of plate while the lowest temperature will occur at the midplane. Yes or No Yes Noarrow_forward
- My answers are incorrectarrow_forwardPicturearrow_forwardWhat is the weight of a 5-kg substance in N, kN, kg·m/s², kgf, Ibm-ft/s², and lbf? The weight of a 5-kg substance in N is 49.05 N. The weight of a 5-kg substance in kN is KN. The weight of a 5-kg substance in kg·m/s² is 49.05 kg-m/s². The weight of a 5-kg substance in kgf is 5.0 kgf. The weight of a 5-kg substance in Ibm-ft/s² is 11.02 lbm-ft/s². The weight of a 5-kg substance in lbf is 11.023 lbf.arrow_forward
- Mych CD 36280 kg. 0.36 givens Tesla truck frailer 2017 Model Vven 96154kph ronge 804,5km Cr Powertrain Across PHVAC rwheel 0.006 0.88 9M² 2 2kW 0.55M ng Zg Prated Trated Pair 20 0.95 1080 kW 1760 Nm 1,2 determine the battery energy required to meet the range when fully loaded determine the approximate time for the fully-loaded truck-trailor to accelerate from 0 to 60 mph while Ignoring vehicle load forcesarrow_forward12-217. The block B is sus- pended from a cable that is at- tached to the block at E, wraps around three pulleys, and is tied to the back of a truck. If the truck starts from rest when ID is zero, and moves forward with a constant acceleration of ap = 0.5 m/s², determine the speed of the block at D the instant x = 2 m. Neglect the size of the pulleys in the calcu- lation. When xƊ = 0, yc = 5 m, so that points C and D are at the Prob. 12-217 5 m yc =2M Xparrow_forwardsolve both and show matlab code auto controlsarrow_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