Thermocouples therm diff comsol

19
Thermocouples, Thermal diffusivity, & COMSOL: Thermal Models Gerard Trimberger November 3, 2011 Section: AC

Transcript of Thermocouples therm diff comsol

Page 1: Thermocouples therm diff comsol

Thermocouples, Thermal diffusivity,

& COMSOL: Thermal Models

Gerard Trimberger

November 3, 2011

Section: AC

Page 2: Thermocouples therm diff comsol

Introduction:

A thermocouple is a temperature transducer that converts a temperature difference

between two leads into an electrical potential difference that can be measured. The device uses

three wires, two of the same types of metal and one of a different type (e.g. Iron, Copper,

Constantan (a copper-nickel alloy), etc.). At each junction between the two metals, a small

voltage is produced across the junction. If the temperature difference is a nonzero number, then

the voltage difference will also be nonzero. Similarly, if the temperature at both junctions is the

same, the voltage will cancel out resulting in a zero electrical potential difference. This is known

as the Seebeck effect. In this way, a thermocouple can be used to measure the temperature

difference between two regions because of the approximate linear relationship between

temperature and voltage difference. This information can also be used to map the thermal

gradient over time as an object reaches the same temperature as its surroundings. One commonly

found thermocouple, the type-J thermocouple, is made from constantan metal and iron. Some

benefits of type-J over Type-T thermocouples are that they are more durable. However,

oxidation of the iron metal is an added concern of the Type-J thermocouple.

The voltage output of a typical thermocouple is on the order of millivolts, therefore some

form of operational amplifier is commonly used to amplify the output signal. A differential

amplifier works well for this amplification because it amplifies the difference between two

voltage sources (each end of the thermocouple). The gain of the amplifier is based on the resistor

values built into the amplifier circuit. The gain function of a differential amplifier is written as

follows:

Vout = (Rf + R1) Rg V2 / (Rg + R2) R1 - Rf V1 / R1

If resistors are chosen so that Rf = Rg and R1 = R2 the gain function simplifies to:

Gain = Vout /.(V2 – V1) = Rf / R1 = Rg / R2

Therefore if resistors Rf and Rg are chosen to be multiples of R1 and R2 then the ratio of the two

is the gain function of the amplifier. In the case of mismatches in any of the amplification

components, current flows into the input differential amplifier unequally. To resolve this

problem, a potentiometer can be placed between the null pins of the amplifier. For a split power

supply, the potentiometer is also connected to one of the power supply leads.

Page 3: Thermocouples therm diff comsol

Methods:

The first step in creating the thermal profile of an egg white cylinder cooked in boiling

water is to create a working thermocouple. A type-J thermocouple was used in this experiment.

The two leads in which the voltage difference was measured were made from iron wire and the

lead connecting the two iron leads was made from constantan wire. The three wires were welded

by applying a current through them which melted the metals and caused them to solder together.

The resistance through each wire was measured prior to soldering as well as after soldering to

ensure no unnecessary resistance was added. Prior to welding the resistance through the iron and

constantan wires was 1.1 Ohms and 1.4 Ohms respectively. While after welding, the resistance

through each iron-constantan junction was 0.9 Ohms.

Because the voltage difference between temperature of ~25 degrees Celsius and ~100

degrees Celsius is on the order of 2 mV, a differential amplifier was built and added to the data

acquisition system. An operational amplifier (model: UA741CN) was used for such purpose. The

amplifier was supplied with -9 and +9 volts from a power supply. R1 and R2 were chosen as ~1

kOhm while Rf and Rg were chosen as ~89 kOhm. These resistors were chosen accordingly to

amplify the signal by ~89 times, resulting in a voltage output on the order of ~200 mV. A

potentiometer was connected between pins 1 and 5, as well as to the -9 volt power supply, and

adjusted to offset the difference in amplification of the signal so that it was centered at 0 volts.

In order to take constant measurements of the voltage difference over time, the program

Labview was used. The Data Acquisition device was set up to read differential voltage between

the amplifier output and Earth ground. This measurement was taken every 1000 ms = 1 second.

The data acquisition began when the cylinder of egg white was placed in boiling water and

concluded when the egg white was confirmed as being cooked. This decision was made based on

the denaturation of the proteins within (turning from clear to white) and on the viscosity of the

material (cooking increased viscosity).

In preparation for the mapping of the thermal profile of a cylindrical egg white cooking

in boiling water, a hot plate was used to heat a 500 mL glass beaker filled with ~450 +/- 10 mL

of water to ~100 +/- 2 degrees Celsius. Once the water reached the desired temperature, the hot

plate was set to a constant temperature so that the water temperature remained fairly constant

(+/- 2 degrees Celsius). Egg white was removed from the rest of the egg and place in a beaker.

Using a 15 mL syringe, ~10 +/- 0.1 mL of egg white at room temperature (~20 degrees Celsius)

was transferred into a 15 mL centrifuge tube. The centrifuge tube was 70 +/- 1mm tall with a

radius of 8.4 +/- 0.1mm and 1.5 +/- 0.1 mm thick. The tips of the centrifuge tube were removed

to allow for the thermocouple lead to enter and were left upside down for the remainder of the

experiment. The dimension of the egg white cylinder was ~60 +/- 5mm tall and ~6.9 +/- 0.1 mm

in radius. One lead of the thermocouple was placed in the centrifuge tube towards the middle of

the cylinder. The other lead was placed in the beaker of boiling water away from the sides. The

other ends of the iron wires in the thermocouple were attached to the differential amplifier and

Page 4: Thermocouples therm diff comsol

the amplifier was supplied with +/- 9 volts from the power supply. Using a ring stand with a

prong holder, the centrifuge tube was lowered into the beaker of boiling water until the surface

of egg white was below the surface of the water. The Labview program described earlier was

started and data acquisition began. Once the egg had been confirmed as cooked, described above,

the data acquisition was canceled and the results saved in a text file.

Two calibration points were recorded prior to running the experiment. One end of the

thermocouple was placed in an ice bath (~0 +/- 1

oC) and the other was placed in warm water

(~40 +/- 1oC). The amplified voltage difference was recorded twice as 210 +/- 10 mV and 202

+/- 10 mV. Dividing the temperature difference by the voltage difference a conversion factor

between voltage and temperature was found. Using this value, the values for temperature

difference over time were found by converting the experimentally obtained voltage values into

temperature values. A linear regression was then taken to get a line of best fit through each of the

trials. To judge the linear correlation between the linear regression and that of the original data,

the r2 value was calculated for each trial. The mean slope and y-intercept was also calculated

from all three trials (Table 1).

A thermal model for this type of radial thermal conduction was simulated in the

COMSOL simulation program. The egg was represented as a cylinder 70 mm tall and 7.0 mm in

radius. The material properties of egg were taken from a study in the Journal of Food

Engineering1. The study provided information concerning the density, heat capacity, and thermal

conductivity of egg at different water concentrations (yolk to white) and at different

temperatures. Since only egg white was used in this experiment, the values with the highest

water concentration were used (0.882 Ww). The density, heat capacity, and thermal conductivity

of egg white were averaged over the temperature values provided for the temperature range used

in the experiment (295-311 Kelvin). These mean values were then entered into the COMSOL

simulation as the material properties of egg white. Surrounding the egg white cylinder was a

1.5mm thick polyethylene centrifuge. Both the cap and sides of the tube were modeled with the

built in polyethylene material properties. At the top of the egg cylinder, a 1.5mm thick layer of

air with built in “air” material properties was also included. Every component of the model was

set to the initial temperature of the room (20 oC) and surrounding the model was a heat source of

boiling water (100 oC). A time dependent simulation was run for the same amount of time as it

took to cook the egg via experimentation (160 seconds). Using a point at the center of the egg

cylinder, the temperature value was recorded at each second for the duration of the simulation.

These values were then plotted in MATLAB and a linear regression was run on the data.

The central temperature history of various solids with initial uniform temperature and

constant surface temperature is displayed in Figure 18.3 of Fundamentals of Momentum, Heat,

and Mass Transfer2. The experimental egg white cylinder can be modeled as an infinite cylinder

1 Coimbra, Jane (2005) 2 Welty (2008)

Page 5: Thermocouples therm diff comsol

with egg white material properties. By taking two points from the plot (i.e (0.0, 1.0) and (0.9,

0.009)), the slope of the graph shown can be calculated. Since the x-axis of the graph is

displayed in units of αt/r2, the α and r

2 values must be found. The constant α represents the

thermal conductivity divided by the product of density and heat capacity. Therefore it can be

calculated using the values for density, thermal conductivity, and heat capacity that were used in

the COMSOL simulation. The radius of the egg white cylinder can be measured physically (7.0

+/- 0.1 mm). Using this information, an approximate temperature difference over time plot can

be constructed for the “theoretical approximation”.

Page 6: Thermocouples therm diff comsol

Results:

Figure 1 Temperature difference versus time plot for trial #1 data with respective linear regression.

Figure 2 Temperature difference versus time plot for trial #2 data with respective linear regression.

0 20 40 60 80 100 120 140 16015

20

25

30

35

40

45

50

55

60

65Trial #1: Temperature Difference over Time

Time (Seconds)

Tem

pera

ture

Diffe

rence (

Degre

es C

els

ius)

Rsqr = 0.9329

Trial #1 Data

Line of Best-fit: temp(t) = -0.2483*t + 55.2157

0 20 40 60 80 100 120 140 160 180 20010

20

30

40

50

60

70Trial #2: Temperature Difference over Time

Time (Seconds)

Tem

pera

ture

Diffe

rence (

Degre

es C

els

ius)

Rsqr = 0.9326

Trial #2 Data

Line of Best-fit: temp(t) = -0.2660*t + 63.2166

Page 7: Thermocouples therm diff comsol

Figure 3 Temperature difference versus time plot for trial #3 data with respective linear regression.

Figure 4 Temperature difference versus time plot for COMSOL simulation with respective linear regression.

0 20 40 60 80 100 120 140 160 18010

20

30

40

50

60

70

80Trial #3: Temperature Difference over Time

Time (Seconds)

Tem

pera

ture

Diffe

rence (

Degre

es C

els

ius)

Rsqr = 0.9510

Trial #3 Data

Line of Best-fit: temp(t) = -0.2894*t + 66.2497

0 20 40 60 80 100 120 140 160-20

0

20

40

60

80

100Temperature Difference over Time

Time (Seconds)

Tem

pera

ture

Diffe

rence (

Degre

es C

els

ius)

COMSOL Simulation Data

Line of Best-fit from COMSOL: temp(t) = -0.6394*t + 84.4760

Page 8: Thermocouples therm diff comsol

Figure 5 Central temperature profile of various solids with particular concentration on infinite cylinders3.

Slope Y-intercept Rsqr

Trial 1 -0.2483 55.2157 0.9329

Trial 2 -0.2660 63.2166 0.9326

Trial 3 -0.2894 66.2497 0.9510

Mean -0.2679 61.5607 N/A

COMSOL Simulation -0.6394 84.4760 0.9740 Theoretical

(Infinite Cylinder) -0.1874 80.00 N/A

Table 1 Summary of slope and y-intercept taken from the linear regression of each trial, including means over all

three trials (r2 value also included for reference), and compared with values from COMSOL simulation and

theoretical values based on central temperature profile of an infinite cylinder.

3 Welty (2008)

Page 9: Thermocouples therm diff comsol

Figure 6 Temperature difference versus time plot of linear approximation for experimental values, COMSOL

simulation, and theoretical values.

Percent Error Slope Y-Intercept

COMSOL Simulation -0.58101345 -0.267134524

Theoretical Calculations -0.00741015 -0.23049125

Table 2 Percent error for linear regression coefficients of experimental results versus the results for COMSOL

simulation and theoretical calculations.

0 20 40 60 80 100 120 140 160-20

0

20

40

60

80

100Temperature Difference over Time

Time (Seconds)

Tem

pera

ture

Diffe

rence (

Degre

es C

els

ius)

Line of Best-fit from COMSOL: temp(t) = -0.6394*t + 84.4760

Line of Best-fit from Experiment: temp(t) = -0.2679*t + 61.5607

Line of Best-fit from Theoretical Values: temp(t) = -0.2699*t + 80

Page 10: Thermocouples therm diff comsol

Discussion:

Examining the relationship of temperature difference between the center of an egg white

cylinder and the surrounding medium (i.e. boiling water) over time, a linear relationship can be

determined for each of the three trials (Figures 1-3). The r2 value of each linear regression was

calculated (Table 1); each trial produced an r2 value greater than 0.93 which strongly suggests a

linear relationship between time and temperature difference. Using the MATLAB functions

“polyfit” and “polyval,” coefficients of the linear model were calculated and plotted for each of

the trials (Figures 1-3). The mean of these coefficients was taken as a more accurate

representation of the true temperature gradient over time (Table 1) and used in comparison with

the other models.

The results of the temperature profile over time, of the COMSOL simulation described

above, was plotted for comparison with experimental results (Figure 4). A linear regression was

taken of this data using the MATLAB functions “polyfit” and “polyval” and the results were

plotted (Figure 4). With an r2 value of 0.9740, there is significant evidence to suggest a linear

correlation in temperature difference, between the center of the model and the surrounding

temperature, and time over which the simulation was run. The coefficients of this linear model

and r2 calculation were presented (Table 1).

A third model of the experimental setup was calculated theoretically using the central

temperature profile of an infinite cylinder of radius 7.0 +/- 0.1 mm (Figure 5). By approximating

the slope between two points on the plot, a linear model was created. The coefficients of this

approximation were also presented (Table 1). Since the approximation was based on two points

on the plot, there was no respective r2 value to calculate.

A plot of the linear approximation for each of the three models (i.e. experimental,

COMSOL simulation, and theoretical) was created for comparison. The coefficients for each

were also plotted on the graph (Figure 6). The slope of the linear models for the experimental

data and theoretical calculations were significantly similar, -0.2679 and -0.2699 respectively.

The percent error of these slope approximations was about 0.741 % which suggests significant

similarity. The percent error between the slopes of the experimental data and COMSOL

simulation was about 58.101% which suggests significant error based on the assumptions made

in the simulation (Table 2). The most likely sources of error include: difference between the

material properties found in the Coimbra (2005) study and those of the egg white that was used

in the experiment, assumption of ideal conditions in heat transfer that the COMSOL simulation

is based on (i.e. constant surrounding temperature, uniform heating, and uniform material

properties), and modeling the entire centrifuge tube as uniform polyethylene material properties.

The percent error in y-intercept approximation for the experimental data compared with

COMSOL simulation and theoretical calculations are 26.713% and 23.049%, respectively (Table

2). With such large percent error calculations, there is significant evidence to suggest a source of

error based on the conditions present in the experiment and assumptions made in the simulation

Page 11: Thermocouples therm diff comsol

and theoretical calculations. The simulation and theoretical calculations are based on uniform

initial temperature conditions within the egg white cylinder and the surrounding medium (boiling

water). Due to the unpredictable nature of these materials within the experimental circumstances,

these assumptions may provide a significant source of error.

Page 12: Thermocouples therm diff comsol

Conclusion:

Based on the results discussed above, there are various additional experiments that would

be interesting to perform. A significant source of error resulted from using a centrifuge tube and

modeling it as polyethylene material properties. It would be interesting to explore the same

experiment using a different material surrounding the cylinder of egg white (i.e. a glass test tube

or uniform metal cylinder). A different surrounding material could also be used instead of the

boiling water in which the temperature profile more accurately represents the uniform

approximation. The material properties of the egg white material were based on a study

conducted by Coimbra (2005), instead of results conducted on the specific egg white being used

in the experiments. In order to obtain more accurate egg white material properties, the values for

density, thermal conductivity, and heat capacity could be found experimentally prior to running

the thermal profile experiment.

Overall, the experiment was successful. The results were not exactly those that were

predicted with other models but they were within the same general magnitude. The assumptions

made for the COMSOL simulation and theoretical calculations were expected to produce some

error due to the non-uniform properties of natural materials. Some of the successes of the

experiment were: creating a fully functional Type- J thermocouple, building and modifying a

differential amplifier with the appropriate gain for the experiment, obtaining experimental data

of the heating of an egg white cylinder using the components built, and interpreting data obtained

from the COMSOL simulation and theoretical calculations into information that can be

compared to the experimental results. The true success of the experiment was the combination of

these factors; which, in this particular situation, outweighs the discontinuity in the results.

Page 13: Thermocouples therm diff comsol

References:

[1] Coimbra, Jane, Gabas, Ana, Minim, Luis, Garcia Rojas, Edwin, Telis, Vania, and Telis-

Romero, Javier, 2005, Density, heat capacity and thermal conductivity of liquid egg products,

Journal of Food Engineering v. 74, p. 186–19.

[2, 3] Welty, Wicks, Wilson, and Rorrer, 2008, Fundamentals of Momentum, Heat, and Mass

Transfer, John Wiley & Sons Inc., Hoboken, NJ, p. 257.

Page 14: Thermocouples therm diff comsol

Appendix I:

Additional Figures:

Figure 7 Temperature difference versus time plot experimental trials #1-3.

Figure 8 Temperature difference versus time plot for COMSOL simulation.

0 20 40 60 80 100 120 140 160 180 20020

30

40

50

60

70

80Temperature Difference over Time: Trial # 1-3

Time (Seconds)

Tem

pera

ture

Diffe

rence (

Degre

es C

els

ius)

Trial #1 Data

Trial #2 Data

Trial #3 Data

0 20 40 60 80 100 120 140 160-10

0

10

20

30

40

50

60

70

80

90Temperature Difference over Time: COMSOL Simulation

Time (Seconds)

Tem

pera

ture

Diffe

rence (

Degre

es C

els

ius)

Page 15: Thermocouples therm diff comsol

Figure 9 Photograph of experimental set-up including hot plate, breaker, thermocouple, operational amplifier, and

Labview data acquisition device.

Page 16: Thermocouples therm diff comsol

Appendix II:

MATLAB Code:

clear all; close all; clc;

trial1 = load('C:\Users\Gerard\Documents\MATLAB\trial1.txt'); trial2 = load('C:\Users\Gerard\Documents\MATLAB\trial2.txt'); trial3 = load('C:\Users\Gerard\Documents\MATLAB\trial3.txt');

comsol = load('C:\Users\Gerard\Documents\MATLAB\COMSOL model.txt');

time1 = trial1(:,1); time2 = trial2(:,1); time3 = trial3(:,1); time_comsol = comsol(1:160,1);

volt1 = trial1(:,2); volt2 = trial2(:,2); volt3 = trial3(:,2);

temp1 = volt1 .* (40/.205); temp2 = volt2 .* (40/.205); temp3 = volt3 .* (40/.205); temp_comsol = 373.15 - comsol(1:160,2);

figure(1) hold on plot(time1, temp1) plot(time2, temp2, 'r') plot(time3, temp3, 'g') title('Temperature Difference over Time: Trial # 1-3'); xlabel('Time (Seconds)'); ylabel('Temperature Difference (Degrees Celsius)'); legend('Trial #1 Data', 'Trial #2 Data', 'Trial #3 Data', 'Location',

'Best');

poly1 = polyfit(time1, temp1, 1); temp_fit1 = polyval(poly1,time1); temp_resid1 = temp1 - temp_fit1; SSresid1 = sum(temp_resid1.^2); SStotal1 = (length(temp1)-1) * var(temp1); rsq1 = 1 - SSresid1/SStotal1;

figure(2) hold on plot(time1, temp1) plot(time1, temp_fit1, 'r') title('Trial #1: Temperature Difference over Time');

Page 17: Thermocouples therm diff comsol

xlabel('Time (Seconds)'); ylabel('Temperature Difference (Degrees Celsius)'); legend('Trial #1 Data','Line of Best-fit: temp(t) = -0.2483*t + 55.2157',

'Location','Best') text(20,-.9, 'Rsqr = 0.9329');

poly2 = polyfit(time2, temp2, 1); temp_fit2 = polyval(poly2,time2); temp_resid2 = temp2 - temp_fit2; SSresid2 = sum(temp_resid2.^2); SStotal2 = (length(temp2)-1) * var(temp2); rsq2 = 1 - SSresid2/SStotal2;

figure(3) hold on plot(time2, temp2) plot(time2, temp_fit2, 'r') title('Trial #2: Temperature Difference over Time'); xlabel('Time (Seconds)'); ylabel('Temperature Difference (Degrees Celsius)'); legend('Trial #2 Data','Line of Best-fit: temp(t) = -0.2660*t + 63.2166',

'Location','Best') text(20,-.9, 'Rsqr = 0.9326');

poly3 = polyfit(time3, temp3, 1); temp_fit3 = polyval(poly3,time3); temp_resid3 = temp3 - temp_fit3; SSresid3 = sum(temp_resid3.^2); SStotal3 = (length(temp3)-1) * var(temp3); rsq3 = 1 - SSresid3/SStotal3;

figure(4) hold on plot(time3, temp3) plot(time3, temp_fit3, 'r') title('Trial #3: Temperature Difference over Time'); xlabel('Time (Seconds)'); ylabel('Temperature Difference (Degrees Celsius)'); legend('Trial #3 Data','Line of Best-fit: temp(t) = -0.2894*t + 66.2497',

'Location','Best') text(20,-.9, 'Rsqr = 0.9510');

n = 3; mean_slope = (poly1(1) + poly2(1) + poly3(1))/n; mean_y_int = (poly1(2) + poly2(2) + poly3(2))/n; tempfit_mean = mean_slope .* time1 + mean_y_int;

figure(5) plot(time_comsol, temp_comsol) title('Temperature Difference over Time: COMSOL Simulation'); xlabel('Time (Seconds)');

Page 18: Thermocouples therm diff comsol

ylabel('Temperature Difference (Degrees Celsius)'); poly_com = polyfit(time_comsol, temp_comsol, 1); tempcom_fit = polyval(poly_com,time_comsol); tempcom_resid = temp_comsol - tempcom_fit; SSresidcom = sum(tempcom_resid.^2); SStotalcom = (length(temp_comsol)-1) * var(temp_comsol); rsq_com = 1 - SSresidcom/SStotalcom;

figure(6) hold on plot(time_comsol, temp_comsol) plot(time_comsol, tempcom_fit, 'r') title('Temperature Difference over Time'); xlabel('Time (Seconds)'); ylabel('Temperature Difference (Degrees Celsius)'); legend('COMSOL Simulation Data', 'Line of Best-fit from COMSOL: temp(t) = -

0.6394*t + 84.4760', 'Location','Best')

rho = (1025.2 +1033.0 +1024.4 +1027.7+ 1031.2)/ 5; Cp = (3.588 + 3.539 + 3.590 + 3.557 + 3.584)/5 * 1000; k = (0.558 + 0.547 + 0.555 + 0.547 + 0.550)/5; alpha = k/(rho * Cp); rad = .007;

slope_mod = (alpha/rad^2)*(100-20);

slope_cyl = (0.009-1.0)/(0.9-0);

total_cyl_slope = slope_mod * slope_cyl; temp_cyl_fit = total_cyl_slope .* time1 + (100-20);

figure(7) hold on plot(time_comsol, tempcom_fit) plot(time1, tempfit_mean, 'r') plot(time1, temp_cyl_fit, 'g') title('Temperature Difference over Time'); xlabel('Time (Seconds)'); ylabel('Temperature Difference (Degrees Celsius)'); legend('Line of Best-fit from COMSOL: temp(t) = -0.6394*t + 84.4760', 'Line

of Best-fit from Experiment: temp(t) = -0.2679*t + 61.5607', 'Line of Best-

fit from Theoretical Values: temp(t) = -0.2699*t + 80', 'Location','Best')

Page 19: Thermocouples therm diff comsol

Appendix III:

Complete Data Sets:

(See attached files)

Trial #1 – trial1.txt

Trial #2 – trial2.txt

Trial#3 – trial3.txt

COMSOL Data – COMSOL model.txt