UniSim Design OLGA Link User Guide

April 7, 2023 | Author: Anonymous | Category: N/A
Share Embed Donate


Short Description

Download UniSim Design OLGA Link User Guide...

Description

 

UniSim Design Communication using Process Data Tables Using Process Data Tables Tables in UniSim Design makes the extension to UniSim Design communication as fast and efficient as possible. It also collects the relevant variables in one convenient place. Refer to Chapter 11 Simulation Tools of Tools of the UniSim Design User Guide for Guide  for more information.

Each time the Integrator is started in UniSim Design, two new Process Data Tables Tables are constructed for each link extension, one for inputs into the OLGA server and one to receive outputs from OLGA. To view these tables select the Databook command in the Tools Tools menu  menu of UniSim Design (or press CTRL D). On the Databook view you will see a Process Data Tables tab Tables tab where you can view individual tables. Examine these tables to see if all the expected variables variables a are re in the input and output tables. Look for any typos the way they have been entered.

OLGA Restart Files OLGA has the concept of restart files which typically have a *.rsw extension. These are saved every time that OLGA shuts down, including when some exception has occurred and the system has inadvertently shutdown. These files are actually the exact same file format as the *.snp snapshot files that the Link saves. Hence, you can just use any pre-existing *.rsw file to initialize the Link. You will, however, have to rename the extension to *.snp. You also need to ensure that the restart file being loaded is sufficiently compatible with the state of the UniSim Design model to prevent errors or to at least allow the simulation to integrate successfully. successfully.

3 Troubleshooting

41

 

4 Getting Started Example

Introduction This getting started example will take you through a step-by-step procedure, which demonstrates how to take an OLGA model and create a UniSim Design case that utilizes the model. Before you begin, make sure that you have installed both OLGA2000 and UniSim Design on the same or separate machines. Verify that you have the UniSim Design-OLGA Link extension installed and properly registered on the machine that UniSim Design is installed on. For the purposes of this exercise, we will use an existing OLGA model, process-test.inp,, which can be found in the Sample1\OLGA files process-test.inp directory where the OLGA Link was installed. If these conditions are satisfied open UniSim Design and create a new simulation case.

Simulation Basis The first step is to create the basis for the integrated simulation that you wish to run. Both OLGA and UniSim Design need to know about the property package and components that will be needed in the simulation and these need to be consistent. It is known, from how the OLGA processtest.tab file was created, that the PR (Peng-Robinson) equation of state is used.

New Case icon

1

Op Open en UniS UniSim im Des Desig ign n and and clic click k th the e New Case icon. Case icon. The Simulation Basis Manager view appears.

2

In the Components Components tab,  tab, create a component list and add the following nitrogen, nitrogen CO2,, methane CO2 methane, , ethane ethane, , propane,,components: propane i-butane,, n-butane i-butane n-butane, , ,i-pentane i-pentane, , n-pentane n-pentane, , nhexane,, n-heptane hexane n-heptane,, n-octane n-octane,, n-nonane n-nonane,, n-decane n-decane,, n-C11 n-C11,, nC12,, and n-C13 C12 n-C13..

3

In the Fluid Pkgs tab, Pkgs tab, create a fluid package and select PengRobinson EOS for EOS for the property package.

4

Click the Enter Simulation Environment button. Environment button.

4 Getting Started Example

42

 

UniSim Design Flowsheet Once the simulation basis has been set up the main simulation environment is entered. Here you will add the required streams and OLGA Link extension to the flowsheet (or PFD). 1

Add a new new strea stream m to the flo flowsh wsheet eet and call call it Feed Feed..

2

Open the Feed Feed stream  stream property view.

3

In the Composition Composition page  page of the Worksheet Worksheet tab,  tab, edit the compositions of this stream to reflect the composition in the case Sample1\UniSim Design\processtestFinal.hsc. Design\processtestFinal.hsc.

4

In the Conditions Conditions page  page of the Worksheet Worksheet tab,  tab, supply this stream with some initial values for pressure (7500 (7500 kPa), kPa), temperature (60°C 60°C)) and mass flow (57,600 ( 57,600 kg/hr). kg/hr).

5

Sa Save ve th this is Uni UniSi Sim m Des Desig ign nc cas ase e as as myTest.hsc myTest.hsc..

OLGA Link Extension 1

Fro From m th the e OLGA OLGA 2000 2000 GUI, GUI, open open the the OLGA OLGA iinpu nputt file file processtest.inp. test.inp.

2

From the draw drawing ing you you will will not notice ice tthat hat tthere here is one one BRA BRANCH NCH named BRAN-1 which BRAN-1  which has two terminal nodes.

3

If y you ou examin examine e the the input input keywor keywords ds more more closely closely the the fol followin lowing g information can be obtained. On the inlet end there is a SOURCE called INLET1 INLET1.. On the outlet side there is a terminal pressure BOUNDARY NODE labelled OUTLET.. Using this information we can now add the UniSim OUTLET Design-OLGA Link extension to the UniSim Design flowsheet and complete the required information on the Setup Setup tab.  tab.

Connections 1

Sw Switc itch h b back ack to your your UniSi UniSim m D Desi esign gn case case..

2 3

From From the the Flo Flows wshe heet et men menu u sele select ct Add Operation or Operation or press F12. In tthe he U Uni nitO tOps ps vie view w, sele select ct tthe he Extensions Extensions radio  radio button and select the UniSim Design-OLGA Link from Link from the list li st of available extensions.

4

Click the Add Add button  button to add OLGA Link to the flowsheet. The OLGA Link property view appears.

5

On the Connections Connections page  page of the Setup Setup tab,  tab, connect the stream Feed to Feed  to the Inlets group and change the OLGA Source label Source label to INLET1.. INLET1

6

Type Product Product in  in the UniSim Design Stream column Stream column of the Outlets group to create and connect an outlet stream. Change the OLGA Boundary label Boundary label to OUTLET OUTLET..

7

Open the Product Product stream  stream property view and click the Define From

8

Other Stream button. Stream button. Initialize this stream from the Feed Feed stream.  stream. Sw Swit itch ch th the e mo mode de fr from om Steady State to State to Dynamics Dynamics..

4 Getting Started Example

43

 

9

Click No No to  to the message dialog box regarding the Dynamics Assistant.

Server Details 1

In tthe he OLGA OLGA Link Link pr prope operty rty view, view, select select the Server Server page  page of the Setup tab. Setup  tab.

2

At th this is point point ta take ke note note of the direct directory ory locat locations ions of of the OLGA executable, the name of the machine where OLGA is installed and the name of the communication port that was setup in your system SERVICES file.

3

Enter the name name of the the machine machine where where OLGA OLGA is insta installed lled in th the e OLGA Host field. Host  field.

4

Ent Enter er tthe he path path to the OLGA OLGA EXE on th the e host host mac machin hine. e.

5

Enter the name name of of the service service under under wh which ich the the OLGA OLGA server server will b be e started. On installation OLGA edits the SERVICES file and will call the service olga2000 olga2000.. Verify this in the SERVICES file.

6

Enter the number number of the port on w which hich the O OLGA LGA server server will b be e started. This is also found in the SERVICES file.

7

In tthe he OLG OLGA A In Inpu putt fi file les s grou group, p, e ent nter er process-test.inp process-test.inp proceeded  proceeded by the full path to t o the location of this file on the OLGA computer computer.. You need to make sure that this is shared with read and write access by the user on the UniSim Design computer.

8

Sav Save e the UniSim UniSim Des Design ign cas case. e. Make Make sure sure tthat hat the process-test.inp process-test.inp   and processtest.tab processtest.tab are  are all in the same file location as you had specified on the extension view.

Dynamic Specifications The OLGA model is calculating the pressure at a SOURCE location and the phase Mass flows at a BOUNDARY location. The dynamic specifications in UniSim Design should coincide with this, therefore the inlet stream should have an activated Flow specification (because OLGA will be calculating pressure) and the outlet stream should have an activated Pressur e specification. weyou are could goingalso to be using the Write P-FPressure Equations Equations checkbox  checkbox Since feature, specify pressure at the inlet and flow at the outlet, but you would be reliant on the OLGA derivatives to relate the pressure and flow variables. 1

Op Open en the the OLG OLGA A Li Link nk vie view w, sele select ct tthe he PF Specs page Specs page of the Worksheet tab. Worksheet tab.

2

Activate th the Flow spec of spec of the stream Feed Feed and  and change the flow type to Mass Flow. Flow. Deactivate the Pressure spec. spec.

3

Sp Spec ecif ify y a mass mass fl flow ow va valu lue e of of 57,600 kg/hr. kg/hr.

4

Activate th the Pressure spec of spec of the stream Product Product and  and specify a value of 5,000 kPa. kPa. Deactivate the Flow spec. spec.

4 Getting Started Example

44

 

Initial Conditions It is important to initialize the streams in UniSim Design with values that correspond to the conditions given in the OLGA input file. If these conditions do not match then the results out of the OLGA model may not be what was expected and the model may become unstable. 1

Open the process-test.inp process-test.inp file  file in OLGA2000 and view the SOURCE and BOUNDARY data for each stream connected to the OLGA link extension.

2

Re Remem member ber tthe he co condi ndition tions s giv given en at these these lloca ocation tions. s.

3

Go ba back ck to the the UniSi UniSim m Design Design case case a and nd doubl double e che check ck th this. is.

You may want to save the UniSim Design case at this point as we are now ready to connect to the OLGA server and run the simulation.

OLGA Server The UniSim Design case is now properly setup to run the integrated simulation. At this point it is necessary to start the OLGA server server,, connect to it and load the input file. 1

Ope Open n the the OLGA OLGA Link Link view view iin n UniSi UniSim m De Desig sign. n.

2

On the Server page of the Setup Setup tab,  tab, click the Connect Connect button  button to link up the extension with the OLGA server. If this fails an error will be reported and the status bar will indicate that the server is not connected. Make sure that the Use Auto Connect checkbox Connect  checkbox is checked.

3

Check that the O OLGA LGA Model Model Path Path and O OLGA LGA Input File name name a are re entered correctly, correctly, and click the Load Input File button. File button.

4

The O OLGA LGA server server wi will ll attempt attempt to to load load the file and and in initiali itialize ze th the e server. If this is successful the status bar will read OK OK..

Integrating The OLGA server has successfully loaded the input file and initialized. Providing that the dynamic specifications are correct, the model is ready to be run. 1

In UniS UniSim im Design, Design, s start tart the the int integra egrator tor ffrom rom th the e Integra Integrator tor pr propert operty y view or by clicking the Solver Active icon Active icon on the tool bar. It is recommended that initially, you put the UniSim Design Integrator in manual mode and then click the Solver Active icon. Active icon. This action will only start the integrator but not take any steps. Next, you can take a few manual steps and see how the model simulates. If there are problems with your OLGA Link extension UniSim Design will fail to initialize and a warning will appear appear..

Solver Active icon

2

View the OLGA OLGA Server Server window window to see if if the serv server er is integrat integrating ing along with UniSim Design (this is not possible if the Server was started automatically on a remote PC).

4 Getting Started Example

45

 

To see the variables that are being input to and retrieved from the OLGA server, view the process data tables. 3

In the Tools Tools menu  menu select the Databook Databook command.  command.

4

On tthe he Data Databoo book k prope property rty view, view, click click tthe he Process Data Table tab. Table tab.

5

In the list of tables tables you you will will fin find d an input and a an n output output table table fo forr each OLGA link extension in the flowsheet. Check that these are the variables that you expect to be transferred to and from OLGA.

Snapshots You may want to save both the OLGA model and the UniSim Design case at a certain point in time. ti me. When you save the UniSim Design case a snapshot file will be saved with the name specified on the Server Server page  page of the Setup Setup tab  tab from the OLGA Link property view. This file name is automatically updated by appending a date and time to the file name, this keeps the file name unique. Note: It is recommended that, once you have Note: It integrated the UniSim Design and OLGA models, you always load the OLGA snapshot, which keeps its time and overall simulation state consistent with that of UniSim Design.

Tutorial on UniSim Design to OLGA Stream Connections As mentioned previously, previously, some care must be taken when making the pressure-flow connections connections to and from OLGA. This is i s described in the Network Considerations on section Design page 30. 30UniSim . A linked UniSimPressure-Flow Design case has been prepared which demonstrates preferable and non-recommended connection techniques.

4 Getting Started Example

46

 

Model Description The case is called OLGALinkSample2.hsc. Y You ou will find that this OLGA model has a BOUNDARY connection to node TOPSIDE and a SOURCE connection for material outflow which is connected to TOPSIDESOURCE. TOPSIDESOUR CE. Both of these Outlets flowing into UniSim Design are taken from the end of a pipeline in OLGA (see the file OLGALinkSampe2.inp). The BOUNDARY connection has an isolation OLGALinkSampe2.inp). valve between the final section of the pipeline and UniSim Design, whereas the SOURCE does not. Note: As a general rule, where connections are made Note: As with the possibility of flow closure or abrupt change, the device which causes the abrupt change should be placed at the immediate bound of the two linked models with no holdup (or a very large holdup with sufficient material capacitance) thereafter. thereafter. The device which will most directly affect the flow needs to send a flow specification to the other model. In the example case, the UniSim Design valve VLV-105 VLV-105 should  should not be closed (nor modulated severely) since the stream 14 14 will  will be sending a pressure specification value to the OLGA TOPSIDE TOPSIDE BOUNDARY  BOUNDARY connection. The valve VLV-101 VLV-101 connection  connection to SOURCE TOPSIDESOURCE is TOPSIDESOURCE  is a much better modeling technique that allows the closure of VLV-101 VLV-101,, because stream 3 will then set an explicit zero flow specification to OLGA. The VLV-106 VLV-106 in  in this case is a bad candidate to close since VLV-101 VLV-101 has  has a holdup of 2m3. This provides two non-zero holdup volumes between the OLGA and UniSim Design model which must equilibrate their pressures all via the linear PF relationship. If the holdup of VLV-101 VLV-101 were  were zero, then the downstream valve could be fully closed. In the OLGA model there is a valve called SDVALVE2-VLV SDVALVE2-VLV which  which is controlled via CONTROLLER SDVALVE2 SDVALVE2.. SDVALVE2 SDVALVE2 is  is controlled in the sample model via the OP of UniSim Design controller IC-100 IC-100.. This valve can be successfully closed since it writes an explicit zero flow specification to the UniSim Design stream 14 14.. The valves CHOKE-VLV CHOKE-VLV   and SDVALVE1-VLV SDVALVE1-VLV cannot  cannot be closed dependably, since they leave a (small) volume of holdup material downstream and are connected to the UniSim Design model which must balance off their pressures when either of these two upstream OLGA v valves alves are are closed. If these two OLGA valves were located, say, a few hundred meters upstream and there was always sufficient gas holdup in the downstream piping, then the valve closures would likely be robust and stable. This is because there is a large volume and hence the pressure changes more slowly. Of course, a smaller integration step in UniSim Design is always a solution to this type of problem, but this is not always pra practical. ctical. This same discussion would apply to connections with pumps or other abrupt flow control equipment.

4 Getting Started Example

47

 

4 Getting Started Example

 

48

4 Getting Started Example

 

Index Index B

SOURCE 8 TCP/IP communication 36

BOUNDARY 8 description 11 overview 29 bugs 40

C controllers configuration 16

D Disclaimer 7

F flow rates 23

time synchronization 32 trace bugs 40 view 9 OLGA Links operation 24 performance 25 trends 25 OLGA PC 2 OLGA simulation 24 operation configuration 24 operation overview 29 outlet composition 33

P P-F equations 30

initial values 31 inp file 8 Introduction 6

pressure-flow equations 30 process data tables 41 product composition 33 profile results 27 property view 9

N



Notes Manager 18 notes specification 17

Reference Stream 11 reference stream 33 rhosts file 37 account access 37 domain name 37

I

O OLGA configuration 21 OLGA Link 9 add 8 BOUNDARY 8 connection 10 controllers 16 create 8 description 8 dynamics configuration 21 flow rates 23 function 8 initial values 31 notes 17 OLGA 21 outlet composition 33 overview 29 P-F equations 30 process data tables 41 profiles 27 reference stream 11 register status 35 server 12

S server configuration 12 SOURCE 8 description 11 overview 29 stream connection 10 stream flow rates 23

T TCP/IP communication protocol 36 time synchronization 32 OLGA 32 trace bugs 40 OLGA 40 trend results 25 Troubleshooting bugs 40 LAN networks 35 OLGA server errors 39

49

Index

50

Index

51

 

separate computers 35 two computers 35 Visual Basic errors 40

U update extension register status 35

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF