Documente Academic
Documente Profesional
Documente Cultură
T
t
V
T
x
$Temp( Axi s. I nt er i or + Axi s. EndNode) =
- v*Temp( Axi s. I nt er i or + Axi s. EndNode) . ddx;
$T( X. I nt er i or ) = k/ ( r ho*cp) *T( X. I nt er i or ) . d2dx2;
2
2
.
. x
T
c
k
t
T
p
\
|
=
j
i
ij
y
s
pressure link
330 2000 AspenTech. All Rights Reserved. ACM intro
Specifications
19 variables and 10 equations
we need 19 - 10 = 9 specifications
Stream 1
F
1
and P
1
fixed
Valve 1
k
A
fixed
Tank
V, A, n, rho and T
o
fixed
Valve 2
k
B
fixed
331 2000 AspenTech. All Rights Reserved. ACM intro
Resolution
Steady state resolution :
Set dV
l
/dt = 0
Solve the system - ok!
Initialization run :
Need one initial condition : for example V
l
Not possible to solve
ACM detects that the
system is singular
332 2000 AspenTech. All Rights Reserved. ACM intro
Incorrect Specification for initialization run
Check status dialog with F
1
and P
1
set
333 2000 AspenTech. All Rights Reserved. ACM intro
Physical explanation
It is not possible to set both the feed flowrate and
pressure (because the pressure is the driving force for
the flow, so they are not independent)
Need to use another specification scenario
For example free F
1
and fix P
4
334 2000 AspenTech. All Rights Reserved. ACM intro
Initialization for Singular Systems
Initialization is singular due to index > 1 system
Aspen Custom Modeler can integrate systems up to index 1
335 2000 AspenTech. All Rights Reserved. ACM intro
Frequent causes of index>1 problems
Trying to do something which is not physically possible
(specifications)
Fixing the liquid level of a tank (perfect level control?)
Fixing the pressure of a gas holdup
Fixing a state variable or equivalent...
Modeling issues
Over-simplifications
An algebraic variable which is Free and which appears only in
differential equations
336 2000 AspenTech. All Rights Reserved. ACM intro
Recommendation
Be proactive : try to make your models look after
themselves
Fixed, Initial, RateInitial and Free in variable declaration
Define Conditions testing parameter values, connectivity
Use Visual Basic scripts to specify your system
Use the Analyze tool
It is not always simple
2000 AspenTech. All Rights Reserved.
Convergence and Troubleshooting
(optional)
338 2000 AspenTech. All Rights Reserved. ACM intro
Convergence Problems
Steady-state
check for typos, missing conversion factors, etc...
improve your initial guesses and bounds on variables
high residuals (equations and variables)
339 2000 AspenTech. All Rights Reserved. ACM intro
Convergence Problems
Non-Linear/Tolerances
maximum variable step
maximum range fraction
Improve equation scaling
Try initialization run and look at time derivatives
Analyze smaller systems
Simplify the model, open recycle loops
340 2000 AspenTech. All Rights Reserved. ACM intro
Integration Problems
Check model for missing conversion factors, etc...
signs in balances and controller action
Non-convergence
discontinuity?
system not physically realistic
Unexpected results
check modeling assumptions
minimum time step too large
try open loop or other control schemes
2000 AspenTech. All Rights Reserved.
Switches (optional)
342 2000 AspenTech. All Rights Reserved. ACM intro
Switches
The switch construct implements two concepts:
conditional equations
state may depend on past history
343 2000 AspenTech. All Rights Reserved. ACM intro
Example
Rudimentary level control:
pump off until level goes under lower level
pumps full rate until level goes above high level
stop
pump
start
pump
344 2000 AspenTech. All Rights Reserved. ACM intro
Example
State diagram:
pump off
pump on
if volume <low
if volume >high
345 2000 AspenTech. All Rights Reserved. ACM intro
Example
ACM language:
pump_cont r ol :
swi t ch
i ni t i al st at e pump_of f
p_i n. F = 0;
i f V < Vmi n st at e : pump_on;
endst at e
st at e pump_on
p_i n. F = f l ow_max;
i f V > Vmax st at e : pump_of f ;
endst at e
endswi t ch
346 2000 AspenTech. All Rights Reserved. ACM intro
SWITCH Syntax
Syntax as follows:
INITIAL keyword to specify initial state
Swi t chName: SWI TCH
I NI TI AL STATE St at eName
Swi t chSt at ement s;
I F Condi t i on STATE : NewSt at eName;
ENDSTATE
.
.
ENDSWI TCH
2000 AspenTech. All Rights Reserved.
Modeling Review (optional)
Review briefly the fundamental principles of
modeling
348 2000 AspenTech. All Rights Reserved. ACM intro
Modeling Review
Modeling helps you
understand your process phenomena
get relevant useful data for accurate simulation
approach what is relevant and what is not
improve unit operation or flowsheet performance and safety
May bring some surprising conclusions giving radical
solutions to problems with huge financial savings
349 2000 AspenTech. All Rights Reserved. ACM intro
Problem Types
Steady state
Initialization and Dynamic runs
Steady state optimization
Dynamic optimization
Steady state parameter estimation and data
reconciliation
Dynamic parameter estimation
350 2000 AspenTech. All Rights Reserved. ACM intro
Variables
Two categories of variables:
State variables :
a variable that is differentiated with respect to time
example : the holdup in a tank
Algebraic variables :
additional variables to write the model
example : temperature, pressure, flowrate
351 2000 AspenTech. All Rights Reserved. ACM intro
Equations
Balances
material balances
energy balances
Pressure/flow relations - hydrodynamics
Kinetics
mass and heat transfer (e.g. diffusion, convection, radiative)
352 2000 AspenTech. All Rights Reserved. ACM intro
Equations
Thermodynamic equilibrium
Geometric constraints
Physical properties
Control system
353 2000 AspenTech. All Rights Reserved. ACM intro
Models
Detailed modeling
leads to distributed parameter models
which leads to partial differential equation systems
Engineering or lumped approach
working out position to lead to lumped parameters
e.g. perfectly mixed tank
354 2000 AspenTech. All Rights Reserved. ACM intro
Material Balances
Steady state balance:
Dynamic or unsteady state balance:
For multicomponent mixtures: one material balance per
component
d(content)/dt = in - out + generation
0 = in - out + generation
355 2000 AspenTech. All Rights Reserved. ACM intro
Energy Balance
Energy content : internal energy
Energy flow : usually enthalpy/time
internal energy : U
internal energy for flow: h + v
2
/2 + z.g
h = u + pv : internal energy + compression work
kinetic energy
potential energy
d(internal energy content)/dt =
internal energy in - internal energy out + Q -W
356 2000 AspenTech. All Rights Reserved. ACM intro
Other Fundamental Laws
Equations of motion (conservation of momentum)
Kinds of forces
normal forces : e.g. pressure
shear forces : e.g. viscous forces
body forces : e.g. gravity
357 2000 AspenTech. All Rights Reserved. ACM intro
Transport Equations
Transport equations have the form:
flux : rate of transfer per unit area
driving force : gradient in temperature, concentration, etc
Examples at microscopic scale:
thermal conductivity : Fourier's law
component diffusion : Fick's law
momentum : Newton's law of viscosity
[flux] = [coefficient] . [driving force]
358 2000 AspenTech. All Rights Reserved. ACM intro
Transport Equations
Examples at macroscopic scale
Heat:
Q = U.A.DT (convection)
- Q : heat duty
- U : convective heat transfer coefficient
- DT : temperature difference
Q = .T
4
(radiation)
- Q : heat duty
- : radiative heat transfer coefficient
- T : temperature of the source
359 2000 AspenTech. All Rights Reserved. ACM intro
Transport Equations
Examples at macroscopic scale
Fluid dynamic:
flow rate = [DP].[area]/[resistance]
- resistance in general depends on flow rate
- laminar flow: F = k.DP (k constant)
- turbulent flow: F = k'.sqrt(DP)
- DP : pressure difference
- F : flowrate
- k, k' : dependent on the system
More details required for sonic flows, quick transients
360 2000 AspenTech. All Rights Reserved. ACM intro
Physical Properties
Evaluation of quantities involved in the previous
equations:
density, enthalpy, viscosity, ...
Thermodynamic equilibrium
liquid-vapor equilibrium, liquid-liquid equilibrium
general
phase temperature equality
phase pressure equality
phase component fugacity (or chemical potential) equalities
361 2000 AspenTech. All Rights Reserved. ACM intro
Physical Properties
Non-equilibrium models
application of transfer/transport equations
362 2000 AspenTech. All Rights Reserved. ACM intro
Process Control
Sensor - Controller - Control valve
Control valve
Sensor
Controller
set point
363 2000 AspenTech. All Rights Reserved. ACM intro
Sensors
Measure important variables: generate signal to
controller
Dynamic response usually much faster than that of the
process, rarely modeled rigorously
exceptions: chromatographs (periodic measurements), some
thermocouple (high pressure; thermal well), pH (delay)
364 2000 AspenTech. All Rights Reserved. ACM intro
Controllers
A form of the PID general equation (library) :
error = setpoint - signal
(or signal - setpoint)
(
+ + + =
t
d
I
c bias
dt
de
edt e K X X
0
1