• No results found

Flowvis examples

In document Flacs v9 Manual (Page 186-199)

This section gives two examples on Flowvis use. Results from a FLACS simulation in the M24 module are used in both examples. The grid resolution is 40x13x12 m3. The simulation files can be copied from your FLACS installation directory.

Linux:

> cp /usr/local/GexCon/FLACS_v9.0/doc/examples/ex1/*110101* .

Windows:

Copy files from C:\Program Files\GexCon\FLACS_v9.0\doc\examples\ex1\∗110101∗ (∗110101∗means all files containing the text "110101")

5.10 Flowvis examples 181

The simulation must be run before creating the presentation:

On Linux:

> cd <simulation file directory>

> run9 porcalc 110101

> run9 flacs 110101

On Windows start the FLACS runmanager, click the Add directory button, and select the directory where the simulation files are located. Select the job number in the list, and click the Simulate button.

When the simulation has finished continue to the next section.

5.10.1 Creating a presentation with multiple plots

This example illustrates how to create a simple presentation from scratch.

In the examples, there are several tasks which implies the use of several dialog boxes to define a plot. This can be time consuming because the plot is redrawn every time an Ok button is clicked.

To avoid this, turn the Redraw Plot On Ok option off (in theOptions menu). Use the Redraw Plot button in the main window when a redraw is wanted.

This example covers 2D and 3D Cut Plane plots, Scalar Time plots and Monitor Point plots.

The presentation shall contain two pages. The first shall contain 2 dimensional cut plane plots (the JK cut plane with grid index equal to 20) showing the combustion product, pressure and velocity at timestep 17. There shall also be a plot showing the position and orientation of the cut plane compared to the geometry. The porosities in the cut plane shall also be visualized.

The second page shall contain a scalar time plot and a plot showing the positions of the monitor points. At last, it is outlined how to adapt the presentation to the results from a new simulation.

1. Start Flowvis

2. Change directory to where the simulation results are

(a) Select the New At command from the File menu. The New At dialog box makes it possible to navigate through the directory structure by double clicking on directory names. When the desired directory is reached, press the Ok button.

3. Create a page

(a) Select the Add Page command from thePage menu. Select the Modify Page command and change the subdivision of the page to 2 plots in X-direction and 3 in Y-direction.

4. Create a plot which shows the geometry and cut planes in 3 dimensions

(a) A 3D Cut Plane plot is used for this purpose. Click MOUSE+LEFT while pointing the mouse pointer somewhere near the top left corner of the page. A frame indicates the selected plot.

(b) Select the Plot Type command from thePlot menu. Select 3D Cut Plane plot from the submenu. The Data Selection dialog box pops up. Select the appropriate job number.

When the variable list is displayed, select PROD (combustion product). When the Ok button is pressed, a plot with default settings is displayed. This means that three cut planes are displayed, one perpendicular to each axis direction.

(c) Select the Plot Domain command from thePlot menu. The Plot Domain dialog box pops up. Set the number of IJ and IK planes equal to 0 (keep the number of JK planes equal to 1). The Start Index for the JK plane is set to 20. Press the Ok button.

(d) Select the geometry utility in the Plot Specification dialog box, and press the Ok button.

5. Some primitives need to be blanked to make it possible to see inside the geometry.

(a) Select the Blank Primitive command from thePlot menu. The geometry is redrawn as a wireframe model.

(b) When the dialog box pops up, click MOUSE+LEFT while pointing the mouse pointer at the roof of the geometry. The selected primitive is highlighted.

(c) Press the Blank Primitive button to blank the roof. Do the same thing to the XZ wall closest to the viewer. If it is difficult to hit the wanted primitive when clicking, the Closer and Farther buttons makes it possible to loop through all primitives intersecting the mouse pointer position.

(d) The plot is redrawn with shaded geometry when pressing the Ok button.

6. Create an Annotation plot

(a) Select the plot to the right of the previous plot by clicking MOUSE+LEFT while point-ing the mouse pointer somewhere in that area. Select the Plot Type command, and Annotation from the submenu.

(b) The Annotation plot is now displayed. It contains the job number, iteration number, time, minimum and maximum grid indices from the 3D Cut Plane plot. The corre-sponding text is removed from the 3D Cut Plane plot which is redrawn because the removed text makes room for larger graphics.

7. Create a 2D Cut Plane plot for visualizing the porosities

(a) Select the plot below the 3D Cut Plane plot. Select the Plot Type command and 2D Cut Plane from the submenu. Select the appropriate job number in the Data Selection dialog box, and press the Ok button.

(b) Select the Plot Specification command. Select the Area Porosities and Volume Porosities utilities and deselect the Axis and Grid utilities. Press the Ok button.

(c) Select the Plot Domain command. Select the JK plane and the appropriate grid index (20) using the I indexslider. Press the Ok button to see the result.

(d) Note that the Annotation plot changes when this 2D Cut Plane plot is created. In-stead of the minimum and maximum grids indices, the Annotation plot now contains information about the plane displayed in the 2D Cut Plane plot.

8. Create 2D Cut Plane plots of the combustion product and the pressure

(a) Select the Copy command from theEdit menuto copy the selected plot to the clipboard.

Select the plot to the right, and select the Paste command. A copy of the previous plot is displayed. Select the Data Selection command from thePlot menu, and select the combustion product (PROD) from the variable list. Press Ok and select the Plot Specification command. Deselect the Area Porosities and Volume Porosities utilities and select the Geometry utility. Press Ok to see the result.

(b) Copy this plot to the clipboard and paste it in the next plot. Select the Data Selection command and select the P variable instead of PROD.

9. Create a 2D Cut Plane plot of the velocities

(a) Select the last plot in the displayed page and select the Paste command. The contents of the clipboard is copied to the selected plot. Select the Data Selection command and select the VVEC variable instead of PROD.

(b) To get longer vectors, select Variable Value Range in the Variable Appearance dialog box and select Fixed Scale in the Vectors dialog box on the Plot menu. Set the scaling factor equal to 1.5.

10. Add a new page

(a) Select the Add command from thePage menu. The new page is added after the previ-ous. Modify the page subdivision to be two plots in Y-direction.

5.10 Flowvis examples 183

11. Create a Scalar Time plot of the Pressure

(a) Select the top plot in the page. Select the Plot Type command and Scalar Time from the submenu. Select the appropriate job, the P variable (pressure) and the wanted monitor points in the Data Selection dialog box. A sequence of adjacent (in the list) monitor points can be selected by moving the mouse pointer over the items while holding MOUSE+LEFT down. Several monitor points can also be selected by clicking while holding the Ctrl key down. Upon Ok, the plot is drawn.

12. Create a Monitor Point plot showing the points used in the previous plot

(a) Select the bottom plot, and select the Plot Type command and Monitor from the sub-menu. Select the appropriate job, and the same monitor points as in the previous plot.

(b) Press the Monitor Point Listtoggle button in the Plot Specification dialog box.

13. Save the presentation

(a) Select the Save command from theFile menu. Since the presentation is new, no file name is associated with it. The Save As dialog box is therefore displayed. Specify a name and press the Ok button.

14. Adapt the presentation to the results from a new simulation

(a) Start a new Flowvis instance. Select the Open command from theFile menu. Select the file specified in the previous step. Select the Substitute Job command from theEdit menu. Specify the previous and the new job numbers. Select the All Pages option and press the Ok button.

Figure 5.7: The first page of the Flowvis presentation in example 1 (location of plots differs slightly from text)

Figure 5.8: The second page of the Flowvis presentation in example 1 (location of plots differs slightly from text)

5.10.2 Creating a honeycomb plot

This example shows how to create a honeycomb plot by specifying a limited visual value range in a 3D Cut Plane plot.

1. Create a 3D Cut Plane plot

(a) Open the presentation from the previous section.

(b) Copy the 3D Cut Plane plot from the first page.

(c) Add a new page and paste the plot from the clipboard.

(d) Select the Plot Domain command. Change the number of cut planes in each direction to be equal to the number of grid indices in that direction. The number of grid indices can be seen from the scales in the volume specification.

(e) Turn off the grid display in the Plot Specification dialog box.

2. Modify the variable appearance

(a) Select the Variable Appearance command. Select Fixed Value Range Setting, and set the Fixed minimum value to be equal to 50% of the maximum value for All Timesteps. The Fixed maximum value is set to be equal to that of All Timesteps. Set the Colour for val-ues<min. to be None. Press the Ok button. The combustion product is drawn as a honeycomb volume covering the volume where the combustion product is above the specified limit.

3. Change the colour table

(a) To get more flame-like colours, select the Range Colours command from thePage menu.

Select the first index using the index slider. Set the hue for this index to be equal to 0.

5.10 Flowvis examples 185

Select the last index and set this hue to be 60. Press the Interpolate button. Press Ok to see the result.

Figure 5.9: The honeycomb plot

Chapter 6

Utility programs in FLACS

This chapter describes the utility programs in FLACS. The user can run the programs from the command line in the terminal window under Linux, or on the command line in the cmd window under Windows. It is possible to start the cmd command shell from theFLACS Run Manager.

The utility programs are categorized according to application:

1. Geometry, grid, and porosities: geo2flacs, gm, and Porcalc 2. Release source modelling: Jet, Flash

3. Modifying simulation files: rdfile, cofile, comerge 4. Post-processing simulation data: r1file, r3file, a1file

6.1 Geometry, grid and porosities

6.1.1 geo2flacs

geo2flacs is a utility designed to import geometry from various 3D geometry formats to FLACS.

The following input formats are supported:

• Microstation dgn version 7

• AutoReaGas

• AutoCAD (when contained in dgn file)

• StereoLitography file (STL)

In addition to the dgn format geo2flacs can export from the prp format (Propagated steel, Frame-works format, very similar to dgn format). Often the dgn files are accompanied by a drv file (Design Review). geo2flacs can use the information in the drv file to group single primitives into larger objects and give the objects the proper names.

The dgn file format can be produced by a number of different software packages. It is the native format of Microstation, but ie. PDMS can be exported to dgn format using the PDMS module ExPlant-I.

Microstation can open AutoCAD files and save them in dgn format. The internal structure of the geometry is not changed, and export from these types of files sometimes result in incomplete or completely empty geometries.

The output format is CASDmacro files.

6.1.1.1 Usage

geo2flacs is a command line program using mandatory and optional arguments.

The conversion is a three-step process. During the export process itself the geometry files are read via an input file.

6.1 Geometry, grid and porosities 189

Windows:

> geo2flacs --help

The above command gives in the following output:

Usage: geo2flacs [OPTION...] DIRECTORY

Geometry conversion tool for FLACS. Converts Microstation, AutoReaGas, STL, and other 3D geometry formats, to CASD macro files.

-a, --noAlign Do not align objects to nearest axis and allow irregular objects (special version of CASD required)

-c, --create Create input file

-d, --minDia=DIAMETER Do not export objects with diameter smaller than DIAMATER (mm)

-e, --export Start export of files

-f, --force Force delete output directory before exporting

-g, --gexconCol Gexcon colour scheme

-l, --minLength=LENGTH Do not export objects with largest length smaller than LENGTH (mm)

-n, --group=NUMBER Group NUMBER of primitives into one object -o, --outdir=DIR Output sub-directory (default = out)

-r, --rotate=ANGLE,X,Y,Z Rotate geometry ANGLE degrees around (X,Y,Z) -s, --translate=X,Y,Z Translate geometry (X,Y,Z) before export -t, --terrain[=HEIGHT] Use HEIGHT as bottom value for terrain

export

-v, --verbose Produce verbose output (increase diagnostic output)

-x, --addLength Add small length to cylinders with 0 length which would otherwise be skipped

-z, --buildingBase=Z0 Create buildings starting at Z0 (only valid for Shape files)

-?, --help Give this help list

--usage Give a short usage message -V, --version Print program version

Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.

Object type specification:

Specify option in the "geo2flacs_files.txt" file.

Report bugs to <[email protected]>.

6.1.1.2 Step-by-step procedure

1. Begin the export process by creating a new directory and copy all files to be converted to this directory.

2. Run geo2flacs first time with argument -c: "<tt>run9 geo2flacs -c .</tt>". This will create the input file geo2flacs_files.txt in the current directory.

3. Open the input file geo2flacs_files.txt in a text editor (eg. emacs, vi, pico, kwrite, etc and add export arguments as described in sectionInput file parameters. Save the file.

4. Run geo2flacs again with argument -e to do the export: "<tt>run9 geo2flacs -e .</tt>".

This will create a sub directory out if it does not exist, and start the export. The exported files are created in the out directory. If the out directory contains exported files geo2flacs will exit without exporting. A log file geo2flacs.log will be created.

5. Start CASD, create a database and read the macro files created by geo2flacs. To do this go Macro→Run ... and select the file 0-RunMe.mcr. The geometry will be read into FLACS.

Note that if the geometry has more than 10000 objects (2000 in FLACS versions prior to 9.0) CASD must be started with arguments -numObj XXXXXX -numAsis XXXXXX, where XXXXXX is the number of objects. The number of objects created is reported at the end of the export.

6.1.1.3 Input file parameters

If a dgn or prp file does not have an accompanying drv file geo2flacs must have information about the type of geometry inside the file. This is done in the input file geo2flacs_files.txt. When this file is initially created all dgn files without a drv file will have a trailing "-". Change the "-"

into one of the following letters.

Parameter Geometry type

The parameters P, E and S are most commonly used. R is used if the file contains only Race Way elements. T is for importing grid or triangular terrain geometry. B can be used to export geometry from files geo2flacs otherwise is unable to export from.

6.1.1.4 Command line options

The following command line options are recognized by geo2flacs:

Short Option Long Option Description

-a –noAlign Do not align objects to

nearest axis and allow irregular objects (special version of CASD required)

-c –create Create input file

-d –minDia=DIAMETER Do not export objects with

diameter smaller than DIAMATER (mm)

-e –export Start export of files

-f –force Force delete output directory

before exporting

-g –gexconCol Gexcon colour scheme

-l –minLength=LENGTH Do not export objects with

largest length smaller than LENGTH (mm)

6.1 Geometry, grid and porosities 191

-t –terrain[=HEIGHT] Use HEIGHT as bottom

value for terrain export

-v –verbose Produce verbose output

(increase diagnostic output)

-x –addLength Add small length to

cylinders with 0 length which would otherwise be skipped

-z –buildingBase=Z0 Create buildings starting at

Z0 (only valid for Shape files)

-? –help Give this help list

–usage Give a short usage message

-V –version Print program version

Table 6.2: geo2flacs command line options

DIRECTORY is mandatory when using the "-c" or the "-e" argument. The directory can either be the current directory (use ".") or any other directory (use full path or relative path).

Using the "-f" argument will force overwriting of any existing files in the out directory.

"-t HEIGHT" is used when exporting terrain data. If HEIGHT is negative use the long option, eg:

--terrain=-10.0

If one or more of the coordinates are negative when using the translate option the coordinates must be specified like this:

-s "\-100,\-100,\-100"

Note the double quotes ("") around the coordinates.

The argument "-g" force geo2flacs to export geometry using theGexcon colour scheme. By default geo2flacs will try to preserve the colours found in the dgn file.

"-a" is a special purpose option that prevents objects from being rotated to the nearest axis. This requires a special version of CASD and is not validated for general use.

"-v" will output as much information as possible during the export.

6.1.1.5 Geometry verification

As with all conversion from one format to another the process cannot be guaranteed to produce correct results. It is therefore very important to do a thorough verification of the geometry in

CASD. Because CASD only offers a subset of the functionality in most CAD packages some in-formation will be lost and some inin-formation might be interpreted with errors.

It is important to have special focus on details having significant influence on the simulation re-sults. These includes walls, decks (with and without grating) and major obstacles. The degree of porosity of the grating can have a significant influence on explosions, but no porosity information is exported.

6.1.1.6 Problems and solutions

Note that geo2flacs is under continuous development. This means that the software will have bugs, although Gexcon has done significant testing of the program to ensure that the program will operate well in most situations. Contact GexCon if any bugs are found. GexCon will consider fixing the bug if it is part of the core functionality of the program.

Increased diagnostic output geo2flacs will output information during the export. Increased diagnostic is written if the "-v" option is used. This information can be redirected to a file by using the ">" sign:

Linux:

> run9 geo2flacs -v -e . > out.txt

Windows:

> geo2flacs -v -e . > out.txt

This will create a file out.txt in the current working directory.

Dgn version supported The current version of geo2flacs supports dgn file version 7. Version 8 is not supported and must be converted to version 7 using Microstation.

Note about PDMS ExPlant-I There is bug in ExPlant-I that sometimes exports geometry in a format that cannot be exported with geo2flacs. If an object is represented by only "Shape"

elements it will not be exported. How to fix this in ExPlant-I is not known to GexCon, but a

elements it will not be exported. How to fix this in ExPlant-I is not known to GexCon, but a

In document Flacs v9 Manual (Page 186-199)