Upload
grid-g
View
1.366
Download
5
Embed Size (px)
Citation preview
1
SYSTEM SIMULATIONSYSTEM SIMULATION
System simulation is a calculation step for finding System simulation is a calculation step for finding out the output when the input parameters are out the output when the input parameters are changed. With the results the designer could make changed. With the results the designer could make a decision on the appropriate size or design before a decision on the appropriate size or design before making a prototype or real systems. making a prototype or real systems.
2
Continuous simulationContinuous simulation Discrete simulationDiscrete simulation
Procedure of the system simulation could beProcedure of the system simulation could be
Deterministic inputDeterministic input Stochastic inputStochastic input
Steady stateSteady state DynamicDynamic
3
In this course, the conditions areIn this course, the conditions are
Continuous simulationContinuous simulation Deterministic inputDeterministic input Steady stateSteady state
4
Steps of System SimulationSteps of System Simulation
1. Define the system.1. Define the system.
2. Set mathematical model of each component in 2. Set mathematical model of each component in the system.the system.
3. Generate connections among the models.3. Generate connections among the models.
==>> Informative flow diagram ==>> Informative flow diagram
4. Check and prescribe the constraints needed.4. Check and prescribe the constraints needed.
5. Simulate the system. 5. Simulate the system.
5
ExampleExampleSteam turbine, Condenser and cooling tower in a Steam turbine, Condenser and cooling tower in a
steam power plant steam power plant
Steam - turbine Steam - turbine
WT = WT(Pc,QT)
f1(WT,Pc,QT) =0
Cooling Tower Cooling Tower
Condenser Condenser
QC = Qc(TCw ,Pc,mcw)
f2(Tcw,Qc, Pc,mcw) =0
Tcw = Tcw (Twb ,RH,CR,mcw)
f3(Twb, RH,CR,mcw,Tcw)=0
…………………………..(1)..(1)
……………………....(2)(2)
………………....(3)(3)
WT = net power of the power plant
QT = heat rate input of the power plant
Qc = heat rate at the condenser
Pc = condenser pressure
mcw = mass flow rate of the cooling tower
Tcw = cool water temperature at the cooling tower
CR = range of the cooling tower
WT = net power of the power plant
QT = heat rate input of the power plant
Qc = heat rate at the condenser
Pc = condenser pressure
mcw = mass flow rate of the cooling tower
Tcw = cool water temperature at the cooling tower
CR = range of the cooling tower
6
Thus two more energy balance equations assisted :Thus two more energy balance equations assisted :
Inputs : Twb , RH , mcw , WT
Unknowns : Pc , QT , Tcw , Qc and CR
steam cycle : QT = WT + Qc
===>>> f4 (QT , WT , Qc)=0
Condenser - Cooling tower : Qc =(mcp)CR
===>> f5(mcw, Qc ,CR)=0
7
ff11(W(WTT , P , Pcc ,Q ,QT T ))
ff44 (Q (QTT , W , WTT , Q , Qcc))
ff55 ( m ( mcw cw , Q, Qcc ,CR) ,CR)
ff33( T( Twbwb , RH , CR , m , RH , CR , mcwcw , T , Tcwcw ) )
ff22 ( T ( Tcw cw , Q, Qcc , P , Pcc , m , mcwcw))
QQT T CHECK CHECKQQTT TRIAL TRIAL
QQCCQQCC
CRCR
TTwbwb
RHRH
mmCWCW
mmCWCW
mmCWCW
PPcc
TcwTcw
WWTT
WWTT
8
Pt.3 : WA = CA(P3 - Patm)1/2 =>> f1 (WA , P3) = 0…….(1)
Pt.4 : WB = CB(P4 - Patm)1/2 =>> f2 (WB , P4) = 0…….(2)
0 => 1 : Patm - p1 = c1W12 + hg =>> f3 (W1 , P1) = 0…...(3)
2 => 3 : P2 - p3 = c2W12 =>> f4 (W1 , P2,P3)=0...…(4)
3 => 4 : P3 - p4 = c3W22 =>> f5 (W2 , P3,P4)=0...…(5)
Pump : => f6(w1,P1,P2) = 0……(6)
Two more equations are needed which are
W1 = WA + W2 ==>> f7 (W1 ,W2,WA) = 0…..(7)
W2 = WB ==>> f8 (W2 ,WB) = 0……(8)
h, Patm are presensibled unknowns : WA , WB , W1 ,W2 , P1 , P2 , P3 ,P4 (8 unknowns)
9
ff66(W(W11 , P , P11 ,P ,P2 2 )) ff33(W(W11 , P , P11 ))
ff44(W(W11 , P , P22 ,P ,P3 3 ))
ff55(W(W22 , P , P33 ,P ,P4 4 ))
ff11(W(WAA , P , P33 ))
ff22(W(WBB , P , P44 ))
ff77(W(W11 ,W ,WAA ,W ,W22 ))
ff88(W(W22 ,W ,W3 3 ))
TRIAL WTRIAL W11
TRIAL WTRIAL W22
PP33
PP44WWBB
WW22
WW11PP11WW11
WW11
WWAA
10
Sequential SimulationSequential Simulation When we start with the information input of a component
in a whole system, the an output from this first component will be the input needed to calculate the output of the next component and go on to the last component.
When we start with the information input of a component in a whole system, the an output from this first component will be the input needed to calculate the output of the next component and go on to the last component.
11
Simultaneous SimulationSimultaneous 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.
12
Example Example Cooling Tower-CondenserCooling Tower-Condenser
Q = 293.1 Q = 293.1 XX 10 1033 kW , W = 9146.6 kg/s , T kW , W = 9146.6 kg/s , Twbwb = 20 ,25 C = 20 ,25 C
Condenser :Condenser : Pc = 1.0055 x 10-5 Q + 0.34398Tcw - 5.4006 kN/m2
f1(Pc , Q , Tcw) = 0 ……………(1)
Cooling Tower :Cooling Tower : Tcw = 0.54078Twb + 0.43889CR + 0.001233W, C
Inputs : Q,W,TInputs : Q,W,Twbwb
Unknowns : PUnknowns : Pcc,T,Tcwcw,CR ,CR
one more equation is needed :one more equation is needed :
Q = mcQ = mcpp.CR ==> f.CR ==> f33 (Q,W,CR)=0 ………………..….…(3) (Q,W,CR)=0 ………………..….…(3)
f2(Tcw,Twb,CR,W) = 0 ……...…(2)
13
f1(Pc , Q , Twc)
f3 (Q,W,CR)
f2(Tcw,Twb,CR,W) = 0
TcwTwb
Q
W
Q
CR
Pc
W
14
Successive Substitution Successive Substitution Example Example pump 1 : P(kPa) = 810 - 25W1 -
3.75W12
pump 2 : P(kPa) = 920 - 65W2 - 30W2
2Pressure drop : PL(kPa) = 7.2W2
h = 40 m Find W1 , W2Solution :Solution :
systemsystem : PA + gZA-PL + P = PB +gZB
Since PA =PB and ZA - ZB = 40 thus
Pa/kPa1000
m)40 m/s 9.807kg/m(1000 7.2W P
232
P = 7.2W2 + 392.28 f1(P ,W) = 0 ……………(1)
15
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)
Successive Substitution Successive Substitution
16
Successive Substitution Successive Substitution
17
Successive substitution is simple but sometimes the calculation step could not be iterated
Example Example Engine and CarEngine and Car
Power to drive the car : P = 4.2+0.45V + 0.0025V2.8
; V(m/s) , P(kW)
f1(P ,V) = 0…….(1)
Engine power : P = 60 + 8V - 0.16V2 f2(P ,V) = 0…….(2)
Starting with V=50 m/s
Final result
P = 112.3905 W
V = 42.25 m/s
Starting with V=42 m/s
The final result could
not be obtained
Auto
P = 4.2+0.45V + 0.0025V2.8
Engine
P = 60 + 8V - 0.16V2
Auto
P = 4.2+0.45V + 0.0025V2.8
Engine
P = 60 + 8V - 0.16V2
PP VV PPVV
18
Newton - Raphson Method Newton - Raphson Method
For y = y(x) = anxn+an-1xn-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(xy(xtt) = y’(x) = y’(xtt)(x)(xtt-x-xcc) ) )x('y
)x(yxx
t
ttc
)x('y
)x(yxx
old
oldoldnew
19
Newton - Raphson Method Newton - Raphson Method
Example ;Example ; x+2 = ex+2 = exx Find xFind x
Solution ;Solution ; y(x) = x+2 - ey(x) = x+2 - ex x andand y’(x) = 1-e y’(x) = 1-exx
Initial trial with value of x= 2
==> y(2) = 2+2-e2 = -3.389
y’(2) = 1-e2 = -6.389
1.469 6.389-
3.389- - 2 x new,1
)x('y
)x(yxx
old
oldoldnew x
y(x)
2
-3.389 -0.876 -0.132 -0.018
1.469 1.208 1.112
20
For multi-variable such as For multi-variable such as y = f(xy = f(x11 , x , x22 , x , x33) ) then then
Newton - Raphson Method Newton - Raphson Method
f1(x1 , x2 , x3) = 0
f2(x1 , x2 , x3) = 0
f3(x1 , x2 , x3) = 0From single variable From single variable y’(xnew)(xold - xnew) = y(xold)
old
3
2
1
new 3old 3
new 2old 2
new 1old 1
old3
3
2
3
1
3
3
2
2
2
1
2
3
1
2
1
1
1
f
f
f
x -x
x -x
x -x
x
f
x
f
x
f
x
f
x
f
x
f
x
f
x
f
x
f
x1new , x2new, x3new and reiterate till the old x values are close to the new ones.
21
Example Example f1 = P - 7.2w2 - 392.28
f2 = P - 810 + 25w1 + 3.75w12
f3 = P - 900 + 65w2 + 30w22
f4 = w - w1 - w2
old4
3
2
1
new old
new 2old 2
new 1old 1
new old
old
4
2
4
1
44
3
2
3
1
33
2
2
2
1
22
1
2
1
1
11
f
f
f
f
w -w
w -w
w -w
P -P
w
f
w
f
w
f
P
f
w
f
w
f
w
f
P
f
w
f
w
f
w
f
P
f
w
f
w
f
w
f
P
f
22
f1 f1 1 1 0 0 0 -14.4w 0 -14.4w
f2f2 1 25+7.5w 1 25+7.5w11 0 0 0 0
f3f3 1 1 0 65+60w 0 65+60w22 0 0
f4f4 0 -1 0 -1 -1 -1 1 1
P
1w
2w
w
old4
3
2
1
new old
new 2old 2
new 1old 1
new old
old
2
1
f
f
f
f
w -w
w -w
w -w
P -P
1 1 - 1 -0
0 60w650 1
0 0 7.5w 251
14.4w0 - 0 1
Assume Assume P = 75 , wP = 75 , w1 1 = 3 , w= 3 , w22 = 1.5 , w = 5 = 1.5 , w = 5
FinalFinal ==>>==>> P = 650.49 , wP = 650.49 , w11 = 3.991 , w = 3.991 , w22 = 1.997 , w = 5.988 = 1.997 , w = 5.988