You are on page 1of 1

h a n g e Vi h a n g e Vi

XC e XC e
F- w F- w
PD

PD
er

er
!

!
W

W
O

O
N

N
y

y
bu

bu
4 Chapter 1: Introduction to EES
to

to
k

k
lic

lic
C

C
w

w
m

m
w w
w

w
o

o
.d o .c .d o .c
c u -tr a c k c u -tr a c k

1.2 Entering and Solving Equations


A mathematical model of an engineering system is based on a system of equations that result
from the application of appropriate theory and simplifications. These equations describe mass,
energy, and entropy balances, rate relations, properties, etc. Modern computer tools, such as
EES, facilitate the solution of the large set of coupled equations that result from the analysis of a
typical engineering system. When you open EES for the first time you will encounter the
Equations Window where the equations that are to be solved are entered. EES allows the user to
enter equations rather than assignments, as are required by most formal programming languages.
This is an important distinction. In an assignment statement, the value of each variable on the
right side of an expression must have been previously determined. An equation is simply a
relationship between variables. Assignments are explicit and can be solved sequentially. A set
of equations may be implicit and nonlinear and must be solved simultaneously and iteratively.

Entering Equations
Consider the following set of equations:

x+ y =
3 (1-1)

y= z − 4 (1-2)

=
z x2 − 3 (1-3)

Equations (1-1) through (1-3) are three non-linear equations in the three unknowns x, y, and z.
However, they are not directly solvable using most formal programming languages (e.g.,
MATLAB or Fortran) because they are equations rather than assignments. In order to solve this
system of equations using a formal programming language, it would be necessary to either
employ an iterative solution technique (e.g., successive substitution) or carry out sufficient
algebra to convert the equations into assignments. Let's take the latter approach here.
Substituting Eq. (1-3) into Eq. (1-2) provides:

y = x2 − 3 − 4 (1-4)

Substituting Eq. (1-4) into Eq. (1-1) provides:

x + x2 − 7 =3 (1-5)

which can be rearranged:

x 2 + x − 10 =0 (1-6)

Equation (1-6) is a quadratic equation that can be solved using the quadratic formula:

You might also like