PRELUDE Tutorial VWT3
Simulating flow around a simple object
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 third tutorial (VWT3) in the VWT series explains how to make use of the symmetry of shape for an object inside the Virtual Wind Tunnel, so as to reduce the computer time.
[ Tutorial created by Elena Pankova, July 2008 ]
- How to start
- Making a simulation and inspecting results for the half-cylinder test-item
- Saving the results
- Making a simulation for the sphere test-item
- Inspecting results for the sphere
- 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, 'VWTc' to distinguish the present case from the previous one. You may also wish to create another working directory for any new case.
You may create it either 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.
- Leave 'No' in the box asking 'Pause at end of run?' and click on 'Next'.
- 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. Making a simulation and inspecting results for the half-cylinder test-item
Let us run this case without introducing any changes to default settings. To do so,
- Click on 'Options' in the Menu bar, and then on 'Run Solver'.
- In the end of the simulation process the solver will close and the PHOENICS Viewer Package will present the image shown here:
- Click on 'OK' in the 'File names' window, thus accepting the default files for presenting the results of the simulation by another module of PHOENICS - VR Viewer.
- Let us display pressure contours on a constant-Z plane. For that purpose click the 'Z' button on the Control Panel or on the tool bar.
- Then click the icon, which selects pressure contour plotting.
You will see a picture like this:
The symmetry of the test-item shape about the constant Y-plane coming through its center, has resulted in the symmetry of the results obtained. (See VWT2 Tutorial.)
- This property enables the calculation time to be reduced by making flow simulation around one half of the test-item only.
- Close the VR Viewer window, clicking on the top-right cross, and return to the Prelude Editor. Click 'OK' in the 'Exit PHOENICS' window.
- Reveal the Prelude window which might now display the result file.
At the very bottom of the file you will see something similar to the following:
Pay attention to the calculation time which for our case is 16 seconds.
- Switch on to the graphics window by clicking on the 'Graphics' tab.
- Click on the object tree icon to reveal it, then select the 'DOMAIN' object.
- Click on the 'red-tick' icon in the tool bar to show its attributes.
It will result in the picture like this.
The domain sizes depend on the test item x-size.
- Now we need to reduce the calculation domain by one-half in Y-direction by typing '1' in the Ysize box as is shown in the picture.
- The next step to fulfill is to place the test-item exactly in the same position in Y-direction of the changed domain.
Select the test-item clicking on it either in the object tree or on the graphisc screen. Then open the 'Pos' tab. The position attributes of the test-item in the modified domain are as follows.
The Y co-ordinate of its center (YPar mid) is located exactly in the domain center in Y-direction.
- To have the same Y-position of the test-item we need to remove its half from the domain, i.e. to increase its Ypos twice, simply typing '1' the Ypos box to result in the picture like this.
Rotate the picture with the mouse left button to have a better view of the test-item, one-half of which is now inside and the other - outside of the calculation domain.
- Now run the Solver clicking on 'Options', then on 'Run Solver' and after that repeat all the other steps of your first run.
- In the VR Viewer window we advice you to display the same image - pressure contours on a constant Z-plane - to permit comparison of the results obtained.
- As you can see, only one-half of the test-item has been simulated and the results of your second run are in good agreement with those of the first one.
- Let us now close the VR Viewer window and return to the Prelude Editor. At the very bottom of the opened tab with the result file you will see the following.
Comparing the calculation time of 9 seconds with the previous 16 seconds, we may establish the fact of actual reduction of the calculation time when flows around symmetrical bodies are simulated.
3. Saving the results
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, you can save the settings which you made during your Prelude session if you wish to return to this case later.
- In the Prelude Editor window click the 'File' button of the menu bar and then on 'Save Q3'.
- If for some reason you did not give a specific name for this case or did not create a specific folder for it, you may do all these now, using the 'Save Q3 as...' command of the 'File' menu. This command allows your settings to be saved and stored in any existing folder or in a new one, if you will create it.
4. Making a simulation for the sphere test-item
Let us now return to the case that was discussed in the VWT2 tutorial. Click here to refresh it in your memory. The sphere is an interesting object from the point of view of its symmetry: it is symmetrical about all three co-ordinate axes. This fact allows us to simulate not one-half but one-quarter of the sphere and thus reducing the calculation time still more.
- If you are still inside the Prelude Editor, switch to the graphics mode clicking on the Graphics tab to display the half-cylinder object of the previous run partly removed from the domain. You might also wish to start from the very beginning - in this case repeat all the steps of the Chapter 1.
- Click somewhere on the graphics screem to make the word 'Director' appear in the top-right part of the graphics window.
- Click on the red-tick icon in the tool bar and after that open the store_cupboard tab.
- Click on the sphere icon to replace the half-cylinder object inside the virtual tunnel. You will have a picture like this.
- Because the half-cylinder object was partly moved from the domain during our previous session, note that the sphere, which appeared in the tunnel, has retained this position. If you are starting a new session from the very beginning, you will have to repeat the corresponding steps (from 'j' to 'n' of the Chapter 2).
- It is now necessary to make similar actions with respect to Z-direction.
Click on the 'DOMAIN' object in the object tree to select it.
- Reduce the calculation domain by one-half in Z-direction by typing '1' in the Zsize box as is shown in the picture.
- Select the sphere object clicking on it in the graphics window or selecting the test-item in the object tree.
- Open the 'Pos' tab and you will see what follows.
- To have the same Z-position of the test-item we need to remove its half from the domain, i.e. to increase its Zpos twice, simply typing '1' the Zpos box to result in the picture like this.
The 'sphere' object has partly 'jumped' off the domain and only one-quarter of it is now inside it.
- Now run the Solver by clicking on 'Options', then on 'Run Solver' and after that repeat all the previous steps.
5. Inspecting results for the sphere
- Now let us compare the new results with the previous ones.
As you can see, the results are in good agreement.
- pressure contours on a constant X-plane
In the previous case they look like
- pressure contours on a constant Y-plane
For the whole sphere they were like
- pressure contours on a constant Z-plane
For the whole sphere they were
- Close now the VR Viewer window and return to the Prelude Editor.
You will see the result file tab open.
The calculation time of 6 seconds proves that making use of the symmetry feature of the test-item inside the virtual wind tunnel we were able to reduce the time of calculation by more than one half.
You may ask why the reduction was not to one quarter of the previous computer time. The answer is that the calculation was carried out with a very coarse grid. Reductions nearer to one quarter would be obtained, the greater the number of cells employed.
6. Saving the results of your work with PRELUDE
You can save the results of your work if you intend to return to them later in a way that has already been described in previous VWT tutorials or earlier in this one.
7. Concluding remarks
In this tutorial,
you studied how, making use of the symmetry feature of symmetrical bodies, reduces the time of calculation.