Professional Documents
Culture Documents
EES
EES
$Key Board EU
$Key Board US
Order of Operations
1) Parentheses
2) Exponents
3) Multiplication and Division
4) Addition and Subtraction
Variable names
EES is case- insensitive
Variables must begin with a letter
Variables cannot include : () * / + - {} 0r ;
{Comment 1}
“Comment 2”
//Comment 3
“! Comment type 2”
Mathematical
Complex
Economic
Statistical
S$ 'Aluminum'
k=Conductivity(S$,T= 300[K])
or
k=Conductivity(Aluminum,T= 300[K])
gone girls, rookie magazine
Clarkson potter
Rupee course publishers
We present
Ocean Wonky
Issac internship
Pixo blog
Introduction to Procedures
Logic Statements
Function Compare(A,B)
If (A=B) then compare=1 else compare=0
End
A=2
B=2+1e-9
C=compare(A,B)
Or
Function Compare(A,B)
If (ABS(A-B)<1e-5) then compare=1 else compare=0
End
A=2
B=2+1e-9
C=compare(A,B)
Or
Function Compare(A,B)
If (Round(A)=Round(B)) then compare=1 else compare=0
End
A=2
B=2+1e-9
C=compare(A,B)
Function Compare(A$,B$)
If (A$=B$) then compare=1 else compare=0
End
A$='A'
B$='B'
C=compare(A$,B$)
Function friction_factor(Re)
"assume flow is laminar"
friction_factor=64/Re
If (Re<2300) Then Return
"assume flow is turbulent"
friction_factor=1/0.790*ln(Re)-1.64)^2
If (Re<5e6) Then Return
"Reynold no. is out of range"
Friction_factor=-9
End
f_laminar=friction_factor(1000)
f_turbulent=friction_factor(1e5)
f_outofrange=friction_factor(1e7)
Function Fact(N)
F:=1 "factorial"
i:=0 "counter"
10: i:=i+1 "increment counter"
F:=F*i "multiply factorial by counter"
if(i<N) Then GoTo 10 "see if counter has reached N"
Fact:=F "assign factorial"
End
Y=Fact(7) "Fact(7)=5040"
Y2=Factorial(7) "EES build-in factorial function"
Or
Function Fact(N)
F:=1 "factorial"
If(N=0) Then Return "check for N=0"
i=0
Repeat
i=i+1
Fact=Fact*i
Until(i>=N)
End
Y=Fact(7) "Fact(7)=5040"
Y2=Factorial(7) "EES build-in factorial function"
Function Roughness (Pipe$)
Case Pipe$
'Steel':: Roughness=0.045 [mm]
'Cast Iron':: Roughness=0.5 [mm]
'Drawn Tubing':: Roughness=0.0015 [mm]
'Concrete':: Roughness=1.7 [mm]
'Glass':: Roughness=0.0 [mm]
'Plastic':: Roughness=0.004 [mm]
'Rubber':: Roughness=0.01 [mm]
'Else':: Roughness=0.0 [mm]
EndCase
End
Pipe$='Rubber'
R=Roughness(Pipe$)
N=5[-]
duration=100[s] "duration of process"
h_bar= 100 [W/m^2-K] "heat transfer coefficient"
A_s=0.01[m^2] "Surface Area"
T_ini=300[K] "initial Temperature"
T_infinity=500[K] "ambient Temperature"
C=100[J/K] "Total Heat Capacity"
T_final=Temp(duration,h_bar,A_s,T_ini,T_final,C,N)