Encyclopaedia Index

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

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

The example is a 3-dimensional stylised air-conditioner. Air is expelled from a slot all the way round the circumfence of a column. It then leaves through a similar opening near the other end. The the flow is turbulent and isothermal.

The geometry is to be as shown in the figure below, with all dimensions 1m :

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 'Inlet flow normal to cylinder surface' as the Title.

We can accept all the default settings for the domain size and solved variables. The domain is a 1m cube, the pressure and velocities are solved for and the KECHEN turbulence model is used. To check these settings, click on 'Models'.

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

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 COLUMN object:

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

Change name to COLUMN

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

Xsize: 0.2

Ysize: 0.2

Zsize: 1.0

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

Xpos: 0.4

Ypos: 0.4

Zpos: 0.0

Click on 'General'.

Select Type: Blockage (default).

Click on 'Shape'. Click on Geometry and select public/shapes/cylinder' as the geometry file, then click 'Open'.

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

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: 0.3

Ysize: 0.3

Zsize: 0.1

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

Xpos: 0.35

Ypos: 0.35

Zpos: 0.1

Click on 'Shape'. Click on Geometry and select public/shapes/cylinder' as the geometry file, then click 'Open'.

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 COLUMN object which lies within INLET.

Click on 'Attributes' to set the inlet condition.

For 'Method' select 'Normal velocity'. Enter 5.0 m/s for the velocity normal to the blockage surface and click 'OK' to close the Attributes dialog.

Click 'Options' and tick the 'Transparency' box.

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: 0.3

Ysize: 0.3

Zsize: 0.1

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

Xpos: 0.35

Ypos: 0.35

Zpos: 0.8

Click on 'Shape'. Click on Geometry and select public/shapes/cylinder' as the geometry file, then click 'Open'.

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 COLUMN object which lies within OUTLET.

Click 'Options' and tick the 'Transparency' box.

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

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, Y and Z. 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 200.

Click on 'Output' then 'Monitor graph style'. From the list select 'max abs corr'. The default convergence monitor draws a graph of the values of the solved variables at the probe (the 'pencil' seen in the graphics window) position. When the solution has converged, the values here should stop changing. The option chosen here causes a graph of largest corrections to be drawn. The corrections should go to zero as convergence is reached.

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

Click on 'OK' to exit the Main Menu.

Setting the Probe Location

When monitoring  the maximum correction, the probe location is not important. If we were using the default monitor mode,it would be 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=0.3, Y=0.3, Z=0.5.

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 plot from this case 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-IN2 ' (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 5.0m/s normal to the surface of the underlying blockage. Another option is to set the cartesian components of the inflow vector.

Double-click on the INLET object to briing up its Object Specification dialog. Click on 'Attributes'. Cange the 'Method' from 'Normal velocity' to 'Velocities'. Leave the X direction at 5.0m/s and the Y and Z directions as 0.0m/s. The side of the column where X > 0.5m (the right) will act as a source, the side where X < 0.5 (to the left) will act as a sink. 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. You should find that the mass source (source of R1) at the INLET object is very close to zero, as the mass source on the right side is cancelled by the mass sink on the left.

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

Save the new results into the 'ANG-IN2' 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.

Revert to the original setup. Either change the inlet setting back to 'Normal velocity', or Click on 'File', 'Open exisiting case' and select ANG-IN2/CASE1.

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 theY and Z directions. 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-IN2/CASE3.

Comparing the Solutions

Try to create these plots in the Viewer from case1.phi and case3.phi.

20*20 grid

40*40 grid