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 W/ACCESS
- Posted below is a picture of a data table and a diagram of an experiment. In the experiment you rolled a marble down a ruler ramp off the end of a coffee table to observe projectiles and conservation of energy. You do 3 trials for each initial height. Each height is measured in meters. h= initial height of marble off of table Y= height of table off floor X= horizontal distance marble goes from edge of table to where it strikes the floor a) use the table to find information you need to solve for theoretical range and % of error in measured range.arrow_forwardGiven: Mass = M, Radius = R, Moment of Inertia = I, Distance = H, Gravity = g, Initial timing = 0 Unknown = How long will the [delta t] process take? (time) Please keep in mind that almost every variable is unknown! We are given no numbers and are instructed to generate a solution using the variables [ "R, M, g, I and H." ] Target = Find an equation that, if we could substitute numbers, would determine how long the process would take. Newton's second law and torque seem to be relevant based on how the problem is written. * Also please show drawing based on what we are calculatingarrow_forwardUSE MATLAB AND SOLVE THIS QUESTION The ideal gas law relates the pressure P, volume V, absolute temperature T, and amount of gas n. The law is P = nRT/ V where R is the gas constant. An engineer must design a large natural gas storage tank to be expandable to maintain the pressure constant at 2.2 atm. In December when the temperature is 4°F (- 15°C), the volume of gas in the tank is 28 500 ft3 . What will the volume of the same quantity of gas be in July when the temperature is 88°F (31°C)? (Hint: Use the fact that n, R, and P are constant in this problem. Note also that K =°C +273.2.)arrow_forward
- The amount of time it takes for a pendulum to swing “to-and-fro” through one complete cycle is called the “period” and is calculated using the following equation: where T = period in seconds, I = mass moment of inertia, m = mass of pendulum in kilograms g = gravitational acceleration, 9.8 m/s2, h = effective length of pendulum in meters What is the appropriate unit for I if the preceding equation is to be homogeneous in units? Please show all of your work.arrow_forward2. (If relevant) A clearly labeled diagram (or diagrams) clearly pertaining to your analysis with a coordinate system and relevant labels. Final answer with appropriate units and significant figures. You can use the fprintf() command in MATLAB to format numerical results A 2-3 sentence reflection on your answer. Does it make sense? Why or why not? What are some implications?arrow_forwardThermodynamics Answer the following problem with complete solutions. Write legibly A balloon is filled with pure oxygen at 10 ℃. The balloon is released from the bottom of a water-filled testing pool and floats 30 m to the water surface (where the atmospheric pressure is standard). The volume of the balloon is 3,000 cm^3. The temperature is 25 ℃ at the surface of the water, and the water temperature at the bottom of the pool is 10 ℃. What is the volume of the balloon at the surface after it has come into thermal equilibrium with the surroundingsarrow_forward
- You are the mechatronics engineer of a manufacturing plant. You decide to perform an analysis on a robot arm of the assembly line with the objective of optimizing its performance. After taking several readings of the speed of the arm’s end effector, you approximate its velocity to the function given below. v(t) = -t4 + 5t3 - 7t2 + 3t + 0.22 0 =< t =< 3 where the velocity is in ms-1 Use your knowledge of differentiation to sketch the velocity-time graph, clearly marking the critical points. Using the graph sketched in (a) above, estimate the velocity when t = 1.5 s Calculate the velocity of the function when t = 1.5 s by substituting to the velocity function. Compare this value to the value you estimated in b above.arrow_forwardSubmit a MATLAB code (.m, word or pdf file) that finds the profile of temperature for a copper rod with the following information after 60 seconds. Length: 50 cm Initial temperature: 25 C Left boundary condition: constant temperature 60 C. Right boundary condition: insulated.arrow_forwardThe speed of sound traveling through the sea is a function of temperature, salinity, and pressure. It is modeled by the function C = 1449.2 + 4.67T -0.055T² +0.00029T³ + (1.34-0.01T) (S-35) + 0.016D where C is the speed of sound (in meters per second), T is the temperature (in degrees Celsius), S is the salinity (the concentration of salts in parts per thousand, which means grams of dissolved solids per 1000 grams of water), and D is the depth below the sea surface, in meters. Calculate the following (Check attached image d3) when T = 10 °C, S = 35 parts per thousand, and D = 100 m. Explain the physical meaning of these derivatives.arrow_forward
- Use of Infinite Sequences and Series in Problem Solving of Special Theory of Relativity. A spacecraft travels fast the earth has a greater velocity (ⱱ) which approximates the speed of light. The time (to) measured in the spacecraft is different from the time (t) measured on earth. The time difference is given, to = t √1- ⱱ 2/c2 = t (1 – ⱱ 2/c2)1/2.arrow_forwardA fixed amount of ideal gas is kept in a container of fixed volume. The absolute pressure P, in pascals, of the gas is plotted as a function of its temperature T, in degrees Celsius. Which of the following are properties of a best fit curve to the data? Select two answers. a. Having a positive slope b. Passing through the origin c. Having zero pressure at a certain negative temperature d. Approaching zero pressure as temperature approaches infinityarrow_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