1 answer

Ball bearings are hardened through a process of heating and then rapid cooling. The temperature of...

Question:

Ball bearings are hardened through a process of heating and then rapid cooling. The temperature of the ball during this process can be estimated using the equation:

T(t) = (ti-to)*e^(-t/T)+to

where ti = initial ball temp = 800 degrees celcius
to = initial oil temp = 40 degrees celcius
   t = time = 0-180 seconds at 1 second intervals
   T = time contraint

Create a graph in matlab showing ball temperature versus time. the graph should have 3 curves for the 3 time contraints entered by the user. the 3 time constrains are:
T = 20, 50, and 80 seconds

Use a while loop to generate the arrays to be plotted, with a stopping condition that the value of temperature for all 3 arrays to be plotted is less than 80 degrees celcius. Include a function that is called from the script to get the time constant from the user, and to verify that it is a value between 20 and 100 inclusive. If not, stay in a loop until the user enters a value between 20 and 100.

The final answer should look like this:

Ball bearings are hardened through a process of he


Answers

MATLAB SCRIPT :

% time interval t = 0:250; % initial oil temperature t = 40; % initial ball temperature ti - 800; % Get the time c nstant fro

Code to Copy:

% time interval

t = 0:250;

% initial oil temperature

to = 40;

% initial ball temperature

ti = 800;

% Get the time constant from user

T1 =input('Enter the value of T1: ');

% verify that it is a value between 20 and 100

while ((T1<20)||(T1>100))

    T1 =input('Entered value does not lie between 20 and 100. Reenter the value: ');

end

% Get the time constant from user

T2 =input('Enter the value of T2: ');

% verify that it is a value between 20 and 100

while ((T2<20)||T2>100)

    T2 =input('Entered value does not lie between 20 and 100. Reenter the value: ');

end

% Get the time constant from user

T3=input('Enter the value of T3: ');

% verify that it is a value between 20 and 100

while (T3<20||T3>100)

    T3 =input('Entered value does not lie between 20 and 100. Reenter the value: ');

end

% Initialize the variables

Temp1=0; Temp2=0; Temp3=0;

% verify the stopping the condition that the value of temperature for all 3 arrays to be plotted is less than 80 degrees Celsius

while(((max(Temp1) < 80)&&(max(Temp2) < 80)&&(max(Temp3) < 80)))

      % calculating the ball temperatures

Temp1 = (ti-to).*exp(-t./T1)+to;

Temp2 = (ti-to).*exp(-t./T2)+to;

Temp3 = (ti-to).*exp(-t./T3)+to;

end

% Display the graph

plot(t, Temp1,'r', t, Temp2, 'g', t, Temp3, 'b'), xlabel('time, s'), ylabel ('temperature');

legend('Time constant 1','Time constant 2','Time constant 3');


.

Similar Solved Questions

2 answers
WBWK7: Problem 2 Previous Problem Problem List Next Problem (15 points) A random sample of 100...
WBWK7: Problem 2 Previous Problem Problem List Next Problem (15 points) A random sample of 100 freshman showed 5 had satisted the university mathematics requirement and a second random sample of 50 sophomores showed that 11 had satisfied the university mathematics requirement. Enter answers below ro...
2 answers
Solve this system by matrices 2x+3y-z=-8 x-y-z=-2 -4x+3y+z=6
solve this system by matrices 2x+3y-z=-8 x-y-z=-2 -4x+3y+z=6...
1 answer
How does designation of the element relate to atomic mass?
How does designation of the element relate to atomic mass?...
1 answer
An organization is building a new customer services team, and the manager needs to keep the...
An organization is building a new customer services team, and the manager needs to keep the team focused on customer issues and minimize distractions. The users have a specific set of tools installed, which they must use to perform their duties. Other tools are not permitted for compliance and track...
1 answer
What types of mechanisms are involved in the following transformation? CH Br + HOCH CH, -...
What types of mechanisms are involved in the following transformation? CH Br + HOCH CH, - products A. SE B. S .E c . El alle D..E Identify the Substitution and Elimination products in the following reaction ? NaOEL Substitution product? Elimination product? MO) vonesat to d o so at avis de la Identi...
1 answer
Toy Universe Products is considering producing toy action figures and sandbox toys. The products require different...
Toy Universe Products is considering producing toy action figures and sandbox toys. The products require different specialized​ machines, each costing ​$1 million. Each machine has a​ five-year life and zero residual value. The two products have different patterns of predicted net ...
1 answer
Consider the system: A(aq) B(aq) at 277 K where AGFormA = -14.3 kJ/mol and AG form...
Consider the system: A(aq) B(aq) at 277 K where AGFormA = -14.3 kJ/mol and AG form B = -13.2 kJ/mol. Calculate the concentration of A at equilibrium when 1.7 mol of A and 1.58 mol of B are mixed in water to form exactly one liter of solution. concentration (M) = number (rtol=0.01, atol=1€ @...
1 answer
19. the health care provider prescribes 2000 ml of 5% dextrose and hall normal saline to...
19. the health care provider prescribes 2000 ml of 5% dextrose and hall normal saline to infuse over 24 hours. The drop factor is 15 dropsett/mL. There should set the flow rate at how any drops per minute? Fill in the blank. Record your answer to the nearest whole number Answer: ott/minute 2000 mh 2...
1 answer
Is #4x=y# a direct variation equation and if so, what is the constant of variation?
Is #4x=y# a direct variation equation and if so, what is the constant of variation?...
1 answer
9. A fire hose nozzle has a diameter of 0.03m, and must be able to deliver...
9. A fire hose nozzle has a diameter of 0.03m, and must be able to deliver a flow rate of 1 cubic meter per minute. If the nozzle is attached to a hose with 10cm diameter, what pressure must be maintained just upstream of the nozzle to deliver this flow rate? Assume no energy loss. OSS...
1 answer
Lamp Light Limited (LLL) manufactures lampshades. It applies variable overhead on the basis of direct labor...
Lamp Light Limited (LLL) manufactures lampshades. It applies variable overhead on the basis of direct labor hours. Information from LLL's standard cost card follows: Standard Quantity 0.6 Standard Rate $0.80 Standard Unit Cost $0.48 Variable manufacturing overhead During August, LLL had the foll...
2 answers
22. Cornell Enterprises is considering a project that has the following cash fnow and WACC data...
22. Cornell Enterprises is considering a project that has the following cash fnow and WACC data What is the project's NPV? Note that a project's projected NPV can be negative, in which case it will be rejected. WACC: 10.00% Year 01 2 Cash flows $825 $450 $460 $470 a. $396.72 b. $317.37 C. $3...
1 answer
A copper (Cu) block at 90°C is placed into a beaker of water (#H_2O#) at 25°C. What is the expected result based on the heat flow between the substances?
A copper (Cu) block at 90°C is placed into a beaker of water (#H_2O#) at 25°C. What is the expected result based on the heat flow between the substances?...
1 answer
At the close of chapter 2, several frequency distributions which provide summary statistics on several economic...
At the close of chapter 2, several frequency distributions which provide summary statistics on several economic and social indicators for Mexicans living in the United States were presented. In each of these frequency distributions, only partial information is displayed. Discuss why this is the case...
1 answer
Regarding safety please help me answer this question as its relates to the role of a...
Regarding safety please help me answer this question as its relates to the role of a nurse or healthcare professionals Describe the benefits and limitations of selected safety-enhancing technologies (such as, barcodes, computer provider order entry, medication pumps, and automatic alerts/alarms....
2 answers
How do you evaluate #12\frac { 1} { 4} \div 3\frac { 1} { 2} #?
How do you evaluate #12\frac { 1} { 4} \div 3\frac { 1} { 2} #?...