Professional Documents
Culture Documents
004 - Equation Fitting - CH4 - New
004 - Equation Fitting - CH4 - New
1
Abdelal
Source: Ch4, design of thermal systems
2
To develop equations that represent the
performance characteristics of the equipment,
the behavior of the process, and the
thermodynamic properties of substances.
3
Abdelal
1. Systematic techniques for determining the
constants and coefficients in equations.
4
Abdelal
Can be used for solving systems of linear
equations.
5 −2 0
7 3
[A]= , [B] = 3 1 −1 = (3X3) matrix
1 2
0 1 1
5 3 0
[B]T= −2 1 1
0 −1 1
5
Abdelal
Multiplication of matrices, the contents of the
first row of the first matrix are multiplied with
the contents of the first column in the second
matrix. For example, the multiplication of:
6
Abdelal
Determinant , this is a number that is written
between two vertical lines. The technique is to
sum the products of diagonal elements,
assigning a positive sign to the diagonal
moving downward to the right and negative to
the product downwards to the left.
7
Abdelal
For a 3X3 matrix, the determinant is given by:
𝑎 𝑏 𝑐
[A]= 𝑑 𝑒 𝑓
𝑔 ℎ 𝑖
𝑎 𝑏 𝑐
X
X
𝑒 𝑓 - 𝑑 X 𝑓 + 𝑑 𝑒
ℎ 𝑖 𝑔 𝑖 𝑔 ℎ
8
Abdelal
For a 4 X 4 matrix and larger, Excel’s
=MDETERM (Array ) can be used.
9
Abdelal
Cramer’s rule uses the following concept:
For the following equations :
10
Abdelal
Example: Using Cramer’s rule, solve for X2 in
this set of simultaneous linear equations
11
Abdelal
Gaussian Elimination
14
Abdelal
15
Abdelal
A polynomial is of the form:
Y= ao+a1x+a2x2+a3x3+…+anxn
19
Abdelal
The goal is to plug in
numbers (x1,y1),(x2,y2),
… (xn,yn) in the equation
before to get n equations
with n unknowns
(a1,a2…an)
These equations can be solved simultaneously.
20
Abdelal
21
Abdelal
22
Abdelal
So the following table contains the set of
constants to solve the equation:
23
Abdelal
24
Abdelal
25
Abdelal
26
Abdelal
This is applicable in the case where the interval
between the data points is not uniform. So it is
more general than the previous method.
So…
A second degree polynomial of the form:
27
Abdelal
By setting x= x1, x=x2, x=x3, the constants
become:
28
Abdelal
Where the product sign indicates multiplication
29
Abdelal
Very often, the function will be dependent on
more than one variable. For example, pressure
developed by a pump depends on the speed
and flow rate.
30
Abdelal
If the need is to produce a function of ΔP in
terms of a second order equation of S and Q.
Separate equations need to be written for each
of the three curves.
Therefore, for the S1=30 r/s
∆𝑃1 = 𝑎1 + 𝑏1 𝑄 + 𝑐1 𝑄 2
Similarly, for the other two speeds, two other
equations are developed:
∆𝑃2 = 𝑎2 + 𝑏2 𝑄 + 𝑐2 𝑄 2
∆𝑃3 = 𝑎3 + 𝑏3 𝑄 + 𝑐3 𝑄 2
31
Abdelal
So now, the constants a, b, c can be expressed as a
second degree equations in terms of S. Such
equations will have the form:
𝑎 = 𝐴𝑜 + 𝐴1 𝑆 + 𝐴2 𝑆 2
Similarly:
𝑏 = 𝐵𝑜 + 𝐵1 𝑆 + 𝐵2 𝑆 2
𝑐 = 𝐶𝑜 + 𝐶1 𝑆 + 𝐶2 𝑆 2
Substituting in the original formula:
∆𝑝
= 𝐴𝑜 + 𝐴1 𝑆 + 𝐴2 𝑆 2 + 𝐵𝑜 + 𝐵1 𝑆 + 𝐵2 𝑆 2 𝑄
+ 𝐶𝑜 + 𝐶1 𝑆 + 𝐶2 𝑆 2 𝑄 2
This formula can be solved if 9 data points are
available (three on each of the three curves)
32
Abdelal
33
Abdelal
Exit Temp as a function of the WBT
32
31
30
Exit Temp
29
28
27
26
25
20 21 22 23 24 25 26 27
WBT
10 16 22
34
Abdelal
Exit Temp as a function of the range
32
31
30
Exit Temp.
29
28
27
26
25
10 12 14 16 18 20 22 24
Range
20 23 26
35
Abdelal
This form of functions is very common in
engineering practice:
y=bxm
On a log-log graph, the exponential plot turn
linear, with the intercept at x=1 representing b
and the slope representing m
36
Abdelal
This method is handy when more data points are
available than the “m” coefficients needed for the
fit curve.
37
Abdelal
38
Abdelal
This method will be developed here for first
and second degree polynomials:
Y= a+bx
A number (m) of data points is available.
(x1,y1), (x2,y2), (x3,y3),…(xm,ym)
The deviation of the data point is given by the
equation: a+bxi-yi. Therefore, the sum of
square deviations is given by:
39
Abdelal
The minimization is obtained when the partial
derivative of the equations above with respect
to a and b is equal to zero.
And
40
Abdelal
Dividing by two and separating the two
equations into individual terms yield:
41
Abdelal
42
Abdelal
43
Abdelal
Here, the function is of the form:
Y = a+bx+cx2
It can be shown that three equation will be developed
for the determination of a,b,c. In a matrix format:
𝑚 𝑥𝑖 𝑥𝑖 2 𝑦𝑖
𝑎
𝑥𝑖 𝑥𝑖 2 𝑥𝑖 3 𝑏 = 𝑥𝑖 𝑦𝑖
𝑐
𝑥𝑖 2 𝑥𝑖 3 𝑥𝑖 4 y𝑖 𝑥𝑖 2
46
Abdelal
In most cases, data points are available and
little is known about the type of function that
best represents the data. Here is where the art
of the curve fitting comes.
47
Abdelal
48
Abdelal
Z= ao+a1x+a2x2+a3y
49
Abdelal
50
Abdelal
This would probably be your first guess if there are
no special indicators otherwise:
51
Abdelal
52
Abdelal
Y=ao+a1x-1+a2x-2 OR Y =a C-x
53
Abdelal
54
Abdelal
𝑐𝑥
𝑦 = 𝑎𝑏
Where a,b,c are constants with b,c less than
unity
55
Abdelal
56
Abdelal
y=y1+y2 = (a+bx)+(c+dxm)
M is a negative exponent
57
Abdelal
Work out the following problems:
1. 4.6
2. 4.14
3. 4.22
58
Abdelal