PRELUDE Tutorial VWT2
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.
- How to start
- Changing the background color
- Exploring the store cupboard
- Adding other objects to the store cupboard
- Making the simulation
- Inspecting the results
- Saving the results of your work with PRELUDE
- Concluding remarks
1. How to start
- 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.
- 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 icon in the tool bar.
- 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.
- 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.
- Click on 'Options - Set Background Color' in the Menu bar to open the following panel:
- Then click on the 'Top' button to select the color you prefer for the top part from the following Color Palette:
- Do the same for the bottom part using the 'Bottom' button of the 'Change Background Color' window.
- 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.
- To access the store cupboard, click on an empty space in the graphics window and then on the 'red-tick' icon in the tool bar. You will then see the following in the top part of the window opened.
Click on the 'store cupboard' tab and you will see which objects you can place
in the VWT, i.e.
the Virtual Wind Tunnel.
- 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.
- 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.
- 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.
- 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.
- Let us open the EQUIPMT sub-folder and select files for the airfoil object, which is often placed in the tunnel for simulation.
- Copy the selected files to C:/phoenics/d_prelud/gateways/vwt.
- Restart Prelude and open the VWT Gateway.
- Click on an empty space in the graphic window and then on the 'red-tick' icon in the tool bar.
- 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
- Click on 'Options' in the Menu bar, and then on 'Run Solver'. Then, in quick succession, you will see evidence on the screen of:
- the running of the PHOENICS Pre-Processor module (SATELLITE) in non-interactive mode, while it processes the information provided for it by PRELUDE;
- the activation and running of the PHOENICS Solver Module (EARTH) while it processes the information which it has received from SATELLITE;
- the drawing of already familiar computation plots, which appear, when the computation is finished, thus:
To those interested in such matters, it may here be remarked that:
- The curves in the left-hand panel represent the maximum values of each of the solved-for variables to be found anywhere in the domain; those in the right-hand panel show their minimum values.
- Which curve corresponds to which variable? This can be established by comparing their colors with those used for printing the names of the variables (P1, U1, V1, W1, TEM1) in the central column in the lower part of the screen.
- Other columns of interest are those headed 'Dom.Max.' and 'Dom.Min.', which contain the actual values of those quantities at the end of the run; and the columns headed 'Change', immediately to the right of them, which represent their changes in value between the last-but-one sweep and the very last.
- In CFD parlance, these curves show that the calculation has satisfactorily 'converged'.
- 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:
- 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:
- Click the icon, which selects pressure contour plotting.
- Click the 'X' button to select 'contours on constant-x planes'.
- 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.
- 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 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 button. The picture will look like this:
- 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 button again and then switch to the 'Select pressure' mode clicking on the 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.
- 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,
- click on 'Object Management' button in the Control Panel,
- select the object 'test-item' (it is the sphere),
- 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.
- 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.
- There, in order to save your settings, click the top-left 'File' button
and then on 'Save Q3'.
- To prove that your settings have been saved, quit PRELUDE by clicking
on the white-on-red cross (top-right).
- 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,
- you explored the store cupboard and learnt to replace the object inside the virtual wind tunnel by others from the store cupboard;
- you also discovered how to add other objects to the store cupboard;
- in the end you made a simulation and observed the symmetry of the results obtained for symmetrical bodies inside the virtual wind tunnel.