PRELUDE Tutorial 3A
Simulating flow inside a room

Welcome to PHOENICS HVAC Gateway.

In HVAC tutorials you will be studying flows inside some built environment.
HVAC standing for Heating, Ventilating and Air Conditioning of rooms, offices, hotel atria, concert halls, etc., is an important area of CFD application as generally it deals with comfort and safety of people and objects assembled for some time and reason in a closed place.

image.gif

Here, in the first HVAC tutorial we shall

  1. discuss how to describe objects placed inside a room,
  2. show air flows inside the apartment in question,
  3. learn how to change attributes of the objects inserted, i.e.
  4. run the case,
  5. study and save the results of the simulation.

Contents

  1. How to start
  2. Inspecting the object tree
  3. Making the simulation
  4. Inspecting the results
  5. Saving the results of your work with PRELUDE
  6. Concluding remarks

1. How to start

In this and all further tutorials, what-to-do instructions are indicated by letters and numbers in the left-hand margins, as follows:
  1. Start this tutorial in the same manner as any other tutorial, by clicking on the image.gif icon on the desktop.
    Alternatively:
    1. click on the Commander's 'Run modules' button and then on the left-hand 'Prelude' icon;
    2. or type the command 'runprel' at the DOS prompt of a window in your system's path;
    3. or launch the executable program /phoenics/d_prelud/prelude.exe by any of the operating-system techniques.
  2. Into the casename box, type the words, say, 'HVAC1'.

  3. In the drop-down menu of the 'Edit' button, select 'Set Working Directory', navigating thereafter to /phoenics/d_prelud/My_HVAC.

    If you have no such folder, please create it in any way you prefer inside the d_prelud directory.

    Click on that folder. It will remain your working directory for the PRELUDE HVAC session until you change it again.

  4. To load the case which is discussed in this tutorial, click on the arrow to the right of the 'Load Gateway' box and select 'hvac' - the Heating, Ventilating and Air Conditioning gateway.

    You should then see a picture more or less like this:

    image.gif

    The 'more or less' is included because, between the time of writing of this tutorial and the time of your studying it, it is almost inevitable that some changes will have been introduced into PRELUDE, which is constantly being improved. This explains why the images presented in this tutorial can be slightly different from yours.

    If you click on the arrow to the right of the 'Scenario' box, you will see the possible scenarios given from the picture that follows.

    image.gif We are going to look into the simplest case - simulation of air flow inside a room and for this reason let us select 'ONEROOM.PSC' from the list of PSC files, i.e. from the script files provided for this gateway.

    After that click on the 'next' button. The next box "Steady?" presents two alternatives of answering the question: saying "Yes" here we intend to consider a steady case and ignore all possible transients.

    Click again on the button "next" and the scenario according to the conditions set will be loaded.

  5. After PRELUDE has carried out some preliminary actions, the progress of which is indicated by blue bars moving across the screen, you should see a picture like this:

    image.gif


    What you see in this picture is an almost empty room with some objects which we shall discuss later.

    Try rotating the domain and enlarging it by moving the mouse, as explained in Tutorial 1, so as better to understand shapes of the component objects.

2. Inspecting the object tree

Now is the time to find out what objects constitute the case under consideration.
Making the 'object tree' visible
  1. Click on the image.gif icon in the toolbar.

  2. Then click on the "+" sign close to the word 'domain' and then on all other "+" signs which thereafter appear.
    What you will see, is:

    image.gif

    Describing objects on the scene
  3. We shall consider the objects one after another as they are shown in the object tree.
    [To have a better view of an object you may need to look at the whole domain from different angles.]

  4. AXES, CAMERA0, CELLGRID and CLIPPER were discussed already in Tutorials 1 and 2. There is no need to write any more about them here.

  5. 'Materials' is the object containing some information about properties of media used. This object is structurized by means of folders with necessary properties. The important medium used in this case is air and its properties can be viewed in the folder 'Properties 1' that is created under the 'Materials' object being its child and thus attached to it.

  6. When you click on the 'Properties 1' folder in the object tree to select it and afterwards on the red-tick button in the tool bar, you will see the following picture

    image.gif

    informing that the only material in this case is air with standard characteristics, i.e. at 20 degrees C and 1 atm, treated as incompressible fluid. Other characteristics required for simulation are given in the table below. It will later be stated that the outside air temperature is set to 15 degrees C, that is appropriate assumption for fluid characteristics slightly depending on its temperature.

  7. The 'variables' object need not be much discussed at this moment. The object tree shows that its components, appearing in alphabetical order, are: These variables are well-known to PHOENICS users, who if reminders are needed, can find these in the Encyclopaedia by clicking the hyperlinks.

    These are the variables which a CFD specialist would expect to be calculated throughout the space.

  8. 'buoyancy' is an 'object' in an extended sense of the word ('entity' might be better). It enables the effect of gravity on the parts of the air having differing temperatures to be introduced, namely as momentum sources affecting the vertical velocity component, W1.

    Buoyancy is a phenomenon which operates everywhere; therefore, when you click on it in the object tree, the whole domain is brightened, the other objects becoming correspondingly dimmed. [This effect does not disappear completely when the next object is selected; but clicking on the image.gif will remove it.]

    Clicking the red-tick icon, then on 'In-Form Statements', image.gif and then on 'IF_SOURCE_W1' and on 'formula', will reveal that the source is:
          9.81*rho1*(tem1-20)/273 .
    Here, 9.81 is recognisable as the acceleration due to gravity; rho1 is the ambient-air density, tem1 is the local air temperature, and 1/273 is the volumetric expansion coefficent of air.

    Evidently, whoever set up this problem regarded 20 degrees Celsius as being the ambient temperature, deviations from which would cause the air to rise or fall. However, it will later be seen that air from the outside enters at 15 degrees Celsius; so (tem1-15) would be more reasonable than (tem1-20).

    Later, after you have made the first flow-simulation calculation, you might care to make the change from 20 to 15, so as to determine how much difference it makes. The 'MAKE RUNS' facility of PRELUDE would enable you to explore a range of such assumptions.

  9. 'ceiling' is precisely what the word implies and its parameters, i.e. sizes, can be studied from the 'Attributes' panel. The red-tick button in the tool bar and the open size tab will show the following:

    image.gif

  10. 'eastwall' stands for East wall here. We can examine its properties clicking the red-tick button of the tool bar. Let us change its colour, for instance. This can be very easily done if we open the 'Appearance' tab of the object properties panel, and after that click on the 'Change Colour' button. Familiar colour box will open and you can choose any colour that suits your taste. image.gif

  11. 'floor' is also only floor. The red-tick icon and the 'attributes' tab will reveal that its 'texture' is 'wood-dark-rough'. But this is only one of the possiblities which you could use.

    Clicking on 'appearance' will lead you, after a few obvious (to Windows cognoscenti) steps, to the folder 'textures' containing a large number of alternative texture files.image.gif
    Choose one of them if you wish.

    Of course, the texture which you choose has only decorative significance: it will have no effect on the calculated flow.

  12. 'inflow' is a rectangular aperture in the West wall of the room (i.e smaller-x, in accordance with the PHOENICS convention, larger-x meaning East, and North-South and High-Low applying respectively to the y- and z-dimensions).

    Clicking on the red tick, the 'Attributes' tab and reveling parameter to edit from the corresponding box will lead to the information that the temperature of the in-flowing air is the just-mentioned 15 degrees Celsius,
    image.gif and that its x-direction velocity is a (hardly-to-be-endured!) 6 meters per second.
    image.gif

    If you think that this is too much even to be contemplated, reduce it at once. Otherwise, when you come to examine the results of the calculation, do not be surprised that the effects of buoyancy are rather small. As currently set up, this is a flow in which forced convection will be dominant and natural convention of little effect.

  13. 'northwall' is the wall on the north (i.e. larger-y) boundary of the room. Exploration of its attributes reveals that they are similar to those of any wall.
    image.gif
    [It has texture, which makes it visible; but that does not influence the flow.]

  14. 'outflow' is an aperture which occupies the same large-x position as the (to-be-discussed) eastwall object.
    Its 'pos' and size properties are related to those of the domain ( i.e. the room; and its most important attribute is its pressure, which is defined as zero.
    image.gif

    This is, of course, not the absolute pressure; it is that relative to which all other pressures (P1 in PHOENICS parlance) are measured.
    What is meant is that air escapes through it in proportion to the excess of the local pressure above zero.
    What is the proportionality constant? The PHOENICS default value (no other having been set) of 1.0E3 kg/s/Newton.

    The other attribute is the temperature, which is the same 15 degrees as has been set for the inflow. This means that if any air through any part of this aperture, that will be its temperature. All outgoing air will of course be higher, because of the heat input from the radiator.
    image.gif

  15. The 'radiator' object, fixed near the west wall of the room is particularly interesting because of way in which its source of heat is controlled. This is revealed, by clicking on the red tick, then on 'Sources' where you can set different sources by means of the 'Add Source of' button and delete unnecessary ones using the 'Delete' button. The present source is given in the box by the following formula with parameters to edit:
    "MAX(0,5*(30-TEM1{(xmid(sensor)&ymid(sensor)&zmid(sensor))}))"
    image.gif

    This indicates that the radiator represents a source of heat that somehow controls the room temperature TEM1. At this stage we shall not expand how.

  16. The 'sensor' object is the device that controls the radiator heat output by switching it on or off depending on the temperature in its middle point. The radiator will be switched off if the sensor mid-point temperature exceeds 30 degrees of Celsius; it will be switched on if the latter is below this reference temperature. According to the formula given above the radiator heating power is 5W for each degree of the difference between 30 degrees and the sensor mid-point temperature at any moment of time.< br> It can be also added that the sensor is represented on the scene by a little green sphere placed right above the radiator which changes its colour to white when this object is selected. Its position and sizes can be revealed when you click on the red-tick object properties button in already familiar way.

  17. The 'southwall' object represents the south wall to which the radiator (although being a child of the domain) is attached. You can see in the next puicture what its sizes are.
    image.gif

  18. The 'westwall' object is precisely what its name suggests, i.e. the wall where the inflow aperture is placed. Exploring its attributes reveals it to be no more nor less interesting than northwall.image.gif

  19. The 'windo' object is actually a window representing an obstacle to inflowing air as it is half-open, and its angle, when its attributes are explored, proves to be given as 60 degrees.
    image.gif

    Try enlarging and reducing this. What you do should be reflected on the screen. [but whatever you do, do not shut it entirely; for then there would be no flow to simulate!]

  20. There is one last object left called 'spot'. It is represented on the scene by another green sphere and shows the point for which 'spot values' of solved-for variables are printed in the result file. It is not important for this tutorial.

3. Making the simulation

  1. Click on 'Options' in the Menu bar, and then on 'Run Solver'. Then, in quick succession, you will see evidence on the screen of:

4. Inspecting the results

How to use the PHOENICS Viewer package is a large subject, for which separate tutorials exist, for example, the one called 'How to use the Viewer'. Nevertheless, the following suggestions are made to the newcomer to PHOENICS who wishes to see immediate evidence that he or she has performed a CFD calculation:
  1. Click the contour toggle (927 bytes) icon, which selects contour plotting.
  2. Click 'X', 'Y' or 'Z' buttons to select 'contours on constant-x, y, or z planes', respectively.
  3. Click and hold any of the 'probe-position' arrows to the right of any box specifying Probe position in the domain. This will be immediately marked in the screen by the probe - a small red-and-yellow pencil showing a a point with coordinates you have just set by the Viewer Control Panel.


    By default the first variable to be displayed is 'Pressure'. Its variations you can observe in a certain plane by means of its contours, coloured Pressure bar on the left of the picture and the 'Probe value' that is displayed on the right of the picture also concerns pressure - relative pressure at a point marked by the probe.

  4. Let us now display contours of other variables of interest. Click on the button contour toggle (927 bytes) of the Control Panel and this will reveal temperature contours. Experiment with temperature contours in a similar way with the help of the Probe position buttons to get pictures like this one.

    It might be interesting to display maximum and minimum values of the variable in question. To do so, press the button contour toggle (927 bytes) in the Viewer tool bar or in its Control panel to open the Viewer Options window.

    Under the 'Contours' tab you will see these values of temperature, i.e. the variable earlier chosen, being 22.45722 and 15 degrees Celsius respectively.
    Open the 'Options' tab, select the empty box 'Show min max locations' to reveal them and after that close the 'Viewr Options' window by the top-right cross.
    You will see a red sphere marking the maximum temperature location in the top-left corner of the radiator, but to have a better look you will have to click on the contours button to switch them off and them to click on the 'Wireframe toggle' button contour toggle (927 bytes) of the Control Panel to view a picture like this one

    It might be a good way to judge about plausibility of the results obtained by viewing max and min temperature locations. As to the present case, the results seem to be realistic. After that you may disselect the same box to remove the display of these locations.

  5. And the other variable is velocity. Select it on the Control Panel by clicking on the button contour toggle (927 bytes), toggle 'contours on' again and you will get velocity contours similar to these.

  6. Now toggle 'contours off' by clicking on contour toggle (927 bytes) again. We shall now discuss another useful feature of the VR Viewer - creation of streamlines. Streamlines are independent air particle trajectories that display air flow inside the apartment.
    It is possible to create
  7. First locate the probe at some point that will be a reference point for streamline/streamlines.
  8. Click on the contour toggle (927 bytes) button to open the 'Streamline options' window.

    We advise you to leave unchanged the default settings for 'Streamline mode' - 'lines' (that is how streamlines will be displayed on the screen) and for 'Streamline direction' - 'both' (that means whatever way of creation of the streamlines you choose, it/they will be extended in both directions - 'Downstream' and 'Upstream'.)

    Third group of options 'Streamline coloured by' gives you opportunity of choosing a variable according to which values the streamlines will be coloured. If you click in the 'Current variable' box, you will be able to set any variable from the list that is of interest to you.

    The fourth group of options specifies the way of streamline creation, necessary coordinates for the 'Along a line' option or the circle radius for the 'Around a circle' option and their number, the default number of streamlines being set to '15'.

  9. Having specified all options, click the 'OK' button.
  10. You will then be led to the 'Streamline Management' panel.

  11. Now do what you are suggested, i.e. click on 'Object' and 'New'.

    and you will get a picture like this one.

    Experiment with the streamlines deleting and creating new ones by means of the 'Object' - 'Options' command from the 'Streamline Management' panel.

    Having reached this section of the tutorial and being still able to proceed, you might be in need of having some rest and entertainment. We can offer you a rather specific way of amusement - animation of created streamlines.

  12. Right click on the contour toggle (927 bytes) button and thus return to the 'Streamline options' panel. We shall now use another opportunity of creating streamlines - around a circlewith the following parameters set:

  13. Click on the same button to open the 'Streamline Management' panel and create the 8 streamlines set above as was shown above.
  14. Then click on the 'Animate' command of the Menu, and select 'Animate' again.

    Click 'here' to see animated streamlines.

  15. To be in control of the animated streamlines try the other option - 'Animation Conrol' under the 'Animate' command of the Menu.

    We advise you to pay attention to the 'Animation ball size' which you can set according to you preferences and selecting the box 'Colour by value' you will make animation balls change their colour according to the variable value at the point in question.

5. Saving the results of your work with PRELUDE

The results of your PHOENICS runs will all be found in your 'My_hvac' folder, where they will remain until deleted or removed by you, or over-written by later runs with the same case name.

However, the settings which you made during your interaction with PRELUDE will be lost unless you save them.

  1. If you are still in the VR Viewer inspecting the results of calculations, close its window by clicking the top right-hand button with the cross. This procedure will return you to the PRELUDE Controller window. Drag and pull by the title bar to activate the window if it is not activated.
  2. There, in order to save your settings, click the top-left 'File' button and then on 'Save Q3'.
  3. To prove that your settings have been saved, quit PRELUDE by clicking on the white-on-red cross (top-right).
  4. Restart PRELUDE; then, instead of 'Load Gateway', click on 'Load Other..'.

    Then navigate to d_prelude\my_hvac, where if you choose 'all files', you should find several files those displayed by clicking here.

    However, if you choose the first-supplied option (*.q1, *.q3, *.psc),you will see only:

    If you load either the q1 or the q3, you should be able to repeat the run which you last made; but it is only the q3 which still contains all the relations which were provided by the PRELUDE hvac gateway.

    6. Concluding remarks

    About HVAC, about the PRELUDE Gateway, and about the CFD simulations which PHOENICS makes in response to its user's requests, there are many more things to say than could be alluded to in this tutorial.

    Therefore, in conclusion, attention is drawn to the following sources of further information, namely: