PRELUDE Tutorial VWT5SA
Simulating flow around a simple object in VWT - two-dimensional case
Author: E.O. Pankova, Moscow Baumann State Technical University
Summary
In this tutorial of the VWT stand-alone gateway series we shall make use of the symmetry of shape for an object inside the Virtual Wind Tunnel to transform the existing three-dimensional flow pattern into a two-dimensional one, and explore how the calculation-grid fineness will affect the results of simulation.
To become more confident of the things you will do in this tutorial, we advise that you first consult the earlier tutorials where they were already explained in part.
For example, click
here to open the tutorial VWT4 where the 2-D case and the effect of the grid fineness were discussed but the results of simulation were displayed in the VR Viewer; and
here to access the tutorial VWT2sa where the symmetry of an object inside the VWT was used to reduce the time of simulation.
Contents
- How to start
- Changing initial settings for the half-cylinder test-item
- Making a test run
- Editing settings for a 2-D run
- Making a series of runs and inspecting results for the series of runs
- Saving the results of your work
- Concluding remarks
1. How to start
- In the present tutorial of the VWT stand-alone series we shall use some settings of the previous tutorial, VWT4sa. Click here to refresh your memory.
- Run Prelude in the ordinary way.
- Click on the button 'Load Other..' and navigate to the folder, which was your working directory during the previous session.
Note that the first window to open will be that of the directory you have created for your previous run.
- Choose the latest script file in the list, e.g. vwtpscrunrun, as it is the file that contains all the changes introduced into the initial script file, vwtpscrun. You will see when the case is loaded that it is exactly the case which we need.
2. Changing initial settings for the half-cylinder test-item
- Click on the object tree icon
to reveal it.
- Then click on the red-tick icon
in the tool bar. You are now ready to edit initial settings of the objects presented in the object tree.
- We shall here remind you once again of the changes made to default settings of the 'half cylinder' case:
3. Making a test run
- Let us first of all make a test run with the above settings to confirm the relevance of our selecting three-fold increase of the domain Y-size as compared with the X-size of the test-item. In the previous tutorial while examining the effect of this parameter on the simulation results we tried the factor of five and seven to confirm the appropriate domain Y-size. There should be a proper balance as a larger parameter reduces the domain-size effect on the simulation results but increases the machine time.
- Click on 'Options' in the Menu bar, and then on 'Run Solver'.
- After some time the solver will close and you will see again the Graphics window of Prelude.
- Display the cut plane, clicking on the sign '+' to the left of the vtkphi object. Then select the cplane in the object tree.
- We shall now display similar results on the cut plane.
If you compare these images with those obtained for the factor equal to five or seven, you will find that qualitatively they are rather similar. This fact allows us to restrict the Y-size of the domain to the parameter only three times larger than the X-size of the test-item with all the advantage of lesser computer time.
You can find out what the time was, if you open the result file with the results of simulation created after each run.
4. Editing settings for a 2-D run
Analyzing the pictures for Z-plane we can say that they are symmetrical about the constant Y-plane coming through the test-item center because of the symmetry of the test-item shape about the same plane. It is so possible to reduce the calculation time by making flow simulation around one half of the half-cylinder only.
- Because the half-cylinder fits the domain exactly and there is no flow either on top or below it, we can reduce the number of cells in Z-direction to one cell only. So click on the cellgrid object in the object tree to select it and you will see that the present configuration of the grid is as follows.
![[sa5_9.gif]](vwt5sa/sa5_9.gif)
There are 110 cells in X-direction, 60 - in Y-direction, and 10 - in Z-direction.
- Change the ZCells to unity to get what follows.
![[sa5_10.gif]](vwt5sa/sa5_10.gif)
- Reduce the calculation domain size by one-half in Y-direction by adding '*0.5' in the Ysize box as is shown in the picture.
![[sa5_11.gif]](vwt5sa/sa5_11.gif)
- It is now necessary to 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 graphics screen. Then open the 'Pos' tab. The position attributes of the test-item in the domain are as follows.
![[sa5_12.gif]](vwt5sa/sa5_12.gif)
- 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 removing '/2.' from the Ypos box to result in the picture like this.
![[sa5_13.gif]](vwt5sa/sa5_13.gif)
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.
It is convenient to to test the accuracy of the results obtained by making a series of runs. We already explained how to do this in the 'VWT1 Tutorial' and in the 'VWT4 Tutorial'.
5. Making a series of runs and inspecting results for the series of runs
In this series of runs we are going to increase the number of cells in X- and Y-direction proportionally, leaving each time only one cell in Z-direction.
- In the Prelude Editor window click on the 'Parameters' tab. We are going to introduce a new function - a coefficient that will be changed during each run and during each run a new number of cells will be obtained by multiplication of the base number by a specific value of this coefficient.
- In the 'Add' box type the word 'factor' and click 'OK'.
- Set the initial value of this parameter to '1'.
![[sa5_14.gif]](vwt5sa/sa5_14.gif)
- Return to the 'Graphics' window clicking on its tab.
- In the cellgrid attributes window let us increase the number of cells in X- and Y-direction multiplying the initial values by the function called 'FACTOR', leaving the Z Cells box unchanged.
You should get the following.
![[sa4_15.gif]](vwt5sa/sa5_15.gif)
The initial settings have not been changed as the initial factor value is unity.
- Now click the 'Make Runs' tab above the graphics window.
- Select the newly introduced function FACTOR from the list which will open if you click on the right-side arrow of the box 'Use these values to run a series of calculations'.
![[sa4_16.gif]](vwt5sa/sa5_16.gif)
- Then specify how this function will vary in the series of runs, say from its initial value '1', to '5' with a step of '2'.
![[sa4_17.gif]](vwt5sa/sa5_17.gif)
- Finally click on the 'Run Solver for cases' button.
- Simulations for three cases (FACTOR equal to 1, 3 and 5) will be made one after another. After their termination the 'Make runs' window will open again and you will see the following.
![[sa4_18.gif]](vwt5sa/sa5_18.gif)
- The easiest way to get access to the results of simulation is to click on a corresponding box. Let us examine the results of all three runs one after another, for which reason first click on the box 'FACTOR=1'. It will take some time while the corresponding VTK object with its cut plane is created. Switch to the Graphics window to get what follows.
![[sa4_19.gif]](vwt5sa/sa5_19.gif)
- Reveal the cut plane clicking on the sign "+" to the left of the relevant VTK object. You will then be able to display the results of simulation on the cut plane in already familiar way.
- pressure contours on the Y-plane
for the above positions of the cut plane;
- pressure contours on the Z-plane;
![[sa4_21.gif]](vwt5sa/sa5_21.gif)
- absolute velocity contours on the Z-plane.
![[sa4_22.gif]](vwt5sa/sa5_22.gif)
- You can find out what the machine time was if open the result file, clicking on "Edit" in the Menu bar, then on "Show File", then selecting the result file from the 'FACTOR 1-' folder.
![[sa4_23.gif]](vwt5sa/sa5_23.gif)
It will be loaded immediately and at its very bottom you will see what follows.
![[sa4_24.gif]](vwt5sa/sa5_24.gif)
Using the symmetry feature of the test-item the calculation time reduced to 4 sec.
- Such reduction in computation time enables us to increase the accuracy of the simulation results by increasing the number of cells in X- and Y-directions. Let us now display the results for the factor of three, i.e. when the numbers of cells in X- and Y- directions were tripled as compared with the previous ones. Get back to the 'Make Runs' tab and click on the box 'FACTOR = 3.0'. You will then have to repeat the actions described earlier. Omitting the details we shall only display the results of this run.
- pressure contours on the Y-plane
for the above positions of the cut plane;
- pressure contours on the Z-plane;
![[sa4_26.gif]](vwt5sa/sa5_26.gif)
- absolute velocity contours on the Z-plane.
![[sa4_27.gif]](vwt5sa/sa5_27.gif)
- The required calculation time from the result file.
![[sa4_28.gif]](vwt5sa/sa5_28.gif)
The above pictures show that although the tendency has been retained, quantitatively and qualitatively these results differ from the previous ones. We achieved this refinement at the expense of the increased computer time, which for this case was already 31 sec.
- We shall now show the results for the 'FACTOR = 5.0' in the same way.
- pressure contours on the Y-plane
for the above positions of the cut plane;
- pressure contours on the Z-plane;
![[sa4_30.gif]](vwt5sa/sa5_30.gif)
- absolute velocity contours on the Z-plane.
![[sa4_31.gif]](vwt5sa/sa5_31.gif)
- The required calculation time from the result file.
![[sa4_32.gif]](vwt5sa/sa5_32.gif)
The results of this run show still greater difference from these of the first run and the computer time has been increased to 204 sec.
6. Saving the results of your work
All results of the simulation will be stored in your working directory which for the series of runs will look similar to what follows.
![[sa4_33.gif]](vwt5sa/sa5_33.gif)
There are three folders each for the factor value given in its name.
You should only not forget to save the changes you have made to the initial settings, just saying 'Yes' to the invitation which appears each time when you close the Prelude editor window.
![[sa4_34.gif]](vwt5sa/sa5_34.gif)
- Then open Prelude in a usual way.
- When its window opens, click on the arrow to the right of the 'Recent Cases' button and run the latest script which will be on the top of the list opened if you made no other runs in-between.
![[sa4_35.gif]](vwt5sa/sa5_35.gif)
Your case will be loaded.
- Reveal the Object tree, clicking on its button, and expand the 'World' object clicking on its sign "+".
- It is now necessary to display the cut plane which can be done in three different ways.
- clicking on the VTK button in the tool bar;
![[sa4_36.gif]](vwt5sa/sa5_36.gif)
- selecting 'Open results for case' from the 'File' menu;
![[sa4_37.gif]](vwt5sa/sa5_37.gif)
- or selecting the same command from the 'Options' menu
![[sa4_38.gif]](vwt5sa/sa5_38.gif)
As a result of any of such actions you will be able after some time to choose the VTK results file.
- From the window that opens, browse to your working directory, choose any case you like, e.g. for the factor of 3 and open the 'phi.vtk' file there.
![[sa4_39.gif]](vwt5sa/sa5_39.gif)
- This will result in the VTK object appearing in the Object tree with its cplane where you can reproduce the results of run for FACTOR=3.0 in already familiar way.
![[sa4_40.gif]](vwt5sa/sa5_40.gif)
Similar actions can be made to display the results of any case from this series.
7. Concluding remarks
In the end of this long tutorial you have got the idea of how to make a series of runs with the purpose to increase the accuracy of your CFD calculation. It is necessary to have in mind that for any gain you must pay, in our case with increased computer time. There are means to reduce this disadvantage by converting the existing 3D problem into 2D one if the symmetry of the object allows this. However, the simplest advice will be this: introduce a finer calculation grid only in case of necessity when you really need accurate results and cannot be satisfied with qualitative ones.