WinPHOTON Tutorial




Contents

  1. Overview.
  2. Open a PHI (XYZ) file.
  3. Open a XYZ file.
  4. Plot Grid.
  5. Dump Screen.
  6. Delete Plotted Element(s)).
  7. Plot Contours.
  8. Plot Parsol Contours.
  9. Plot Contour Lines.
  10. Plot Contours by Depth.
  11. Plot Contour by Number.
  12. Plot Iso-Surface.
  13. Plot Vectors.
  14. Plot Vectors in Parsol case.
  15. Plot StreamLines.
  16. Select a Plotting Colour.
  17. Set a Plot Region.
  18. Write Text.
  19. Changes the orientation of the plot
  20. Use No Smooth contour mode.
  21. Look of variable values.
  22. Use calculated field variables.

Overview

This tutorial shows you how to use the menu system of WinPHOTON. Results from the simulation of two flows:

  1. flow in a radial impeller,
  2. flow around a diamond-shaped obstacle
will be used in the examples.

 


Open a PHI (and XYZ) file(s)

To open PHI file (and XYZ file ):

  1. Select "File/Open PHI/XYZ file" menu,
  2. Click "PHI-Name" Browse button and select TUTO directory (C:\PHOENICS\D_PHOTON\TUTO) in OpenFile dialog,
  3. Select file "TUTO1.PHI",
  4. Click OK button.

In command mode will enter following commands:

  1. PHI
  2. C:\PHOENICS\D_PHOTON\TUTO\tuto1.phi
  3. <Enter>,
  4. <Enter>,
  5. <Enter>

NOTE. If your files located in current directory (D_PRIV1), the path in filename possible not to indicate.

 


Open XYZ file

To open XYZ file only:

  1. Select "File/Open PHI/XYZ file" menu,
  1. Check "XYZ only" radio-button,
  2. Click "XYZ-Name" Browse button and select TUTO directory (C:\PHOENICS\D_PHOTON\TUTO) in OpenFile dialog,
  3. Select file "TUTO1.XYZ",
  4. Click OK button.

In command mode will enter following commands:

  1. XYZ
  2. C:\PHOENICS\D_PHOTON\TUTO\tuto1.xyz

 


Plot Grids

To plot the grid outline :

  1. Open the result file - Open a PHI file or (if it already open) select "Draw/Clear" menu,
  2. Select "Draw/Grids" menu,
  3. Press "Add" button,
  4. Check "Outline" box,
  5. Click "Z" radio-button in GroupBox "Plane",
  6. Type "0" in EditBox "PlnNo" (or select with Spin button),
  7. Press "Add" button,
  8. Click "Y" radio-button in GroupBox "Plane",
  9. Type "0" in EditBox "PlnNo" (or select with Spin button),
  10. Press "Add" button,
  11. Click "X" radio-button in GroupBox "Plane",
  12. Type "0" in EditBox "PlnNo" (or select with Spin button),
  13. Press "Add" button,
  14. Press "Close" button,
  15. Press "Close" button.

In command mode will enter following commands:

  1. GRID OUT X 1 Z 1 12 Y 1 5 COL 1 DASH 0
  2. GRID OUT X 6 Z 1 12 Y 1 5 COL 1 DASH 0
  3. GRID OUT Y 1 X 1 5 Z 1 12 COL 1 DASH 0
  4. GRID OUT Y 6 X 1 5 Z 1 12 COL 1 DASH 0
  5. GRID OUT Z 1 X 1 5 Y 1 5 COL 1 DASH 0
  6. GRID OUT Z 13 X 1 5 Y 1 5 COL 1 DASH 0

 

The result of plotting is shown below.

To plot a grid on plane X=2:

  1. Select "Draw/Grids" menu,
  2. Press "Add" button,
  3. Click "X" radio-button in GroupBox "Plane",
  4. Type "2" in EditBox " PlnNo ",
  5. Select red colour in ComboBox " Color",
  6. Press "Add" button,
  7. Press "Close" button,
  8. Press "Close" button.

In command mode will enter following command:

  1. GRID X 2 Z 1 12 Y 1 5 COL 13 DASH 0

The result of plotting is shown below.

 


Dump Screen.

To create a plot to be saved by screen dumping:

  1. Select "File/Open Photon use file" menu,
  2. Click "Browse" button and select "Tuto1.u01" file in Open file dialog,
  3. Click "OK" button.

To dump screen, select "File/Save Window as" menu and type a name of the bitmap file in Save file dialog.

In command mode will enter following command:

  1. DUMP <Name>

 


Delete Plotted Element(s))

To delete all plotted elements select "Draw/Clear" menu.

To create plots (the outline grids, vectors on plane X 1 in WHITE colour, Vectors on plane X 5 in RED colour and Vectors on plane Y 1 in BLUE colour):

  1. Select "File/Open Photon use file" menu,
  2. Click "Browse" button and select "Tuto1.u02" file in Open file dialog,
  3. Click "OK" button.

In command mode will enter following command:

  1. USE C:\PHOENICS\D_PHOTON\TUTO\tuto1.u02

The result of plotting is shown below.

For delete the last vector element (on plane Y 1, in BLUE):

  1. Select "Draw/Vector" menu,
  2. Select last item in listbox,
  3. Press "Delete" button,
  4. Press "Close" button.

In command mode will enter following command:

  1. VEctor Delete

The result of plotting is shown below.

For delete all vector elements:

  1. Select "Draw/Vector" menu,
  2. Press "Delete All" button,
  3. Press "Close" button.

In command mode will enter following command:

  1. VEctor CLEar

To be turned ON/OFF Vector element:

  1. Select "Draw/Vector" menu,
  2. Select plotted element in ListBox,
  3. Press "On/OFF" button,
  4. Press "Close" button.

In command mode will enter following command:

  1. VEctor ON/OFF <Index vector element>

 


Plot Contours.

To plot a pressure contour on the surface of plane X=2:

  1. Open the result file - Open a PHI file or (if it already open) select "Draw/Clear" menu,
  2. Select "Draw/Contour" menu,
  3. Press "Add" button,
  4. Click "X" radio-button in GroupBox "Plane",
  5. Type "2" in EditBox " PlnNo " (or select with Spin-Button),
  6. Press "Add" button,
  7. Press "Close" button,
  8. Press "Close" button.

In command mode will enter following command:

  1. CONtour P1 X 2 Y 1 5 Z 1 12 FILL; 2.00E-03

To plot grid outlines around the contours:

  1. Select "File/Open Photon use file" menu,
  2. Click "Browse" button and select "Tuto1.u03" file in Open file dialog,
  3. Click "OK" button.

The result of plotting is shown below.

 


Plot Parsol Contours.

To plot a pressure contour on the surface of plane X=1:

  1. Open the result file "PARSOL.PHI" - Open a PHI file,
  2. Select "Draw/Contour" menu,
  3. Press "Add" button,
  4. Click "X" radio-button in GroupBox "Plane",
  5. Press "Add" button,
  6. Press "Close" button,
  7. Press "Close" button.

In command mode will enter following command:

  1. CONtour P1 X 1 Y 1 5 Z 1 12 FILL; 2.00E-03

To plot grid outlines around the contours:

  1. Select "File/Open Photon use file" menu,
  2. Click "Browse" button and select "Tuto1.u04" file in Open file dialog,
  3. Click "OK" button.

The result of plotting is shown below.



Plot Contour Lines.

To plot a pressure contour lines on the surface of plane X=2:

  1. Open the result file - Open a PHI file or (if it already open) select "Draw/Clear" menu,
  2. Select "Draw/Contour" menu,
  3. Press "Add" button,
  4. Click "X" radio-button in GroupBox " Plane",
  1. Type "2" in EditBox " PlnNo " (or select with Spin-Button),
  1. Check "Isolines Style" button and type "20" in EditBox "Int",
  2. Press "Add" button,
  3. Press "Close" button,
  4. Press "Close" button.

In command mode will enter following command:

  1. CONtour P1 X 2 Y 1 5 Z 1 12 SH DASH 0 ;INT 20

To plot grid outlines around the contours:

  1. Select "File/Open Photon use file" menu,
  2. Click "Browse" button and select "Tuto1.u03" file in Open file dialog,
  3. Click "OK" button.

The result of plotting is shown below.



Plot Contours by Depth.

Open the result file - Open a PHI file or (if it already open) select "Draw/Clear" menu. Select "Setting/Set Params" menu and click "Depth" radio button.

To plot a pressure contour on the surface of plane X=2:

  1. Select "Draw/Contour" menu,
  2. Press "Add" button,
  3. Click "X" radio button in GroupBox "Plane",
  4. Type "3" in Edit Box "Dep:",
  1. Type "2" in EditBox " PlnNo " (or select with Spin-Button),
  1. Press "Add" button,
  2. Press "Close" button,
  3. Press "Close" button.

 

In command mode will enter following commands:

  1. SET CON FILL DEPTH; 3
  1. CONtour P1 X 2 Y 1 5 Z 1 12 FILL;

To plot grid outlines around the contours:

  1. Select "File/Open Photon use file" menu,
  2. Click "Browse" button and select "Tuto1.u03" file in Open file dialog,
  3. Click "OK" button.

The result of plotting is shown below.



Plot Contours by Number.

Open the result file - Open a PHI file or (if it already open) select "Draw/Clear" menu. Select "Setting/Set Params" menu and click "Number" radio-button.

To plot a pressure contour on the surface of plane X=2:

  1. Select "Draw/Contour" menu,
  2. Press "Add" button,
  3. Click "X" radio-button in GroupBox "Plane",
  4. Type"4" in Edit Box "Num:",
  5. Type "2" in EditBox " PlnNo " (or select with Spin-Button),
  6. Press "Add" button,
  7. Press "Close" button,
  8. Press "Close" button.

In command mode will enter following commands:

  1. SET CON FILL NUMBER
  1. CONtour P1 X 2 Y 1 5 Z 1 12 FILL; 4

 

To plot grid outlines around the contours:

  1. Select "File/Open Photon use file" menu,
  2. Click "Browse" button and select "Tuto1.u03" file in Open file dialog,
  3. Click "OK" button.

The result of plotting is shown below.

 


Plot Iso-Surface.

To Plot an Iso-Surface :

  1. Open the result file - Open a PHI file or (if it already open) select "Draw/Clear" menu,
  2. Select "Draw/Surface" menu,
  3. Type "-2000" in the EditBox "Value"( which is represented by the iso-surface),
  4. Click "X" radio-button in GroupBox "Plane",
  5. Press "Add" button,
  6. Click "Y" radio-button in GroupBox "Plane",
  7. Press "Add" button,
  8. Press "Close" button,
  9. Press "Close" button.

To plot grid outlines around the iso-surfaces:

  1. Select "File/Open Photon use file" menu,
  2. Click "Browse" button and select "Tuto1.u03" file in Open file dialog,
  3. Click "OK" button.

In command mode will enter following commands:

  1. SET CON FILL NUMBER
  1. CONtour P1 X 2 Y 1 5 Z 1 12 FILL; 4

 

The result of plotting is shown below.



  1. Plot Vectors.

To plot vectors on the X=2 plane:

  1. Open the result file - Open a PHI file or (if it already open) select "Draw/Clear" menu,
  2. Select "Draw/Vector" menu,
  3. Press "Add" button,
  4. Click "X" radio-button in GroupBox "Plane",
  5. Type "2" in EditBox " PlnNo " (or select with Spin-Button),
  6. Select "UCRT" in ComboBox "U", "VCRT" - in ComboBox "V" and "WCRT"- in ComboBox "W",
  7. Press "Add" button,
  8. Press "Close" button,
  9. Press "Close" button.

In command mode will enter following commands:

  1. SET VEC COMP UCRT VCRT WCRT
  2. VECT X 2 Y 1 5 Z 1 12 SH DASH 0

To plot grid outlines around the vectors:

  1. Select "File/Open Photon use file" menu,
  2. Click "Browse" button and select "Tuto1.u03" file in Open file dialog,
  3. Click "OK" button.

The result of plotting is shown below.



  • Plot Vectors in Parsol case.

    To plot vectors on the X=1 plane:

    1. Open the result file "PARSOL.PHI" - Open a PHI file or (if it already open) select "Draw/Clear" menu,
    2. Select "Draw/Vector" menu,
    3. Press "Add" button,
    4. Click "X" radio-button in GroupBox "Plane",
    5. Select "-" in ComboBox "U", "V1" - in ComboBox "V" and "W1"- in ComboBox "W",
    6. Press "Add" button,
    7. Press "Close" button,
    8. Press "Close" button.

    To plot grid outlines around the vectors:

    1. Select "Draw/Grids" menu,
    2. Press "Add" button,
    3. Check "Outline" box,
    4. Click "X" radio-button in GroupBox "Plane",
    5. Type "1" in EditBox "PlnNo" (or select with Spin button),
    6. Press "Add" button,
    7. Press "Close" button,
    8. Press "Close" button.
    9. Select "Draw/Contour" menu,
    10. Press "Add" button,
    11. Check "Parsol Boundaries" box,
    12. Click "X" radio-button in GroupBox "Plane",
    13. Type "1" in EditBox "PlnNo" (or select with Spin button),
    14. Press "Add" button,
    15. Press "Close" button,
    16. Press "Close" button.

    The result of plotting is shown below.



    Plot StreamLines.

    To plot stream lines:

    1. Open the result file - Open a PHI file or (if it already open) select "Draw/Clear" menu,
    2. Select "Draw/Streamlines" menu,
    3. Press "Add" button,
    4. Click "On Circles" radio-button in GroupBox "Init Position",
    5. Press "Add" button,
    6. Press "Close" button,
    7. Press "Close" button.

    To plot grid outlines around the stream lines:

    1. Select "File/Open Photon use file" menu,
    2. Click "Browse" button and select "Tuto1.u03" file in Open file dialog,
    3. Click "OK" button.

    The result of plotting is shown below.



    Select a Plotting Colour.

    To plot vectors on the X=2 plane in Blue colour:

    1. Open the result file - Open a PHI file or (if it already open) select "Draw/Clear" menu,
    2. Select "Draw/Vector" menu,
    3. Press "Add" button,
    4. Click "X" radio-button in GroupBox "Plane",
    5. Type "2" in EditBox " PlnNo " (or select with Spin-Button),
    6. Select "UCRT" in ComboBox "U", "VCRT" - in ComboBox "V" and "WCRT"- in ComboBox "W",
    7. Uncheck "Shade" button,
    8. Select blue colour in ComboBox " Colour",
    9. Press "Add" button,
    10. Press "Close" button,
    11. Press "Close" button.

    In command mode will enter following commands:

    1. SET VEC COMP UCRT VCRT WCRT
    2. VECT X 2 Y 1 5 Z 1 12 COL 2 DASH 0

     



    1. Set a Plot Region.

    Grids, vectors, contours and streamlines can be plotted in a sub-region of the domain. This example shows how to set up such a region and how to plot grids in it.

    Open the result file - Open a PHI file or (if it already open) select "Draw/Clear" menu.

    To plot grid outlines of the domain:

    1. Select "File/Open Photon use file" menu,
    2. Click "Browse" button and select "Tuto1.u03" file in Open file dialog,
    3. Click "OK" button.

    To plot grids in sub-region:

    1. Select "Draw/Grids" menu,
    2. Press "Add" button,
    3. Reset:
      XF to 2; XL to 4
      YF to 2; YL to 4
      ZF to 2; ZL to 11
    4. Set colour of grid in Green in Combobox "Colour",
    5. Click "Z" radio-button in GroupBox "Plane",
    6. Type "2" in EditBox " PlnNo " (or select with Spin-Button),
    7. Press "Add" button,
    8. Click "X" radio-button in GroupBox "Plane",
    9. Type "2" in EditBox " PlnNo " (or select with Spin-Button),
    10. Press "Add" button,
    11. Click "Y" radio-button in GroupBox "Plane",
    12. Type "2" in EditBox " PlnNo " (or select with Spin-Button),
    13. Press "Add" button,
    14. Press "Close" button,
    15. Press "Close" button,

    In command mode will enter following commands:

    1. USE tuto1.u03
    2. GRID X 2 Z 2 11 Y 2 4 COL 1 DASH 0
    3. GRID Y 2 Z 2 11 X 2 4 COL 1 DASH 0
    4. GRID Z 2 X 2 4 Y 2 4 COL 1 DASH 0

    The result of plotting is shown below.



    Write Text.

    Open the result file - Open a PHI file or (if it already open) select "Draw/Clear" menu. To create a sample of plot:

    1. Select "File/Open Photon use file" menu,
    2. Click "Browse" button and select "Tuto1.u01" file in Open file dialog,
    3. Click "OK" button.

    To write text:

    1. Select "Draw/Text" menu,
    2. Press "Add" button,
    3. Type text "This is TEXT" in EditBox "Text",
    4. Press buttons in GroupBox "Move" to change the position of the text,
    5. Use ComboBox "Colors" to change colour of the text,
    6. Press "Close" button,
    7. Press "Close" button.

    The result of plotting is shown on below.

     


    Changes the orientation of the plot

    To change the orientation of the plot, move picture and enlarged/shrunk picture:

    1. Select "View/View direction" menu,
    2. Use "UP axes" radio-buttons for set X/Y/Z-axes as the up direction.
    3. Use "Move" buttons for moving the picture,
    4. Use "Azimuth" and "Elevation" Sliders for setting the View direction,
    5. Use "Zoom" EditBox for setting Zoom- factors (enlarged/shrunk picture),
    6. Press "OK" button for quit.


  • Use No Smoth contour mode.

    To plot contour variable PRPS on the X=1 plane in "No Smoth" mode:

    1. Open the result file "PARSOL.PHI" - Open a PHI file or (if it already open) select "Draw/Clear" menu,
    2. Select "Draw/Contour" menu,
    3. Press "Add" button,
    4. Click "X" radio-button in GroupBox "Plane",
    5. Select "PRPS" in ComboBox "Var",
    6. Check "No Smoth Fill" box,
    7. Press "Add" button,
    8. Press "Close" button,
    9. Press "Close" button.

    To plot vectors on the X=2 plane:

    1. Select "Draw/Vector" menu,
    2. Press "Add" button,
    3. Click "X" radio-button in GroupBox "Plane",
    4. Select "-" in ComboBox "U", "V1" - in ComboBox "V" and "W1"- in ComboBox "W",
    5. Press "Add" button,
    6. Press "Close" button,
    7. Press "Close" button.

    The result of plotting is shown below.

     


    Look of variable values.

    To look a pressure values on the plane X=2:

    1. Open the result file - Open a PHI file,
    2. Select "Variables/Look of Variable" menu,
    3. Press "OK" button,
    4. Select "P1" in ComboBox,
    5. Press "OK" button,
    6. Set to "2" PlntNO editbox.

    The result is shown below.

     


    Use calculated field variables.

    For calculation a modula of velocity vector :

    1. Open the result file - Open a PHI file,
    2. Select "Variables/PHI Variables" menu,
    3. Press "Add" button,
    4. Type "VMOD" in the EditBox "Name",
    5. Type
      SQRT((U1^2) + (V1^2) + (W1^2))
      in the EditBox "Formula",
    6. Press "Add" button,
    7. Press "Close" button.

    To plot contour new variable VMOD on the X=2 plane:

    1. select "Draw/Clear" menu,
    2. Select "Draw/Contour" menu,
    3. Press "Add" button,
    4. Click "X" radio-button in GroupBox "Plane",
    5. Type "2" in EditBox " PlnNo " (or select with Spin-Button),
    6. Select "VMOD" in ComboBox "Var",
    7. Press "Add" button,
    8. Press "Close" button,
    9. Press "Close" button.

    In command mode will enter following commands:

    1. ADDVAR VMOD is SQRT((U1^2) + (V1^2) + (W1^2))
    2. CON VMOD X 2 Y 1 5 Z 1 12 FILL; 2.00E-03

     

    The result of plotting is shown below.