Encyclopaedia Index

WORKSHOP - InForm Source for Object

For this workshop you can load and modify case 274 from the core library. The basic case models the isothermal flow of air past a moving van. The movement of the van is represented by giving the floor plane the same velocity as the air inlet.


InForm is a feature which enables users of PHOENICS greatly to extend its capabilities, without the introduction of new coding.

Users are enabled to express their requirements by way of formulae. These are read by the Input Module (Satellite), which transmits them to the Solver Module (EARTH); this then interprets them and performs the implied computations.

Unlike PLANT, its predecessor in functionality, In-Form does not require use of a re-compilable version of PHOENICS.

Many objects types have a button labeled 'InForm Commands' on their attributes page. This leads to a dialog from which a selection of InForm commands can be attached to the current object. The usual format of an InForm command is as follows:


The workshop will show how to replace the standard uniform velocity at an INLET object with a user-defined profile.


From the system level:

To enter the PHOENICS-VR environment, click on the PHOENICS icon on the desktop, or click on Start, programs, PHOENICS, PHOENICS.

In PHOENICS-VR environment,

Click on 'File', 'Load from Libraries', enter 274 in the Case Number data entry box, and click 'OK'.

In the VR-Editor

Open the Attributes dialog for the INLET object

Double-click the purple object named UPSTR

wsinf3-1.gif (5944 bytes)

Click on Attributes, then InForm Sources. The following dialog will appear:

Click 'Add InForm', and a new line of InForm will appear.

The velocity formula we want is:


In this formula, XG is the distance of the cell centre in X, XULAST is the domain size in X, YG is the distance of the cell centre in Y, and YVLAST is the domain size in Y. The result is to make the inlet velocity linear in both X and Y.

Click on the empty button under 'Keyword'. A list of options will appear:

From the list select 'SOURCE'.  Now click on the empty box under 'Var'. A list of currently SOLVEd and STOREd variables will appear. Select W1 from the list and click OK.

Now to introduce the formula for W1. Click the empty box under 'Formula'. An editing window will appear:

Place the cursor at the top-left of the input window and type in:


then click 'File' and 'Save & Exit'. The new formula will appear on the button.

When we replace the inlet velocity, we also need to replace the mass source, otherwise we may get inconsistencies in the pressure field. Mass sources are introduced as sources of the pressure variable, P1.

Click 'Add Inform' again to create a second line of InForm. On the second line, select 'Source' for the Keyword and P1 for the 'Var'iable. The formula for mass flow is density times velocity. Click on Formula for P1, and in the editing window type in:


DEN1 is the name of the density store.

The default source for an object is a total source for the whole object. We have specified the mass flow as density*velocity, which is in kg/m2/s. To tell Inform that the source is 'per unit area', not total, click on the empty box under 'Condition' for P1. In the editing window enter AREA then click 'File', 'Save & Exitt'.

There is one action remaining before we can run the solver. The default source form for Inform is a fixed flux. This is fine for the mass source, which has been specified as a mass flux in kg/m2/s. However, for the W1 velocity we only specified a velocity, not a momentum flux. We need to tell InForm that it must multiply the velocity (W1) source by the mass (P1) source. To do this, click 'Condition' for W1, and in the editing window enter ONLYMS, then 'File', 'Save & Exit'.

The InForm Sources dialog should now look like this:

wsinf3-2.gif (9920 bytes)


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).

The contours of velocity near the inlet should look like this:

wsinf3-2.gif (9920 bytes)

Saving the results.

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