OLGA Tutorial

41
Table of Contents 1 Using this Tutorial ................................................................................................................................................................................ 2 Part I - Build a Basic Case ............................................................................................................................................................ 3 Step 1: Define a project ................................................................................................................................................................... 4 Step 2: Define a case ....................................................................................................................................................................... 5 Step 3: Case Definition .................................................................................................................................................................... 6 Step 4: Library ...................................................................................................................................................................................... 8 Step 5: Network Component .......................................................................................................................................................... 11 Step 6: Geometry ............................................................................................................................................................................. 14 Step 7: Heattransfer ....................................................................................................................................................................... 15 Step 8: Source .................................................................................................................................................................................. 17 Step 9: Output ................................................................................................................................................................................... 18 Step 10: Run ...................................................................................................................................................................................... 19 Part II - Viewing Results .............................................................................................................................................................. 20 Set Default Units .............................................................................................................................................................................. 21 View Trend Plot ................................................................................................................................................................................ 22 Using Templates ............................................................................................................................................................................... 23 View Profile Plot ............................................................................................................................................................................... 24 Network Plot ....................................................................................................................................................................................... 25 Export data ......................................................................................................................................................................................... 26 Tabulate Data .................................................................................................................................................................................... 27 Part III - Additional Keywords to Basic Case .............................................................................................................. 28 Process Equipment ......................................................................................................................................................................... 29 Restart .................................................................................................................................................................................................. 30 Slug Tracking ..................................................................................................................................................................................... 31 Part IV - Options ................................................................................................................................................................................. 32 Change OLGA executable ........................................................................................................................................................... 33 Run Project ......................................................................................................................................................................................... 34 Part V - Parametric Studies ...................................................................................................................................................... 35 Select parameters ........................................................................................................................................................................... 36 Set Parameter values .................................................................................................................................................................... 37 Matrix .................................................................................................................................................................................................... 39 View Parametric study results ....................................................................................................................................................

Transcript of OLGA Tutorial

Page 1: OLGA Tutorial

Table of Contents

1Using this Tutorial ................................................................................................................................................................................2Part I - Build a Basic Case ............................................................................................................................................................3Step 1: Define a project ...................................................................................................................................................................4Step 2: Define a case .......................................................................................................................................................................5Step 3: Case Definition ....................................................................................................................................................................6Step 4: Library ......................................................................................................................................................................................8Step 5: Network Component ..........................................................................................................................................................

11Step 6: Geometry .............................................................................................................................................................................14Step 7: Heattransfer .......................................................................................................................................................................15Step 8: Source ..................................................................................................................................................................................17Step 9: Output ...................................................................................................................................................................................18Step 10: Run ......................................................................................................................................................................................19Part II - Viewing Results ..............................................................................................................................................................20Set Default Units ..............................................................................................................................................................................21View Trend Plot ................................................................................................................................................................................22Using Templates ...............................................................................................................................................................................23View Profile Plot ...............................................................................................................................................................................24Network Plot .......................................................................................................................................................................................25Export data .........................................................................................................................................................................................26Tabulate Data ....................................................................................................................................................................................27Part III - Additional Keywords to Basic Case ..............................................................................................................28Process Equipment .........................................................................................................................................................................29Restart ..................................................................................................................................................................................................30Slug Tracking .....................................................................................................................................................................................31Part IV - Options .................................................................................................................................................................................32Change OLGA executable ...........................................................................................................................................................33Run Project .........................................................................................................................................................................................34Part V - Parametric Studies ......................................................................................................................................................35Select parameters ...........................................................................................................................................................................36Set Parameter values ....................................................................................................................................................................37Matrix ....................................................................................................................................................................................................39View Parametric study results ....................................................................................................................................................

Page 2: OLGA Tutorial

Using this TutorialThis Tutorial is to give a first introduction to how to use the Graphical User Interface (GUI) of OLGA. You can either go through the Tutorial task by task, starting with Part I, or you can search for subjects youwant to learn more about. For more information about the features of the GUI, please read Get Started or use F1.

Please enter the Project title here

1 / 40

Page 3: OLGA Tutorial

Part I — Build a Basic CaseIn Part I of this Tutorial you will learn how to build a basic OLGA case using the Graphical User Interface(GUI). The main focus is on the GUI, not on OLGA. For information about the use of OLGA you need toread the User's Manual. Get started, learn how to define a project.

Please enter the Project title here

2 / 40

Page 4: OLGA Tutorial

Step 1: Define a project1. Choose New on the File menu, click on Project...

2. If you want to save in a different folder, locate and open/create the folder

3. In the File name box, type a name for the project

4. Click Save

Next, learn how to define the project location.

Please enter the Project title here

3 / 40

Page 5: OLGA Tutorial

Step 2: Define a case1. Choose New on the File menu, click on Case...

2. Select one of the templates; in this sample an OLGA Empty case is selected

3. In the Name box, enter the name of the case.

4. Click Save

The new case SampleCase is now part of the project SampleProject that was defined in Step 1. Next, Step 3: CaseDefinition.

Please enter the Project title here

4 / 40

Page 6: OLGA Tutorial

Step 3: Case DefinitionNormally, the following keywords are required to be defined under CaseDefinition: CASE, FILES,INTEGRATION, and OPTIONS. These keywords are already included in the template that was chosen inStep 2. In the following steps it is shown how to enter information to the CASE keyword.

1. Go to Model View

2. Double click on the SampleCase. The case is expanded.

3. Expand the CaseDefinition

4. Click on CASE

5. In the Properties dialog, add information for the case using the keys AUTHOR, DATE, INFO,

PROJECT, and TITLE.

Next, learn how to enter information to the FILES keyword.

Please enter the Project title here

5 / 40

Page 7: OLGA Tutorial

Step 4: LibraryWe need to define a pipe wall made from different types of materials. Both WALL and MATERIAL belongto the Library group. The following steps show how to define the MATERIAL keywords:

1. Go to the Model View.

2. If SampleCase is not expanded, expand it.

3. Right click on Library and select Add > MATERIAL

4. In the Properties dialog, set the MATERIAL keys as shown below.

5. To make a copy of this material, click on MATERIAL : STEEL in the Model View.

6. Press Ctrl + c.

7. Press Ctrl + v.

8. In the Properties dialog, set the MATERIAL keys of the copy to:

Please enter the Project title here

6 / 40

Page 8: OLGA Tutorial

Next, learn how to define the WALL keywords.

Please enter the Project title here

7 / 40

Page 9: OLGA Tutorial

Step 5: Network ComponentWe are now going to add NODEs and a FLOWPATH. The following steps show how to add NODEs

1. Go to Components and select the NetworkComponent group.

2. Click on NODE.

3. Drag and drop the NODE onto the canvas (hold left mouse button down while moving the mouse

onto the canvas, let go).

4. Repeat step 2 and 3.

5. Click on the Fit Window button on the Toolbar.

6. Click on NODE_0.

7. In the Properties dialog, change LABEL and TYPE as shown below.

Please enter the Project title here

8 / 40

Page 10: OLGA Tutorial

8. Click on NODE_1.

9. In the Properties dialog, change the NODE keys as shown below.

Please enter the Project title here

9 / 40

Page 11: OLGA Tutorial

Next, learn how to create a FLOWPATH.

Please enter the Project title here

10 / 40

Page 12: OLGA Tutorial

Step 6: GeometryThe Flowpath that we added in Step 5 contains a default GEOMETRY. We are now going to modifyGEOMETRY.

1. Right click on PIPELINE on the canvas.

2. Choose Properties, the Geometry Editor is opened.

3. Choose the table representation of GEOMETRY-1 (second tab, also marked in yellow).

4. Select WALL-1 for PIPE-1.

5. Right click on PIPE-1, select Insert After.

6. Repeat step 5 until you have five pipes.

7. Choose Reset Pipe Labels on the Tools menu.

8. Type in the following Lengths and Elevations for PIPE-2 to PIPE-5:

Please enter the Project title here

11 / 40

Page 13: OLGA Tutorial

9. Choose Discretize... on the Tools menu.

10. Click OK.

11. Copy the PIPE-1's Diameter, Roughness, and Wall to the other pipes. This can be done in the

following way:

a. Select PIPE-1's Diameter.

b. Press Ctrl + c.

c. Select PIPE-2's Diameter while holding down Ctrl + Shift.

d. Press the Page Down button on the keyboard.

e. Let go of Ctrl + Shift.

f. Press Ctrl + v.

g. Repeat steps 1 through 6 for Roughness and Wall.

12. Choose Exit on the File Menu.

13. Click Yes.

Please enter the Project title here

12 / 40

Page 14: OLGA Tutorial

Next, Step 7 HEATTRANSFER.

Please enter the Project title here

13 / 40

Page 15: OLGA Tutorial

Step 7: HeattransferWe will here define the HEATTRANSFER keyword.

1. Right click on PIPELINE on the canvas.

2. Select Add > Boundary&InitialConditions > HEATTRANSFER.

3. In the Properties dialog, click on the Property Page button .

4. Enter the Tambient, Hambient, and Hmininnerwall as shown above.

5. Click OK.

Next, Step 8 SOURCE.

Please enter the Project title here

14 / 40

Page 16: OLGA Tutorial

Step 8: SourceHow to add a source.

1. Right click on PIPELINE on the canvas.

2. Select Add > Boundary&InitialConditions > SOURCE.

3. In Properties dialog, set keys in the Position section of the SOURCE.

4. In Properties dialog, click on the Timeseries button .

5. Enter TIME = 0, 1 H, TEMPERATURE = 2:30 C, and MASSFLOW = 15, 20 kg/s.

6. Change the GASFRACTION from -1 to 2:0.1 and the TOTALWATERFRACTION from 0 to 2:0.4

Please enter the Project title here

15 / 40

Page 17: OLGA Tutorial

7. Click OK.

Next, Step 9 OUTPUT.

Please enter the Project title here

16 / 40

Page 18: OLGA Tutorial

Step 9: OutputHere, we will add some plotting variables that we want look at after the simulation has been run.

TRENDTRENDDATA on Case LevelTRENDDATA on Flowpath LevelPROFILEPROFILEDATA on Case LevelPROFILEDATA on Flowpath LevelOUTPUT

First, learn how to define how often the TREND variables are to be written to file.

Please enter the Project title here

17 / 40

Page 19: OLGA Tutorial

Step 10: RunThe case is now ready to run. Do the following:

1. Click on Run Simulation on the Toolbar menu or press F5. The case is automatically saved before it is run. The simulation information is given in the output window. Next, in Part II you will learn how you can view the results of your simulation.

Please enter the Project title here

18 / 40

Page 20: OLGA Tutorial

Part II - View ResultsThe results can be viewed during the simulation or after the simulation has finished. You will here learn toview trend plots, profile plots, and network plot as well as how to export and tabulate data. First, learn how to set the default units for the variables to plot.

Please enter the Project title here

19 / 40

Page 21: OLGA Tutorial

Set Default Units1. Choose Options... on the Tools menu.

2. Click on the Default Units tab.

3. Scroll down until you find TEMPERATURE and change unit from K to C.

4. A warning is displayed, click on Yes.

5. Click OK.

All temperatures plotted will now be shown in degrees Celsius. Next, learn how to view a Trend plot.

Please enter the Project title here

20 / 40

Page 22: OLGA Tutorial

View Trend Plot1. On the Toolbar, click on (Plot current Trend Plot).

2. Mark variables either by double clicking on the selected variable(s) or by pressing space bar. All

variables can be marked by selecting Mark all from the right click menu.

3. Click OK, the Trend plot is shown.

4. Right click in the chart, select Edit > Titles...

5. Delete "Trend Plot"

6. Write "60 bara outlet pressure"

7. Close the trend plot.

Next, learn how to use templates when creating Trend or Profile plots.

Please enter the Project title here

21 / 40

Page 23: OLGA Tutorial

Using TemplatesTemplates for Trend and Profile plot can be stored and re-used. To store a template do the following:

1. Make the wanted changes to the plot by using the Configuration... dialog accessed from the Editmenu.

2. To save the template choose Save As Template from the File menu.

3. To open a template choose Open Template from the File menu. Next time you want to create a Trend plot, you can simply use the template. Click on the drop-down arrownext to and select a template previously stored. Next, learn how to view Profile plot.

Please enter the Project title here

22 / 40

Page 24: OLGA Tutorial

View Profile Plot1. On the Toolbar, click on (Plot current Profile Plot).

2. In the Select variables... dialog, double click on TM, fluid temperature. The variable is marked.

3. Columns in the Select variables... dialog can be moved around into desired positions. Select a

column and drag-and-drop it to its desired location. Columns can also be deleted and added fromthe right click menu. Click on X Axis Variable heading and hold the mouse button down, whilemoving the mouse cursor, drop it next to Branch heading.

4. Click on Pipeline length (m) and select Horizontal length (m) as illustrated below.

5. Click OK, the Profile plot is shown.

6. Right click in the Profile plot, select Edit > Select, the Select variables... dialog is shown.

7. Double click on HOL and GT.

8. Click OK.

9. Close the profile plot.

Next, learn how to make a network plot.

Please enter the Project title here

23 / 40

Page 25: OLGA Tutorial

Network Plot1. Right click on the canvas.

2. Select Network Plot > Load profile plot...

3. In the Select variable... dialog select GT.

4. Click OK.

5. Press to start the viewing of total mass flow through PIPELINE. To deselect the Network Plot, do the following:

1. Right click on the canvas.

2. Select Network Plot > Unload profile plot. Next, learn how to export data.

Please enter the Project title here

24 / 40

Page 26: OLGA Tutorial

Export dataHow to export data from the results files (*.tpl and *.ppl) is described below.

1. Open the Select variables... dialog either for trend or profile plot.

2. Mark the variables to export. N.B., you can only exports variables from one file at the time.

3. Press the Export button. (If it is profile data, a time selection box will be activated. Chose the pointsin time that are to be exported. Click OK.) The data is copied to the clipboard.

4. Open Excel or a text editor and paste the data into a file. Next, learn how to tabulate data.

Please enter the Project title here

25 / 40

Page 27: OLGA Tutorial

Tabulate DataTo tabulate data for given points in time or positions, Track Values can be used in Trend and Profileplots.

1. Open the trend or profile plot with the variables that are to be tabulated.

2. Right click in the plot and select View > Track Values.

3. Find the point(s) in time/position(s) to tabulate. Click once with the left mouse button. Repeat until allpoints in time or positions of interest are tracked.

4. Right click in one of the frozen track value dialogs, and select Copy all data.

5. The data is copied to the clipboard.

6. Open Excel or a text editor and paste the data into a file.

Next, learn about other basic keywords.

Please enter the Project title here

26 / 40

Page 28: OLGA Tutorial

Part III - Additional Keywords to Basic CaseIn this part, you will learn how to add process equipment and how to define a restart run based on thecase that was built in Part II. Furthermore, you will learn how to add slug-tracking and define illegalsections. First, learn how to add process equipment.

Please enter the Project title here

27 / 40

Page 29: OLGA Tutorial

Process EquipmentBased on the SampleCase built in Part I, you will now learn how to add process equipment.

1. Open SampleCase.

2. Double click on PIPELINE.

3. Click on the Components button on the Toolbar menu. ProcessEquipment is opened,however, there are two other options as well; Piping and BoundaryInitialConditions.

4. Click on VALVE, hold down the mouse button and drag it onto the canvas, release.

5. In the Properties dialog, give the following data:

The same procedure applies for adding, e.g., a POSITION or a WELL. Next, we will learn how to make a restart file.

Please enter the Project title here

28 / 40

Page 30: OLGA Tutorial

RestartThe following is based on the case that was built in Part I. If you already have a case that you want tomake a restart from go to step 7.

1. Change the outlet pressure from 60 bara to 20 bara. This can be done in the following way: click onthe OUTLET node on the canvas, change the pressure in the Properties dialog.

2. Choose Save Case As... from the File menu.

3. Change the File name to SteadyStateCase.

4. Click Save.

5. On Output on Case Level add the branch variable LIQC to TRENDDATA.

6. Run the simulation.

7. Choose Duplicate Case... on the file menu.

8. Change the File name to RestartCase.

9. Click Save. Both the SteadyStateCase.opi and RestartCase.opi files will be part of the same project. The following steps apply for RestartCase.

10. Select RESTART under CaseDefinition in the Model View (make sure you are doing this on thecorrect file).

11. In the Properties dialog, set READFILE to ON and select the entry field for FILE.

12. Click on

13. Select SteadyStateCase.rsw.

14. Click Open. A restart case has been defined. The keys that are gray, e.g., WALL and MATERIAL cannot be changed.All keys that can be changed (given in black) will be reread if changed, e.g., MASSFLOW for SOURCE. Next, learn how to add slug tracking.

Please enter the Project title here

29 / 40

Page 31: OLGA Tutorial

Slug TrackingBased on the restart file that was made during the restart task, you will here learn how to add slugtracking.

1. Right click on RestartCase in Model View, select Add > FA-models > SLUGTRACKING.

2. Change HYDRODYNAMIC in the Properties dialog to ON. (The values written in Italics are defaultvalues.)

Next, learn how to specify illegal section.

Please enter the Project title here

30 / 40

Page 32: OLGA Tutorial

Part IV - OptionsPart IV illustrate how to two different options in OLGA; how to change OLGA executable in the GUI andhow to set case dependencies in a project. Learn how to change OLGA executable .

Please enter the Project title here

31 / 40

Page 33: OLGA Tutorial

Change OLGA executableSince keywords and/or keys might change between different OLGA versions, see release note, it can beuseful to be able to specify which OLGA executable to use. This can be achieved in the following way:

1. Choose Options... on the Tools menu.

2. Select the OLGA Version tab.

3. If the version you want to switch to is listed in the version list, then mark that version and click OK. Ifthe desired version is not listed, carry out the following steps:

a. Click Advanced...

b. Click Add... next to the OLGA engine dialog.

c. Browse to the executable that you want to use.

d. Click Open.

e. Select the new executable.

f. Click OK.

g. Click OK. Next, learn how to Run Project and set up dependencies between cases within a project.

Please enter the Project title here

32 / 40

Page 34: OLGA Tutorial

Run ProjectHere you will learn how to run all your cases belonging to a project in one action. This functionality iscalled Run Project. Before you can start Run Project, you have to establish the dependencies between the cases includedin the project. Follow steps 1 through 4.

1. On the Project menu, click Project Dependencies...

2. Choose the case in the drop-down list that you want to set the dependencies for. E.g., the project

defined in the previous Parts contain the cases: SampleCase.opi, SteadyStateCase.opi, andRestartCase.opi. The first two cases do not depend on any other cases, but RestartCase.opidepends on SteadyStateCase.opi.

3. The order of the simulations is shown on the right side of the Project Dependencies window.

4. Click OK when all dependencies are specified.

5. Your project is now ready to run. On the Simulation menu, select Run Project. Alternatively, youcan select Run Project Batch. The cases are run in the specified order given through thedependencies.

Next, learn about the parametric study.

Please enter the Project title here

33 / 40

Page 35: OLGA Tutorial

Part V - Parametric StudiesIn the following, you will learn how to make a parametric study.

1. Open the case that the parametric study shall be based on.

2. Choose Parametric studies from the Tools menu and select Add study...

3. Number of parameters can be modified by using the arrows next to #Parameters.

4. Different types of name for the parametric cases can be chosen. By default, the parametric casesare named: 1.opi, 2.opi, and so on. Using Decoration equal to, e.g., "Massflow%1-Pres%2" theparametric cases will be named: Massflow<the value of the first parameter>-Pres<the value of thesecond parameter>.

Next, learn how to select the parameters.

Please enter the Project title here

34 / 40

Page 36: OLGA Tutorial

Select parameters1. Right click on the text <Right-click to select parameter>.

2. Choose Select Parameter...

3. From the drop-down menu in the Select Parameter dialog, choose the group of keywords that

contains the parameter that is to be changed.

4. Double click or press the > button on the keyword to be selected, e.g., SOURCE.

5. Click on the text <Click to select parameter>.

6. Select, e.g., MASSFLOW. N.B., if the diameter for the entire geometry of a flowpath is to be

changed, move all PIPEs to the right side and select diameter as parameter.

7. Click OK. Repeat steps 1 through 7 for each parameter to be investigated. Next, learn how to set the value of the parameters

Please enter the Project title here

35 / 40

Page 37: OLGA Tutorial

Set Parameter values1. Right click on, e.g., MASSFLOW, select Set Value(s)... 2. Select Range 3. Enter Start value = 12, Step = 2, and Last value = 24 4. Click OK Next, learn how one alternatively can give the parameters’s values by use of the Matrix..

Please enter the Project title here

36 / 40

Page 38: OLGA Tutorial

Matrix...Matrix... is an input option for writing values directly instead of using Set Values. It is to be used whenmore than one parameter is to be changed and all combinations of parameter values are to be considered(e.g., NxM).

1. Click on the Matrix... button.

2. Fill in the values wanted and click OK.

3. Click Run Study.

Please enter the Project title here

37 / 40

Page 39: OLGA Tutorial

Next, learn how to view the results.

Please enter the Project title here

38 / 40

Page 40: OLGA Tutorial

View Parametric study resultsWhen all simulations are finished, click on Profile Plot or Trend Plot. Alternatively, the XY plot optioncan be used if one wants to view variables versus the parameters varied. The following steps show howto use this latter option.

1. Click on the XY Plot button.

2. Select variable type, trend or profile variables.

3. Select the x-axis parameter.

4. Select the variable that should be plotted against the x-axis parameter.

5. Select the second parameter to get several graphs, this is optional. N.B., a single point will not be

shown in the graph.

6. Press the Plot button

Please enter the Project title here

39 / 40

Page 41: OLGA Tutorial

7. The Tabulate button can be used if you want to tabulate the data from the graph. Select the time

and position (only for profile plots) and press the Tabulate.

8. To export the tabulated data press the Export button. The data is then copied to the clipboard.

Please enter the Project title here

40 / 40