PRELUDE Tutorial VWT1sa
Simulating flow around a simple object

Author: E.O. Pankova, Moscow Baumann State Technical University

Introduction

In this tutorial, you will learn how to use PRELUDE's Virtual-Wind-Tunnel Gateway so as to simulate the flow around a simple object.

How to make changes to:

will be discussed in later tutorials.

It must be mentioned here that PRELUDE (and its VWT Gateway specifically), being under constant development, now includes new features, namely:

  1. it allows display of results directly, as well as via the Viewer;
  2. it can handle unstructured as well as structured grids;
  3. a companion, i.d., a step-by-step explanation and execution of the VWT scenario, has been suppied;
  4. the VWT Gateway is being suppplied to selected users as a stand-alone PHOENICS package, without the Viewer module.
In this respect we shall concentrate here on the VWT options as as a stand-alone PHOENICS Gateway. Although VWT tutorials inside PHOENICS package are mainly valid, they still need to be updated as Prelude software is under permanent development. So do not be discouraged if tutorial images do not coincide completely with those on your screen.

It might be useful if before starting this tutorial you will get familiarised with the VWT companion.
To activate the VWT companion, do the following:

  1. run Prelude by clicking on the [chopin.gif] icon on the desktop;
  2. click on Help in the Menu bar, point to Companion and click on VWTPCO;
  3. you will then be guided through the VWT script wherein all its commands will be shown in a separate window and a corresponding link after each command when clicked on will run the command being discussed earlier.
So the aim of the Companion is not only to interpret commands of the Tcl language but to show what is being done in the domain when any of these command is run. Eventually the companions will enable a user to be in control of the case he is going to create, and without being forced to study Tcl for this reason.

Contents

  1. How to start
  2. Inspecting the object tree
  3. Making the simulation
  4. Inspecting the results
  5. Concluding remarks

1. How to start

In this and all further tutorials, what-to-do instructions are indicated by letters and numbers in the left-hand margins, as follows:
  1. Start this tutorial by clicking on the [chopin.gif] icon on the desktop.

  2. Into the casename box, type the words, say, 'VWTa'.
    Preferably use a single short word, because it will be used as the start of the names of files to be saved later. (See section 6.)

  3. First create your working directory under /phoenics/d_prelud in an ordinary way. Then in the drop-down menu of the 'Edit' button, select 'Set Working Directory', navigating thereafter to the directory you have just created.
    Click on that folder. It will remain your working directory for PRELUDE until you change it again.

  4. To load the case which is discussed in this tutorial, click on the arrow to the right of the 'Load Gateway' box and select 'vwt', which stands for Virtual Wind Tunnel.

  5. List of initial settings (options) will appear inviting you to take account of thermal and/or compressibility effects as well as choose an object to be placed into the VWT and some others. We suggest that you should leave default settings at first. Then click on the button "Next".

  6. After PRELUDE has carried out some preliminary actions, the progress of which is indicated by blue bars moving across the screen, you should see a picture like this:

    [sa1_1.gif]

    It displays a solid (namely a sphere) placed in a tunnel of rectangular cross-section, with a plane inlet for air on the left and a plane outlet on the right.

2. Inspecting the object tree

PRELUDE is an 'object-oriented' program. Now is the time to find out what objects constitute the case under consideration.
Making the 'object tree' visible
  1. Click on the [treen.gif] icon in the toolbar.

  2. Then click on the "+" sign close to the word 'world', 'materials' and 'variables'.
    What you will see, is:

    [sa1_2.gif]

    Selecting the object around which the flow is to be calculated
  3. Select the object in the tunnel by clicking on its image. You will then see the following image:

    [sa1_3.gif]

    about which the following remarks must be made:

  4. Click now on the word 'INLET' in the tree. You will see the following:

    [sa1_4.gif]

    As before:

  5. To find out what are the properties of the inlet click on the 'red-tick' icon [immov.gif]. You will then see the following:

    [sa1_5.gif]

    You can examine what are the inlet position and sizes, whether it is rotated or not if you click on a corresponding tab. It is more interesting, however, to look at the 'Attributes' tab.

  6. The 'Attributes' tab when clicked will look as follows.

    [sa1_5a.gif]

    Click on the arrow to the right of the 'Edit parameter' box and select 'velocity' as a parameter for examination. You can make sure of that three white boxes appear that contain the current values of the three components of velocity at the inlet, namely (from top to bottom):

    [sa1_5b.gif]

    1. Xvelocity: windspeed, directed into the wind-tunnel, is set to 2.0 m/s;
    2. Yvelocity: 0.0 m/s, directed across the inlet horizontally;
    3. Zvelocity: 0.0 m/s, directed across the inlet vertically.

  7. Check that you can change these values in any of the ways which you learned in tutorial 1; but then return them to their original values before proceeding.

    However, you can add other parameters affecting the flow around a body in the wind tunnel, choosing them from the 'Add Parameter' box.
    It might be hidden, in this case enlarge the 'Attributes' window by dragging its handle down.

    1. Click on the right arrow to open the following drop-down menu.

      [sa1_6.gif]

    2. Select from that list any parameter you are specifically interested in and would like to control, say 'pressure'.
    3. Make sure that it has now appeared in your list of parameters and you can now edit it, pressing the right arrow and selecting 'pressure' from the Parameters box.

      [sa1_7.gif]

  8. Investigate the attributes of 'OUTLET' in the same way as you did for 'INLET', namely by:

  9. 'Pressure' has been introduced by default.
    Its panel contains a white box in which the 0.0 signifies that the outlet is being represented as a region where the air pressure is fixed to zero, (not 'absolute' of course, but 'relative'; the air is being taken as incompressible, therefore any constant value could be chosen.)

    [sa1_8.gif]

  10. Please note that the solid which has been placed into the virtual wind tunnel can be replaced by some other body. You can choose it from the store cupboard - a folder where objects of different shape are stored. To access the store cupboard, click on an empty space in the graphic window. You will then see the following in the top part of the window opened.

    [sa1_9.gif]

  11. Click on the 'store cupboard' tab and you will see which objects such as the following which you can place in the VWT i.e. the Virtual Wind Tunnel. [What you will in fact see, depends on what files having .dat, .3ds, .stl extensions are currently in your /gateways/vwt folder.]

    [sa1_10.gif]

    We do not recommend that you change the object now: you can experiment later and then run PHOENICS with different objects placed in the VWT.

  12. However, the 'wind tunnel setting' tab is probably worth discussing. The next picture shows how it looks like.

    [sa1_11.gif]

    The initial velocity is here set by a parameter 'windspeed'. Initially it is equal to 2 m/s as was found out when we discussed the inlet velocity and as the number to right of the box shows. You can change it entering a new value in place of 'windspeed' in the 'Speed' box. You can as well tilt the body inside the VWT specifying the angle of attack. For example, the body will be put upside-down when the angle of attack is 180 degrees, but not in case with the sphere.

  13. Apart from the green sphere representing the point of the coordinate system origin, you will see another, this time red-sphere object.

    [sa1_13.gif]

    This is called 'monitor' and it marks the position for which 'spot values' are displayed on the graphical monitor when the Solver is making a run. We shall return to this point later, having started the simulation process.

3. Making the simulation

Click on 'Options' in the Menu bar, and then on 'Run Solver'. Then, in quick succession, you will see evidence on the screen of:

4. Inspecting the results

After the calculation is finished, the user is again taken to the Prelude Graphics window to explore the results obtained. It was already mentioned in the beginning that for the stand-alone VWT Gateway Prelude is the only module needed for editing settings and display of results by means of the VTK.

VTK stands for the Visualization Toolkit that is is an open-source, freely available software system for 3D computer graphics, image processing and visualization. VTK supports a wide variety of visualization algorithms including scalar, vector, tensor, texture, and volumetric methods; and advanced modeling techniques such as implicit modeling, mesh smoothing, cutting, contouring, and others.

We shall use it for display of the simulation results inside Prelude itself, without being in need of some other display module.

  1. When the graphics window is again opened after the simulation, it will look a bit differently and as follows:

    [sa1_12.gif]

    The objects tree contains a new object now, called vtkphi and a small white tetrahedron (a default VTK probe) appeared behind the monitor object in the Graphics window. This probe sets the default position of the cutplane that becomes visible if you click on the sign "+" to the right of the vtk object (vtkphi).

  2. Select the cplane, standing for "cut plane", i.e. a plane where the calculation results will be displayed.

    [sa1_14.gif]

  3. Now click on the object properties button [immov.gif] to open the window as follows.

    [sa1_18c.gif]

  4. Let us first choose the variable that we shall display on the cplane. The first variable chosen by default is pressure, P1. This can be confirmed if you click on the 'Scalar Properties' tab to get a picture like this one.

    [sa1_15.gif]

  5. Let us display pressure contours on the cplane. To do so, click on the Cutplane tab, then select the Y Contour box, i.e. along the VWT

    [sa1_18d.gif]

    to get a picture like this one.

    [sa1_18e.gif]

  6. It will be more interesting, however, to display the results for velocity. It is necessary first to make this variable a default one. Click on the Scalar Properties tab, then on the PlotScalar button and choose VABS from the list standing for absolute velocity.

    [sa1_18f.gif]

    Let us now display what is really of interest about velocity. And we shall again display the calculation results on the cutplane along the the VWT.

  7. Select the contour box and you will get the picture like this one.

    [sa1_18g.gif]

  8. If you prefer to display the lines of constant velocity, select the 'Lines' box to get the picture as follows.

    [sa1_18h.gif]

  9. Eventually you can as well display velocity vectors if you select the 'Vectors' box.

    [sa1_18i.gif]

  10. You may as well display the results in other planes, in the VWT cross section, in boxes to the right of the x grid one, and those to the right of the z grid box, or even in three coordinate planes. Other display controls in this window are:

  11. We remind you that the results of the simulation were saved in your working directory. In order to open them again without being in need of repeating the simulation, do the following. First close the present Prelude window clicking on the top right cross.

  12. Answer 'yes' or 'No' to the invitation 'Save the unsaved changes'

    [sa1_18j.gif]

  13. and open Prelude in already familiar way.

  14. To load your case, click on the tab 'Load other' and you will be asked to run any file having extension *.q1, *.q3 or *.psc from your working directory.

    [sa1_18k.gif]

  15. Open the vwtpscrun file and your case will be loaded.

  16. Then display the object tree clicking on the corresponding button [treen.gif] in the tool bar.

  17. Click on the VTK button [vtk.gif] and open the familiar phi.vtk file from the 'Choose VTK results file' window. The phivtk object together with its cplane will be displayed in the object tree and you can make similar steps starting with item b in this section.

5. Concluding remarks

In this tutorial, the already-made settings were inspected but not varied.

In the tutorials which follow, instructions will be given as to how the settings can be changed; and the effects of these changes will be illustrated.