Encyclopaedia Index

Flow Simulation. Step 1.

  • This tutorial shows how to set up and run the simulation of laminar flow of air with neither friction nor heat exchange at the walls.
  • The geometry is 2-dimensional, of (y-direction) depth 1.0 m, with the vertical (z-direction) dimension 1m and the horizontal (x-direction) dimension 2m :


    Preliminary remarks

    1. In addition to physically-meaningful data of the above kind, all CFD codes, and therefore PHOENICS also, require non-physical inputs such as:
      • a grid of computational cells;
      • instructions about how many iterations to make of the trial-and-error solution process;
      • how much data to print.
    2. The non-physical settings suggested below are such as to make the calculations rapid rather than accurate.
    3. Other tutorials will be provided which will enable you to explore the influences of the settings on accuracy and speed of calculation.

    Choosing the working directory

    Your working directory is the folder in which will appear all the files which the tutorial creates. Your first step will be to choose this by:
    1. clicking on the 'Top Page' of the Commander;
    2. clicking on the 'Customise' icon;
    3. clicking on the 'Choose Working Directory' icon, which will elicit a window such as this:

    4. Open the 'd_pc' folder (by clicking on its '+' sign) ; then 'tuts'; click on 'beginnrs' and then on 'OK'.
    Your working directory is now \phoenics\d_pc\tuts\beginnrs.

    Starting the tutorial

    First close any windows which are already running PHOENICS modules (Satellite, Earth or Viewer).

    Then activate the PHOENICS Satellite module, in its VR-Editor mode by entering the 'Run Modules' panel of the PHOENICS Commander, and then clicking the 'VRE' button.

    You can change the background colour, if you wish, by clicking on 'Options' - 'Background Colour' and then making your choice.

    In PHOENICS-VR Editor

    Set the domain size

    Select the working fluid

    Indicate for which variables solution is required

    Re-sizing the domain

    The domain no longer fits the screen; to resize, click on the pull-down arrow next to the 'R' icon on the toolbar; then 'Fit to window'.

    Introduce the required objects

    1. Introduce the INLET object

      • Click on 'Object', 'New' and New Object'.
      • Change name, if you wish, for example to MY_INLET (not more than 8 characters can be used)
      • Click on 'Size' and set SIZE of object as:
        • Xsize: 0.0
        • Ysize: 1.0
        • Zsize: 1.0
      • Click on 'Place' and note that the default Position of object (Xpos=0.0, Ypos=0.0, Zpos=0.0) need not be changed.
      • Click on 'General'.
        • Select 'Type': INLET.
        • Click on 'Attributes' and set the velocity in X-direction to 0.05 m/s.
        • Click on 'OK' to close the Attributes menu,
        • and on 'OK' in the Object Specification Dialogue Box.

    2. Introduce the OUTLET object

      • Click on 'Object', 'New' and New Object'.
      • Change name to MY_OUT, for example.
      • Click on 'Size' and set SIZE of object as:
        • Xsize: 0.0
        • Ysize: 1.0
        • Zsize: 1.0
      • Click on 'Place' and set Position of object as:
        • Xpos: 2.0
        • Ypos: 0.0
        • Zpos: 0.0
      • Click on 'General'.
        • Define 'Type': OUTLET.
        • Leave the default values in the Attributes dialogue box.
        • Click on 'OK' to exit the Object Dialogue Box.
        • Close the Object Management window by clicking the button with X in the top right-hand corner of the window.

      Set the grid

      Once the PHOENICS satellite has been told what objects are present, it sets a 'default' computational grid. This may or may not be satisfactory for computational accuracy.

      • Click on the 'Mesh toggle' button to display the default mesh on the screen. This shows subdivision in X-direction but none in Y or Z, because no indication has been given that variations in the latter directions exist.
      • Click anywhere on the image, and the 'Gridmesh settings' dialog box will appear. The grid in all three directions is set to 'Auto'.
        To understand what this means, click on the top-right '?', and then on the word 'Auto'. An explanatory screen will then appear.
        In the present case 'Auto' gives 20 cells in X, 1 cell in Y and Z.
      • This does not give a very interesting picture; therefore change the number of cells in Z-direction to 15. To do so, click on Z-Auto button to switch to Manual mode and then type the proper number in the corresponding box. Click on 'OK' to close the dialog box.
      • The mesh will now be shown as blue and red lines. The latter show the edges of the objects (or domain); the former are those introduced by PHOENICS.
      • Click on 'Mesh toggle' again to turn off the mesh display.

      The remaining solution-control parameters

      In later tutorials, you will be invited to click on 'Menu' and then on 'Numerics', in order to inspect and modify other solution-control parameters. However, the defaults which have been set will suffice for the present purposes.

    Running the Solver

    You are now ready to perform the simulation by activating the PHOENICS solver module (known as 'Earth').

    In order to do so, click on 'Run', 'Solver, and click on 'OK' to confirm.

    You will then see, in quick succession, indications on the screen of:

    Upon the end of the calculation, the VR Editor window will be displayed again.

    You are now able to launch the VR Viewer, in order to inspect the results of your calculation.

    Using the VR Viewer.

    Click on 'Run', 'Post processor',then GUI Post processor (VR Viewer) . Click 'OK' on the file names dialog to accept the default files.
  • To view:
  • To change the direction of the plotting plane, set the slice direction to X, Y or Z slice direction (927 bytes)
  • To change the position of the plotting plane, move the probe using the probe position buttons

    probe position (927 bytes).

    Alternatively, click on the probe icon probe.gif (903 bytes) on the toolbar or double-click the probe itself to bring up the Probe Location dialog.

  • One plot from this case is:

    The small differences of velocity (between 0.050002 and 0.049993) on this plot may be attributed to the small inaccuracies associated with all numerical calculations.

  • Another plot displays the pressure distribution. It is to be expected that the pressure should be uniform; but in fact small variations (between 5.946E-5 and 5.938E-5) appear, which are explained in a similar manner.

    Saving the results.

  • In the VR Viewer click on 'File' then 'Save as a case'. At this point you will see that the folder 'step1' already exists. Open it. (If this were not a prepared tutorial, you would have to create your own new folder and choose for it whatever name you wish.)
  • Save as 'step1'.

    You will find in the folder the following files created during this run:

    You will also find there the file step1mod.q1 which is provided for your convenience at installation time.

    Your step1.q1 should be identical with step1mod.q1, which you could run in case you prefer not to follow tutorial recommendations.

    Next Step