Brunet(Dynamic Simulation and Process Control)

DYNAMIC SIMULATION AND PROCESS CONTROL WITH ASPEN HYSYS Robert Brunet Politechnika Warszawska 1 Contents 1 INTRODUCTI

Views 285 Downloads 83 File size 6MB

Report DMCA / Copyright

DOWNLOAD FILE

Recommend stories

Citation preview

DYNAMIC SIMULATION AND PROCESS CONTROL WITH ASPEN HYSYS Robert Brunet Politechnika Warszawska

1

Contents 1 INTRODUCTION TO DYNAMIC SIMULATION 1.1 Mathematical model . . . . . . . . . . . . . . . . . . 1.2 Holdup Model . . . . . . . . . . . . . . . . . . . . . . 1.3 Nozzles . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Distributed and Lumped models . . . . . . . . . . . . 1.5 Static Head Contribution . . . . . . . . . . . . . . . . 1.6 Heat Loss Model . . . . . . . . . . . . . . . . . . . . 1.7 Integration Strategy . . . . . . . . . . . . . . . . . . 1.8 Unit Operation Guidelines for Dynamics . . . . . . . 1.9 Rating the equipment . . . . . . . . . . . . . . . . . . 1.10 Trouble Shooting . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . .

3 6 8 9 10 11 12 13 16 17 19

2 INTRODUCTION TO DYNAMIC SIMULATION 2.1 Resistance Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Volume Balance Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20 23 25

3 FUNDAMENTALS OF PROCESS CONTROL 3.1 3.1. Level Control . . . . . . . . . . . . . . . . . . 3.2 3.2. Choosing the Correct Control . . . . . . . . . 3.3 Temperature Control . . . . . . . . . . . . . . . . 3.4 The Process Reaction Curve . . . . . . . . . . . .

. . . .

30 32 35 40 43

4 NGL EXTRACTION PLANT 4.1 Steady-state NGL extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Moving from Steady-State to Dynamics . . . . . . . . . . . . . . . . . . . . . 4.3 Control Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44 46 49 56

5 INLET SEPARATION PLANT 5.1 Steady State model . . . . . . . 5.2 Preparing for Dynamics . . . . 5.3 Installing control strategy . . . 5.4 Completing the model . . . . .

59 61 64 69 77

. . . .

. . . .

. . . .

2

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . . . . . . . .

. . . .

. . . .

. . . . . . . . . .

. . . .

. . . .

. . . . . . . . . .

. . . .

. . . .

. . . . . . . . . .

. . . .

. . . .

. . . . . . . . . .

. . . .

. . . .

. . . . . . . . . .

. . . .

. . . .

. . . . . . . . . .

. . . .

. . . .

. . . . . . . . . .

. . . .

. . . .

. . . . . . . . . .

. . . .

. . . .

. . . . . . . . . .

. . . .

. . . .

. . . . . . . . . .

. . . .

. . . .

. . . . . . . . . .

. . . .

. . . .

. . . .

1

INTRODUCTION TO DYNAMIC SIMULATION

The design and optimization of a chemical process involves the study of both steady state and dynamic behaviour. Steady state models can perform steady state energy and material balances and evaluate different plant scenarios. The design engineer can use steady state simulation to optimize the process by reducing capital and equipment costs while maximizing production. With dynamic simulation, you can confirm that the plant can produce the desired product in a manner that is safe and easy to operate. By defining detailed equipment specifications in the dynamic simulation, you can verify that the equipment functions as expected in an actual plant situation. With dynamic simulation, you can investigate: • Process optimization. • Controller optimization. • Safety evaluation. • Transitions between operating conditions. • Start-up/Shutdown conditions. The dynamic mode shares the same physical property packages as the steady state model. However, the dynamic mode needs a different solver with a different set of conservation equations to be solved. The Steady State mode uses modular operations which are combined with a non-sequential algorithm. Information is processed as soon as it is supplied. The results of any calculation are automatically propagated throughout the flowsheet, both forwards and backwards. In steady state simulation material, energy, and composition balances are considered constant in time. In addition all the specifications are considered equally. For example, a temperature specification can be replaced by a vapour fraction specification or a column’s product flow rate specification is replaced by a composition specification in the reboiler. The simulator can solve with either specification. In Dynamic mode material, energy and composition balances are not considered constant, over time. The equations for material, energy, and composition balances include an additional ”accumulation” term, which is differentiated with respect to time. Non-linear differential equations can be formulated to approximate the conservation principles; but an analytical solution method does not exist. Therefore, numerical integration is used to determine the process behaviour at distinct time steps and the solver should be run after the addition of any unit operation to the flowsheet.

3

Dynamic process simulation offers a high level of realism with regards to material flow through the simulation thanks to the use of dedicated solver to calculate the pressure-flow type of equations. Pressure and flow equations are solved simultaneously in a pressure-flow system of equations at every integration step. Temperature and composition specifications need to be defined at every boundary feed stream entering the flowsheet. Temperature and composition through the flowsheet are then calculated by means of the energy and composition balances in a modular sequential way for every existing unit operation.

4

Learning Objectives The contents of the module will help users to understand all the mathematical and engineering assumptions behind the dynamic engine of the process simulator. The following aspects of the dynamic model are presented: • Mathematical model: Material and Energy Balance and Implicit Euler algorithm. • Holdup Model and Non equilibrium Flash. • Nozzles location. • Distributed and lumped Models. • Static head contribution. • Heat loss Model. • Integration Strategy.

5

1.1

Mathematical model

The dynamic mass, component and energy balances are similar to the steady state balances, with the exception of the accumulation term. It is the accumulation term which allows the output variables from the system to vary with time. Material and Energy Balance For the simple case of perfectly mixed tank, the material balance is as follows: ) = Fin · ρin − Fout · ρout W here F = f lowrate ρ = density V = volume d(ρV dt

(1)

For a multi-component feed, the balance for component, would be as follows: ) = Fin · Ci,in − Fout · Ci,out W here C = concentration d(Ci V dt

(2)

Equations (1) and (2) are a simplification of the more rigorous equations used inside the simulator which also considers other phenomena such as vaporization, reactions, density changes, etc... And the energy balance is as follows: d(u+k+gz)·ρV dt

) = Qin − Q( out) + Win − W( out) + (h · F · ρ)in − (h · F · ρ)out

W here u = internalenergyperunitmass h = enthalpyperunitmass k = kineticenergyperunitmass gz = potentialenergyperunitmass Q = headaddedorlost W = shaf twork

(3)

The ODE Solver The ordinary differential equations are solved by the simulator by using the Implicit Euler method which solves by an approximation rectangular integration. = f (y) = y(t)−y(t−∆t) ∆t y(t) = y(t − ∆t) + ∆t · f (y, t) dy dt

(4)

The advantage of implicit methods, such as the one from equation (4), is that they are usually more stable for solving a system of stiff equation, meaning that a larger step size ∆t 6

can be used. The integrator property view allows adjusting the time step value to increase the speed or stability of the model. The integrator property view is available by pressing CTRL+I or selecting it from the Simulation menu.

The smaller the time step, the more closely the calculated solution matches the analytic solution. However, this gain in rigour is being paid by the additional calculation time required to simulate the same amount of elapsed real time. A reasonable compromise is achieved by using the largest possible step size, while maintaining an acceptable degree of accuracy without becoming unstable.

7

1.2

Holdup Model

Dynamic behaviour arises from the fact that many pieces of plant equipment have some sort of material inventory or holdup. Therefore, the impact of changes in composition, temperature, pressure or flow from an inlet stream to a vessel with volume (holdup) are not immediately seen in the outlet stream. The hold-up model predicts how the holdup and outlet streams of a piece of equipment, respond over time to input changes to the system. Calculations included in the holdup model are: • Material and energy accumulation. • Adiabatic PH flash calculation for vapour composition and pressure effects in the vapour holdup. • Heat transfer. • Chemical reaction. • Flash efficiencies for the modelling of non-equilibrium behaviour between the feed phases of the holdup. • The placement of feed and product nozzles on the equipment has physical meaning in relation to the holdup. For example, if the vapour product nozzle is placed below the liquid level in a separator, only liquid exits from the nozzle. Calculation assumptions for the holdup model are: • Each phase is assumed to be well mixed. • Mass and heat transfer occur between feeds to the holdup and material already in the holdup. • Mass and heat transfer occur between phases in the holdup. In the real world, the extent of mixing the feeds with a holdup depends on the placement of the feed nozzles, the amount of holdup, and the geometry of the piece of equipment. In the simulator, you can indirectly specify the amount of mixing that occurs between the feed phases and the existing holdup using feed, recycle, and product efficiencies. These feed efficiency parameters can be specified on the Efficiencies tab of the unit operation’s Advance view.

8

1.3

Nozzles

In Dynamics mode, you can specify the feed and product nozzle locations and diameter for any piece of equipment. These nozzle placement parameters can be specified in the Holdup page under the Dynamics tab of the unit operation property view by pressing the Advanced button. If you go to the Nozzles tab you can enter the nozzle’s elevation and diameter. In Steady State mode, the bottom product stream of a vessel is considered to be at its bubble point and the vapour stream at its dew point, unless user had specified some vapour outlet pressure drop. In Dynamics mode, the vapour fraction of a product stream depends on the placement of feed and product nozzles on the equipment and the current liquid level:

For practical purposes, the simulator moves nozzles located at the extreme bottom or top of the vessel very slightly. This minor adjustment is not displayed and does not impact the static head contributions. The adjustment is mostly done so that users do not have to consider nozzle diameters etc. carefully when setting elevations. The adjustment makes the calculated values more realistic.

9

1.4

Distributed and Lumped models

Most chemical engineering systems have thermal or component concentration gradients in three dimensions (x,y,z) as well as in time. This is known as a distributed system. If you were to characterize such a system mathematically, you would obtain a set of partial differential equations (PDEs). If the x, y, and z gradients are ignored, the system is ”lumped”, and all physical properties are considered to be equal in space. Only the time gradients are considered in such an analysis. This consideration allows for the process to be described using ordinary differential equations (ODEs) which are much less rigorous than PDEs, thereby significantly saving calculation time. For most instances, the lumped method gives a solution which is a reasonable approximation of the distributed model solution. The process simulator used in this course uses lumped models for all unit operations. Therefore, there are no thermal or concentration gradients present in a single phase and the temperature and composition of each phase are the same throughout the entire hold up of the unit operation.

10

1.5

Static Head Contribution

If the simulator is using a Lumped Model approach, does this mean that there is no pressure gradient between the top and the bottoms of one equipment filled with liquid? The answer is Yes by default and No if you go to the Options Tab of the integrator and activate the Enable implicit static head contribution check box. By selecting it, vessels can, optionally, be solved using implicit static head calculations for the pressure contributions associated with the liquid level inside the vessel, rather than using explicit static head calculations. This option provides increased stability in applications where these static head contributions play a crucial role. Static head is important in vessels with a certain level of liquid, because the liquid’s column exerts some pressure on the exit. For example, consider a vertical separator unit operation that has a current liquid level of 50%. The static head contribution of the liquid holdup makes the pressure at the liquid outlet nozzle higher than that at the vapour outlet nozzle. Nozzle location also becomes significant with this respect. The pressure flow relationship for the separator is different for a feed nozzle which is below the current liquid holdup level as compared to a feed which is entering in the vapour region of the unit.

11

1.6

Heat Loss Model

The heat loss parameters can be specified for most unit operations in the Heat Loss page under the Rating tab. You can choose to neglect the heat loss calculation in the energy balance by selecting the None radio button or select one of the two heat loss models available. The Simple model, allows you to either specify the heat loss directly or have the heat loss calculated from specified values. The heat loss is calculated using the following equation: Qout = U · A(Tf − Tamb )

(5)

Where, UA is the overall heat transfer coefficient, Tf is the fluid temperature and Tamb is the environmental temperature.The Detailed model allows you to specify more detailed heat transfer parameters. The model assumes heat is lost or gained from the holdup fluid through the wall and insulation by conductivity and convection. There are three radio buttons in the Heat Loss Parameters: the temperature profile, conduction and convention. The temperature across the wall and insulation is assumed to be constant, and the model considers a temperature profile composed by the fluid, wall, insulation, surroundings temperature and a temperature gradient through the thickness of the wall and insulation, but temperature is constant along the vessel.

12

1.7

Integration Strategy

Because the pressure flow solver exclusively considers pressure flow balances in the network, pressure flow specifications are separated from temperature and composition specifications. Pressure flow specifications are input using the one P-F specification per flowsheet boundary stream rule. While pressure and flow are calculated simultaneously in a pressure flow system of equations, energy and composition balances are solved in a modular sequential fashion. Furthermore, material, energy and composition balances in dynamic mode are not considered at the same time. Material and pressure flow balances are solved for every time step. But, energy and composition balances are defaulted to solve less frequently. Solving material and energy balance at every time step would be too computational expensive and is not required in most of the gas processing simulations. The Steady State mode uses modular operations which are combined with a non-sequential algorithm. Information is processed as soon as it is supplied. The results of any calculation are automatically propagated throughout the flowsheet, both forwards and backwards. In dynamic mode, information is not processed immediately after being input. The integrator should be run after the addition of any unit operation, or any other new piece of information to the flowsheet. Temperature and composition specifications, should be entered for every boundary feed stream entering the flowsheet. Temperature and composition are then calculated sequentially for each downstream unit operation and material stream using the holdup model. You can access the Integrator view from the Simulation menu or by using the CTRL + I hot key:

13

The Integration Time group contains the following parameters: • Units Units for the Current Time, End Time and Display Interval fields. • Current Time Displays the time that the Integrator is running. • Acceleration If running in Real Time, changing this field can speed up or slow down the model by taking larger or smaller steps. • End Time Allows you to specify the time at which the Integrator stops. • Real Time Activates the Desired Real Time Factor field. • Display Interval Visible only in Automatic Integration Control, this field contains the time interval at which the simulator updates the views. • Real time factorVisible only in Automatic Integration Control, this field is calculated by dividing a time interval for a case by the actual time required to simulate that time interval. The Real time factor depends on the computer’s processing speed and the complexity of the simulation case. 14

The Integration Step Size group contains the unit for the integrator step size and the cell for the step size value. By default is 0.5 seconds and while the integrator is running, this value cannot be changed. The Execution tab contains the parameters that indicate the frequency at which the different balance equations are solved. The default values for Pressure flow equations, Control and Logic Ops, Energy Calculations, and Composition and Flash are 1, 2, 2, and 10 respectively. A value of 2 for the Energy Calculations means that an energy balance is performed every 2 time steps. • Pressure Flow Solver Since pressure and flow can change rapidly, their calculations are solved at the highest frequency and should be left at its default, 1. • Control and Logical Ops The default number should always be sufficient, but you can reduce this number for special cases. (E.g., if you need rapid control responses or to mimic equipment where sample data can only be obtained at a low frequency.) • Energy Calculations The energy calculation, interpolates between the flash calculations. The value should be lower than that of the composition and flash calculations. • Composition and Flash Calculations If you reduce this number, the flashes will be performed more frequently. This can slow down the calculation speed, but it may result in more accurate results in some cases. This number can be reduced in cases where the phase change in an individual vessel is being studied and a high degree of accuracy is required with regard to the phase composition.

15

1.8

Unit Operation Guidelines for Dynamics

Before a transition from steady state to dynamic mode can be made, the simulation case should be set up so that a realistic pressure difference is accounted for across the plant. Some basic steps you can take to set up a case in Steady State mode and then switch to dynamic mode are: 1. Identify material streams which are connected to two unit operations with no pressure flow relation and whose flow must be specified in Dynamic mode. These unit operations include the separator operation and tray sections in a column operation. Add unit operations, such as valves, heat exchangers, and pumps, which define a pressure flow relation to these streams. 2. Size all the unit operations in the simulation using actual plant equipment or predefined sizing techniques. 3. Specify one pressure flow specification for each flowsheet boundary stream. 4. Identify key control loops that exist within the plant. Implementing control schemes increases the realism and stability of the model. Disturbances in the plant can be modeled using the Transfer Function operation.

16

1.9

Rating the equipment

Valves Rating information for the valve operation, including the valve type and Cv values, can be input on the Sizing page in the Rating tab. Valves should be sized using typical flow rates. The valve should be sized with a 50% valve opening and a pressure drop between 15 and 100 kPa. Mixer and Tee It is recommended to specify the mixer with the Equalize All option in dynamic mode. With this, the pressure of the surrounding streams of the unit operation is equal if static head contributions are not considered. This is a realistic situation since the pressures of the streams entering and exiting a mixer or tee must be the same. It is also recommended that, the dynamic tee model should not use the dynamic splits as specifications, so that the flow to and from the tee is determined by pressures and resistance through the flowsheet. This is more realistic than using the split fractions which can also cause complications with regards to flow reversal. These options are set on the Specs page of the Dynamics tab in their respective operation views. Pump and Compressors Rating information for the dynamic compressor, expander, and pump operations, can be input on the Curves and Inertia pages in the Rating tab. In general, two specifications should be selected in the Dynamics Specifications group, in the Specs page of the Dynamics tab, in order for these unit operations to fully solve. Heat Exchanger The dynamic heat exchanger can be specified as having a set pressure drop or an Overall K-Value (pressure flow) relation. This option is set on the Specs page of the Dynamics tab in the heat exchanger property view: K-values can be calculated using the Calculate k button on the Specs page of the Dynamics tab in the operation’s property view. Heater and cooler operations are much like heat exchangers. However, they only have a single K-value on their process side. Be cautious of Heaters/Coolers with fixed duties. This can cause problems if the flow in the heater/cooler happens to fall to zero. It is recommended to use a controller, or a Spreadsheet function, or a temperature specification to control the temperature of a stream. Separator Rating information including the volume of the vessel, boot capacity, and nozzle location can be entered on the Sizing and Nozzles pages in the Ratings tab. A separator with no valves attached to the inlet and exit streams requires at most one pressure specification. The other two streams are specified with flows. A more realistic way to run the separator is to attach valves to the inlet and exit streams of the vessel. The boundary streams of the separator with valves should be specified with pressure. Vessels (Separators, Condensers, Reboilers) should be sized for 5 - 15 minutes of liquid holdup time. Sizing and Costing calculations can also be performed using the Vessel Sizing Utility in the Sizing page of the Rating tab. Separation Columns For all separation columns, the tray section parameters including the tray diameter, weir length, weir height, and tray spacing, can be specified on the Sizing page in the Rating tab of the Main TS property view. Tray Sizing can be accomplished for 17

separation columns using the Tray Sizing utility in the Utilities page. The trays are sized according to the existing flow rates and the desired residence times in the tray. Any use of Tray Sizing should be restricted to Steady State mode Adjusting Column Pressure In steady state, the pressure profile of the column is user specified. In dynamics, it is calculated using dynamic hydraulic calculations. If the steady state pressure profile is very different from the calculated pressure drop, there can be large upsets in flow in the column when the integrator is run. A reasonable estimate of the column’s pressure profile can be calculated using the Tray Sizing utility. This utility provides a value in the Results tab. The column pressure profile can be calculated using this value and a desired pressure specification anywhere on the column. You can change the value to achieve a desired pressure profile across the column. This can easily be done by modifying the Weir height in the Rating tab in the Tray Sizing utility. Reducing the weir height lowers the static head contributions and lowers the value. In dynamic mode, the Nozzle Pressure Flow K-factors (found on the Dynamics tab of the Main TS property view) can also be adjusted to better model the pressure drop across the column. Feed and product streams entering and exiting tray sections, should be at the same pressure as the tray section itself. Any large pressure differences between a feed or product stream and its corresponding tray section can result in large amounts of material moving into or out of the column.

18

1.10

Trouble Shooting

Singular Problem This message indicates that not all of the equations in the pressure flow solver matrix are independent of one another. This occurs when one or more equations are redundant. For instance, if a valve operation is using a pressure drop specification, the inlet and exit streams cannot both be specified with pressure. The pressure drop equation becomes redundant. It is useful to over specify a singular problem. The simulator might be able to identify the redundant pressure flow specification and allows the case to solve. The PF Solver failed to converge This message indicates that one or more pressure flow specifications are unreasonable. This message can also appear if there are sudden large upsets to the simulation case. It is helpful to enter the Equation Summary View to identify problem areas in the flowsheet. Click the Full Analysis button (or Partitioned Analysis button, if it is made available). By clicking the Update Sorted List button in the Unconverged tab, the simulator shows the type of equation, location, and scaled error associated with the unconverged nodes in the flowsheet drop. Pay special attention to the unit operations with the largest errors in the Uncoverged tab. Check the vessel volumes of the uncoverged unit operations and ensure they are sized with reasonable residence times. Check the size of the valves attached to the unconverged unit operations.

19

2

INTRODUCTION TO DYNAMIC SIMULATION

Dynamic simulation adds more realism to the model thanks to the pressure flow solver (P-F Solver). This is a specific solving method to deal with pressure and flow related calculations. The P-F Solver considers the integration of pressure flow balances in the flowsheet. There are two basic equations, with pressure and flow as unique variables, which define most of these P-F variables: • Resistance Equations - defining the flow between pressure holdups. • Volume Balance Equations - defining the material balance at pressure holdups. In general, the resistance equation calculates flow rates from the pressure differences of the surroundings piece of equipment. Resistance equations are derived from the Bernoulli equation and general friction factors for turbulent flow.

P1 g·ρ

=

P2 g·ρ

+ hf

(6)

2

Lu hf = fD D 2

(7)

Substituting equation (2) in equation (1) and introducing the mass flow rate, results on equation (3), where all the variables that are not pressure or flow have been grouped in a flow conductivity constant which is the reciprocal of resistance to flow.

√ F low = k ρ · ∆P

(8)

The pressure drop, ∆P, is the frictional pressure drop across the unit operation without static head contributions. As shown, a resistance equation relates the pressure of two holdups and the flow that exists between them. The following unit operations have a resistance equation associated with them: Heater, Cooler, Heat Exchanger, Air Cooler, LNG Heat Exchanger, Valves and Column Trays. Following a similar approach, Pumps, Compressors and Expanders have a resistance equation where the heat flow and the pump or compressor work define the pressure flow relation of the unit operation. Valve flow Coefficient ˆ o F in US Gallons per minute that passes The Cv is defined as the flow of water at 60A through a control valve when the pressure drop is 1 psi and the valve is fully open. √ 1(psi) Q(U SGP M ) = Cv · 1 1(lb/f t3

(9) 20

Once the Cv of the valve is known, it is possible to estimate the flow when the valve is fully open for another pressure drop, by applying the equation: Q = Cv

√ ∆P

(10)

ρL

By introducing the relative density of the liquid it is possible to calculate the flow at other conditions or for another fluid. √ Q = Cv · f (x) ∆P ρL

(11)

Finally, the inherent flow characteristic of a valve f(x) is introduced as the relation between the tap position, x, and the product flow rate that flows through it as a fraction of the maximum flow rate. If the pressure drop, ∆P in the valve is constant, it is possible to estimate the resulting flow at other valve positions. f (x) =

F Fmax

(12)

Volume Balance Equation In dynamics mode, all unit operations with hold-up represent pressure nodes. There are unit operations like the separator which contribute with only one pressure node and others, like the column with multiple stages, which contribute with the same number of pressure nodes than trays in the column. During calculations in dynamics mode, the change in volume, V, of the total material (liquid and vapour phase) inside an equipment, is zero: dV dt

=0

(13)

For a fixed volume, the change in pressure node, P, is calculated as a function of the change in temperature (enthalpy) and the change of accumulation within the equipment (hold up). dP dt

= f (T emperature, f lows, size)

(14)

An increase in the feed flow rate, with a constant product flow rate, will result in the holdup increasing. The accumulation of vapour occupying a fixed volume will cause the node pressure to rise. The liquid hold up causes an increase in liquid level which compresses the vapour holdup, causing the pressure to rise.

21

Learning Objectives After the completion of this module users will be able to understand the foundations of the pressure flow solver: • How the simulator calculates flow between nodes. • How the simulator calculates the pressure at nodes. • Sizing vessels and valves. • The meaning of flowsheet boundary streams. • How to define pressure flow specifications. • How to define reverse flow condition.

22

2.1

Resistance Equations

In the process simulator, flows exiting from a material holdup are calculated from a volume balance equation, specified by the user, or calculated from a resistance equation. In general, the resistance equation calculates flowrates from the pressure differences of the surrounding nodes. The simulator contains unit operations such as valves and heat exchangers which calculate flowrates using resistance equations. The resistance equations are modelled after turbulent flow equations. 1.1.1. Create a new case. Use Water and Air as components. Select Peng Robinson (PR) as Property Package. Move to the Simulation Environment. ˆ o C and 4 bar with pure water as composition. 1.1.2. Add a new stream, Stream 1, at 25A Enter 1000 kg/h as mass flow rate. 1.1.3. Add a valve, VLV-100, with 3 bar as pressure drop and stream 2 as outlet stream.

1.1.4. What are mass flow and pressure for stream 2? If when building the simulation case we did input 1000 kg/h, this is the answer in Q1 for the flow rate. It is then enough to calculate (P1 - deltaP) to know the pressure for stream 2: 100 kPa. However, for answering the same question in dynamics mode it is necessary to apply the resistance equation for valves, which uses the valve flow coefficient. The mass flow rate that passes through the valve is a function of the valve flow coefficient, Cv, and of the frictional pressure drop across the valve. Therefore, Q1 cannot be answered in dynamics mode if we do not provide at least a value for the valve Cv if the size of the valve is required. 1.1.5. Open VLV-100 property view and go to the Sizing page under the Rating tab. Enter 2 USGPM (US Gallon Per Minute) as Cv value. 1.1.6. Open Stream 1 property view; go to the Specs page of the Dynamics tab and ensure that Pressure is the only active Dynamic Specification at 400 kPa. 1.1.7. The last step is the way to consider the pressure upstream of VLV-100 as a boundary condition of the integration algorithm. 23

1.1.8. Repeat step 1.1.6. for Stream 2. 1.1.9. Press the dynamic mode option and make the integrator active. 1.1.10. What is the mass flow and pressure for stream 2? 1.1.11. Open the VLV-100 property view and go to the Sizing page under the Rating tab. On the Valve Operating Characteristics group you can see that a Linear Valve, 50% open, is selected by default. Change the Valve Opening from 50% to 100%.

1.1.12. What is now the mass flow rate? The pressure flow matrix of the model has one equation and three variables: the two boundary pressures and the mass flow rate. By defining two of them, the third one is calculated by the equation. In the example, we are specifying both boundary pressures and calculating the flow rate. But a valid alternative, could be to specify inlet pressure and flow, so we will have the outlet pressure as calculated unknown variable. 1.1.13. Open Stream 1 property view and go to the Specs page under the Dynamics tab. 1.1.14. In addition to the already active Pressure specification, activate the Mass Flow one with the value you used to answer 1.1.10. 1.1.15. Then, for Stream 2, deactivate the Pressure specification. 1.1.16. What are the mass flow and pressure for stream 2? 1.1.17. What are the mass flow and pressure for stream 2, if you close the valve from 100% to 75%?

24

2.2

Volume Balance Equations

1.2.1. Add a separator to the flowsheet and connect stream 2 as inlet. Create a new stream 3, for the Vapour Outlet, and stream 4 for the Liquid Outlet. The vessel becomes red and a message appears in the property view Volume not specified. For simulating equipment with holdup in steady state mode, an underlying principle is that the physical volume of the equipment, and thus, the volume of material in the equipment at any time remain constant. This principle does not applies in dynamics mode and therefore to run the model in dynamic mode we need to provide the volume of each equipment with holdup. 1.2.2. Go to Sizing page of the Rating Tab and enter a volume of 50 L. In exercise 1, we specified pressures for stream 1, P1, and stream 2, P2, to calculate the flow, FV-100, across VLV-100: √ F = Cv · f (50%) P1 − P2

(15)

And for answering Q4 and Q5, we moved the stream 2 pressure specification, to the stream 1 flow specification. In this way, it was possible to calculate the pressure of stream 2. √ F = Cv · f (50%) P1 − P2

(16)

Because V-100 is a perfectly mixed pressure node, streams 2, 3, 4 and the vessel itself, are all at the same pressure. However, to run the case in dynamics mode, we still need to add more information. As mentioned above: under dynamics mode, the flow rate through any unit operation depends on the pressure of the surrounding piece of equipment. For V-100, the surroundings and the equipment are at the same pressure. Therefore the simulator does not have enough information to calculate the flow for streams 4 and 5. 1.2.3. Add two valves, VLV-101 and VLV-102 and connect streams 3 and 4 as the inlets to each one of them. 1.2.4. Define streams 5 and 6 as the outlet streams. 1.2.5. Read the Cv of VLV-100 and enter the same value for VLV-101 and VLV-102.

25

All material streams within the simulator have to be solved for pressure and flow, and all holdup unit operations have to be solved for pressure (only). Therefore in the flowsheet there are 13 variables to be solved, 6 streams, times 2 variables plus the vessel pressure. If we consider that there is no accumulation in valves, we can assume the following relations which reduce the variables from 13 to 10:

FV LV −100 = F1 = F2 FV LV −101 = F3 = F4 FV LV −102 = F5 = F6 dPV −100 /dt = f (T, FV LV −100 , FV LV −101 , FV LV L−102 , size)

(17)

Therefore, to satisfy the degrees of freedom of this pressure-flow system of equations we must input three additional equations or pressure flow specifications (7 - 4 = 3). With the pressure and flow specifications that we already have for stream 1, we are setting: FV LV −100 = 1503kg/h P1 = 400KP a

(18)

Then, we still need to add one new pressure flow specification to solve the system. 1.2.6. Move the stream 1 flow specification to a pressure specification equal to 1 atm in stream 5. 1.2.7. Add a pressure specification equal to 1 atm in Stream 6. The pressure-flow system of this example will be solved according to the following equations:

FV LV −100 = CvV LV −100 f (50%)(P1 − PV −100 )1/2 FV LV −101 = CvV LV −101 f (50%)(PV −100 − P5 )1/2 FV LV −102 = CvV LV −101 f (50%)(PV −100 − P5 )1/2 dPV −100 /dt = f (T, FV LV −100 , FV LV −101 , FV LV L−102 , size) 26

(19)

1.2.8. Run the simulator. 1.2.9. A new message appears: it indicates that, at process conditions, the fluid in the separator is only liquid. This enters in conflict with the default specification of 50% liquid volume level. Then the simulator asks the modeller what to do to initialize the liquid in the vessel:

1.2.10. Click on 100% Liquid option and allow the simulator to run for a pair of minutes of simulation time. 1.2.11. Press CTRL+D for accessing to the Databook and select the Variables tab. 1.2.12. Press the Insert... button and add the following variables.

1.2.13. Move to the Strip Charts tab.

27

1.2.14. Click the Add button to include a strip chart with default name DataLogger1 in the list of available strip charts. 1.2.15. Click the Active checkbox for each variable that you want to display in this strip chart. 1.2.16. In the View group, click the Strip Chart... button to view the selected strip chart or just double-click the name of the strip chart you would like to view. 1.2.17. Run the integrator. 1.2.18. How much is the liquid percent level in V-100? 1.2.19. What would you do to decrease it to 50%? 1.2.20. If the feed valve, VLV-100, is fully closed and the bottoms valve, VLV102 is fully open, why the level is not decreasing? 1.2.21. Go to the PFD and observe the pressures, (Shift+P). There is no pressure drop between the vessel and the boundary streams. 1.2.22. Decrease stream 6 boundary spec pressure to 70 kPa. 1.2.23. Observe the mass flow rates, (Shift+M). Now, there is a positive flow rate at the vessel bottoms. However, you should observe as well that, the vessel pressure is lower than the boundary pressure specification for stream 5. This means that, reverse flow is, likely to happen and that stream 5 is feeding the vessel through VLV-101. 1.2.24. What is the composition of this unexpected vessel feeding? If it is wanted to drain the liquid out of the vessel, some other material has to substitute the volume of the liquid being drained. In any real plant, there will be air from atmosphere or nitrogen from a blanket, feeding back the vessel or, if external feeding does not exist,

28

internal vacuum is then created. 1.2.25. Open stream 5 and go to the Dynamics Tab. 1.2.26. Press the Product Block... button. 1.2.27. In the Conditions tab, leave temperature as specified variable, and its default ˆ ◦ C. value, 25A 1.2.28. Go to the Composition tab and define reverse flow composition as pure air.

1.2.29. Run the integrator. 1.2.30. How much is the percent liquid level of V-100?

29

3

FUNDAMENTALS OF PROCESS CONTROL

In the second course module a vessel in dynamics mode was modeled but it was not possible to control the liquid level. In this module the basics of Process Control will be covered by the practical example of controlling the liquid level and the temperature of the vessel. The PID Controller operation is the primary means of manipulating the model variables in Dynamics mode. It adjusts a stream OP (output) to maintain a specific flowsheet variable PV (process variable) at a certain value SP (set point). A variety of Feedback, Feedforward and other control schemes can be modeled by modifying the tuning parameters in the PID controller operation. Controller parameters can be modified to incorporate proportional, integral and derivative action into the controller. Besides the PID controller other five controller operations can be modeled: • Split Range Controller Several manipulated variables are used to control a single process variable. Here both manipulated variables are driven by the output of a single controller. However, the range of operation for the manipulated variables can be independent of each other. Typical examples include the control of the pressure in a chemical reactor by manipulating the inflow and outflow from the reactor. • Ratio Controller In the Ratio Controller the objective is to keep the ratio of two variables, the load and the manipulated, constant. • MPC Controller The Model Predictive Control (MPC) controller addresses the problem of controlling processes that are inherently multi-variable and interacting in nature, in other words, one or more inputs affects more than one output. • DMC Plus Controller The DMCplus Controller engine runs in Aspen DMCplus Online. You are required to have the DMCplus link, Aspen DMCplus Online, CIMIO kernel and ACO Base licenses to run DMCplus in the Process simulator. With DMCplus controller the Process Simulator works like a Real Plant. • Profit Controller The Profit Controller (only available in UniSim Design) allows the user to configure the models, create Profit Controller and run it in the simulation to evaluate the model and controller design... • A Digital On/Off control operation is also available. The Process Variable (PV) that needs to be monitored and the output (OP) stream which is manipulated are defined. When the PV reaches a specified Threshold value, the Digital Point either turns the OP On or Off, depending on how the Digital Point has been set up.

30

Learning Objectives In this module we will cover an overview of the basics of Process Control Theory. Furthermore, the user will learn how to implement a PID controller in the simulation model.

31

3.1

3.1. Level Control

3.1.1. Open the case you were working with in the first module, where it was not possible to control the liquid level percentage of V-100 or just the starting case for this workshop. 3.1.2. Add a PID controller to the PFD and double click on its icon to get access to the Connections tab. The Connections tab allows you to select both, the Process Variable, PV, and the Manipulated Variable or Output Process for the controller, OP. It is comprised of the objects described in the table below:

3.1.3. Press the Select PV button and select Object V-100 and Variable Liquid Percent Level. The Process Variable, or PV, is the variable that must be maintained, or controlled at a desired value. 3.1.4. Press the Select OP button and select Object VLV-102 and Variable Actuator Desired Position (ADP). 3.1.5. Go to the Parameters tab. By default you get access to the Configuration page. The Configuration page allows you to set the process variable Range, controller Action, operating Mode, and depending on the mode, either the Set Point, SP, for the Process variable or the Operating Point, OP, for the Manipulated Variable, as well as the Tuning of the controller.

32

If we open VLV-102, positive ∆OP, the bottom output flow of the vessel increases and we expect that the liquid percent level will decrease. Therefore, we have a negative steady state gain and our action mode has to be Direct. For the Controller to become operational, we must define the minimum and maximum values for the PV (the Controller cannot be switched from Off mode unless PVmin and PVmax are defined). The process simulator converts the PV range into a 0-100% range, which is then used in the solution algorithm. The following equation is used to translate a PV value into a percentage of the range: P V (%) =

P V −P Vmin P Vmax −P Vmin

· 100

(20)

3.1.6. Select Direct Action. 3.1.7. Enter 0% and 100% as minimum and maximum PV values respectively. 3.1.8. Once you provide these values (as well as the Control Valve span), you may select the Automatic mode, and give a value for the Set point. 3.1.9. Switch the Mode to Auto.

33

3.1.10. Type 50% as Liquid Percent Level SP. You can select where the signal from the controller is sent using the drop-down list in the Execution field. If you select Internal, the controller confines signals generated to stay Within the simulator. If you select External, the controller sends the signals to a DCS, if a DCS is connected to the process simulator. 3.1.11. Leave the Default Execution option, Internal.

34

3.2

3.2. Choosing the Correct Control

The Tuning group allows you to define the constants associated with the PID control equation. You should consider what type of performance criteria is required for the set point variables, and what acceptable limits they must operate within. Generally, an effective closed loop system is expected to be stable and cause the process variable to ultimately attain a value equal to the set point. The performance of the controller should be a reasonable compromise between performance and robustness. A very tightly tuned or aggressive controller, gives good performance, but is not robust to process changes. It could go unstable if the process changes too much. A very sluggishly-tuned controller delivers poor performance, but is very robust. It is less likely to become unstable. In the paragraphs below you will find some details of the different configurations that can be implemented for a feedback controller.

Digital On/Off The most rudimentary form of regulatory control is on-off control. In the process simulator, it is implemented using the Digital Point operation. An excellent example of on-off control is a home heating system. Whenever the temperature goes above the SP, the heating plant shuts off, OP=0%, and whenever the temperature drops below the SP, the heating plant turns on, OP=100%. Since the controller cannot throttle the actuator, but only turn it on or off, the primary characteristic of on-off control is that the PV is always cycling about the SP.

The rate at which PV cycles and the deviation of PV from the set point are a function of the system dynamics or dead time and capacity. The On/Off controller is an appropriate controller if the deviation from the set point is within an acceptable range and the cycling 35

does not destabilize the rest of the process.

Proportional Control Proportional control is the simplest continuous control mode that can damp out oscillations in the feedback control loop. This control mode normally stops the process variable, PV, from cycling but does not necessarily return it to the SP. P-only control is implemented in the Process Simulator by setting the values of Td and Ti to ¡empty¿ in the PID Controller operation. With P-only control, oscillations that occur in the process variable due to disturbances or changes in the set point dampen out the quickest (have the smallest natural period) among all other simple feedback control schemes. The output of the proportional control is defined as: OP (t) = K · E(t) + b

(21)

As it could be observed in the below figure, the larger is the controller gain, the lower is the error. However, increasing K makes the loop unstable. If K has a value such that the loop gain is equal to one, the loop will oscillate with a period that is a function of the natural characteristics of the process and it is called the natural period.

In general Proportional control is suitable when a fast response to a disturbance is required. However a sustained error occurs where the PV does not return to the set point even when steady-state is reached. The sustained error is called offset and is undesirable in most cases. Therefore it is necessary to eliminate offset by combining proportional control with the integral control mode. 36

Proportional + Integral Control The action of integral control is to remove any error that may exist. As long as there is an error present, the output of this control mode continues to move the FCE. OP (t) = OP (t0 ) +

1 E(t)dt Ti

(22)

When Proportional and Integral control are combined, oscillations can be dumped out and return the process variable to the set point. Under PI control, the gain has an effect not only on the error, but also on the integral action. OP (t) = K(OP (t0 ) +

1 E(t)dt) Ti

(23)

When we compare the equation for a PI controller to that for a P-only controller, we see that the bias term in the P-only controller has been replaced by the integral term in the PI controller. Therefore, the integral action provides a bias that is automatically adjusted to eliminate any error.

Typically, the response period of PV under an I controller is much slower than for a P controller, therefore because the addition of the P action, the response period under PI is longer than a P controller and shorter than an I controller. The integral time, Ti, is defined as the amount of time required for the controller output to move an amount equivalent to the error. Because the relationship between Ti and the control action is reciprocal, increasing Ti results in less integral action, while decreasing Ti results in greater integral action. Therefore by increasing Ti we have less integral action and a shorter response and a behavior closer to only proportional controller. Thus, the integral time should be decreased just enough to return the process variable to the SP. PI is the most common controller found in plants and it is suitable when offsets cannot be tolerated. PI controller combines accuracy (no offset) with a relatively quick response time. 37

However, the added integral action acts as a destabilizing force which can cause oscillations in the system and cause the control system to become unstable.

Proportional Integral Derivative Control The purpose of derivative action is to provide lead to overcome lags in the loop. In other words, it anticipates where the process is going by looking at the rate of change of error. For D action, the output equals the derivative time, Td, multiplied by the derivative of the input, which is the rate of change of the error. When PI is combined with the D action, this one adds the additional response speed required to overcome the lag in the response from the integral action.

OP (t) = K(E(t) +

1 E(t)dt Ti

+ T d dE(t) ) dt

(24)

The addition of the derivative mode in the PID controller provides a response similar to that of a P-only controller but without the offset because of the integral action. Therefore a PID controller provides a tight dynamic response but, since it contains a derivative block, it cannot be used in any processes in which noise is anticipated.

The following is a list of typical controller tuning parameters appropriate for various processes. There is no single correct way of tuning a controller. The objective of process control is to provide a reasonable compromise between performance and robustness in the closed loop response. These initial values are a kind of suggestion. They help to obtain tight control. They can be later adjusted further if the closed loop response is not satisfactory. Tighter control and better performance can be achieved by increasing the proportional gain. Decreasing the controller gain would result in a slower, but more stable response.

38

Generally, proportional control can be considered the principal component of the controller equation. Integral and derivative action should be used to trim the proportional response. Therefore, the controller gain should be tuned first with the integral and derivative actions set to a minimum. If instability occurs, the controller gain should be adjusted first. Adjustments to the controller gain should be made gradually.

39

3.3

Temperature Control

3.3.1. Add an energy stream to your simulation, Q-100, and connect it to V-100. 3.3.2. Enter 0.0 kJ/h as heat flow value for this stream. 3.3.3. Add a PID controller. 3.3.4. Select Vessel Temperature of V-100 as Process Variable Source. 3.3.5. Select Q-100 as Output Target Object and Control Valve as its variable.

The Control Valve button appears if the Output Target Object is a material or energy stream instead of a valve unit operation. By pressing it, we have access to the Flow Control View, FCV. The FCV that appears for an energy stream is dependent on the type of duty stream selected: • Direct Q duty consists of a simple power value (in other words, BTU). • Utility Fluid takes the duty from a utility fluid (in other words, steam) with known properties.

40

The type of Duty Source specified can be changed at any time by clicking the appropriate radio button in the Duty Source group.

The default option is Direct Q. In this view option, the SP appears, and you may specify the minimum (Min. Available) and maximum (Max. Available) cooling or heating available. You need to define these values in a way that your OP works at around 50% under your steady state target conditions. 3.2.6. Enter 0.0 kJ/h as the minimum available duty and 2.0e+05 kJ/h as the maximum one. ˆ o C and 100A ˆ oC 3.2.7. Go to the Parameters option in the Configuration page and enter 0A as controlled variable range PV values. 3.2.8. Which has to be the Control Action for this controller? 3.2.9. Switch the controller to Manual Mode. 3.2.10. Create a New chart. Go to Tools/Databook and select Strip Charts tab. Press the Add button. 3.2.11. Open the property view of the Temperature Controller and go to the Configuration page. Drag and drop the SP, PV and OP values to the new strip Chart. 3.2.12. Run the integrator until you get the steady state behaviour.

41

42

3.4

The Process Reaction Curve

The process reaction curve is probably the most widely used method for identifying dynamic models. It’s simple to perform and although it is the least general method, it provides adequate models for many applications and it is very helpful to tune PID controllers from general guidelines. The process reaction curve method involves the following four actions: • Allow the process to reach steady state. • Introduce a single step change in the input variable. • Collect Input and output response data until the process reaches again steady state. • Perform the graphical process reaction curve calculations. Change the OP of TIC-100 from 50% to 75% and run the integrator to the new steady state. You should get a response like the one in the figure.

The graphical calculations determine the parameters for a first order with dead time model represented by the following equation: = Kp · e−θs τ · s + 1 W here Y (s)istheoutputof thesystem X(s)istheinputof thesystem Kpisthesteady − stategain τ istheT imeconstantof thesystem θisthedeadtomeof theprocess Y (s) X(s)

(25)

43

4

NGL EXTRACTION PLANT

Natural Gas Liquids (NGL) consist of hydrocarbon components in a produced gas stream which can be extracted and sold in their respective market. NGL extraction is typically justified: • To meet a gas sales specification requirement such as a hydrocarbon dewpoint or • to upgrade the market value of the produced gas and liquid streams. Condensation processes are the most widely used processes for the extraction of NGL from natural gas. In this workshop we will build a NGL extraction process by Mechanical refrigeration. Mechanical refrigeration plants utilize a commercial refrigerant such as propane ˆ ◦ C. This or R-22 to chill the gas. Process temperatures are seldom less than about -40A process is used both for hydrocarbon dewpoint control and NGL sales. The workshop is divided in three exercises. In the first one, the process model is built in steady state. In the second one, we cover all the aspects for the transition from steady state to dynamics mode: 1) adding resistance unit operations, 2) rating all the equipment and 3) defining pressure boundary streams. Finally the third exercise is focused on the addition of controllers and strip charts to follow the process dynamics.

44

Learning Objectives After completion of the module, users would have had the opportunity to develop the dynamic model of an mechanically refrigerated plant to extract the Natural Gas Liquids (NGL) of a gas mixture. Users will be able to size equipment, define pressure flow specifications and add strip charts and controllers.

45

4.1

Steady-state NGL extraction

The gas produced in the inlet separation section is dehydrated and sent to the NGL Separation section. In this case, an external refrigerated process will be modelled. The thermodynamic method and the first unit operations will be incorporated now in the simulation model:

The process and equipment data are given in the following tables:

46

47

Continue to build the chiller plant. Figure below shows the process schematic for this additional part:

The new equipment data and operating conditions are provided in the below table:

48

4.2

Moving from Steady-State to Dynamics

Adding unit operations 4.2.1. Identify material streams which connect two unit operations with no pressure flow relation. Notice that boundary streams are coming from holdups or going to holdups. Therefore, if they are connected to a hold-up unit operation, a new unit operations which define a pressure flow relation, such as valves, heat exchangers and pumps, have to be added to these streams. It is also possible to specify a flow specification on these streams instead of using an operation to define the flow rate. 4.2.2. Which streams in this flowsheet connect two unit operations with no pressure flow relation and will need an additional pressure flow relation or its flow must be specified? 4.2.3. Add a new valve and name it VLV-103. 4.2.4. Connect Stream 11 as inlet of VLV-103. Create an outlet stream and name it 12. Enter 1800 kPa as outlet pressure. 4.2.5. Add a new valve and name it VLV-102. 4.2.6. Connect Stream 7 as inlet of VLV-102. Create an outlet stream and name it 17. Enter 3900 kPa as outlet pressure. 4.2.7. Add a new valve and name it VLV-101. 4.2.8. Connect Stream Inlet Gas as outlet of VLV-101. Create an inlet stream and name it 1. Enter 1550 kPa as inlet pressure.

4.2.9. Equipment sizing. All unit operations in the simulation need to be sized using the dimension of the actual plant equipment or by using pre-defined sizing techniques.

49

Sizing the Valves 4.2.10. Open VLV-101 property view and go to the Specs page of the Dynamics tab. 4.2.11. Under the Dynamic Specifications group, there are two possible dynamic specifications you can choose to characterize the Valve operation. If the Total Delta P checkbox is activated, a constant pressure drop is assumed across the Valve operation. With this specification, the flow and the pressure of either the inlet or exit stream must be specified or calculated from other operations in the flowsheet. The flow through the Valve is not dependent on the pressure drop across the Valve. 4.2.12. If the Pressure Flow Relation checkbox is activated, the flow rate through the Valve is calculated from the valve equation, so will be the pressure of the streams entering and exiting the Valve. If this option is selected the user must provide the valve size.

4.2.13. If the user does not have this information (valve’s Cv), it is possible to size the valve on the Sizing page in the Ratings tab. 4.2.14. For sizing a valve the following information is required: • Valve operating characteristics group (Linear, Quick Opening Equal Percentage our User Table). • Stream Conditions (Normal Valve Opening, Pressure Drop, Mass Flow Stream Composition, Inlet Pressure and Temperature). • Sizing Method (Cv and Cg). 4.2.15. The sizing calculation method is the same for all valve manufacturers and types, with the exception of the Simple Resistance Equation. All valve manufacturers and types

50

have Cv and Cg methods to calculate the flow rate. The difference between the manufacturers and types is the equations and constants used to calculate the flow rate within the valve. 4.2.16. A valve should be sized using typical flow rates with a 50% valve opening and a pressure drop between 15 and 100 kPa.

Sizing the Separators 4.2.17. In the Geometry group under the Rating Sizing page , you can specify the vessel orientation, shape, and volume. The geometry of the vessel is important in determining the liquid height in the vessel. There are four possible vessel shapes: flat cylinder, sphere, horizontal ellipsoidal cylinder, horizontal hemispherical cylinder. The liquid height in a vertical cylindrical vessel varies linearly with the liquid volume. There is a nonlinear relationship between the liquid height, and the liquid volume in horizontal cylindrical and spherical vessels. 4.2.18. Open D-1 Scrubber property view and go to Sizing Rating page. Select Vertical orientation for a Flat Cylinder and press Quick Size button. 4.2.19. The Quick size option is sizing the vertical vessel for L/D ratio equal 3.0 and 5 minutes of residence time. Vessels (Separators, Condensers, Reboilers) should be sized for 5 - 15 minutes of liquid holdup time. Sizing could be also performed using the Vessel Sizing utility.

Sizing the Heat Exchangers 4.2.20. The dynamic heat exchanger can be specified as having a set pressure drop or a Overall k-Value (pressure-flow) relation. This option is set on the Specs page of the Dynamics tab in the heat exchanger property view: K-values can be calculated using the Calculate K button on the Specs page of the Dynamics tab in the operation’s property view. 4.2.21. Open E-100 property view and go to Dynamics Specs page. Press the Calculate k button and activate the Overall k dynamic Specification. 4.2.22. Enter 0.5 m3 as Volume. 4.2.23. Special caution has to be taken with Heaters/Coolers with fixed duties. This can cause problems if the flow in the heater/cooler happens to fall to zero. It is recommended to use a controller, or a Spreadsheet function, or a temperature specification to control the temperature of a stream. ˆ oC 4.2.24. Select Product Temp Spec within Model Details sub window and enter 45 A as Product Temp specification. 51

ˆ o C. 4.2.25. Repeat the last three steps for E-102 with a Product Temp Spec equal to -25A 4.2.26. The heat exchanger model in Dynamics shares information with the Dynamic Rating mode. Therefore, it is good practice to converge the steady state flowsheet with Dynamic Rating Mode before moving to Dynamic Simulation. 4.2.27. For solving E-101 with the dynamic rating mode you need a recycle operation for Stream 10. 4.2.28. Add a recycle and a new stream as outlet, 10 bis. Connect 10 bis to the HX instead of stream 10. 4.2.29. Open E-101 property view and go to the Model page of the Dynamics tab. Enter 0.5 m3 and 3 m3 for the Tube and Shell volumes and 1.0e+5 kJ/C-h as Overall UA value.

52

4.2.30. Go to the Dynamics Specs page and press the Calculate K’s button. 4.2.31. Go to the Design Parameters page and switch from the Weighted model to the Dynamic Rating model. 4.2.32. Go to the Dynamics Specs page and switch from Delta P Specification to k specification in the shell and tube cells.

53

4.2.33. Because the Dynamic rating model calculate pressure drops from the Dynamic k Specification, the Delta P values in the Parameters page of the Design tab must be deleted to avoid inconsistencies. Sizing the Compressor and the Pump 4.2.34. In general, two specifications should be selected in the Dynamics Specifications group in the Specs page of the Dynamics tab in order for Compressors, Expanders and Pumps to fully solve. Efficiency is one of the recommended specs and either Head or Pressure rise is the second one. If available, compressor pump curves make excellent specifications. 4.2.35. You should be aware of specifications, which cause complications or singularity in the pressure flow matrix. Some examples of such cases are: • The Pressure rise checkbox should not be checked if the inlet and exit stream pressures are specified. • The Speed checkbox should not be checked if the Use Characteristic Curves checkbox is unchecked. • Duty specs on pumps can only be used if a recycle and pressure control to protect the pump are modelled. Otherwise use a pressure rise spec. 4.2.36. Go to the Specs page of the pump Dynamics tab and select 62% efficiency and power as dynamic specifications. 4.2.37. Go to the Specs page of the compressor Dynamics tab and select 72% efficiency and duty as dynamic specifications.

Boundary Stream Specification 4.2.38. Pay special attention to equipment with fixed pressure drops. Any fixed pressure drop specifications in equipment can yield unrealistic results, such as flow occurring in the direction of increasing pressure. 4.2.39. The last specification that needs to be included before the case can be moved to the dynamic mode is to add Pressure specifications to all Boundary Streams. 4.2.40. Go to the top right corner palette and modify the code of colours from Default Colour Scheme to Dynamic P/F Specs. 4.2.41. Add the following Boundary Specs.

54

55

4.3

Control Strategy

4.3.1. Press the Dynamics mode. 4.3.2. Run the Solver for a few minutes.

Feed Flow Control 4.3.3. Add flow controllers according to the following information.

4.3.4. Add a level controller according with the following information.

4.3.5. Add a temperature controller according with the following information.

56

4.3.6. Go to the Model Details in the Specs Dynamics page of E-102 and switch from Product Temp Spec to Supplied Duty. 4.3.7. Press [CTRL+F] to get access to the Face Plates window.

4.3.8. Select LIC-102 and TIC-102 and press the Open button. 4.3.9. Run the integrator and observe if the SP is achieved. 4.3.10. Add a Level controller according with the following information.

57

58

5

INLET SEPARATION PLANT

A lean gas condensate enters a separation plant where the different fluids will be separated for further processing. The purpose of this separation in stages is to reduce the pressure on the produced fluids in steps to maximize each phase’s recovery. If the separator pressure is too high, large amounts of light components will remain in the liquid phase at the separator and will be lost along with other valuable components to the gas phase in the stock tank. Conversely, if the pressure is too low, large amounts of light components will be separated from the liquid, and they will take with them substantial quantities of intermediates and heavier components. Consequently, it is necessary to optimize the separators pressure in winter and summer seasons. Considerable gains can be realized by performing process simulations to optimize the separator pressure. Knockout drums, 2 and 3-phase separators, valves, coolers, heaters, pumps and compressors of a typical Oil & Gas separation plant are added to the model in steady state. Later, additional information is added to the model to adapt it for dynamic simulation: sizing information, pressure drop relationships, and boundary conditions will be included in a stepwise manner to systematically understand each step. A control strategy is implemented to have the system working in closed loop. PID and onoff controllers are going to be used in this Module.

59

Learning Objectives The content of the module will help users to understand how to install, connect and solve unit operations first in steady state mode and later in how to move that model to a dynamic operation. The guided exercises will show how to install unit operations of four different types: • Simplified heat exchange devices: Cooler, Heater. • Flash Separators: 2 & 3-phase separators. • Piping equipment: Valves, mixers. • Rotating equipment: Pump, compressors. At the end of the module students will have learned how to use unit operations in dynamic simulation models to calculate stream conditions and power requirements to accomplish certain process working conditions. In later modules these unit operations will be defined with a higher degree of rigorousness.

60

5.1

Steady State model

Through a guided exercise, the below flowsheet will be modelled in steady state mode to obtain initial results for moving it later to the dynamic environment.

5.1.1. Create a New Case and install a Fluid Package, with a Component List containing the following Traditional components: N2,CO2, C1, C2, C3, iC4, nC4, iC5, nC5, nC6 and H2O. And the following Hypothetical components:

5.1.2. Use the Peng-Robinson equation of state as Property Package. 5.1.3. Create a Material Stream with the conditions in Table below.

61

5.1.4. Install a valve downstream of Produced Fluids (that will be later used for flow control) and specify an outlet pressure of 64.8 bar. Name that valve Manifold. 5.1.5. Install a 2-phase separator to split the stream into one gas and one mixed-liquid stream. Name it HP Separator. 5.1.6. The HP Separator vapour stream enters an exchanger to decrease its temperature down to 27 oC. 5.1.7. Install a Cooler to perform such simulation. Consider that a 50 kPa pressure drop takes place in the cooler. 5.1.8. The 2-liquid phase stream leaving the HP Separator is flashed through a valve before entering the intermediate pressure separator. 5.1.9. Install a valve and fix its outlet pressure at 23.1 bar. 5.1.10. Install a 3-phase separator and name it IP Separator. Use the valve outlet product as the feed for this separator.

62

5.1.11. The light liquid product stream is flashed again in a valve and warmed up to compensate the Joule-Thompson effect. 5.1.12. Install a valve, then a heater with a 50 kPa pressure drop, and specify the outlet heater pressure to be 5.5 bar and the temperature, 85 oC. 5.1.13. Install now the low pressure separator (LP Separator) to split the resulting three phases. 5.1.14. Install the pump by double-clicking its icon in the Object Palette and specify its working conditions to be 70% adiabatic efficiency to obtain an outlet pressure of 70 bar. 5.1.15. Place again a valve (50 kPa pressure drop) and a Cooler (50 kPa pressure drop, 60 C outlet T) downstream of the light liquids stream. 5.1.16. Install valves downstream of the rejected water streams in IP and LP separators. Collect all water streams using a Mixer, which has to Equalize All pressures, to obtain a final water stream at 4 bar pressure.

63

5.2

Preparing for Dynamics

The size and the physical characteristics of every piece of equipment will affect the way the variables of the model respond to the time evolution of the dynamic model. Key aspects of a transient response like residence time, capacitance, resistance, etc. are directly related to the equipment size. Before being able to start a run of a simulation in dynamic mode, all these values need to be incorporated into the model. Using realistic values will additionally ensure the stability of the model and the accuracy of the results obtained. There are two main aspects to focus on when adding the physical dimensions of the unit operations: volume, that affects the pressure in the holdup and the residence time, and flow resistance that affects the transfer of material from one unit to another one. So, as seen in previous modules, when entering this phase of dynamic model construction, the user needs to ensure that proper volumes are supplied for every unit operation and reasonable pressure drop relationships are defined in every unit to account for the pressure gradient across the whole simulation model. In its current status the model contains 3 vessels, 3 heat transfer devices, 1 pump, 6 valves and a mixer. Consequently, it is necessary to provide rating information for all these devices. The software allows for a scalable approach to equipment sizing, from simply just entering the vessel volume (and the rest of dimensions are set to default values according to internal rules) to a complete access to all rating parameters. For the sake of simplicity and due to the introductory level of this module, the simplest equipment sizing approach is being used here. Ask your instructor if you are curious about the additional capabilities of the software. Most of the sizing information is going to be added in the Rating tab of every unit. Another tab that contains sizing information is the Dynamics tab. Using both tabs, the user should be able to enter all the dimensions of the equipment. 5.2.1. Open the HP Separator property view and move to its Rating tab/Sizing page. 5.2.2. Enter a volume of 50 m3 and allow the simulator to auto-calculate the rest of dimensions. Leave the Geometry at its defaults (vertical, flat cylinder).

64

5.2.3. The vessels do not offer any resistance to flow and in rating them, it is not necessary to worry about pressure drop correlations. 5.2.4. Size the IP and LP separators as horizontal, flat cylinders, of 30 m3 and 25 m3 respectively. 5.2.5. For the IP Separator move to the Dynamics tab and see that in the Specs page you can find the same rating information. Just to start from a different initial value, fix the Liq Volume Percent at 40% instead of the default 50%. 5.2.6. For the three separators, once in the Rating tab, move to the Nozzles page. Check the elevations (both, in meters and in height %) at which the software has placed the different nozzles by default. See that the boot is taken into account when measuring the elevations of the nozzles.

5.2.7. The nozzle elevations are important values to remember because they will determine what mixture is leaving through each nozzle. 5.2.8. The volumes of the three heat transfer devices are considered to be equal to 5 m3 each. In these unit operations, the volume value is added on the Specs page of the Dynamics tab. In every heat transfer device, move to that page and enter the desired volume (See that 65

a default value of 0.1 m3 is already there, too small to be realistic). 5.2.9. Still in the Model Details group, move as well from a Supplied Duty model to a Product Temp Spec model by switching the radio button. Ensure that the Product Temp shown is the one you specified when building the model.

5.2.10. The heat transfer devices do offer resistance to flow. The way the simulator will calculate this resistance is by using a k constant in the turbulent flow equation. This k can be calculated from the equivalent length of the installed equipment or can be back-calculated by the software using the pressure drop and flow values used in the development of the steady state model. 5.2.11. Still in the same Specs page of the Dynamics tab there is another group, Dynamic Specifications, where the user can use the Calculate k button to estimate the value of k and a check box to activate its use during dynamic simulations.

5.2.12. Repeat the procedure for every heat transfer device. For the most realistic dynamic simulation of a centrifugal pump, the pump performance curves are necessary. However, if process conditions remain stable, an acceptable simulation can be achieved by using a fixed efficiency and a specified duty. As pump performance curves are not available, the second approach will be followed in this exercise. 5.2.13. Open the Pump property view and go to Specs page of the Dynamics tab. Ensure that the Efficiency and the Power are the two active (checked on) specifications in the list. If necessary, this value of Power can be later modified by the user during dynamic simulation runs, if the flow is significantly different from the one in Steady State.

66

5.2.14. Open the Manifold valve and move to its Rating tab/Sizing page:

See that the Cv and the Cg values are missing but that a Size Valve button is available. When the button is used, the simulator uses the information that appears in the Sizing Conditions group plus the Valve Operating Characteristics to determine a current value of the valve’s Cv. 5.2.15. Press the Size Valve button for the Manifold valve. 5.2.16. Move to the Dynamics tab, Specs page and ensure that in the Dynamic Specifications group the Pressure Flow Relation is selected. 5.2.17. Repeat these steps for the rest of valves in the model. The Dynamic model should now be almost ready to run. It only misses the boundary conditions between which to integrate the differential equations. The number of necessary boundary conditions normally coincides with the degrees of freedom of the pressure-flow system of equations, which in turn usually coincides with the number of boundary streams (feeds and products) in the model. The most realistic setup of the model that can be prepared is to use pressure boundary conditions and allow the model to run due to the pressure 67

gradient that these conditions establish. 5.2.18. Switch the PFD Colour Scheme (you find it on the PFD top right corner) from Default to Dynamic P/F Specs.

5.2.19. Identify the boundary streams in the model: Produced Fluids, Produced Water, Condensate Export, Gas Cooler Out, IP Vap and LP Vap. 5.2.20. Remembering the colour scheme mentioned in Module 1, check what boundary specifications are already active in the model. 5.2.21. Modify the existing specifications or create new ones in order to have only a pressure specification in every boundary stream. 5.2.22. Check the Dynamics Assistant to see if there is any potential trouble remaining. 5.2.23. Move to the Dynamics environment. 5.2.24. Run the integrator by pressing the green traffic light icon for a few simulation minutes to check if the integrator is capable of starting the model for dynamic simulation. The simulation is now running in open-loop, without any control action to maintain the variables at desired set points. Of course, a dynamic simulation needs as well as any real plant a control strategy to avoid undesired runaway situations due to upsets.

68

5.3

Installing control strategy

The simulation case is in Steady State environment and ready to have the control strategy added. Let’s begin supplying the flow control of the system, by adding a control of the flow of produced fluids. A flow controller 5.3.1. From the Object Palette, select a PID controller and place it on the PFD, close enough to the Manifold valve. 5.3.2. The Connections page of a PID controller allows the user to select the Process Variable (PV), the variable that is necessary to maintain at a certain desired value (Set Point, SP); and the Output Variable (OP), the variable that is going to be manipulated to have the PV achieve the SP. 5.3.3. For this flow controller select the Molar Flow of Produced Fluids stream as PV and the Actuator Desired Position of Manifold valve as the OP:

As discussed in previous modules, a flow controller acting on a valve needs a Reverse action. If the Steady State Environment results are going to be the normal operating point for Dynamic simulation, it is good practice to use a PV Range of twice the SS value (from 0 flowrate to double the SS result). Good starting values for the Tuning parameters of a Flow

69

controller (in preparation for later fine tuning) can be Kc = 0.1 and Ti = 0.25 minutes. 5.3.4. Implement the above guidelines to define the flow controller:

A level controller Now each vessel needs to have the level controlled to ensure that the mixtures leaving it are of the desired type. Let’s begin by defining a liquid level controller for the HP separator. 5.3.5. Install again a PID controller close enough to the HP Separator. Connect it by selecting as PV the Liquid Percent Level of vessel HP Separator and the Actuator Desired Position of VLV-100 as OP.

70

5.3.6. The Range for the PV is now easy to define (0% to 100%), the action should be Direct (if PV decreases, OP needs to decrease; if PV increases, OP needs to increase), and first initial guesses for Tuning parameters can be 2 and 10 for Kc and Ti, respectively. Normally, SP for liquid level in vessels is 50%.

5.3.7. Open the Face Plate of the LIC-100. The IP and LP separators are different than the HP Separator. They are separating 3 phases and consequently, they contain 2 inter-phase levels (Liquid 1 - Liquid 2 and Liquid 1 Vapor). For a proper control of the 3 phases, 2 level controllers are needed for each separator.

71

The same PID controller type that has been used for the HP Separator can be used to control the level of the light liquid in the IP and LP Separators. Because the water product is not very important for the plant profitability, an accurate and expensive control is not needed and a simple On-Off controller is going to be implemented to control the water level in the boot of the separator. 5.3.8. Install a PID controller and select the Liquid Percent Level in IP Separator as PV and Actuator Desired Position (ADP) of VLV-101 as OP. 5.3.9. Use the guidelines in point 3.8 to define it. 5.3.10. Open its Face Plate. 5.3.11. Repeat steps 3.10 to 3.12 for the LP Separator, using the ADP of VLV-102 as the OP.

An On-Off for Water level When we had a look to the nozzles position we noted that the light liquid nozzle was at 33% of vessel height and that the heavy liquid nozzle was at 0% of vessel height. So, it is important to avoid water to accumulate in the vessel to a level above this 33% to prevent water flowing out of the vessel through the light liquid nozzle. When defining the On-Off controller parameters this needs to be taken into account. An On-Off controller is implemented using the functionality of the Digital Point logical operator: that is located in the Object Palette, just above the PID controller. 5.3.12. Install one Digital Point logical operator close to the IP Separator and use the HvyLiquid Percent Level variable as Process Variable. For the OP, like we have been doing up to now, it is necessary to select the Actuator Desired Position of VLV-103. However, for the Digital Point controller it is necessary to select the Digital Actuator Desired Position.

72

5.3.13. Define its Parameters according to the picture below:

73

5.3.14. Install an identical On-Off Controller for the LP Separator.

5.3.15. Switch to Dynamics mode and start the Integrator for some minutes. Observe how the control strategy reacts, how the controlled variables (PVs) stay at the desired SP (or not) and how the manipulated variables (OP) change to drive the PVs to the SPs. Working in this way, we can only see what is happening at every moment, but we are not storing any historical data of what has been happening before. In order to analyse historical 74

behavior, we need a tool to visualize the evolution of the variables and to store a number of historical points. This can be achieved using the Strip charts. Strip Charts can be created by the user selecting the variables of interest or can be automatically created by the simulator. In either of the cases, they can be later modified to change the variables displayed. 5.3.15. Double-click on the HP Separator to open its property view and move to the Strip Chart page of the Dynamics tab. Select Small Dynamic State in the drop-down menu. Remove part of the variables to leave only:

5.3.16. Press the Create Stripchart... button. A new window opens with the just created graphical interface:

75

5.3.17. Open the Databook (Ctrl + D) and see in its Variables tab that the three HP Separator variables have been automatically added. If you move to its Strip Charts tab, then you will see that the three variables are selected for the only existing Strip Chart, HP Separator-DL1. 5.3.18. Still in the Strip Charts tab, press the Add button to create a new one. Change its default name to IP Separator. 5.3.19. Go back to the Variables tab and press the Insert button to find the relevant variables for the IP Separator: • Liquid Percent Level. • HvyLiquid Percent Level. • Vessel Pressure. • Vessel Temperature. 5.3.20. Go back to the Strip Charts tab, highlight the IP Separator strip chart and activate the checkboxes of the four variables mentioned above. 5.3.21. In the View group, press the Strip Chart... button. 5.3.22. For the time being, close the Databook window.

76

5.4

Completing the model

Up to now, we have been taking care of the modeling of the liquids in the flowsheet. All vapor streams were left as boundary streams, without too much modeling. The simulation case is now going to be completed by adding the vapor compressors and related equipment. The final setup of the processing plant is the one shown in the picture below:

5.3.23. Open the case you saved at the end of point 3.31 in Exercise 3, Inlet PlantExercise3. Your case should be in Steady State Mode. 5.3.24. Switch the Color Scheme back to the original Default color scheme. 5.3.25. The LP vapor streams are going to be compressed up to the IP vapors pressure and mixed together. To do so, install a Mixer downstream of IP Vap stream and set it to Equalize All pressures. Rename the stream at the mixer outlet: To Aftercooler. 5.3.26. Install a compressor K-100 with LP Vap as input and a new stream called IP Vap 2 as outlet. Connect this new stream as the second input to the mixer created in point 4.2. The flowsheet should solve completely. 5.3.27. Add a cooler (IP Aftercooler) to decrease the temperature of To Aftercooler ˆ o C. There is a 50 kPa pressure drop in the cooler. stream down to 38 A 5.3.28. Add a cooler (IP Aftercooler) to decrease the temperature of To Aftercooler ˆ o C. There is a 50 kPa pressure drop in the cooler. stream down to 38 A 5.3.29. Install a separator (IP Scrubber) to separate the liquids formed during cooling. It should use as feed the outlet of the recycle block. 5.3.30. Install another compressor (K-101) to increase the pressure of the separator vaˆ o C. A 50 kPa pressure drop can pors and a cooler to decrease its temperature down to 38 A be assumed in the cooler.

77

5.3.31. Install a Mixer, with Equalize All option, that should mix together these compressed and cooled down vapors with the ones that were coming from the HP Separator. Name Gas Export the resulting mixed stream. 5.3.32. Due to the cooling, stream Gas Export is not only vapor. Another separator is needed (TEG Scrubber) to eliminate the liquids and to have the vapors ready for dehydraˆ o C in heater H-202 (50 kPa pressure drop). tion once warmed up to 32 A

5.3.33. Use a Mixer (Equalize All) to mix the liquids of the TEG Scrubber with the liquids of the HP Separator. A valve will be needed for the TEG Scrubber liquids line. 5.3.34. Use a Mixer (Equalize All) to mix the liquids of the IP Scrubber with the liquids of the IP Separator before the Condensate Heater. A valve will be necessary for the IP Scrubber liquids line.

78

5.3.35. Now, this part of the flowsheet should look very close to the following diagram.

79