For psychrometric functions, additional allowable letters are W, R, D, and B, ... can be pasted in another application, such as Microsoft Word or PowerPoint.
EES Programming Notes 1. Writing Equations The equations can be entered into the Equations window (the window that appears when you start EES). The equation text is entered in the same manner as for any word processor. Formatting rules are as follows: a) Upper and lower case letters are not distinguished (A is read the same as a). b) Blank lines and spaces may be entered as desired because they are ignored. c) Comments (non-active text) must enclosed within braces { } or within quote marks " ". d) Variable names must start with a letter and consist of any keyboard characters except ( ) ‘ | * / + - ^ { } : " or ;. The maximum variable length is 30 characters. e) Multiple equations may be entered on one line if they are separated by a semi-colon (;). The maximum line length is 255 characters. f) Raising to a power is indicated by the caret symbol (^) or ** g) Equations order does not matter. h) The position of knowns and unknowns in the equation does not matter.
2. The Equations in Mathematical Notation The equations can be viewed in an easy to read format by selecting the Formatted Equations command from the Windows menu.
3. The Unit System To view or change the unit system, select Unit System from the Options menu.
4. Fluid Properties Different properties of the fluid, e. g. thermodynamic properties, can be obtained by using a special function format from the Function Info in the Options menu. At the Function Info click on Fluid properties and select a substance (e.g., R22, R134a, ammonia, etc.) then select the fluid property (e.g., enthalpy, entropy, specific volume, etc.) which you want to calculate. An example of how the function will look like is the enthalpy (h1) of R134a at temperature T1 and quality X1
h1=ENTHALPY(R134a,T=T1,X=X1) •
• •
T and X are two independent variables. You can use any two variables from the group of T, P, H, U, S, V, and X, corresponding to temperature, pressure, specific enthalpy, specific internal energy, specific entropy, specific volume, and quality. T1 and X1 are defined variables in your program, or you can insert numbers directly. For psychrometric functions, additional allowable letters are W, R, D, and B, corresponding to humidity ratio, relative humidity, dewpoint temperature, and wetbulb temperature.
5. Parametric table •
New parametric table a) Select New Parametric Table from the Tables menu b) Insert a name for the table (optional) c) Select variables from equations that you would like to have in the table. Use Add and Remove buttons to arrange the table (or double-click on the variable name to move it from one list to the other) d) Insert the number of runs (rows) that you would like to have in the table e) Insert values for the variables in the parametric table. You can type numbers directly into the cells. Numbers, which you enter, produce the same effect as if you set the variable to that value with an equation in the Equations window (The values can also be automatically entered using Alter Values in the Tables menu) Important: If you have already inserted a value for the variable in the equations window, e.g. P1=30, then you must delete it from the equations window or enclose it in comments brackets { }, e.g. {P1=30}. You can insert a value for the variable only once, either in the parametric table or in the equations window. f) Click OK
•
Edit a parametric table Use the Tables menu to edit values, variables and runs in the parametric table.
6. Plot window •
New plot a) Select New Plot Window from the Plot menu. Chose the type of plot you want, e.g. X-Y plot b) Insert title for the plot (optional) 1
c) d) e) f) g)
Chose the variable(s) in the x-axis list. Click on the variable(s) name in the y-axis list Scale limits will be set automatically unless you chose otherwise Grid lines make the plot easier to read Automatic update option will update the plot according to the changes you apply to the program Click OK
•
Property plot (e.g. T-s, P-h) Select Property Plot from the Plots menu. Select the substance and the plot type and click OK.
•
Overlay plot It is used to place a new plot on an existing one. Select Overly Plot from the Plots menu. It is important to select the proper axis.
•
Edit plot Select Modify Plot or Modify Axis from the Plots menu. You can double-click on the item (plot area, curve, axis, or text) that you want to modify in the plot window.
•
Copy a plot a) Select the plot window that you want to copy then select Copy Plot from the Edit menu. b) The plot or diagram can be pasted in another application, such as Microsoft Word or PowerPoint. Select Edit menu in the application and chose Paste Special then select the proper form of the picture that you want.
•
Change settings for the copied plot Selecting Preferences from Options menu can change picture settings (such as colors, size, picture or Bitmap format). Then select Plots and chose your preferences.
7. Procedure The procedure is used to simplify a long program by splitting it into blocks of equations that is explained in the following simple example:
Procedure statement (:=) instead of (=) Solution equations (at least one equation) End of Procedure Call statement
Name of the procedure
Input values (defined variables or numbers)
PROCEDURE Simple(X,Y:Z,W) Z:=X+Y W:=X-Y+5 end;
Output values
CALL Simple(X,Y:Z,W) Exactly the same as in the Procedure statement
Important: • Procedures must be placed at the top of the Equations window, before any of the non-function and non-procedure equations. • Place the CALL statement anywhere between your equations.
8. Array/Vectors Arrays can be used to draw vectors on the plot window. You can construct an array by selecting Insert/Modify Array from Edit menu. Enter a name for the array, chose number of rows and columns (use one column) for the array and then insert the variables.
9. Greek and Special Symbols By typing the EES variable name in the equations window the corresponding symbol will be displayed in the solution. Different Greek and special symbols are listed in page#3. Or you can select Help Index from the Help menu. Select Search and type Greek and special symbols in the index search. Click Display.
10. Help Menu You are advised to use the EES manual on the Help menu. 2