00 mi piace00 non mi piace

26 visualizzazioni16 pagineSystem, Simulation

Jul 09, 2015

© © All Rights Reserved

PDF, TXT o leggi online da Scribd

System, Simulation

© All Rights Reserved

26 visualizzazioni

00 mi piace00 non mi piace

System, Simulation

© All Rights Reserved

Sei sulla pagina 1di 16

System Simulation

7.1

Introduction

System simulation may be defined as the prediction of system performance when performance characteristics of components, properties of working fluids, and conditions

imposed by the surroundings (boundary conditions) are known. System simulation

is performed so that off design performance may be examined. The mathematical

description of the process requires the solution of a set of linear and/or non-linear

equations.

7.1.1

Simulation may be classified broadly into three sub-categories. These are: continuous

versus discrete, deterministic versus stochastic, and steady versus transient. Each is

discussed below.

Continuous versus Discrete: In a continuous system the flow through the system

is that of a continuum, i.e. such as a fluid flow. Whereas in a discrete system the

flow is treated as an integer function, i.e. a traffic flow. In thermo-fluid systems, we

most often undertake a continuous flow analysis.

Deterministic versus Stochastic: In a deterministic analysis the input variables

are precisely known or specified. Whereas in a stochastic analysis, the input variables

are uncertain and rely on probability models to describe their statistical distributions.

An example of a stochastic analysis is found in the oil and gas field where reservoir

simulations usually rely on some form of probabilistic model for reservoir conditions.

In this chapter, we will consider only deterministic models.

Steady versus Dynamic: In a steady state analysis operating variables remain

constant with respect to time. Whereas in a dynamic analysis, the operating conditions do not remain constant with respect to time and usually vary on the basis of

the surrounding conditions or vary as a result of periodic changes in a process.

107

108

7.2

Methods of Solution

some useful techniques to solve linear and non-linear systems of equations. Two

common methods of solution in system simulation are successive substitution and

Newton-Raphson iteration. Most students are aware of both approaches.

Successive substitution involves the repeated substitution of a solution back into the

equation or system of equations until desired convergence is achieved. This approach

is frequently encountered in basic fluid mechanics when solving pipe friction problems.

A guess is made for the friction factor and the equation solved for another variable

such as flow or pipe diameter. The solution variable is then used to re-calculate the

friction factor and a new solution for the flow or pipe diameter is found, and so on,

until the solution variable no longer changes significantly.

In Newton-Raphson iteration, solution of non-linear equations is facilitated through

a linearization procedure. Iterations are performed, but the solution is generally found

in fewer iterations than successive substitution gives.

Both methods have divergence problems if the initial guess is poorly chosen. However, good engineering intuition can often avoid such problems. For example, one

would never guess a system flow rate outside of the maximum permissible flow of the

system pump. Physical intuition dictates that it must be less than the maximum flow

when a system flow resistance only diminishes the output.

7.2.1

The Newton-Raphson method for a single variable was introduced earlier in Chapter

4. The method is quick and easy provided the function can be differentiated easily.

Convergence occurs in a few iterations provided a reasonable guess is made. The

solution for a variable x is found by making an initial guess xi and solving the following

equation:

xi+1 = xi

f (xi )

f (xi )

(7.1)

for the improved solution xi+1 . The procedure is repeated until desired convergence

is achieved, which usually occurs in fewer than three iterations.

Example 7.1

A simple piping system requires fluid to be pumped through a finite length of

pipe and through a fixed elevation. Assuming turbulent pipe friction, the resulting

equation is non-linear in Q, the volumetric flow rate. Solve the simple pump/piping

system equations given by:

Hp = 100 0.25Q2

(7.2)

109

System Simulation

and

Hsys = 25 + 0.5Q1.75

(7.3)

Hp = Hsys

(7.4)

where

defines the operating point. Use Newton-Raphson iteration. Note: the maximum

flow for the pump (when Hp = 0) is 20 m3 /s and the pump head is given in m.

7.2.2

Newton-Raphson in Multi-Variables

can be generalized for any number of variables. The details of the mathematical

method can be found in any text on numerical methods and is presented in a simple

manner in Stoecker (1989). Consider a system defined in standard form:

f1 (x1 , x2 , x3 , . . . xn ) = 0

f2 (x1 , x2 , x3 , . . . xn ) = 0

f3 (x1 , x2 , x3 , . . . xn ) = 0

..

.

(7.5)

fn (x1 , x2 , x3 , . . . xn ) = 0

To solve the above system we may write the general non-linear system in a linearized

form using a truncated Taylor series expansion of each equation:

f1

f1 f1

x1 x2

xn

f

f1

x1

f2

f2

2

xn x2 f2

x1 x2

f3 f3

f3

(7.6)

x3 = f3

x1 x2 xn .. ..

.

. .

..

..

.

.

.

.

fn x

xn

f

o

fn

fn

n

x1 x2

xn xo

The non-linear system is now in the form of a linear system of equations, since the

matrix of partial derivatives is evaluated at the guess xo , as is the right hand matrix.

We solve this new linear system for the xi and refine the guess such that:

xi,new = xi,old xi

(7.7)

The process is then repeated until desired convergence is achieved. In systems containing several variables this may occur after five to ten iterations or more depending

on the initial guess. The method is easily implemented in math programs, and can

easily be carried out in ExcelT M . We will revisit this approach in Chapter 8 when

dealing with optimization problems.

110

Example 7.2

Solve the system below using multi-variable Newton-Raphson iteration.

f1

f2

f3

f4

= z 7.2w2 392.28 = 0

= z 810 + 25x + 3.75x2 = 0

= z 900 + 65y + 30y 2 = 0

=wxy =0

(7.8)

consider other guesses and examine the stability of the solution process.

7.3

Steady state simulation is the most common form of system analysis undertaken by

engineers. In this section we will examine a number of problems to demonstrate the

general approach. It is necessary to outline the basic steps required to undertake the

simulation exercise. All simulation analyses must consider the following:

System Identification: all components and sub-systems must be identified and

the process which links them together must be understood, i.e. power plant

operating on a Rankine cycle.

Component Behaviour: performance characteristics for each component/subsystem must be known and be in the form of a mathematical equation based on

a fit of data or model developed from first principles, i.e. pump curves, system

pressure drop, etc.

System Equations: equations based on fundamental principles such as conservation of mass, energy , and momentum are applied to system elements and

process, i.e. mechanical energy balance for system flow, heat exchanger energy

balances, etc.

Closure Equations: using component performance equations and the fundamental system equations, the number of solution variables and equations must be

equal, if there is a mis-match additional closure equations are required or any

additional variables must be assigned fixed values.

System Solution: having developed the necessary equations, the system is solved

using numerical methods such as Newton-Raphson iteration and the process

repeated for a new set of conditions.

7.3.1

We shall now demonstrate the above steps using several examples. Three cases will

be considered: a simple chip cooler system, an open Brayton cycle power generation

111

System Simulation

facility, and a simple refrigeration cycle. In all three cases, the final solution is

obtained using Newton-Raphson iteration and a direct solver using mathematical

software.

Example 7.3 - Chip Cooler System

Solve the closed loop chip cooler system outlined in Chapter 1. The system consists of a pump, tubing, a liquid cooled heat sink, a compact heat exchanger, and a

reservoir. The following information is required for each component: piping losses,

pump curve, heat sink resistance curve, heat sink pressure loss curve, heat exchanger

pressure drop curves, and heat exchanger heat transfer curves. All of the performance

curves have been obtained and fit as follows:

ppump = 94364 + 258036m

l 1598014m

2l

(7.9)

l + 537060.8m

2l

(7.10)

a + 882.1m

2a

(7.11)

QH/X

QH/X

=

=

IT D

Te T

7.73 + 520.7m

l + 512.2m

a 1157.1m

2l + 111.7m

lm

a 863.9m

2a

(7.12)

The liquid cooled heat sink can be modelled using first principles or using manufacturers actual performance data. For this example, we will use the following curves

which represent a fit of actual data:

psink = 9148.2 0.1537 107 m

l + 0.5499 108 m

2l

Rsink =

Ts Ti

= 0.1495 4.748m

l + 58.02m

2l

Qsink

(7.13)

(7.14)

The above equations could also be replaced by the first principles models developed

in Chapter 6, but for simplicity we shall use the above equations. Finally, the tubing

pressure drop which is based on first principles has been fit for ease of solution to the

following equation:

ptubing = 17797 0.2989 107 m

l + 0.1087 109 m

2l

(7.15)

In all equations, the mass flow rate is given in kg/s, pressure is given in P a, and

the thermal resistance is K/W . Using the above equations, we desire to simulate the

chip cooler system discussed earlier in Example 1.2.

112

Solution

The solution begins by first developing an expression for the liquid mass flow rate

m

l . This is obtained by writing the mechanical energy balance around the closed

loop. We will neglect the expansion tank, although in practice there will be losses

associated with the inlet and exit which should be included.

ppump = psink + pH/X,liq + ptubing

(7.16)

This yields the following equation, which may be solved for the mass flow rate:

94364 + 258036m

l 1598014m

2l =

9148.2 0.1537 107 m

l + 0.5499 108 m

2l +

2

689.5 + 68145.3m

l + 537060.8m

l+

7

17797 0.2989 10 m

l + 0.1087 109 m

2l

(7.17)

This equation is only a function of one variable and is easily solved using the onedimensional Newton-Raphson scheme outlined above and in Chapter 4. It is left as

an exercise to verify that the solution is m

l = 0.0388 kg/s.

Next, we develop the necessary energy balance on the heat sink and the compact

heat exchanger. This gives:

Qsink = m

l Cp,liq (Te Ti )

Qsink =

(Ts Ti )

(Ts Ti )

=

Rsink

0.1495 4.748m

l + 58.02m

2l

(7.18)

(7.19)

QH/X,liq = m

l Cp,liq (Te Ti )

(7.20)

QH/X,air = m

a Cp,air (Ta T )

(7.21)

We see that the the first and third of these equations are the same. This is a

consequence of neglecting the expansion tank. In fact, if we were to allow even a

slight imbalance to exist, the fluid temperature in the reservoir would continue to rise

until eventually it would boil. However, since we desire to dissipate all of the heat

absorbed by the liquid through the heat exchanger, we must set the exit temperature

of the heat exchanger equal to the inlet temperature of the heat sink.

The system of equations may be reduced to two equations. The first is given by the

mechanical energy balance which we developed earlier. The second equation relates

the surface temperature of the heat sink Ts to the environment temperature T . This

equation is obtained by combining the various energy balances to eliminate Ti . This

yields:

1

1

Ts T = Q

+ Rsink

(7.22)

(QH/X /IT D) m

l Cp,l

113

System Simulation

l , and m

a . At this point we have

two equations and five unknowns. Since the mechanical energy balance is only a

function of m

l , the simulation is now based solely on the energy equation. In an

actual design simulation we may know either Ts or Q or both and know T . Thus if

all of these variable are known, the only unknown is the airflow m

a . In reality, the

air flow would be controlled through a fan. Specification of a fan curve would make

this variable known by solving a mechanical energy balance on the air side. A likely

simulation would entail knowing the heat dissipation rate Q and environment temperature T and simulating the surface temperature Ts as a function of m

a . Another

likely simulation is knowing the maximum surface temperature Ts and simulating the

heat dissipation rate Q versus air flow rate m

a . Several scenarios are provided in

TM

the Maple

worksheet, which also addresses some pitfalls of using fitted data.

Finally, the inlet and exit fluid temperatures can be solved using the energy balances

given earlier. These variables are often required to ensure the mean fluid temperature

is not excessively high for safety reasons in the event of a leak.

Example 7.4 - Brayton Cycle

Consider the simple power generation system based on an open Brayton cycle. The

system consists of a compressor, combustion chamber, and turbine. The compressor

and turbine characteristics are given in the handout. The performance data for

the turbine and compressor which run at a fixed speed can be fit to the following

equations:

Compressor

and

p = 331 + 45.6m

4.03m

2

(7.23)

W

(7.24)

Turbine

m

= 8.5019 + 0.02332p + 0.48 104 p2 0.02644T

+0.1849 104 T 2 + 0.000121pT 0.02736 106 p2 T

0.01137 106 pT 2 + 0.2124 109 p2 T 2

(7.25)

W

+0.050921pT 0.8525 104 p2 T 0.02356 104 pT 2 +

+0.447 107 p2 T 2

(7.26)

and

[kW ],

In the above equations the variables have the following units: m

[kg/s], W

p [kP a], and T [ C]. The environment conditions which are usually known and assumed to remain constant are the inlet temperature and pressure and exit pressure.

114

However, these may be variables which are varied for simulation purposes. For example, the plant may be designed to operate in different environments where atmospheric

temperature and pressure vary geographically or seasonally.

Solution

The following is the list of variables which are either part of the solution or are

c, W

t , and W

s . Of these

fixed but may be variable: p1 , T1 , p2 , T2 , T3 , p3 , T4 , p4 , m,

Qc , W

thirteen variables we will assume the following:

p1 = p4 = 101 kP a

(7.27)

T1 = 25 C

(7.28)

Qc = 8000 kW

(7.29)

p2 = p3

(7.30)

This leaves eight unknowns. Therefore, since we have four equations representing mechanical equipment performance, we still require four additional equations for

closure. These four equations come from energy balances on the system and its components:

Qc = mC

p (T3 T2 )

c = mC

W

p (T2 T1 )

(7.31)

t = mC

W

p (T3 T4 )

s=W

tW

c

W

(7.33)

(7.32)

(7.34)

Finally, for simulation purposes, we may define the thermal efficiency as:

=

s

W

Qc

(7.35)

The problem is discussed in the course text Stoecker (1989), the solution is: m

=

t = 3128.6 kW , and W

s = 1598.5 kW . The plant efficiency is = 0.1998. The

W

problem may be re-solved varying either Qc , p1 = p4 , and/or T1 . Plotting plant

efficiency as a function of any one of these variables would constitute an example of

steady state simulation.

Example 7.5 - Refrigeration Cycle

A refrigeration plant operates on a simple vapour compression cycle and serves as

a water chiller. The refrigeration capacity in kW of the compressor as a function of

the evaporating and condensing temperatures Te and Tc is:

Qe = 239.5 + 10.073Te 0.109Te2 3.41Tc 0.00250Tc2 0.2030Te Tc

+0.00820Te2 Tc + 0.0013Te Tc2 0.000080005Te2 Tc2

(7.36)

115

System Simulation

while the compressor has the following power characteristic (in kW ):

0.000306Te2 Tc + 0.000567Te Tc2 0.0000031Te2 Tc2 (7.37)

The overall heat transfer coefficient for the evaporator is U Ae = 30600 W/K and

for the condenser is U Ac = 26500 W/K. Water circulates through the condenser and

evaporator with a mass flow rate of m

c = 7.6 kg/s and m

e = 6.8 kg/s. Simulate the

performance for the system if the water inlet temperature to the evaporator varies

between 10 C and 15 C and the water inlet temperature to the condenser varies

between 25 C and 30 C. What is the COP for this range.

7.4

In this section we consider simple dynamic response in thermal and fluid systems.

Dynamic simulation is useful for examining the effects of disturbances in system

operation, start up or shut down transients, or stability and control issues. We

will examine the lumped analysis method for ascertaining the thermal response of a

mechanical system. Using Laplace transforms we will solve uncoupled, coupled, and

intermittent processes.

7.4.1

Lumped Analysis

In these types of problems we do not consider the spatial distribution of the property

of interest, but rather the temporal or time behaviour of the system as a whole.

The conservation law for energy transfer may be written as:

Qstored = Qin Qout + Qgeneration

(7.38)

Closed Systems

We now consider the case of a finite solid body of initial temperature To in an infinite

medium of temperature T , such that To > T . In terms of the temperatures of the

system under consideration we may write

dT

= hA(T (t) T ) + S V

dt

which is subject to the initial condition

Cp V

T (0) = To

(7.39)

(7.40)

The above analysis is only valid for the condition Bi = h(V /A)/ks < 0.1. However,

we may apply the analysis to fluid systems if we assume a well stirred fluid.

The differential equation may be written as:

116

dT

hA

S V + hAT

=

T (t)

dt

Cp V

Cp V

(7.41)

dT

= C1 C2 T (t)

dt

(7.42)

or

Open Systems

In an open system, fluid flows through the system through several inlets/outlets. We

may also include exchanges with the surroundings through a finite wall conductance.

We may modify Eq. (7.39) to account for an additional conduction resistance by

introducing the overall heat transfer co-efficient:

UA =

t

1

1

+

+

hi A kA ho A

(7.43)

Further for a simple inlet/outlet system the net change in enthalpy, Qout = mC

p (T (t)

Ti ), must be introduced into the macroscopic energy balance:

dT

= mC

p Ti mC

p T (t) U A(T (t) T ) + S V

dt

The differential equation may be written as:

Cp V

dT

U A + mC

p

S V + U AT + mC

p Ti

=

T (t)

dt

Cp V

Cp V

(7.44)

(7.45)

dT

= C1 C2 T (t)

dt

Later we will consider several examples and their solution.

7.4.2

(7.46)

Laplace transforms are a useful and relatively simple solution technique for dynamic

response problems. Two important solutions will be examined to demonstrate the

technique. These are the simple lumped system and the simple coupled system.

Before proceeding to the solutions of these two fundamentally useful problems, a

brief review of the Laplace transform method is required.

Given the function f (t), we denote the Laplace transform of this function as:

L(f (t)) = F (s)

(7.47)

L1 (F (s)) = f (t)

(7.48)

117

System Simulation

The Laplace transform is evaluated through the following integral:

Z

L(f (t)) = F (s) =

f (t)est dt

(7.49)

L(f (t)) = F (s)

(7.50)

(7.51)

(7.52)

(7.53)

(7.54)

(7.55)

In general we work with tables of Laplace transform pairs, rather than evaluate the

integral given above for each term in an equation.

Example 7.6

Solve the differential equation:

dT

= C1 C2 T (t)

dt

(7.56)

T (0) = To

(7.57)

subject to:

using the Laplace transform method.

Example 7.7

Solve the coupled system of differential equations:

dT1

= C1 C2 T1 (t)

dt

(7.58)

T1 (0) = T1,o

(7.59)

dT2

= C3 + C4 T1 (t) C5 T2 (t)

dt

(7.60)

T2 (0) = T2,o

(7.61)

subject to:

and

subject to:

using the Laplace transform method.

118

7.4.3

We will now examine some simple dynamic simulation problems. These include the

dynamic response in a simple process start up, a mixing process, a coupled two stage

process, and an intermittent process.

Example 7.8 - Energy Balance in a CSTR

We wish to examine the temperature history in a continuously stirred tank reactor

(CSTR). Consider the heating of a process stream using a steam condensing coil. The

process slurry enters the tank at a constant inlet temperature Ti and mass flow rate

m,

and leaves the tank with a temperature of T (t). The steam coil is maintained

at constant temperature Ts with an overall heat transfer co-efficient (U A)c which

accounts for the tube wall resistance and convective heat transfer coefficient. The tank

also loses heat through the tank walls which have an overall heat transfer coefficient

(U A)w and an environment temperature T .

Solution

We may now develop the overall lumped energy balance for this system. Using Eq.

(7.38), we write

Cp V

dT

= (U A)c (Ts T (t)) + mC

p Ti (U A)w (T (t) T ) mC

p T (t)

dt

(7.62)

dT

= C1 C2 T (t)

dt

where

C1 =

(7.63)

(U A)c Ts + (U A)w T + mC

p Ti

Cp V

(7.64)

(U A)c + (U A)w + mC

p

Cp V

(7.65)

and

C2 =

C1

+ C exp (C2 t)

(7.66)

C2

The unknown constant C is determined from an initial condition. In this example,

the initial temperature of the tank contents could be at the environment temperature

T or it could be at the process stream temperature Ti , depending upon the system

model which is desired. Assuming that T (0) = Ti before the steam coil is activated,

the system model has a final solution:

C1

C1

T (t) =

exp (C2 t)

(7.67)

+ Ti

C2

C2

T (t) =

System Simulation

Alternatively, the solution may have the form

C1

C1

T (t) =

exp (C2 t)

+ T

C2

C2

119

(7.68)

The solution may also be examined for the special case when m

= 0, i.e. shutdown.

Example 7.9 - Mixing of Process Streams

Consider the system sketched below. In a particular industrial process, two process

water streams at different temperatures and flow rates enter a mixing tank whereby

they are heated by means of an electrical coil. The flow leaves as a single stream at a

temperature T(t). Formulate a model to simulate the thermal response of the system

with time.

Derive the necessary energy balance in terms of all process variables and solve

the equation subject to the initial condition T (0) = Tad

Now, since the process contains three different reference temperatures, the appropriate initial temperature Tad , should be the steady adiabatic mixing temperature, i.e. when there is no heat transfer to the surroundings or from the

electric coil. What is Tad in terms of the process variables. Complete the solution from using this value of Tad

What is the steady state temperature Tss

If m1 = 0.1 kg/s, m2 = 0.5 kg/s , T1 = 40 C , T2 = 65 C, Tf = 20 C,

U Aw = 100 W/m2 K, = 1000 kg/m3 , Cp = 4130 J/kgK, V = 5000 L,

P = 100 kW , how long does the process take to reach steady state, i.e 0.99Tss

Example 7.10 - Coupled Processes

In a certain chemical process, two different fluid streams enter a mixing tank with

mass flow rates m

A and m

B . Each fluid stream has a heat capacity of Cp,A and

Cp,B , respectively. As a result of chemical reaction between the two streams, heat

is generated at a rate S W/m3 , and must be removed by a cooling coil to prevent a

runaway reaction. The cooling coil is maintained at temperature Ts with an overall

heat transfer coefficient of U A. The new contents of the tank which are well stirred,

are removed at a rate equal to the flow entering the tank but now have a new heat

capacity Cp,1 and temperature T1 (t). The new process fluid then enters a second well

stirred tank, where it is mixed with a third stream having a mass flow rate of m

C

and heat capacity Cp,C . The contents of the second tank are heated, while being

mixed, using an electric coil which has a power input of P . The contents leave with

a total combined mass flow rate equal to the total rate of inflow at temperature T2 (t)

with a heat capacity Cp,2 . Develop the necessary equations and solution to predict

120

the response time of the system and to determine the final exit temperature of the

mixture, as a function of time.

Example 7.11 - Intermittent Processes

You wish to simulate the transient response of a batch reaction process as shown

below. The chemical reaction is exothermic (meaning heat is released) and is calculated to be 50,000 W/m3 . The batch reactor contains a volume of 7.5 m3 . A cooling

coil circulates cold water at 25 C at a high flow rate such that U A = 2500 W/K

is achieved. The thermal capacity of the mixture is: Cp = 53.362 kJ/m3 K. It is

desired to have the temperature history for a system failure simulation summarized

by the following:

Normal system start up and operation with T (0) = 25 C

At t = 45 minutes, the primary cooling pump shuts down causing U A = 500

W/K

At t = 55 minutes, the primary cooling pump restarts, and the cooling process

resumes with U A = 2500 W/K

Determine the following:

Maximum system temperature after pump failure

Time for the system to resume steady state operation after the primary cooling

pump is re-activated

Sketch the system response labeling each transition point and temperature

If the maximum system temperature were to reach 500 C at anytime in the reactor,

a secondary runaway reaction could occur leading to catastrophic consequences. How

close were you to this dangerous result?

In your analysis, show the required energy balance and solution to the differential

equation. Hint: you only need to solve the system once, by applying an initial

condition of the type T (tc ) = Tc , where Tc is the final temperature after each critical

process and tc is the time at which each new process begins.

System Simulation

7.5

121

References

Hodge, B.K. and Taylor, R.P., Analysis and Design of Energy Systems, PrenticeHall, 1999, Upper Saddle River, NJ.

Rao, S.S., Applied Numerical Methods for Engineers and Scientists, Prentice Hall,

2002.

Rice, R.G. and Do, D.D., Applied Mathematics for Chemical Engineers, Wiley,

1995.

Stoecker, W.F., Design of Thermal Systems, McGraw-Hill, 1989.

## Molto più che documenti.

Scopri tutto ciò che Scribd ha da offrire, inclusi libri e audiolibri dei maggiori editori.

Annulla in qualsiasi momento.