Download as pdf or txt
Download as pdf or txt
You are on page 1of 56

ERE 722

Dr. Qasem Abdelal

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.

This session and the next one will both be


serving one purpose, here were are dealing
purely with numbers, next session, we’ll be
utilizing some physical laws to help with the
equation development.

3
Abdelal
1. Systematic techniques for determining the
constants and coefficients in equations.

2. Proposing the form of the equation that


best fits the process, this is an art !

3. Methods for determining equations that fit a


limited number of data perfectly

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

Transpose of a matrix [A]T is when rows are


inverted to columns and vise versa

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]= 𝑑 𝑒 𝑓
𝑔 ℎ 𝑖

|A| = a(ei - fh) - b(di - fg) + c(dh - eg)

𝑎 𝑏 𝑐
X
X
𝑒 𝑓 - 𝑑 X 𝑓 + 𝑑 𝑒
ℎ 𝑖 𝑔 𝑖 𝑔 ℎ

8
Abdelal
For a 4 X 4 matrix and larger, Excel’s
=MDETERM (Array ) can be used.

Matrices can be used for solving sets of


simultaneous equations as previously outlined.
The two procedures of interest are the
Cramer’s rule and the Gaussian elimination

9
Abdelal
Cramer’s rule uses the following concept:
For the following equations :

According to the setup above, the following


formulation can be used to solve for each of
the xis:

10
Abdelal
Example: Using Cramer’s rule, solve for X2 in
this set of simultaneous linear equations

11
Abdelal
Gaussian Elimination

This process involves the conversion of the


coefficient matrix into a triangular matric and
solution of Xn to X1 by back substitution.
Example, solve the following set of equations
using Gauss elimination.

14
Abdelal
15
Abdelal
A polynomial is of the form:

Y= ao+a1x+a2x2+a3x3+…+anxn

So here, the dependent variable is a function of


only one independent variable. In many cases, it
will be a function of more than one independent
variable.

When number of data points is precisely the same


as the degree of the equation plus 1, a polynomial
can be devised that exactly expresses those data
points.
16
Abdelal
See for example a case where two data points
are available, here you can fit a linear
polynomial (first order) of the form:
Y=ao+a1x
Here, the two known points:
(xo,yo) and (x1,y1) are used to
generate two equations:
Yo =ao +a1 xo
Y1 =ao +a1 x1
So it is our duty to identify the coefficients ao
and a1
17
Abdelal
For a second degree, or quadratic equation,
three data points are needed.
Y =ao+ a1x+ a2x2

The three points give the


Following set of equations:

These can be solved for the values of the


parameters ao, a1, a2
18
Abdelal
In this special case,
if we wanted to fit a 4th
order polynomial for
example, while having
the space between the
observed points uniform. The following
representation can be used for the 4th order
polynomial

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:

Can be represented by:

27
Abdelal
By setting x= x1, x=x2, x=x3, the constants
become:

The general form of the equation when n data


points are available is given by:

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.

One definition of the best fit is the one where the


sum of the absolute values of the deviations from
the data point is a minimum.

Another, the sum of the squares of the deviation is


a minimum.

The method of establishing the coefficients is


called the method of least squares.

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:

And so, these will be simultaneous equations


that can be solved with any of the previously
discussed methods.

Work out example 4.4, page 69

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

The pattern can be developed for higher order


equations
44
Abdelal
45
Abdelal
Same principles developed earlier are
applicable for non polynomial equations as
long as the coefficients are constants.
For example:

Can be solved for:

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.

The most intuitive step is to plot the data and


observe the shape.

Below are examples of different types of


curves:

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:

At least a third order polynomial


needed

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

You might also like