PRELUDE Tutorial VWT4
Simulating flow around a simple object - two-dimensional case

Summary

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 fourth tutorial (VWT4) in the VWT series will explain how, making use of the symmetry of shape for an object inside the Virtual Wind Tunnel, transform the existing three-dimensional flow pattern into a two-dimensional one.

Contents

  1. How to start
  2. Making a simulation and inspecting results for the half-cylinder test-item
  3. Making a series of runs
  4. Inspecting results for the series of runs
  5. Saving the results of your work
  6. Concluding remarks

1. How to start

  1. Start the Prelude Editor in any of the ways described in earlier Tutorials.
  2. Type into the casename box the words, say, 'VWTd' to distinguish the present case from the previous one. You may also wish to create another working directory for a new case by any possible means accepted by your computer's operating system.
  3. Click on the button 'Load Other..' and navigate to the folder, which was your working directory during the previous session with the half-cylinder test-item, to select the corresponding Q3 file.
    If this is your first session or for some reason you did not keep the results of your previous work, go to /phoenics/d_prelud/VWT and select cyl.q3 - the corresponding file which we created for you. The Prelude Editor will open the virtual wind tunnel (VWT) with already familiar half-cylinder test-item, only one-half of it being inside the domain, i.e. inside the VWT.
    [im1.gif]

  4. The purpose of this tutorial is to help a user convert a three-dimensional case into a two-dimensional one when it is possible. The advantage of this operation is evident:
  5. Such conversion will be achieved if we simply prohibit the flow to move either above or below the test-item, i.e. if we reduce the Z-size of the domain to the Z-size of the test-item.
  6. So click on the object tree icon [treen.gif] to reveal it, and select the 'DOMAIN' object.
  7. Then click on the red-tick icon [immov.gif] in the tool bar. You will see that the domain sizes are as follows.
    [im2.gif]

  8. Make the domain Z-size equal to that of the test-item to get what follows.
    [im3.gif]

    As you can see the half-cylinder fits the domain exactly and no flow is possible either on top or below it.

2. Making a simulation and inspecting results for the half-cylinder test-item

Let us run this case without introducing further changes to default settings.
  1. Click on 'Options' in the Menu bar, and then on 'Run Solver'.
  2. In the end of the simulation process the solver will close and the PHOENICS Viewer Package will present the image shown here:
    im2.gif

  3. 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, the VR-Viewer.
  4. 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.
  5. Then click the contour.gif icon, which selects pressure contour plotting. You will see a picture like this:
    [im4.gif]

  6. You can change the Z-coordinate of the probe (the red-and-yellow pencil) clicking on either arrow to the right of the Z-box on the Control Panel.
    [im5.gif] Changing Z from zero to unity will result in the same image of pressure contours.

    The symmetry of the test-item shape about the constant Y-plane coming through its center, enabled us to make simulation for one half of the test-item only. (See VWT3 Tutorial.)

  7. It would be also interesting to display velocity vectors clicking on the velocity vector toggle [velocity.gif]. You will then see a picture like this.
    [im6.gif]

  8. For better visualization of velocity vectors let us change vector options by increasing the vector scale factor. Right-click the velocity vector icon in the tool bar or in the Control Panel to open the Viewer Options window.
    [im7.gif]

  9. Click and hold the upper button to the right of the scale factor box to increase vectors until you can clearly distinguish them.
    [im8.gif]

    It is obvious that behind the half-cylinder test-item there is a low-pressure region with a swirl flow being formed there.

  10. Close the VR Viewer window, clicking on the top-right cross, and return to the Prelude Editor. Click 'OK' in the 'Exit PHOENICS' window.
  11. Open the Prelude window which might now display the result file. At the very bottom of the file you will see the following:
    [im9.gif]

    Pay attention to the calculation time which is 6 seconds.

  12. Switch on to the graphics window by clicking on the 'Graphics' tab.
  13. Click on the object tree icon [treen.gif] to reveal it, then select the 'CELLGRID' object.
    It is now time to mention that the accuracy of the results obtained depend on the calculation grid fineness: the smaller are the grid cell sizes, the more accurate will be the results we shall get.
  14. Click on the 'red-tick' icon [immov.gif] in the tool bar to show its attributes.
    It will result in the picture like this.
    [im10.gif]

    The number of cells in X-direction is 37, there are 8 cells both in Y- and Z-direction.

  15. As we have found out after the simulation, the flow pattern is the same on each constant Z-plane, what makes us possible to change the cell numbers in each box. Let us have only one cell in Z-direction and double the number of cells both in X and Y-direction. See the picture below.
    [im11.gif]

  16. Now run the Solver by clicking on 'Options', then on 'Run Solver'; after that repeat all the other steps of your first run.
  17. In the VR Viewer window we advice you to display the same image, viz pressure contours on a constant Z-plane with velocity vectors, to admit of comparison of the results obtained.
    [im12.gif]

    As you can see, although quantitatively pressure values did not change very much, qualitatively pressure contours became more intricate.

  18. Let us also display forces and moments acting on the test-item for easier comparison of the results. Click on the test-item to select it, then right-click to display the contextual menu and select the 'Show results' command. At the very bottom you will read the following.
    [im13.gif]

  19. 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.
    [im14.gif]

    The calculation time has been even reduced to 2 seconds at the expense of diminution of the number of cells in Z-direction.

  20. 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'.

3. Making a 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.
  1. In the Prelude Editor window click on the 'Functions' 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.
  2. In the 'Add' box type the word 'factor' and click 'OK'.
  3. Set the type of this parameter to 'int', meaning 'integer', and its initial value to '3'.
    [im15.gif]

  4. Return to the 'Graphics' window clicking on its tab.
  5. In the cellgrid attributes window let us restore the initial values for cells in X- and Y-direction multiplied by the function called 'FACTOR'.
    You should get the following.
    [im16.gif]

    You can see X Cells and Y Cells values have been tripled as compared with their initial numbers. The picture confirms this.

  6. Now click the 'Make Runs' tab above the graphics window.
  7. 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'. Then specify how this function will vary in the series of runs, say from its initial value '3', to '5' with a step of '1'. You will have a picture like this.
    [im17.gif]

  8. Finally click on the 'Run Solver for cases' button.
  9. Simulations for three cases (FACTOR equal to 3, 4 and 5) will be made one after another. To get access to their results, return to the 'Make runs' window to see the following.
    [im18.gif]

  10. Clicking on a corresponding button you will view the results of each run. We are going to compare these, displaying pressure contours on a constant Z-plane and forces and moments on the test item. In the end we shall give the time of calculation.
  11. In the end we shall provide you with the results obtained with FACTOR=20. That means that the number of cells in X- and Y-direction are 740 and 160, respectively. At the same time we increased the number of sweeps, i.e. iterations, for this very run from 50 to 200, going to the 'Functions' tab and there setting LSWEEP - the number of iterations - to 200.
    [im26.gif]

    That has been done because for a larger number of cells more iterations are needed to achieve convergence.

You can continue experimenting and expand the range of FACTOR variations further, if you wish. The final solution will be attained when the fineness of the grid does not affect the results of simulation any longer.

We suggest that you should stop here, although judging by graphical and numerical results the accurate solution has not been obtained yet. However, balancing between achieving more accurate results and spending larger time on simulation, we advice you to keep to the "golden" mean and not be carried away by excessive desire for accuracy. All CFD simulations are based on certain physical and mathematical assumptions; thus their accuracy is always limited.

4. Inspecting results for the series of runs

You can find numerical results of all the simulations made in your working directory that could look like what follows.
[im25.gif]

Pay attention to the subfolders created inside your working directory: they contain all the files created by PHOENICS for each run. The one that is called 'result', which can be opened with any text editor (Notepad, for example), contains numerical results of each run.

You can find there information on forces and moments on the test-item, as well the machine time needed for simulation. It is indeed the file which is visible in the Prelude screen, immediately a PHOENICS run has been completed.

5. Saving the results of your work

If you intend to return to the present case in future and continue investigate further, all the changes that you have introduced to the domain, test-item and grid settings should be saved. Otherwise you will have to repeat all your previous work in the Prelude Editor once again. Consult the previous VWT Tutorials how to do it.

6. Concluding remarks

In this tutorial,