Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Background: Comprehension Time: 15-20 min In a factory, various hot pieces of metal are shaped through a process called forging. The hot metals are
Background: Comprehension Time: 15-20 min In a factory, various hot pieces of metal are shaped through a process called forging. The hot metals are then quickly cooled by dropping them in liquid glycerol. You will need to determine the energy that must be removed to cool each metal from an initial temperature of 300 C to a final temperature of 50 C, which depends on (1) the type of metal and (2) the amount of metal. You also need to determine the amount of cooling liquid required. The energy that must be added or removed to change the temperature of a material is summarized by the equation, Q = mCAT g.C where Q is energy in units of joules [J], m is the mass of the material in grams [g], C is the specific heat in (each material has a unique specific heat value), and AT is the temperature difference in C between the final and initial temperature of the metal. Materials Data Aluminum 0.897 4000 Cadmium 0.231 8000 Iron Tungsten 0.45 5000 0.134 12800 MA1_data.mat contains two variables storing information about 4 pieces of metal, shown above. Materials (string array): Contains the metal names Data (numerical matrix): Contains the specific heat (C) for each material in Column 1 and the mass in [g] of each metal in Column 2. Each row corresponds to the same row in the Materials variable. The properties of the glycerol cooling liquid are provided in the file, CoolingLiquid.csv, as shown below. Note: Only the first column (numerical values, shaded gray) is stored in the data file. The other two columns are provided for reference as you work through this assignment. 2.4 1.261 25 Property Specific Heat Specific Gravity Initial Temperature Units J/(g C) C Tasks: TASK 1: (15-20 min) Proficiency Time: 45 min You would like to analyzing the cooling process for a new metal. Load in the data file CoolingLiquid.csv Ask the user to enter the name of a new metal (Hint: A name is a text input!) Ask the user to enter the specific heat of the new metal in units of [J/(g.C)] Ask the user to enter the mass of the new metal in [g] Calculate the absolute value of the energy, Q, in [Joules] that must be removed to cool the metal from 300 C to 50 C. MATLAB has a built-in absolute value function abs () ! As a formatted output to the command window, report the absolute value of the energy, Q, that was removed. The first law of thermodynamics states that energy is always conserved. The energy lost by the metal is therefore, equal to the energy gained by the cooling liquid. In other words, as the metal gets cooler, the cooling liquid gets warmer because it is gaining energy, IQmetall = |Qcooling liquid Using your answer from above, calculate the volume of cooling liquid in [gallons] that is required to cool the metal assuming the cooling liquid also has a final temperature of 50 C. Because Qmetall Qcooling liquid, you can substitute [Qmetall for Q in the Q = mCAT for the cooling liquid. Then solve for your unkown, the mass of the cooling liquid. To avoid hardcoding, cooling liquid properties must come from the CoolingLiquid.csv data. You will need to do some additional calculations to convert the mass of cooling liquid to a volume in [gallons]: Density of Liquid Specific gravity of glycerol is given. Specific Gravity= Density of Liquid Water density= . mass volume Volume conversion factors and the density of water are readily available online As a formatted output to the command window, report the [gallons] of cooling liquid that are needed. NOTE (avoid hardcoding): Your code should produce different results if the data for the cooling liquid is changed or there are changes in the user inputs. TASK 2: (20-25 min) You will now analyze the cooling process for the provided metals and store your results. Load in the data file MA1 data.mat Calculate and store in a new vector, the absolute value of the energy, Q, in [Joules] that must be removed to cool all the metals in the Materials list from 300 C to 50 C. Calculate and store in a new vector, the volume of cooling liquid in [gallons] that is required to cool all the metals. Create a matrix that stores the information provided in the original Data matrix, the results from Task 1, and the results from Task 2. There are many ways you can go about building this matrix, but it must be organized as shown below! Create a matrix that stores the information provided in the original Data matrix, the results from Task 1, and the results from Task 2. There are many ways you can go about building this matrix, but it must be organized as shown below! O You must use indexing to build the table! If you hardcode individual values, for example, typing the number 0.897, your code will not earn credit! Column 1 Specific Heat Column 2 Column 3 Mass Q Original metals Column 4 Cooling Liquid New user-specified metal Add the new material to the end of the Materials vector. Save the new matrix and updated Materials vector to a .mat file named MA1_Task2.mat. As a formatted output to the command window, report the total number of materials in the new materials list. Used in your fprintf statement to display an integer (number with no decimals)!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started