Encyclopaedia Index

WORKSHOP - Use of Angled Inlets and Outlets (1).

This workshop example shows demonstrates the use of the ANGLED-IN and ANGLED-OUT objects.

The example is a 2-dimensional section of a warehouse. The fluid is air and the flow is turbulent and isothermal.

The geometry is to be as shown in the figure below, with the vertical dimension 4m and the horizontal dimension 10m :


wherein:

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:
  2. The non-physical settings suggested at first below are such as to make the calculations rapid rather than accurate.
  3. At the end of the tutorial, some further suggestions are made which will enable you to explore the influences of the settings on accuracy and speed of calculation.

Starting the tutorial

First activate the PHOENICS Satellite module in VR-Editor mode by either:

If you are uncertain of, or wish to change, your working directory, click on 'Options', 'Change working directory'.

In PHOENICS-VR Editor

When the Editor starts execution, what it shows on the screen will depend on what happens to be in your working directory. You can disregard this.

In order to make a fresh start;

You are now ready to begin.

Set the domain size, and activate solution of the required variables

Click on 'Main Menu' and set '2D Warehouse Example' as the Title.

Click on 'Geometry'.

Change the X-Domain Size to 10.0 m and the Z-Domain Size to 4.0m.

Click 'OK' to close the Grid mesh settings dialog.

Click on 'Models'.

Leave the 'solution for velocities and pressure' ON, and Energy Equation OFF. The default turbulence model, KECHEN, can also be left active.

Click on 'Top menu', then on 'OK' to exit the Main Menu.

The domain no longer fits the screen. To resize the view so that it does fit, click on the pull-down next to the 'R' icon on the toolbar then 'Fit to Window'.

reset1.gif (3045 bytes)

Create the objects making up the scene

Click on the 'Object Management' button (O on the toolbar or image172.gif (1000 bytes) on the hand set). This will display a (currently empty apart from the domain) list of objects.

Create the ROOF1 object:

In the Object management dialog, click on 'Object', 'New' and New Object'.

Change name to ROOF1

Click on 'Size' and set SIZE of object as:

Xsize: 5.0

Ysize: tick 'To end'

Zsize: 1.0

Click on 'Place' and set Position of object as:

Xpos: 0.0

Ypos: 0.0

Zpos: tick 'At end'

Click on 'General'.

Select Type: Blockage (default).

Click on 'Shape'. Click on Geometry and select public/shapes/wedge' as the geometry file, then click 'Open'. The new shape is not aligned correctly. Click on 'Options' then 'Rotation options'. The 'Rotate object face' entry sets the orientation of the shape with its bounding box. There are 24 possible orientations. Keep changing the orientation number until you find the one which makes the shape lie correctly (it is number 12). Al alternative way to do the same job is to repeatedly click on the 'Rotate object up/down' buttons image176.gif (1346 bytes) on the handset (if it is visible).

Click on 'OK' to exit the Rotation Options menu,

and on 'OK' to close the Object Specification Dialogue Box. ROOF1 will now appear in the Object Management list of objects.

Create the ROOF2 object:

Select the ROOF1 object, then click 'Object' - 'Copy object' and 'OK' to allow the copy.

The copied object will now be highlighted in the Object Management Dialog. Double-click it to open the Object attributes dialog.

Change name to ROOF2.

Click on 'Place' and set the X position to 'At end'.

Click on 'Options' then 'Rotation options'. Change the rotation number (Rotate object face) until the orientation is correct (16 in this case).

Click on 'OK' to return to the Object Specification Dialogue Box, and on 'OK' to close the Object Dialogue Box.

Create the INLET object:

Click on 'Object', 'New' and New Object'.

Change name to INLET .

Click on 'Size' and set SIZE of object as:

Xsize: 1.0

Ysize: 'To end'

Zsize: 0.75

Click on 'Place' and set Position of object as:

Xpos: 2.0

Ypos: 0.0

Zpos: 'At end'

Click on 'General'.

Define Type: ANGLED-IN.

Note that the shape and size of the angled-in object do not really matter - what matters is the size and shape of the area of intersection between it and any blockage which it overlaps. In this case the active inlet area will be the outer surface of the ROOF1 wedge segment which lies within INLET.

Click on 'Attributes' to set the inlet condition.

For 'Method' select 'Vol. flow rate'. Enter 2.0 m3/s for the volumetric flow rate and click 'OK' to close the Attributes dialog.

Click on 'OK' to close the Object Specification Dialogue Box.

Create the OUTLET object:

Click on 'Object', 'New' and New Object'.

Change name to OUTLET.

Click on 'Size' and set SIZE of object as:

Xsize: 1.0

Ysize: 'To end'

Zsize: 0.75

Click on 'Place' and set Position of object as:

Xpos: 7.0

Ypos: 0.0

Zpos: 'At end'

Click on 'General'.

Define Type: ANGLED-OUT.

Note that the shape and size of the angled-out object do not really matter - what matters is the size and shape of the area of intersection between it and any blockage which it overlaps. In this case the active outlet area will be the outer surface of the ROOF2 wedge segment which lies within OUTLET.

Click on 'OK' to close the Object Specification Dialogue Box.

Create the CRATE1 object:

Click on 'Object', 'New' and New Object'.

Change name to CRATE1.

Click on 'Size' and set SIZE of object as:

Xsize: 2.0

Ysize: 'To end'

Zsize: 1.0

Click on 'Place' and set Position of object as:

Xpos: 1.5

Ypos: 0.0

Zpos: 0.0

Click on 'General'.

Define Type: Blockage.

Click on 'OK' to close the Object Specification Dialogue Box.

Create the CRATE2 object:

Select the CRATE1 object, then click 'Object' - 'Copy object' and 'OK' to allow the copy.

The copied object will now be highlighted in the Object Management Dialog. Double-click it to open the Object attributes dialog.

Change name to CRATE2.

Click on 'Place' and set the X position to 6.5m.

Set the grid:

Click on the 'Mesh toggle' button. The default mesh will appear on the screen.

The orange lines are region lines,and denote the edges of the bounding boxes of each object. The blue lines are ordinary grid lines introduced by the auto-mesher.

Click anywhere on the image, and the 'Gridmesh settings' dialog box will appear.

The grid in all three directions is set to 'Auto'. This gives 20 cells in X and Z, and 1 cell in Y. This will suffice for the tutorial, though it would not be enough for a 'real' calculation. Click on 'OK' to close the dialog box. Click on 'Mesh toggle' again to turn off the mesh display.

Set the remaining solution-control parameters:

Click on 'Main Menu' and then on 'Numerics'.

The default number of iterations is 100. This is enough to test if a model is set up correctly, but is hardly ever enough to obtain a converged solution.

Reset the total number of iterations to 500.

Click on 'Top menu' to return to the top menu.

Click on 'OK' to exit the Main Menu.

Setting the Probe Location

Before running the solver,it is a good idea to place the probe in a suitable place to monitor the convergence of the solution. Too close to an inlet, and the value will settle down very quickly before the rest of the solution. Placed in a recirculation zone, it may still show traces of change even though the bulk solution is converged. In this case, somewhere in the middle of the domain is fine.

Click on the probe icon on the toolbar or double-click the probe itself, and move the probe to X=5.0, Y=0.5, Z=2.0.

Running the Solver.

In the PHOENICS-VR environment, click on 'Run', 'Solver'(Earth), and click on 'OK' to confirm running Earth.

Using the VR Viewer.

In the PHOENICS-VR environment, 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 select the plotting variable:

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 on the toolbar or double-click the probe itself to bring up the Probe Location dialog.

A typical vector plot from this case is:

A typical pressure contour plot is:

Checking the Source Balance

It is very important to know whether the inflows and outflows of mass and energy are in balance. If they are, it is a good sign that the solution is convergent. If they are not, the solution is definitely not converged. For further information on the assessment of Convergence, see the lecture Convergence monitoring and control.

Open the Object Management dialog, and right-click on the Domain entry. From the context menu select 'Show results'.

 

This will display the sources and sinks of all variables.

The section showing 'Nett source of R1 at...' shows the mass source in kg/s at each inlet and outlet.

Positive values are inflows,negative values are outflows. The 'nett sum' at the end of the section should be close to zero, as all the mass entering must leave.

These balances can also be checked by inspecting the RESULT file. This contains an echo of the inputs, a selection of the solution and the source balances. Click on 'File', 'Open file for editing', then 'Result'. Scroll down the file until you reach the section headed 'Sources and sinks'.

Saving the results.

In the PHOENICS-VR environment, click on 'Save as a case', make a new folder called 'ANG-IN ' (e.g.) and save as 'CASE1' (e.g.). Return to the VR-Editor by clicking 'Run' - 'Pre-processor' - 'GUI Pre-processor'.

Changing the Inflow

In the run just made, the inflow condition was set to 2.0m3/s. The flow enters the domain normal to the surface of the underlying blockage. (A second tutorial investigates this further). Another option is to set the cartesian components of the inflow vector.

Let us assume we want to see what happens if the inflow is directed towards the bottom-left instead of being normal to the surface. We want the velocity to be 2.0m/s, directed at 45 to left of the vertical. This means that the vertical (Z) component should be -1.414 and the horizontal (X) component also -1.414. (2*cos(45) or sin(45)).

Double-click on the INLET object to bring up its Object Specification dialog. Click on 'Attributes'. Change the 'Method' from 'Vol. flow rate' to 'Velocities'. Enter -1.414 for both the X and Z direction components. Click 'OK' to close the Attributes dialog, then again to close the Object Specification dialog.

Click on 'Run' then 'Solver' to run the solver again.

Enter the Viewer and inspect the solution.

Check the mass balance again, either by opening the Result file, or from the Object Management dialog in the Viewer as explained above.

The flow is slightly different, as seen in the vector field:

and pressure field:

Save the new results into the 'ANG-IN' folder as 'CASE2'.

Improving the Grid

The 20*20 mesh used in this example is not sufficient for an accurate solution. In the auto-mesher, the grid fineness is controlled by the 'maximum cell factor'. This sets the largest cell size allowed as a fraction of the domain size in that direction. The default setting of 0.05 gives around 20 cells, assuming a fairly uniform region distribution.

Turn on the mesh display (by clicking the 'Mesh toggle' button image436.gif (1037 bytes)) then bring up the 'Grid Mesh settings' dialog by clicking anywhere in the domain.

The auto-mesher settings for each direction are set from the 'Edit all regions' dialog. Click on 'X direction', and change 'Max cell factor' from 0.05 to 0.025, then click 'OK'. There will now be 40 cells in X. Make the same change in the Z direction. Close the Grid Mesh dialog,and turn the mesh display off.

Run the solver again. Note that the run takes longer, and the residuals (errors) do not fall as rapidly.

Save the results as ANG-IN/CASE3.

Now change the 'max cell factor' for X and Z to 0.0125, giving a mesh of 80*80 and run again. This time around 1000 iterations will be needed to get reasonable convergence.

Save these results as ANG-IN/CASE4.

Comparing the Solutions

It is interesting to compare the solutions from the three meshes, to see if any degree of grid independence has been reached.

This can be done using the Autoplot X-Y graph plotter to plot, say, the X-direction velocity (U1) at a particular height, say Z=2.0 (IZ=10 or 20 or 40) from each of the result sets.

Start Autoplot by clicking on 'Run', 'Post processor' then 'X-Y graph plotter'. When Autoplot starts, click 'View', 'View console' to close the command-input console. This is not required for this exercise and only hides the plots.

Click on 'File', 'Data files' to attach the three data sets. In the 'Opened files' dialog click 'Add'. In the entry box, type ang-in/case2.phi and click 'Add'. The 'Opened files' dialog should reappear with this file listed. Click 'Add', enter ang-in/case3.phi and click 'Add'. Repeat for ang-in/case4.phi. Click 'Close' to dismiss the 'Opened files' dialog.

Click 'Command' then 'Datas' to read data from the data sets. Click 'Add' to add the first data element. In the 'Adding Data Element' dialog, select case2.phi as the file, U1 from the 'Vars' list and set ZF to 10. Click 'Plot'. A graph of U1 at IZ=10, IX=1-20 will be drawn.

Click 'Add' to add the second data element. In the 'Adding Data Element' dialog, select case3.phi as the file, U1 from the 'Vars' list and set ZF to 20. Under 'Color' select blue. Click 'Plot'. A graph of U1 at IZ=20, IX=1-40 will be drawn in blue.

Click 'Add' to add the last data element. In the 'Adding Data Element' dialog, select case4.phi as the file, U1 from the 'Vars' list and set ZF to 40. Under 'Color' select red. Click 'Plot'. A graph of U1 at IZ=40, IX=1-80 will be drawn in red. Click 'Close' to close the 'Data elements' dialog. The screen should look like this:

The main differences are at the left-hand side, where the finer grids pick up a secondary vortex left of CRATE1. They also pick up more detail of the large central vortex.

It is clear that the finer meshes are picking up a recirculation zone which is missed by the initial coarse mesh.

Try to create these three plots in the Viewer from case2.phi, case3.phi and case4.phi.

20*20 grid

40*40 grid

80*80 grid