Simulating flow around a simple object (continued)


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

The second tutorial (VWT2) in the VWT series will explain how to change the object inside the Virtual-Wind-Tunnel.


  1. How to start
  2. Changing the background color
  3. Exploring the store cupboard
  4. Adding other objects to the store cupboard
  5. Making the simulation
  6. Inspecting the results
  7. Saving the results of your work with PRELUDE
  8. Concluding remarks

1. How to start

  1. Start the VWT Gateway of the Prelude editor in any of the ways described in the VWT1 Tutorial, either by running the gateway script provided by CHAM or the vwta.q3 file which you saved in your working directory during the session described in the VWT1 Tutorial.

  2. If you are running the initial script, type into the casename box the words, say, 'VWTb' to distinguish the present case from the previous one. You may also wish to create another working directory for any new case.
    You may either create it by any possible means before this Prelude session or acting in a similar way within the Prelude Editor, i.e. clicking on File - Open in the Menu bar or else on the Open open.gificon in the tool bar.

  3. In the drop-down menu of the 'Edit' button, select 'Set Working Directory' and navigate thereafter either to this new folder; or to /phoenics/d_prelud/my_cases if you prefer not to change it.
    Click on that folder. It will remain your working directory for PRELUDE until you change it again.

  4. After the case is loaded, you will see a familiar test-item (a half of a cylinder) in the virtual wind tunnel in the graphics window.


2. Changing the background color

Your background may look different from that in the previous picture. In our case the background has a gradient filling of two colors: dark blue in its top and light blue in the bottom. Your background can be filled either with one color or two as in our case.
  1. Click on 'Options - Set Background Color' in the Menu bar to open the following panel:

  2. Then click on the 'Top' button to select the color you prefer for the top part from the following Color Palette:

  3. Do the same for the bottom part using the 'Bottom' button of the 'Change Background Color' window.

  4. After you have selected either two different colors for the top and bottom parts of the background to produce a gradient filling, or the same colors to have uniformly coloured filling, click on the 'Done' button and close this window.

    Note that after you have selected the first color, the 'Change Background Color' window will remain open, although it might be hidden behind your other open windows and you will have to minimize other windows to have that very one visible. However, it will be closed only after you click on the 'Done' button.

3. Exploring the store cupboard

So far the test-item placed in the virtual wind tunnel was represented by a half of a cylinder. You can easily replace it with some other solid by extracting one from the Virtual Wind Tunnel store cupboard; this is a folder where objects of different shape are stored.
  1. To access the store cupboard, click on an empty space in the graphics window and then on the 'red-tick' icon immov.gif in the tool bar. You will then see the following in the top part of the window opened.


  2. Click on the 'store cupboard' tab and you will see which objects you can place in the VWT, i.e. the Virtual Wind Tunnel.

  3. Now replace the existing test-item by another one, e.g. the sphere, by clicking on the corresponding button of the store cupboard. You will then see the following picture:


    Please note that the object has truly been replaced by a new one from the store cupboard.

  4. In order to explore its properties, click on this sphere to select it, and its position in the wind tunnel will be as follows:


    Then click on the size tab to reveal its dimensions,


    The object has equal sizes in X, Y and Z-directions, i.e. its radius is 1m.

4. Adding other objects to the store cupboard

The store cupboard is a useful folder where the necessary information about bodies that can be tested in the tunnel is stored. It is so organized that each time you choose any object there, it immediately replaces in the graphics window of Prelude the object previously located in the virtual wind tunnel.

According to the VWT script (i.e. the file which defines the VWT Gateway), it is not possible to delete the test-item. To simulate flow around a body in the tunnel, a body should be there! But it is possible to replace the body introduced into the tunnel by default by others which you would like to test.

It also possible to expand the store cupboard by storing there information about all the objects you would like to test in the virtual wind tunnel in future.

  1. First of all, let us examine where and how the information about bodies to be introduced into the tunnel is stored. From the earlier picture showing the present contents of the store cupboad we know that this information is stored in C:/phoenics/d_prelud/gateways/vwt. That is how its contents looks like in part, when opened in the Windows environment in 'thumbnail' mode.


    Each object is presented by two files - a graphical JPG-file where the image is stored and a text DAT-file with the numerical information about its shape. To introduce new objects to this folder, we need simply to place there the corresponding JPG and DAT files.

  2. Where can you find these files? As a matter of fact, this is not difficult. You will not be forced to create these files as PHOENICS already has lots of objects presented in this form. They are stored in C:/phoenics/d_satell/D_OBJECT/PUBLIC.


    Examine the sub-folders and you may find objects which might be of interest for simulation.

  3. Let us open the EQUIPMT sub-folder and select files for the airfoil object, which is often placed in the tunnel for simulation.


  4. Copy the selected files to C:/phoenics/d_prelud/gateways/vwt.

  5. Restart Prelude and open the VWT Gateway.

  6. Click on an empty space in the graphic window and then on the 'red-tick' icon immov.gif in the tool bar.

  7. Open the store cupboard clicking on the 'store cupboard' tab. You will see the objects and find out the the airfoil is already there:

    Experiment with adding other objects to the store cupboard and placing them thereafter into the virtual wind tunnel. However, do not forget to restore the sphere object in the end, as all that follows will be connected with flow simulation around the sphere.

5. Making the simulation

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

    To those interested in such matters, it may here be remarked that:

  2. In CFD parlance, these curves show that the calculation has satisfactorily 'converged'.

  3. Click now on the 'END' button, below the right-hand panel. Then the solver will close and the PHOENICS Viewer Package will present the image shown here:


  4. Now click on OK thus accepting the default files for presenting the results of the simulation by another module of PHOENICS - VR Viewer. This will result in the following picture, in which you will recognise the sphere inside the tunnel which you last saw in the graphics window of PRELUDE:


4. Inspecting the results

How to use the PHOENICS Viewer package is a large subject, for which separate tutorials exist. A useful introduction can be found in the on-line document TR324.

However, the following suggestions are made to the newcomer to PHOENICS who wishes to see immediate evidence that he or she has performed a CFD calculation:

  1. Click the contour.gif icon, which selects pressure contour plotting.
  2. Click the 'X' button to select 'contours on constant-x planes'.
  3. Click and hold one of the 'probe-position' arrows to the right of the 'x' box until the plotting plane is in front of the sphere. This will show a picture like this:


    Clearly evident is that the picture is symmetrical and the higher-pressure region is in the center of the object where the flow hits the sphere. Outside the central high-pressure region other concentrical regions of diminishing pressure are formed.

  4. Let us now explore pressure contours on constant-y plane that will go through the sphere center by clicking and holding y-'probe-position' arrow.


    The picture is also symmetrical and low pressure regions are located in the top and bottom of the sphere. That is quite understandable as these are the regions with highest values of velocities of flow inside the tunnel.

    This can be confirmed if you click on the 'Select velocity' button velocity.gif either in the tool bar or in the Control Panel. It is a good thing here to display also velocity vectors by clicking on the vector.gif button. The picture will look like this:


  5. Just for consistency, let us now examine pressure contours on a constant z-plane that also goes through the sphere center. To do so, toggle off velocity vectors by clicking on the vector.gif button again and then switch to the 'Select pressure' mode clicking on the pressure.gif button.

    You will have another symmetrical picuture looking like this:


    The results of the simulation confirm quite evident conclusion that for symmetrical bodies in the tunnel the results of simulation should be also symmetrical. In our case with the sphere there is symmetry with respect to all three coordinate axes. Let us keep this in mind to make use of it in the future.

  6. Although graphical displays of results provide much valuable information about flow patterns, etcetera, users may be often interested in numerical data, for example the forces exerted by the fluid on the object held in the wind-tunnel.

    To see how PHOENICS presents such data,

    1. click on 'Object Management' button object.gif in the Control Panel,
    2. select the object 'test-item' (it is the sphere),
    3. click on 'Action' and choose 'Show results' command from the list.

      The information about forces and their moments acting on the sphere will be displayed in a picture like this:

      As a result of your previous actions a text file will be created in your working folder, named 'Results for object TEST-ITEM', where from you can explore forces and their moments acting on the body any time without running VR Viewer or even Prelude itself, simply by opening it directly from your folder.

    6. Saving the results of your work with PRELUDE

    The results of your PHOENICS runs will all be found in your working folder, where they will remain until deleted or removed by you, or over-written by later runs with the same case name.

    However, the settings which you made during your interaction with PRELUDE will be lost unless you save them.

    1. If you are still in the VR Viewer inspecting the results of calculations, close its window by clicking the top right-hand button with the cross. This procedure will return you to the PRELUDE Controller window. Drag and pull by the title bar to activate the window if it is not activated.
    2. There, in order to save your settings, click the top-left 'File' button and then on 'Save Q3'.
    3. To prove that your settings have been saved, quit PRELUDE by clicking on the white-on-red cross (top-right).
    4. Restart PRELUDE; then, instead of 'Load Gateway', click on 'Load Other..'.


      Then navigate to your working directory, where you should find several files with names starting with 'vwtb'.
      Load the one called vwtb.q3, which is the one which you have just saved.

      You will see the following picture.

      The case that is loaded by PRELUDE is the one which you have just simulated.

    7. Concluding remarks

    In this tutorial,
    1. you explored the store cupboard and learnt to replace the object inside the virtual wind tunnel by others from the store cupboard;
    2. you also discovered how to add other objects to the store cupboard;
    3. in the end you made a simulation and observed the symmetry of the results obtained for symmetrical bodies inside the virtual wind tunnel.