EES_intro

download EES_intro

of 9

Transcript of EES_intro

  • 8/22/2019 EES_intro

    1/9

    February, 2005

    Introduction to EES (Engineering Equation Solver)

    Introduction

    EES is a powerful tool for solving engineering problems and is relatively easy to learn. It

    is particularly useful in solving thermodynamic and heat transfer problems since it offers

    several built-in libraries comprising of thermodynamic and thermophysical properties,hence there is no need to look these values up in tables. Moreover, algebraic mistakes arenot a concern and the use of EES is time efficient in solving complicated engineering

    problems. One major advantage to EES is that it can solve a system of simultaneous

    equations, which is not easy to do using Excel. This includes a system with atranscendental equation (i.e. one in which the dependent variable cannot be isolated).

    This introduction is to help you get started with EES. If additional help is required, youcan refer to the Help Window within the software or the PDF manualavailable on line.

    To aide in your introduction of the software an example problem from your textbook

    (Moran and Shapiro) is solved using EES. The solution of the problem and description of

    specific functions in EES are based on the PC version of EES, however there is littledifference in the Mac version. There are additional example problems listed under the

    Examples menu in EES. When you are working on your homework sets, it may be useful

    to search for similar problems in this menu.

    Availability

    EES is available on all IT lab computers. A free version is also available to all MEstudents and other majors taking ME courses and can be downloaded directly from the

    following website:

    http://www.menet.umn.edu/dist/

    When visiting this site, click on the ees folder. A user name and password will berequired to download the software. This information has been distributed in class and

    cannot be placed on the course website. If you have misplaced or did not receive this

    information please contact your course instructor or teaching assistant. The EES.DFT fileis also available on the server in case you need a new copy. All students who are new to

    EES must download the EES.DFT file and copy it into the same directory/folder as the

    other EES program. Free additions to EES are available if you visit the F-Chart Software

    website at http://www.fchart.com.

    Windows Installation

    To install EES for Windows 95, 98,NT, 2000 orXP, you must run the file Setup_ees.exe.Either double-click on the file or from the Windows Run Command using Browse until

    you get to the directory where you stored the new EES setup program and run Setup_ees.

    The file will install EES into the directory C:\EES32 or the directory you choose usingthe Browse command. If you install into a directory other than your existing EES

    directory, you must copy the file EES.DFT into your new EES directory.

    1

    http://www.menet.umn.edu/dist/http://www.fchart.com/http://www.menet.umn.edu/dist/http://www.fchart.com/
  • 8/22/2019 EES_intro

    2/9

    February, 2005

    The latest EES manual is also on the menet server as a PDF file. The new version of EES

    has a direct link to the manual, hence it is convenient to place the EES manual (EESmanual.pdf) in the EES directory.

    Installing on a Mac

    Download the EES_PPC.sea file into your EES folder, double click on the file and thenclick the Extract button. The folder that EES is installed into must contain the file

    EES.DFT for EES to run. The manual (EES Manual.sea.bin) is on the menet server. Theexpanded manual must be placed in the same folder as the other EES files.

    Getting Started

    Begin by opening the EES program. Upon doing so, an empty Equations Window will

    appear. If you see update information in Equations Window or the Equations Window

    does not appear, obtain a new Equations Window by selectingNew under theFile menu.The Equations Window is the window in which you write and edit equations. There are

    additional windows available underWindows such asFormatted Equations Window and

    Solution Window. TheFormatted Equations Window is advantageous since it displays theformatted equations form the Equations Window. When entering complicated equations,

    this window can be useful to double check if any errors have been made. The Solution

    Window appears automatically upon solution of the equations within the Equations

    Window when the system of equations is solved via the Calculate command. Moreover,

    the Solution window also indicates if any potential unit problems exist in the solution.

    The Options menu consists of several commands that allow you to check your variables

    (Variable Info), obtain commands for various built-in functions (Function Info) andconstants (Constants), declare a unit system (Unit System), and to set personal

    preferences (Preferences). The Calculate menu involves the solution of the equations

    entered in the Equations Window. Under this menu you can check the number of

    variables and number of equations involved in the solution using the Check/Formatcommand. Also, the set of equations in the Equations Window can be solved using the

    Solve command. The Plots menu involves the generation, modification, and typeselection of plots. Similarly, the Tables menu deals with generation and modification of

    tables by use ofParametric Tables andLookup Tables. ThePlots and Tables menus will

    be described in further detail in the solution of the example problem.

    2

  • 8/22/2019 EES_intro

    3/9

    February, 2005

    Example Problem:

    Example 3.4, Fundamentals of Thermodynamics, 5th Edition, Moran and Shapiro

    To solve this problem in EES, type the following comments and equations in the

    Equations Window. See WebCT for postings of the example EES file.

    " Example 3.4, Moran and Shapiro, Fundamentals of Thermodynamics"

    "Water contained in a piston-cylinder assembly undergoes two processes.The initial state is 10 bar, 400 C.Process 1-2: Constant pressure cooling to saturated vaporProcess 2-3: Constant volume cooling to 150 C(a) Sketch the processes on T-v and P-v diagrams(b) Determine the work (kJ/kg) for the overall process(c) Determine the heat transfer (kJ/kg) for the overall process"

    "AssumptionsThe water is a closed system.

    Neglect changes in potential and kinetic energy.Neglect friction between piston and wall"

    "Given:"Pb_1 = 10 [bar] "units may be specified using [ ] ...."T_1 = 400 [C]x_2 = 1.0 "state 2 given as saturated vapor, thus quality, x = 1.0"T_3 = 150 "..... or specify units in Options => Variable Info"P_2 = P_1 "constant pressure process"v_2 = v_3 "constant volume process"

    P_1 = Pb_1 * 100[kPa/bar] "unit conversion, now P_1 is in kPa"

    "Governing equations""Conservation of energy: First Law for a closed system"

    q_12 - w_12 = u_2 - u_1 "equations written in specific form (per kg)"q_23 - w_23 = u_3 - u_2

    w_12 = P_1*(v_2 - v_1) "constant pressure process"w_23 = 0. "constant volume process"

    w_net = w_12 + w_23q_net = q_12 + q_23

    "Analysis"{using Calculate => Check/Format, above we have 13 eq's and 18 unknowns.

    We need 5 more equations, listed below, to solve for all variables}

    u_1 = intenergy(WATER,T=T_1,P=P_1) "Options=>Function Info=> Fluid properties"v_1 = volume(WATER,T=T_1, P=P_2)u_2 = intenergy(WATER,x=x_2,P=P_2) {NOTE: in or on the vapor dome, T and P are not

    independent properties, thus, alone, these two propertiesdo not fix the state of the system}

    v_2 = volume(WATER,x=x_2,P=P_2)u_3 = intenergy(WATER,V=v_3,T=T_3)

    3

  • 8/22/2019 EES_intro

    4/9

    February, 2005

    Note that comments are included in brackets {} and quotation marks .Also, EES is caseinsensitive and ignores spaces.

    Thermodynamic properties

    No need to look up values in the tables in the back of your textbook! EES has a large

    database of thermodynamic properties for many substances. Recall that the state of asystem (and all corresponding properties) can be determined if two independent

    properties are known.

    Go to Options => Function Info and selectFluid Properties.

    Choose a substance (water, refrigerant, air), the property you desire to find (internalenergy, temperature, fugacity), and specify which two properties you would like to use to

    specify the resulting property. NOTE: Within the vapor dome, temperature and pressure

    are not independent properties.

    u1 = INTENERGY(Water,v=v1,P=P1)

    x1 =QUALITY(Xenon,u=u1,T=T1)

    In the first example above, the specific internal energy of water can be found knowing the

    specific volume and temperature. In the second example, the quality of xenon is found

    from the temperature and specific internal energy. Units correspond to those specified inOptions =>Unit System.

    Solve

    When your problem is set-up and you are ready to solve:

    Calculate => Check/format: are there the same number of equations and unknown

    variables? (for parametric table, there will be n-1 eqs and n unknowns)

    Calculate => Solve: solution is produced in Solution window. Notice if unit error occurs.Successful solution is when no unit errors are detected

    Solution Window

    PLEASE highlight or box individual variables of interest (the answers) by right-clicking

    on that variable in the Solution window (note, T2 and P3 do not appear until a later step,

    discussed below).

    Pb1 = 10 [bar] P1 = 1000 [kPa] P2 = 1000 [kPa] P3 = 475.7 [kPa] q12 = -486.1 [kJ/kg]

    q23

    = -1000 [kJ/kg] qnet

    = -1486 [kJ/kg] T1

    = 400 [C] T2

    = 179.9 [C] T3

    = 150 [C]

    u1 = 2957 [kJ/kg] u2 = 2583 [kJ/kg] u3 = 1583 [kJ/kg] v1 = 0.3066 [m3/kg] v2 = 0.1945 [m

    3/kg]

    v3 = 0.1945 [m3/kg] w12 = -112.1 [kJ/kg] w23 = 0 [kJ/kg] wnet = -112.1 [kJ/kg] x2 = 1

    Units

    A calculation of numbers may be mathematically correct, but it is meaningless withoutthe specification of units. Units corresponding to every variable in theEquations Windowmust be defined, either explicitly (by the user), or implicitly (automatically determined by

    EES). There are several ways to do this:

    4

  • 8/22/2019 EES_intro

    5/9

    February, 2005

    Options => Unit System. This unit system corresponds to variables in

    thermodynamic property tables. Example, in Unit System choose SI, mass basis,

    Celcius, kPa, and kJ. Now, use the EES property database to find the internal

    energy of water:

    u1 = INTENERGY(WATER, p = p1, T = T1)

    According to the chosen system of units, the input variables of pressure and

    temperature must be in kPa and C, respectively, and the output internal energy isprovided in kJ/kg.

    Options => Variable Info, units of each variable may be defined here

    Units may also be defined explicitly within theEquations Window, using [ ]:

    P1 = 10 [bar]

    Conversions may also be specified explicitly. For Pb in bar and Pk in kPa:

    Pk = Pb * 100 [kPa/bar]

    Unit errors

    Upon solving, EES indicates if units are consistent or not. If unit errors are detected:

    CheckVariable Info. Are all units specified and correct?

    Check EES functions. Are input variables in units as specified in Unit System?

    Equation format are units consistent? For example, if W = P1(v2 v1), and P is

    in bars, this will NOT result in units of kJ for W, and WILL cause a unit error.

    P-v and other interesting diagrams

    Construct a P-v diagram in EES showing each of the states found in our analysis. First,create an ARRAY (indicated byX[i], for variableXat state i) of each of the variables you

    desire to plot; P and v, in this case. Continuing on with example 3.4, construct the

    necessary arrays by adding several lines to those already in theEquations Window.

    Define arrays for diagrams

    P[1] = P_1P[2] = P_2P[3] = P_3

    v[1] = v_1v[2] = v_2v[3] = v_3

    T[1] = T_1T[2] = T_2T[3] = T_3

    P_3 = pressure(WATER, V=v_3,T=T_3)

    T_2 = temperature(WATER,u=u_2,v=v_2)

    Again select Solve. Initially in this case (before adding the last two lines, above), we find

    that P_3 has not been specified. Add any additional equations that are required for

    additional variables. When enough information is provided, an array table appears when

    Solve is selected. If any values are still missing from array table, add additional equations

    to theEquations Window to define values.

    5

  • 8/22/2019 EES_intro

    6/9

    February, 2005

    Next, construct a property plot by selectingPlots => Property Plots. Select the substance

    (water, in this example) and type of diagram (P-v). Adjust graph parameters if necessary.For clarity in this example problem, it is recommended that you deselectlines of constant

    entropy,s. Clickokand a plot will appear.

    Finally, place the states of your array on the P-v diagram by selecting Plots => Overlay

    Plotto open a setup window. UnderTable, select Arrays Table. Choose the appropriatevariables for the X-axis (v[i]) and Y-axis (P[i]). BE SURE to activate Show array

    indices, to display the state labels on your diagram. You MUST LABEL your graphs!Axis, units, states, significant temperatures and pressures..to name a few things. Adjust

    axis to maintain a clear view of the plotted states. See Figure 1.

    10-3 10-2 10-1 100 10110

    1

    102

    103

    104

    105

    v [m3/kg]

    P[kPa]

    500C400C

    180C

    150C

    Water

    12

    3

    10-3 10-2 10-1 100 101

    100

    200

    300

    400

    500

    v [m3/kg]

    T

    [C]

    1000 kPa

    475 kPa

    Water

    1

    2

    3

    Figure 1. P-v and T-v diagrams. Process 1-2 is constant pressure, and 2-3 maintains constant volume.

    6

  • 8/22/2019 EES_intro

    7/9

    February, 2005

    Discussion

    The water initially is in the superheated region. As heat is transferred from the cylinder,

    the steam (losing energy) is kept at constant pressure by the piston and thus compresses.Work is input to the system at this time (negative), but more energy is lost through heat

    (negative value) than is added to the system via work.

    The system reaches the point of saturation, on the edge of the vapor dome. Any slight

    disturbance would cause a drop of condensation to occur on the piston wall. As heat

    continues to leave the system and the temperature decreases, condensation indeed doesoccur. The volume is held constant during this time (Process 2-3). As heat is lost, more

    water moves from the vapor phase to the liquid phase. The pressure decreases during thistime because fewer and fewer molecules exist in the gas form to cause pressure againstthe walls. The process stops at T3, and the amounts of liquid and vapor present can be

    determined by calculating the quality at that location.

    Tables

    For further intriguing investigation of the piston-cylinder assembly, consider how the

    initial temperature is related to the required compression work and heat transfer.Maintaining the same initial pressure, and final state, we will vary the initial temperature

    and evaluate the compression work and heat loss. In EES, calculating and plotting the

    results over a range of initial temperatures is made simple by creating a Parametric

    Table. A Parametric Table allows you to vary one variable in a system of equations tostudy the effect on other specified variables.

    To build a Parametric Table, first comment out parameter that is to be varied, (T1) withbrackets or quotes in theEquations Window.

    {T_1 = 400}

    Water(Steam)

    1

    Q

    W

    Constant pressurecompression cooling

    Water(Sat.vap.)

    2

    Q

    saturated watervapor

    Constant volumecooling

    (condensation occurs)

    Water(Liquid-Vapor)

    3

    7

  • 8/22/2019 EES_intro

    8/9

    February, 2005

    Click the New Parametric Table command under the Tables menu. A pop-up window

    will appear where you can select the variables to be included in the table. Choose T_1,w_net, and q_net. Select addand clickOK. The number of cells can also be adjusted in

    this window but for this problem keep the number of cells at the default value of 10. A

    Parametric Table then appears listing all cells and selected variables. In the table, clickthe black down-arrow in the T_1 cell (or right-click on the T_1 cell and select Alter

    Values). Enter the minimum and maximum values forT_1 (labeledfirstand last). In thisexample the temperature is varied from 200 to 600 C. Lastly, click the green side-arrow

    in the upper left-hand corner of the table. This will generate the solution for eachvariable.

    Plots

    After generating a table, the results can be displayed graphically by creating a plot in

    EES. To plot the results determined above, select New Plot Window under the Plots

    menu. Then choose X-Y Plot. In the pop-up window, select Parametric Table under the

    Table setting. Select T_1 for the X-axis and w_net, and q_netfor the Y-axis. The style

    and look of the plot can also be chosen here, however, this can be done after plot

    generation as well. You can generate the plot by clicking OKSee Figure 2.

    The axis, labels, and other looks of the plot can be modified by right-clicking on these

    items. Comments and lines can be added to the plot using the small icon menu in the plotwindow or by selecting Add TextorAdd Line under the Plotmenu. Also, you can copy

    and paste plots using theEditmenu.

    200 250 300 350 400 450 500 550 600-2000

    -1600

    -1200

    -800

    -400

    0

    T1 [C]

    qnet,

    wnet,

    kJ/kg

    qnetqnet

    wnetwnet

    Figure 2. Initial steam temperature effect on net heat and work transfer.

    Discussion

    Both work and heat transfer are negative quantities here, thus work is input (done ON thesystem) and heat is output (lost FROM the system). As the temperature gap increases

    between the initial and final states, the heat loss increases as well. The work input also

    increases, but to a lesser magnitude than the heat transfer change.

    8

  • 8/22/2019 EES_intro

    9/9

    February, 2005

    HAVE FUN!!

    This document was prepared by

    [1] Michael J. Hebert, Department of Mechanical Engineering, University of Minnesota.

    [2] Sarah J. Warthesen, Department of Mechanical Engineering, University of Minnesota.

    9