PRELUDE Tutorial VWT2SA
Simulating flow around a simple object
Author: E.O. Pankova, Moscow Baumann State Technical University
In this tutorial, you will continue learning how to use PRELUDE's Virtual-Wind-Tunnel
Gateway to simulate the flow around a sphere inside the Virtual Wind Tunnel, but making use of the symmetry of its shape, so as to reduce the computer time.
- How to start
- Making a simulation and inspecting results for the sphere
- Saving the results
- Concluding remarks
1. How to start
- Start the VWT Gateway of the Prelude Editor in the way described in the VWT1sa Tutorial, either by running the gateway script provided by CHAM or the vwtpscrun file which was saved in your working directory during the session described in the VWT1sa 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 your previous directory 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 sphere) in the virtual wind tunnel in the graphics window.
2. Making a simulation and inspecting results for the sphere
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 you will see again the graphics window of Prelude.
- The results of your simulation are stored in a special file named result. We are not going here to explain its contents in detail, but shall note one one point only: the computer time required for this simulation. To have access to the result file, go to 'Edit' and select the 'Show file' command from the pulldown menu. As a consequence, you will see the result file on your screen instead of the graphics window.
- Go to its very bottom to find out that the calculation time was 78s.
- Now click on the Graphics tab to return to the graphics window.
- Click on the icon in the
toolbar to make the object tree visible, expand the vtkphi clicking on its sign "+" and select cplane, i.e. the plane where the results of simulation will be displayed.
- Click on the object properties button, then on Scalar Properties tab to be sure that the variable to be plotted is pressure.
- Then click on the Cutplane tab and display pressure contours on y-plane selecting the corresponding box.
- 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.
This property enables the calculation time to be reduced by making flow simulation around one half of the test-item only.
- Switch off the displayed contours clicking on the 'None' box in y-direction.
- Select the 'DOMAIN' object in the object tree, click on the 'red-tick' icon in the tool bar to show its attributes, then click on the Size tab.
It will result in the picture like this.
The domain sizes depend on the test-item sizes, more precisely on its radius.
- To ascertain that the test-item sizes are the same in every direction, select it in the object tree and open the Size tab for the sphere.
The sphere has the same size along every coordinate axis, as it should, equal to 1m.
- Select the DOMAIN object once again in the object tree. Now we need to reduce the calculation domain by one-half in Y-direction by typing in the Ysize box what is shown in the picture.
The domain has become narrower in Y-direction.
- The next step to fulfill is to place the test-item exactly in the same position in Y-direction of the changed domain.
Select testitem by clicking on it either in the object tree or on the graphics 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, 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 y-plane - to permit comparison of the results obtained.
However, it is first necessary to place the cutplane in the same position as it was before. The cutplane position is shown by the VTK probe, i.e. by the white tetrahedron before the sphere.
By default it is set to enable the cutplane go through the domain centre. But because the y-size of domain has been changed and the position of the sphere also (it is now present in the calculation domain with one half only), the Y-position of the cutplane should be changed too.
Display the properties of the cutplane (if they are not displayed on your screen) clicking on the red-tick button in the tool bar to get the following.
You can see that the Y-cutplane goes throught the domain centre.
- In order to place it in the exactly same place as before, you should increase its Y-position twice, thus making it coincide with the VWT rear wall.
- Having now repeated your actions of item h of this section, you will have the following picture.
As you can see, only one-half of the sphere has been simulated and the results of your second run are in good agreement with those of the first one. And what was the calculation time?
- Let us now examine the result file. Having made what was described in items c and d of this section, you will see the following.
Comparing the calculation time of 37 seconds with the previous 78 seconds, we may establish the fact of actual reduction of the calculation time when flows around symmetrical bodies are simulated.
- Let us now close the result file and return to the graphics window.
- It might be established that our test item, the sphere, is as well symmetrical about the Z-plane too. It is so worth doing similar steps for Z-direction. We shall not describe those in detail and show intermidiate pictures, but show here only the most important ones.
- The initial pressure contours on Z cutplane can look as follows.
- If you run the case with one-quarter of the sphere placed in the VWT, you will have the following result.
- The calculation time in this case will be as follows.
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.
Such being the case, we suggest that you create each time a new working directory that will keep the results of your runs until you wish to delete them.
4. Concluding remarks
In this tutorial,
you studied how, making use of the symmetry feature of symmetrical bodies, to reduce the time of calculation. in this particular case with the sphere the calculation time has been reduced four times.