EMSO Quick Reference LastChangedDate: 2007-07-17 11:02:49 -0300 (Ter, 17 Jul 2007)
Introduction Name Base Default Lower Upper Unit
volume mass positive 10 -1e-6 1e30 m3 /kg
EMSO is the acronym for Environment for Modeling, Simulation, and Optimization. current positive 10 -1e-6 1e12 A
It is a dynamic simulator for general processes. charge Real 10 -1e12 1e12 C
capacitance positive 10 -1e-6 1e12 F
This is the EMSO quick reference card, for detailed documentation please consult the indutance positive 10 -1e-6 1e12 V ∗ s/A
EMSO User’s Guide. voltage positive 100 -1e-6 1e9 V
You can find the latest version of this document, the EMSO User’s Guide, and the resistance positive 50 -1e-6 800 ohm
software itself at [Link] potency Real 10 -1e3 1e3 kW
currency Real 0 -∞ ∞ US$
mass positive 2.5 -1e-6 1e6 kg
mol positive 2.5 -1e-6 1e6 kmol
EMSO Types – [Link] molweight Real 75 1 1e8 kg/kmol
molweight inv Real 1 0 1e30 kmol/kg
Name Base Default Lower Upper Unit dens mol Real 1 1e-30 5e3 kmol/m3
Real Built-In 1 -∞ ∞ none dens mass Real 1e3 1e-30 5e5 kg/m3
coefficient Real 1 -50 50 none conc mol dens mol 1e-3 1e-30 5e3 kmol/m3
Constant Real 10 -5e3 5e3 none inv conc mol Real 0.05 2e-4 1e30 m3 /kmol
positive Real 1.0 -1e-6 ∞ none conc mass dens mass 1e3 1e-30 5e3 kg/m3
negative Real -1.0 -∞ 1e-6 none inv conc mass Real 1e-3 2e-6 1e30 m3 /kg
fraction Real 0.5 -1e-6 1.00001 none reaction mol Real 10 -1e6 1e6 kmol/h/m3
percent Real 50 0 100 none reaction mass Real 1e3 -1e3 1e9 kg/h/m3
control signal Real 1 -1e9 1e9 none cp mass Real 1.0 0.1 10.0 kJ/kg/K
efficiency Real 0.5 0 1 none cp mol Real 100 1 1e3 J/mol/K
pressure Real 1 1e-30 5e7 atm cv mol Real 100 1 1e3 J/mol/K
press delta pressure 0.01 -5e6 5e7 atm enth mass Real 500 -1e4 1e4 kJ/kg
head mass Real 50 -1e6 1e6 kJ/kg enth mol Real 500 -1e9 1e9 J/mol
head Real 50 -1e6 1e6 kJ/kmol entr mol Real 0 -1e4 1e4 kJ/kmol/K
temperature Real 300 27 5273 K entr mass Real 0 -1e4 1e4 kJ/kg/K
temp delta temperature 30 -1e3 1e3 K heat reaction Real 1e3 -1e8 1e8 kJ/kmol
time h positive 1 -1e-6 1e4 h heat rate Real 1e3 -1e11 1e11 J/s
time min time h 1 -1e-6 ∞ min heat flux Real 1 -1e5 1e5 kW/m2
time sec time h 1 -1e-6 ∞ s heat trans coeff positive 1 -1e-6 1e3 kW/m2 /K
frequency positive 1 -1e-6 100 1/s energy Real 1e4 -1e11 1e11 kJ
angle Real 0 -7 7 rad energy mass Real 1e4 -1e15 1e15 kJ/kg
area positive 1 -1e-6 1e6 m2 energy mol Real 1e4 -1e15 1e15 kJ/kmol
length positive 1 -1e-6 5e6 m power Real 10 -1e8 1e8 kW
length delta length 1 -1e3 ∞ m flow mass positive 1e3 -1e-6 1e10 kg/h
volume positive 10 -1e-6 1e3 m3
volume mol positive 10 -1e-6 1e6 m3 /mol
Gerson B. Bicca [Link]
EMSO Quick Reference LastChangedDate: 2007-07-17 11:02:49 -0300 (Ter, 17 Jul 2007)
Name Base Default Lower Upper Unit Function Meaning
flow mass delta flow mass 1e3 -1e10 1e10 kg/h sinh(Z) Returns the hyperbolic sine of Z
flow vol positive 1 -1e-6 1e12 m3 /h cosh(Z) Returns the hyperbolic cosine of Z
flow vol delta flow vol 1 -1e12 1e12 m3 /h tanh(Z) Returns the hyperbolic tangent of Z
flow mol positive 10 -1e-6 1e8 kmol/h coth(Z) Returns the hyperbolic cotangent of Z
flow mol delta flow mol 10 -1e8 1e8 kmol/h sin(Z) Returns the sine of Z
flux mol positive 1 -1e-6 1e4 kmol/s/m2 cos(Z) Returns the cosine of Z
flux mol delta flux mol 1 -1e4 1e4 kmol/s/m2 tan(Z) Returns the tangent of Z
flux mass positive 1 -1e-6 1e6 kg/s/m2 asin(Z) Returns the angle whose sine is Z
flux mass delta flux mass 1 -1e6 1e6 kg/s/m2 acos(Z) Returns the angle whose cosine is Z
flux vol positive 1 -1e-6 1e4 m3 /s/m2 diff(Z) Returns the derivative of Z with respect to time
flux vol delta flux vol 1 -1e4 1e4 m3 /s/m2 atan(Z) Returns the angle whose tangent is Z
vel angular Real 1e3 -1e5 1e5 rpm sum(Z) Returns the sum of components of a vector or matrix Z
rotation Real 5e2 -1e4 1e4 rad/s prod(Z) Returns the product of a vector or matrix Z
velocity Real 1 -1e5 1e5 m/s sumt(Z) Returns the transpose sum of components of a vector or matrix Z
velocity delta velocity 0 -1e3 -1e3 m/s prodt(Z) Returns the transpose product of components of a vector or matrix Z
acceleration Real 9.81 -1e3 1e3 m/s2 transp(Z) Returns the transpose of a matrix Z
fricfactor Real 0.05 1e-5 2e3 none exp(Z) Returns the exponential function, e raised to the power Z
moment inertia Real 100 1e-3 1e4 kg ∗ m2 log(Z) Returns the base 10 logarithm of Z
hookes const Real 1e5 1 1e10 N/m ln(Z) Returns the natural logarithm (base e) of Z
conductivity Real 1.0 1e-3 500 W/m/K sqrt(Z) Returns the square root of Z
diffusivity positive 1e-3 -1e-6 1 cm2 /s
fugacity positive 0.5 -1e-6 10 none
viscosity Real 1 1e-30 1e5 cP Units Of Measurement (UOM)
vol mol volume mol 10 -1e-6 1e6 m3 /mol
vol mass volume mass 10 -1e-6 1e6 m3 /kg
Fundamental Units
spec surface vol positive 1e5 -1e-6 1e15 m2 /m3
spec surface mass positive 100 -1e-6 1e12 m2 /kg m length in meters
surf tens positive 0.05 -1e-6 1 N/m kg mass in kilogram
act coeff positive 1 -1e-6 30 none s time in seconds
ph Real 7 -5 20 none K temperature in Kelvin
A eletric current in Ampere
mol the amount of substance in mole
Built-In Functions cd the luminous intensity in Candela
rad angle measure in radian
Function Meaning US$ money in dollar (USA)
abs(Z) Returns the magnitude or absolute value of Z
max(Z) Returns the maximum value of Z
min(Z) Returns the minimum value of Z
sign(Z) Returns the signal of Z (-1 if Z < 0 e 1 if Z> 0
round(Z) Returns the small integer value of Z
Gerson B. Bicca [Link]
EMSO Quick Reference LastChangedDate: 2007-07-17 11:02:49 -0300 (Ter, 17 Jul 2007)
Derived Units pdl 0.138254954376*N poundal
lbf 4.44822161526*N pounds of force
Acceleration of Gravity kip 4448.22161526*N kip
ga 9.80665*m/s2 standard acceleration of gravity gf 0.00980665*N gram force
Angle kgf 1e3*gf kilogram force
arcs 4.8481368111e-6*rad arcsecond dyn 0.00001*N dyne
arcmin 2.90888208666e-4*rad arcminute Length
grad 1.57079632679e-2*rad grad cm 1e-2*m centimeter
deg 1.74532925199e-2*rad degree mm 0.1*cm millimeter
Area fermi 1e-15*m fermi
acre 4046.87260987*m2 acre Å 1e-10*m angstrom
a 100*m2 are µ 1e-6*m micro
ha 10000*m2 hectare mil 2.54e-5*m mil
b 1e-28*m2 barn ftUS 0.304800609601*m international foot
Eletric fath 1.82880365761*m fathom
Wb kg*m2 /A/s2 weber rd 5.02921005842*m rod
T kg/A/s2 tesla chain 20.1168402337*m chain
S A2 *s3 /kg/m2 siemens miUS 1609.34721869*m US statute miles
mho A2 *s3 /kg/m2 mho nmi 1852*m nautical mile
Fdy 96487*A*s faraday mi 1609.344*m International Mile
F A2 *s4 /kg/m2 farad km 1000*m Kilometer
ohm kg*m2 /A2 /s3 ohm au 1.495979e11*m Astronomical Unit
C A*s unit of relative current for batteries lyr 9.46052840488e15*m light year
V kg*m2 /A/s3 volt pc 3.08567818585e16*m parsec
Energy Mpc 3.08567818585e22*m megaparsec
J kg*m2 /s2 joule in 0.0254*m inch
kJ 1e3*J kilojoule ft 0.3048*m foot
MJ 1e6*J megajoule yd 0.9144*m yard
GJ 1e9*J gigajoule Mass
eV 1.60217733e-19*J electronvolt u 1.6605402e-27*kg atomic mass unit
MeV 1e6*eV megaelectronvolt grain 0.00006479891*kg grain
therm 105506000*J therm ct 0.0002*kg carat
Btu 1055.05585262*J British thermal unit ozt 0.0311034768*kg troy ounce
cal 4.1868*J calorie t 1000*kg tonne
kcal 1e3*cal kilo calorie tonUK 1016.0469088*kg ton (UK)
erg 1e-7*J erg ton 907.18474*kg ton
Force lbt 0.3732417216*kg troy pound
N kg*m/s2 newton
Gerson B. Bicca [Link]
EMSO Quick Reference LastChangedDate: 2007-07-17 11:02:49 -0300 (Ter, 17 Jul 2007)
slug 14.5939029372*kg slug h 60*min hour
oz 0.028349523125*kg ounce d 24*h day
lb 0.45359237*kg pound yr 31556925.9744*s year
g kg/1000 gram Velocity
kmol 1e3*mol kilomole c 299792458*m/s velocity (or ”speed”) of light
lbmol 453.59237*mol pound mole knot 0.514444444444*m/s knot
Money mph 0.44704*m/s mile per hour
R$ US$/3.05 Brazilian money (Real) kph 0.277777777778*m/s kilometer per hour
Power Viscosity
W kg ∗ m2 /s3 watt St 0.0001*m2 /s stoke
kW 1e3*W Kilowatt P 0.1*kg/m/s poise
MW 1e6*W megawatt cP 0.001*kg/m/s centipoise
hp 745.699871582*W horsepower Volume
Pressure st m3 Stere
Pa kg/m/s2 pascal fbm 0.002359737216*m3 board foot
kPa 1e3*Pa Kilopascal pk 0.0088097675*m3 peck
MPa 1e3*kPa megapascal bu 0.03523907*m3 bushel
inH2O 248.84*Pa inch of water column bbl 0.158987291928*m3 barrel
inHg 3386.38815789*Pa inch of mercury trp 4.92892159375e-6*m3 teaspoon
mmHg 133.322368421*Pa millimeter of mercury tbsp 1.47867647813e-5*m3 tablespoon
torr 133.322368421*Pa torr ozUK 2.8413075e-5*m3 fluid ounce (UK)
psi 6894.75729317*Pa pound per square inch ozfl 2.95735295625e-5*m3 fluid ounce
bar 1e5*Pa bar cu 2.365882365e-4*m3 US Cup
atm 101325*Pa atmosphere l 1e-3*m3 liter
Radiation ml 1e-3*l milliliter
R 0.000258*A*s/kg R pt 0.000473176473*m3 pint
Ci 3.7e10/s curie qt 0.000946352946*m3 quart
Bq 1/s becquerel gal 0.00378541178*m3 gallon
Sv m2 /s2 sievert galC 0.00454609*m3 imperial gallon
rem 0.01*m2 /s2 rem galUK 0.004546092*m3 gallon (UK)
Gy m2 /s2 gray
Temperature
degR K/1.8 degree Rankine
Time
Hz 1/s hertz
min 60*s minute
rpm 1/min revolution per minute
Gerson B. Bicca [Link]
EMSO Quick Reference LastChangedDate: 2007-07-17 11:02:49 -0300 (Ter, 17 Jul 2007)
Modeling Language The Model Entity
Model ModelName [as base]
Conventions: ATTRIBUTES
Icon ="file name";
• Every command enclosed by [ ] is optional. Pallete = false | true;
Brief ="A shortcut information about the model";
• The code a | b | c means a or b or c. Info ="A detailed information about the model";
PARAMETERS
• Every command between < > is an emphasis in that command. [outer] ParName;
[outer] ParName as base;
• FlowSheet accepts all commands of a Model [outer] ParName as base(Brief="brief",Default=value,Lower=value,Upper=
value,DisplayUnit=’unit’);
• Optimization and Estimation accept all commands of a FlowSheet [outer] size as Integer(Brief="brief",Default=value,Lower=value,Upper=
value);
[outer] ParName(size) as base(Brief="brief",Default=value,Lower=value,
Upper=value,DisplayUnit=’unit’);
The FlowSheet Entity [outer] ParName(dim1,dim2,...) as base(Brief="brief",Default=value,Lower=
value,Upper=value,DisplayUnit=’unit’);
ParName as Switcher(Brief="brief",Valid=["value1","value2",...],Default="
FlowSheet FlowSheetName [as base]
value");
DEVICES
VARIABLES
DevName as base [(Brief="brief")];
[in | out] VarName;
CONNECTIONS
[in | out] VarName as base;
[Link]<in> to [Link]<out>;
[in | out] VarName as ModelBase [(Brief="brief")];
SET
VarName as base(Brief="brief",Default=value,Lower=value,Upper=value,
ParName = <expression involving only parameters> | value ;
DisplayUnit=’unit’);
SPECIFY
VarName(size) as base(Brief="brief",Default=value,Lower=value,Upper=value
["equation name"] [Link] = expression | value;
,DisplayUnit=’unit’);
INITIAL
VarName(dim1,dim2,...) as base(Brief="brief",Default=value,Lower=value,
["equation name"] [Link] = expression | value;
Upper=value,DisplayUnit=’unit’);
OPTIONS
CONNECTIONS
Dynamic = false | true;
varName<in> to varName<out>;
TimeStart = value;
EQUATIONS
TimeStep = value;
["equation name"] expression = expression;
TimeEnd = value;
INITIAL
TimeUnit = ’unit’;
["equation name"] varName = expression | value;
SparseAlgebra = false | true;
SET
GuessFile = "File Name";
ParName = <expression involving only parameters> | value;
InitialFile = "File Name";
size = < a integer value >;
NLASolver(File="sundials" |"nlasolver",
end
RelativeAccuracy=1e-3, AbsoluteAccuracy=1e-6, MaxIterations =100);
DAESolver(File="sundials"|"dassl"|"dasslc"|"mebdf",
RelativeAccuracy=1e-3,AbsoluteAccuracy=1e-6,EventAccuracy =1e-2);
NLPSolver(File="complex"|"ipopt_emso",RelativeAccuracy=1e-3);
end
Gerson B. Bicca [Link]
EMSO Quick Reference LastChangedDate: 2007-07-17 11:02:49 -0300 (Ter, 17 Jul 2007)
The Optimization Entity Expressions:
Optimization name [as base] algebraic operations:+, -, *, /, ˆ
MINIMIZE built-In functions: See list above
expression1; plugin Method: [Link](arguments)
expression2;
MAXIMIZE
expression3;
expression4;
EQUATIONS Conditional Equations:
expression5 < expression6;
expression7 > expression8;
if LogicalExpression then
FREE
["equation name"] Equations;
variable1;
else
variable2;
["equation name"] Equations;
end
end
switch Valid_Switcher_ParName
case "validName":
The Estimation Entity ["equation name"] Equations;
[when LogicalExpression switchto "Any validName"];
. . .
Estimation EstimationName as FlowSheetName end
ESTIMATE
#PARAMETER START LOWER UPPER UNIT
ParName StartValue LowerValue UpperValue ’unit’
EXPERIMENTS
# DATA FILE WEIGTH LogicalExpressions:
"[Link]" WeigthValue1;
"[Link]" WeigthValue2;
. . . Relational operations:
OPTIONS <, >, <=, >=
. . . Logical constants:
end true, false
Logical operations:
and, or, not, equal
The experimental data – [Link]
MEASURE time Param1 Param2 . . . ParamN Iterative equations:
[ UNIT ’timeUnit’ ’unit1’ ’unit2’ . . . ’unitN’ ]
[ VARIANCE timeVar var1 var2 . . . varN ] for index in [StartValue:EndValue]
DATA Timevalue value1 value2 . . . valueN ["equation name"] Equations;
end
Simple Equations
["equation name"] expression = expression;
Gerson B. Bicca [Link]