# SYSTEM SIMULATION

System simulation is a calculation step for finding out the output when the input parameters are changed. With the results the designer could make a decision on the appropriate size or design before making a prototype or real systems.
1

Procedure of the system simulation could be
   

Continuous simulation Discrete simulation Steady state Dynamic Deterministic input Stochastic input

 

2

In this course, the conditions are
  

Continuous simulation Deterministic input Steady state

3

Steps of System Simulation
1. Define the system. 2. Set mathematical model of each component in the system. 3. Generate connections among the models. ==>> Informative flow diagram 4. Check and prescribe the constraints needed. 5. Simulate the system.

4

Example
Steam turbine, Condenser and cooling tower in a steam power plant
Steam - turbine WT = WT(Pc,QT) f1(WT,Pc,QT) =0 Condenser
W net power of the power plant WT T==net power of the power plant Q heat rate input of the power plant QT T==heat rate input of the power plant Q heat rate at the condenser Qc c ==heat rate at the condenser condenser pressure PPc==condenser pressure c m mass flow rate of the cooling tower mcwcw==mass flow rate of the cooling tower cool water temperature at the cooling tower TTcw==cool water temperature at the cooling tower cw CR range of the cooling tower CR ==range of the cooling tower

……………..(1)

QC = Qc(TCw ,Pc,mcw ) f2(Tcw ,Qc, Pc,mcw ) =0 Cooling Tower Tcw = Tcw (Twb ,RH,CR,mcw ) f3(Twb , RH,CR,mcw ,Tcw )=0 ……….. (3)
5

………….. (2)

Inputs : Twb , RH , mcw , WT Unknowns : Pc , QT , Tcw , Qc and CR Thus two more energy balance equations assisted : steam cycle : QT = WT + Qc ===>>> f4 (QT , WT , Qc)=0

Condenser - Cooling tower : Qc =(mcp)CR ===>> f5(mcw , Qc ,CR)=0

6

WT

f1(WT , Pc ,QT )

QT CHECK

QT TRIAL

WT

Pc f2 ( Tcw , Qc , Pc , mcw ) Tcw Twb RH f3( Twb , RH , CR , mcw , Tcw ) mCW

f4 (QT , WT , Qc) mCW QC QC f5 ( mcw , Qc ,CR) mCW

CR

7

Pt.3 : WA = CA(P3 - Patm )1/2 Pt.4 : WB = CB(P4 - Patm )1/2 2 => 3 : P2 - p3 3 => 4 : P3 - p4 Pump : = c2W12 = c3W22

=>> f1 (WA , P3) = 0…….(1) =>> f2 (WB , P4) = 0…….(2) = 0…...(3) =>> f4 (W1 , P2,P3)=0...…(4) =>> f5 (W2 , P3,P4)=0...…(5) => f6(w1,P1,P2) = 0……(6)

0 => 1 : Patm - p1 = c1W12 + hρ g =>> f3 (W1 , P1)

h, Patm are presensibled unknowns : WA , WB , W1 ,W2 , P1 , P2 , P3 ,P4 (8 unknowns) Two more equations are needed which are W1 = WA + W2 ==>> f7 (W1 ,W2,WA) = 0…..(7) W2 = WB ==>> f8 (W2 ,WB) = 0……(8)
8

W1

f6(W1 , P1 ,P2 )

P1

f3(W1 , P1 )

W1 TRIAL W1

W1

f7(W1 ,WA ,W2 )
P3

f4(W1 , P2 ,P3 )

f1(WA , P3 )
TRIAL W2

WA W2

f8(W2 ,W3 )

f5(W2 , P3 ,P4 )

P4

f2(WB , P4 )

WB

9

Sequential Simulation
 

When we start with the information input of a component When we start with the information input of a component in a whole system, the an output from this first component in a whole system, the an output from this first component will be the input needed to calculate the output of the next will be the input needed to calculate the output of the next component and go on to the last component. component and go on to the last component.

10

Simultaneous Simulation
The calculation is not straightforward. Two methods normally used are

Successive substitution

A value or more input variables are assumed to begin to the calculation and the process is continued till the originally-assumed variable are recalculated. The iteration is finished when the convergence of the of the variable is obtained. Newton-Raphson method.
11

Example

Cooling Tower-Condenser

Q = 293.1 X 103 kW , W = 9146.6 kg/s , Twb = 20 ,25 C

Condenser : Cooling Tower :
Inputs : Q,W,Twb

Pc = 1.0055 x 10-5 Q + 0.34398Tcw - 5.4006 kN/m2

f1(Pc , Q , Tcw ) = 0 ……………(1)

Tcw = 0.54078Twb + 0.43889CR + 0.001233W, C

f2(Tcw ,Twb ,CR,W) = 0 ……...…(2)

Unknowns : Pc,Tcw ,CR one more equation is needed :
Q = mcp.CR ==> f3 (Q,W,CR)=0 ………………..….…(3)
12

Q

f1(Pc , Q , Twc ) Tcw f2(Tcw ,Twb ,CR,W) = 0

Pc

Twb W

Q
W f3 (Q,W,CR)

CR

13

Successive Substitution

Example

pump 1 : ∆ P(kPa) = 810 - 25W1 3.75W12 pump 2 : ∆ P(kPa) = 920 - 65W2 Pressure drop : PL(kPa) = 30W22 7.2W2

Solution :

h = 40 m

Find W1 , W2

+ ρ gZ Since PA B=PB and ZA - ZB = 40 thus
2

system : PA + ρ gZA-PL + ∆ P = PB
(1000 kg/m 3 × 9.807 m/s 2 × 40 m) ∆P = 7.2W + 1000 Pa/kPa

∆ P = 7.2W2 + 392.28

f1(∆ P ,W) = 0 ……………(1)

14

Successive Substitution
Pump Characteristics : ∆ P = 810 - 25W1 - 3.75W12 => f2(∆ P , W1 ) = 0……. (2) ∆ P = 900 - 65W2 - 30W22 => f3(∆ P , W2 ) = 0…….. (3) Unknowns : ∆ P , W1 ,W2 , W then one more equation is needed which is W = W1 + W2 f4 (W1 , W2 , W) = 0…..….(4)

15

Successive Substitution

16

Successive substitution is simple but sometimes the calculation step could not be iterated

Example

Engine and Car
f1(P ,V) = 0…….(1) f2(P ,V) = 0…….(2) ; V(m/s) , P(kW)

Power to drive the car : P = 4.2+0.45V + 0.0025V2.8 Engine power
Final result P = 112.3905 W V = 42.25 m/s Auto P = 4.2+0.45V + 0.0025V2.8

: P = 60 + 8V - 0.16V2

Starting with V=50 m/s

Starting with V=42 m/s The final result could not be obtained Auto P = 4.2+0.45V + 0.0025V2.8

P
Engine P = 60 + 8V - 0.16V2

V

V
Engine P = 60 + 8V - 0.16V2

P
17

Newton - Raphson Method
For y = y(x) = anxn+an-1 xn-1 +…+ax+a0 If xc is a solution ==> y(xc) = 0
with Taylor’s expansion around the point xc
y(x) = y(xc) + y’(xc)(x-xc) + 1/2!y’’(xc)(x-xc)2+… = 0 +y’(xc)(x-xc) ; y’=dy/dx

If we trial with xt y(xt) = y’(xc)(xt-xc)
Since xc is not known then y’(xc) is used instead. y(xt) = y’(xt)(xt-xc)
xnew = xold − y( xold ) y' ( xold ) xc = x t − y ( xt ) y' ( xt )
18

Newton - Raphson Method
Example ; Solution ; x+2 = ex Find x

y(x) = x+2 - ex and y’(x) = 1-ex

Initial trial with value of x= 2 ==> y(2) = 2+2-e2 = -3.389 y’(2) = 1-e2 = -6.389 - 3.389 x1 ,new = 2 = 1.469 - 6.389

xnew = xold

y( xold ) − y' ( xold )

x y(x)

2 -3.389

1.469 -0.876

1.208 -0.132

1.112 -0.018
19

Newton - Raphson Method
For multi-variable such as y = f(x1 , x2 , x3) then f1(x1 , x2 , x3) = 0 f2(x1 , x2 , x3) = 0 f3(x1 , x2 , x3) = 0 From single variable y’(xnew )(xold - xnew ) = y(xold )
 ∂f 1   ∂x1  ∂f  2  ∂x1  ∂f  3  ∂x  1 ∂f 1 ∂x 2 ∂f 2 ∂x 2 ∂f 3 ∂x 2 ∂f 1   x1 old - x1 new   f 1       ∂x3      ∂f 2   x2 old - x2 new   f 2  =    ∂x3        ∂f 3   x3 old - x3 new   f 3          ∂x3 old    old

x1new , x2new , x3new and reiterate till the old x values are close to the new ones. 20

Example
f1 = ∆ P - 7.2w2 - 392.28 f2 = ∆ P - 810 + 25w1 + 3.75w12 f3 = ∆ P - 900 + 65w2 + 30w22 f4 = w - w 1 - w 2
 ∂f 1   ∂∆P  ∂f  2  ∂∆P  ∂f  3  ∂∆P  ∂f  4  ∂∆P ∂f 1 ∂w1 ∂f 2 ∂w1 ∂f 3 ∂w1 ∂f 4 ∂w1 ∂f 1 ∂w 2 ∂f 2 ∂w 2 ∂f 3 ∂w 2 ∂f 4 ∂w 2 ∂f 1    ∆P old - ∆P new     ∂w       ∂f 2   w1 old - w1 new     ∂w   =   ∂f 3   w 2 old - w 2 new     ∂w       ∂f 4   w old - w new     ∂w old  f1    f2    f3     f 4 old

21

∂ ∂∆ P

∂ ∂w 1

∂ ∂w 2

∂ ∂w

f1 f2 f3 f4

1 1 1 0

0 25+7.5w1 0 -1

0 0 65+60w2 -1

-14.4w 0 0 1

1  1 1  0 

- 14.4w   ∆P old   25 + 7.5w1 0 0   w1 old 0 65 + 60w 2 0   w 2 old   -1 -1 1  old  w old   0 0

- ∆P new     - w1 new   = - w 2 new   - w new    

f1   f2  f3   f 4  old 

Assume

∆ P = 75 , w1 = 3 , w2 = 1.5 , w = 5
22

Final ==>> ∆ P = 650.49 , w1 = 3.991 , w2 = 1.997 , w = 5.988

Sign up to vote on this title