Mathcad - HW#2_AdamDelToro
-
Upload
adamdeltoro -
Category
Documents
-
view
52 -
download
3
Transcript of Mathcad - HW#2_AdamDelToro
Adam Del ToroMAE 6420Dr. Smith2/15/2012
HW#2: 2.10-2.16,3.1-3.3
(2.10) Problem Statement: The ACME Co. produces model 12B roadrunner inhibitors which are supposed tohave a length of 2.00m. You have been hired to determine the minimum number of samples (N)necessary for averaging if the plant manager must cer fy that the sample mean length (Xbar) is within0.5% of the parent popula on mean (μ) with 95% confidence. You have been permi ed to take lengthreadings from nine randomly chosen model 12B's, and the results (in meters) were 2.00, 1.99, 2.01,1.98, 1.97, 1.99, 1.99, 2.00, and 2.01. Es mate N and state all of your assump ons. Problem Solu on:
Assumptions: Assume the mean and standard deviation from the first 9 models have the samestats as the future random selection.
X210 2.00 1.99 2.01 1.98 1.97 1.99 1.99 2.00 2.01( ):= N210 cols X210( ) 9=:=
X210bar mean X210( ) 1.993=:= s210x Stdev X210( ) 0.013=:= u210 0.5%:=
Using the following: X210bar u210 t210_95s210x
N210t= then
t210_95 s210x
N210t X210baru210 0.005=
Verify below:We solve for N, viaiteration in the t-tables. Afteriterating, we find that N=9 (8 d.o.f.)with a t-value of:
t210_95 2.306:=
N210t 9:=t210_95 s210x
N210t X210bar0.0051=
(2.11) Problem Statement: The spring constant of a certain spring (in lb/in.) has been determine mul ple
mes as 10.36, 10.43, 10.41, 10.48, 10.39, 10.46, and 10.42. What is the best es mate (with 95%confidence) of the range that contains the parent popula on mean of the spring constant? Problem Solu on:
X211 10.36 10.43 10.41 10.48 10.39 10.46 10.42( ):= N211 cols X211( ) 7.000=:=
X211bar mean X211( ) 10.421=:= s211x Stdev X211( ) 0.041=:=
From table A.2with 6 dof:
t211_95 2.447:=
Lower bound is then: X211bart211_95 s211x
N211- 10.384=
Upper bound is then:X211bar
t211_95 s211x
N211+ 10.459=
(2.12) Problem Statement: How would the range in problem 2.11 vary if the confidence level were changedto (a) 90%; (b) 99%; (c) 99.5%; (d) 99.9% ? Problem Solu on:From table A.2with 6 dof:
t212_90 1.943:= t212_99 3.707:= t212_995 4.317:= t212_999 5.959:=
Part ( a)
Lower bound is then: X211bart212_90 s211x
N211- 10.392=
Upper bound is then:X211bar
t212_90 s211x
N211+ 10.451=
Part ( b)
Lower bound is then: X211bart212_99 s211x
N211- 10.365=
Upper bound is then:X211bar
t212_99 s211x
N211+ 10.478=
Part ( c)
Lower bound is then: X211bart212_995 s211x
N211- 10.355=
Upper bound is then:X211bar
t212_995 s211x
N211+ 10.488=
Part (d)
Lower bound is then: X211bart212_999 s211x
N211- 10.330=
Upper bound is then:X211bar
t212_999 s211x
N211+ 10.513=
(2.13) Problem Statement: For the data in problem 2.11, within what range would we expect all of 5addi onal measurements to fall? What range would contain all of 20 addi onal measurements? Problem Solu on:
X211bar 10.421= s211x 0.041= N211 7.000= From Table A.4: CP5N 3.77:= CP20N 4.74:=
X211bar CP5N s211x- 10.268=For 5 additional measurements, lower bound is then:
Upper bound is then: X211bar CP5N s211x+ 10.574=
For 20 additional measurements, lower bound is then: X211bar CP20N s211x- 10.229=
Upper bound is then: X211bar CP20N s211x+ 10.614=
(2.14) Problem Statement: If 30 data measurements are taken, according to Chauvenet's criterion, what isthe ra o of the maximum acceptable devia on to the standard devia on? Problem Solu on: N214 30:=
P214 11
2 N214- 0.983=:= Using Table A.1, P214 corresponds with (via interpolation):τ214 2.39:=
(2.15) Problem Statement: Ten different people measured the diameter of a circular plate and obtainedresults (in cm) of 6.57, 6.60, 6.51, 6.61, 6.59, 6.65, 6.61, 6.63, 6.62, and 6.64. Compare the samplemean and standard devia on before and a er applica on of Chauvenet's criterion. Problem Solu on:
X215_a 6.57 6.60 6.51 6.61 6.59 6.65 6.61 6.63 6.62 6.64( ):= N215 cols X215_a( ) 10.000=:=
Xi |(Xi - Xbar)/Sx|6.57 0.8196.60 0.0746.51 2.3086.61 0.1746.59 0.3236.65 1.1676.61 0.1746.63 0.6706.62 0.4226.64 0.918
X215bar_a mean X215_a( ) 6.603=:= Before Chauvenet's Criterion:
s215x_a Stdev X215_a( ) 0.040=:=
Using Chauvenet's Crieterion: P215 11
2 N215- 0.950=:=
Using Table A.1, P214 corresponds with (via interpolation): τ215 1.96:=
As seen in the table to the right, 6.51 is removed since deviation tostandard devitation ratio is greater than the maxiumum of 1.96. Removing this value results in a new Xbar and sx as follows:
X215_b 6.57 6.60 6.61 6.59 6.65 6.61 6.63 6.62 6.64( ):=
X215bar_b mean X215_b( ) 6.613=:= After Chauvenet's Criterion: Standard Deviation
decreased by about 40%s215x_b Stdev X215_b( ) 0.025=:=
(2.16) Problem Statement: Twelve values of the calibra on constant of an oxygen bomb calorimeter weredetermined (in cal/°F): 1385, 1381, 1376, 1393, 1387, 1400, 1391, 1384, 1394, 1387, 1343, and 1382.Using these data, determine the best es mate of the mean calibra on constant with 95% confidence. Problem Solu on:
X216a 1385 1381 1376 1393 1387 1400 1391 1384 1394 1387 1343 1382( ):=
Xi |(Xi-Xbar)/Sx|1385 0.0991381 0.1801376 0.5291393 0.6571387 0.2381400 1.1451391 0.5171384 0.0291394 0.7271387 0.2381343 2.8311382 0.110
X216bara mean X216a( ) 1383.583=:= s216xa Stdev X216a( ) 14.337=:=
Using Table 2.1, we get via interpolation: τ216 2.028:=
and using Chauvenet's Criterion we remove the value 1343 from the data
X216b 1385 1381 1376 1393 1387 1400 1391 1384 1394 1387 1382( ):=
X216barb mean X216b( ) 1387.273=:= s216xb Stdev X216b( ) 6.813=:=
From table A.2with 10 dof:
t216_95 2.228:= N216 cols X216b( ) 11=:=
Lower bound is then: X216barbt216_95 s216xb
N216- 1382.696=
Upper bound is then:X216barb
t216_95 s216xb
N216+ 1391.85=
(3.1) Problem Statement: Below is a sketch of a turbine showing the measurements of the inlet and exitpressures and temperatures:
The expression for the adiaba c turbine efficiency η is:
η T1 T2, P1, P2, γ1, ( )1
T2T1
-
1P2P1
γ1 1-( )γ1
-
:=
where γ is the ra o of specific heats. Use the following nominal values and total uncertaintyes mates for the variables:
Variable Nominal Value Uncertainty (95%)P1 517 kPa 10%
P2 100 kPa 10%
T1 1273 K 3%
T2 853 K 3%γ 1.4 0.50%
Perform a general uncertainty analysis using TSM propaga on to es mate the uncertainty in theadiaba c turbine efficiency. Problem Solu on:
First we calculate each partial derivative as follows:
T1η T1 T2, P1, P2, γ1, ( )d
d
T2
T12 P2
P1
γ1 1-
γ1
1-
-T2
η T1 T2, P1, P2, γ1, ( )dd
1
T1P2P1
γ1 1-
γ1
1-
P1η T1 T2, P1, P2, γ1, ( )d
d
P2P2P1
γ1 1-
γ11-
γ1 1-( )T2T1
1-
P12 γ1
P2P1
γ1 1-
γ1
1-
2
P2η T1 T2, P1, P2, γ1, ( )d
d
P2P1
γ1 1-
γ11-
γ1 1-( )T2T1
1-
P1 γ1P2P1
γ1 1-
γ1
1-
2
-
γ1η T1 T2, P1, P2, γ1, ( )d
d
lnP2P1
P2P1
γ1 1-
γ1
1γ1
γ1 1-
γ12
-
T2T1
1-
P2P1
γ1 1-
γ1
1-
2-
Using TSM, the uncertainty is determined as:
uη2 dη
dT1
2uT1
2
dηdT2
2uT2
2+
dηdP1
2uP1
2+
dηdP2
2uP2
2+
dηdγ
2uγ
2+=
where from the problem statement:
uP1P1
10%=uP2P2
10%=uT1T1
3%=uT2T2
3%=uγγ1
0.5%=
P1 517kPa:= P2 100kPa:= T1 1273K:= T2 853K:= γ1 1.4:=
rearranging and dividing by η2 we get:
uηη
2
dηdT1
T1
2 uT1T1
2
dηdT2
T2
2 uT2T2
2
+dηdP1
P1
2 uP1P1
2
+
dηdP2
P2
2 uP2P2
2
dηdγ1
γ1
2 uγγ1
2
++
...
η2=
working with the numerator and plugging in the partial derivatives we have:
T1 T2
T12 P2
P1
γ1 1-
γ1
1-
-
2 uT1T1
2
T2
T1P2P1
γ1 1-
γ1
1-
2 uT2T2
2
+
P1 P2P2P1
γ1 1-
γ11-
γ1 1-( )T2T1
1-
P12 γ1
P2P1
γ1 1-
γ1
1-
2
2
uP1P1
2
+
...
P2P2P1
γ1 1-
γ11-
γ1 1-( )T2T1
1-
P1 γ1P2P1
γ1 1-
γ1
1-
2
-
2
uP2P2
2
+
...
γ1 lnP2P1
P2P1
γ1 1-
γ1
1γ1
γ1 1-
γ12
-
T2T1
1-
P2P1
γ1 1-
γ1
1-
2-
2
uγγ1
2
+
...
The modified partial derivate terms are determined as follows:
T1 T2
T12 P2
P1
γ1 1-
γ1
1-
- 1.789=T2
T1P2P1
γ1 1-
γ1
1-
1.789-=
P1 P2P2P1
γ1 1-
γ11-
γ1 1-( )T2T1
1-
P12 γ1
P2P1
γ1 1-
γ1
1-
2
0.420-=
P2P2P1
γ1 1-
γ11-
γ1 1-( )T2T1
1-
P1 γ1P2P1
γ1 1-
γ1
1-
2
- 0.420=
γ1 lnP2P1
P2P1
γ1 1-
γ1
1γ1
γ1 1-
γ12
-
T2T1
1-
P2P1
γ1 1-
γ1
1-
2- 1.725-=
plugging those values in we have:
uηη
2
1.789( )2 uT1T1
2
1.789-( )2 uT2T2
2
+ 0.420-( )2 uP1P1
2
+
.420( )2 uP2P2
2
1.725-( )2 uγγ1
2
++
...
η2=
using: uT1T1
3%=uT2T2
3%=uP1P1
10%=uP2P2
10%=uγγ1
0.5%=
and also from the nominal values: η
1T2T1
-
1P2P1
γ1 1-( )γ1
-
0.881=:=
we take the square root of each side of the last equation on the previous page and plug in to find:
uηη
1.789( )2 0.03( )2 1.789-( )2 0.03( )2
+ 0.420-( )2 0.10( )2+ .420( )2 0.10( )2
+ 1.725-( )2 0.005( )2+
0.8812=
1.789( )2 0.03( )2 1.789-( )2 0.03( )2
+ 0.420-( )2 0.10( )2+ .420( )2 0.10( )2
+ 1.725-( )2 0.005( )2+
0.88120.1098=
uηη
10.98%= or in other words: uη 11.0% 0.881 9.69 %=:=
(3.2) Problem Statement: Perform the analysis in problem 3.1 using MCM propaga on and compare thetwo uncertainty es mates. Problem Solu on:An excel spreadsheet with vba code written by myself was used to carry out the MCM propagation.Below are the results obtained using 100,000 randomized errors. The code will follow on the nextpage. The code can also be accesed within excel by pressing ALT+F11 once the workbook is open.The spreadsheet is attached to this assignment (macros must be enabled). As can be seen in theworksheet, the errors aren't printed out, due to the time it takes the spreadsheet to print out thoseerrors. Only the final
Results viaMCM propogation:
uηη
10.99%= or in other words: uη 9.68%=
The two results are almost identical.
Option ExplicitPublic Sub Calculate() Dim i, N, LastRow As Long Dim P1, P2, T1, T2, ga, eta As Double Dim uP1, uP2, uT1, uT2, uga As Double Dim rand_err_P1, rand_err_P2, rand_err_T1, rand_err_T2, rand_err_ga As Double 'Determine existing data in worksheet and delete it LastRow = ActiveSheet.UsedRange.Rows.Count Range(Cells(2, "F"), Cells(LastRow, "K")).Cells.Clear Cells(16, "K").Clear Application.ScreenUpdating = False 'N is the Number of iterations N = Cells(8, "D").Value eta = Cells(7, "B").Value P1 = Cells(2, "B").Value P2 = Cells(3, "B").Value T1 = Cells(4, "B").Value T2 = Cells(5, "B").Value ga = Cells(6, "B").Value uP1 = Cells(2, "D").Value uP2 = Cells(3, "D").Value uT1 = Cells(4, "D").Value uT2 = Cells(5, "D").Value uga = Cells(6, "D").Value
For i = 2 To N + 1 'Calculate random errors for each respective variable With Application.WorksheetFunction Randomize rand_err_P1 = (.NormSInv(Rnd) * P1 * uP1 / 2) Randomize rand_err_P2 = (.NormSInv(Rnd) * P2 * uP2 / 2) Randomize rand_err_T1 = (.NormSInv(Rnd) * T1 * uT1 / 2) Randomize rand_err_T2 = (.NormSInv(Rnd) * T2 * uT2 / 2) Randomize rand_err_ga = (.NormSInv(Rnd) * ga * uga / 2) End With 'Put random errors into respective worksheet cells 'Cells(i, "F") = rand_err_P1 'Cells(i, "G") = rand_err_P2 'Cells(i, "H") = rand_err_T1 'Cells(i, "I") = rand_err_T2 'Cells(i, "J") = rand_err_ga 'Calculate the random efficiency from the given equation and the random errors with nominalvalues Cells(i, "K") = (1 - (T2 + rand_err_T2) / (T1 + rand_err_T1)) / _ (1 - ((P2 + rand_err_P2) / (P1 + rand_err_P1)) ^ (((ga + rand_err_ga) - 1) / (ga +rand_err_ga))) Next i
Next i
'print out Uncertainty and relative uncertainty (95%) Cells(16, "D") = 2 * Application.WorksheetFunction.StDev(Range(Cells(2, "K"), Cells(N + 1, "K"))) Cells(17, "D") = Cells(16, "D") / eta
End Sub
(3.3) Problem Statement: Repeat problems 3.1 and 3.2 with the uncertain es taken as 3 mes the givenvalues. Compare the TSM and MCM results using 2uη for the MCM uncertainty at a 95% level ofconfidence. Problem Solu on:
using: uT1T1
9%=uT2T2
9%=uP1P1
30%=uP2P2
30%=uγγ1
1.5%=
and the propogationfrom 3.1:
uηη
2
1.789( )2 uT1T1
2
1.789-( )2 uT2T2
2
+ 0.420-( )2 uP1P1
2
+
.420( )2 uP2P2
2
1.725-( )2 uγγ1
2
++
...
η2=
we take the square root of each side of the last equation on the previous page and plug in to find:
uηη
1.789( )2 0.09( )2 1.789-( )2 0.09( )2
+ 0.420-( )2 0.30( )2+ .420( )2 0.30( )2
+ 1.725-( )2 0.015( )2+
0.8812=
1.789( )2 0.09( )2 1.789-( )2 0.09( )2
+ 0.420-( )2 0.30( )2+ .420( )2 0.30( )2
+ 1.725-( )2 0.015( )2+
0.88120.3295=
TSM uncertainty:uηη
32.95%= or in other words: uη 32.95% 0.881 29.03 %=:=
MCM uncertainty:(see spreadsheet)
uηη
34.79%= or in other words: uη 30.64%=
Larger difference between the results, due to a exploitation of anincreased uncertainty, which was due to magnify the errors. TheMCM has a higher uncertainty of the measured efficiency η.
10.000
0.1098
0.3295