## WORKSHOP - Working with Transfer Objects.

This workshop example shows how to use Transfer objects. Transfer objects allow the flow conditions at the exit of one calculation to be used as the inlet to another, provided that the flow is always from the first domain to the second.

An earlier example set up a 2-dimensional labyrinth flow. The fluid was air and the flow was turbulent with heat exchange.

The geometry was as shown in the figure below, but with the vertical dimension 1m and the horizontal dimension 2m :

wherein:

• INLET is an aperture through which air at 20 degrees C enters at a prescribed velocity of 0.5m/s. This gives an inlet Reynolds Number of 15000;
• OUTLET is a fixed-pressure aperture, where the pressure is held close to 0Pa, relative to the external pressure;
• WALL-W is an adiabatic boundary wall;
• IN-PLATE is an internal plate, the only function of which is to obstruct the flow;
• IN-BLOCK is a block of copper;
• WALL-H is a block of aluminium;
• WALL-E is an adiabatic boundary wall;
• WALL-L is a block of aluminium, supplied uniformly with 100 watts of electrical heat.

It is now imagined that there is a series of these labyrinths, with the outlet of one feeding the inlet of the next, as shown here:

### 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 at first below are such as to make the calculations rapid rather than accurate.

### Starting the tutorial

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

• clicking on the PHOENICS icon on the desktop; or
• entering the Run Modules panel of the PHOENICS Commander, and the clicking the VRE button; or
• typing 'vre' at the command prompt.

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;

• click on 'File';
• then on 'Start New Case';
• then on 'Core';
• then click on 'OK' to confirm the resetting.

You are now ready to begin.

If you have recently done the labyrinth tutorial, and have saved the cases as directed, you can click on 'File' , 'Open existing case' and select labyrinth/case2.

If these files are not available, you can load a copy of the labyrinth case from the Library. Click on 'File', 'Load from Library', then 'Browse'. Click the '+' next to 'Tutorial cases' to open that branch, then again for 'General tutorials'.

Select case 621 Simulation of a Labyrinth Flow and click 'OK'.

We must make a first run in which the OUTLET object will write out its data at the end of the Solver run.

Modify the OUTLET object:

Double-click the OUTLET object.

Click on 'Attributes'. Change the 'No' next to 'Acts as Export' to 'Yes'. In the file-name entry box, enter 'outflow' (without the ' '). When the solver runs, it will write out the flow conditions at the OUTLET object into the file outflow.pob.

Click on 'OK' to exit the Object Dialogue Box.

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

• Vectors - click on the 'Vector toggle' . Vectors are coloured by the current plotting variable, but their length is always related to the absolute velocity.
• Contours - click on the 'Contour toggle'
• Streamlines - click on the 'Streamline management' button
• Iso-surfaces - click on the 'Iso-Surface toggle'

To select the plotting variable:

• To select Pressure - click on the 'Select Pressure button' .
• To select Velocity - click on the 'Select Velocity button'
• To select Temperature - click on the 'Select Temperature button'
• To select any other variable - click on the 'Select a Variable button'

To change the direction of the plotting plane, set the slice direction to X, Y or Z

To change the position of the plotting plane, move the probe using the probe position buttons

.

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:

### Saving the results.

In the PHOENICS-VR environment, click on 'Save as a case', make a new folder called 'TRANSFER ' (e.g.) and save as 'CASE1' (e.g.).

### Running the next domain

To run the simulation of the next domain, we need to use the data in outflow.pob as the inlet boundary condition.

Double-click on the INLET object.

Click on 'Attributes'. Change the 'No' next to 'Acts as Import' to 'Yes'. In the file-name entry box, enter 'outflow' (without the ' '). Notice that all the other attribute settings have gone, as when the solver runs, it will read the flow conditions at the INLET object from the file outflow.pob.

Click 'OK' to close the Attributes dialog then again to close the Specification dialog.

Double-click the OUTLET object and open the Attributes dialog. Change the name of the export file from outflow.pob to outflow2.pob. If we do not do this, we will overwrite the original outflow.pob from the first run.

### Running the Solver.

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

### Inspecting the Results

Run the Viewer and check the flow field. Do the vectors at the inlet look anything like the vectors at the outlet of the first run? Check the mass and energy balances (for a reminder of how to do this, click here). Do the source values at the INLET in this run match the sink values at the OUTLET in the first run?