Académique Documents
Professionnel Documents
Culture Documents
SIMULATION
BASIC DEFINITIONS
System
Dynamic
System
Structur
e
Behavio
ur of
system
Simulati
on
SIMULATION
CLASSICAL
SIMULATION
SYSTEM DYNAMIC
SIMULATION
FEEDBACK
RELATIONSHIPS
+ve feedback
Feedback loop
+ve feedback
-ve feedback
Suggestion 4
A difference between actual and perceived states of a process can often
be important in explaining patterns of behaviour. Thus, it may be
important to include casual loop elements for both the actual value of a
variable and the perceived value. In many cases, there is a lag (delay)
before the actual state is perceived. For example when there is a
change in water quality, it usually takes a while before we perceive this
change .
Suggestion 5
There are often differences between short-term and long-term
consequences of actions, and these may need to be distinguished with
different loops.
Suggestion 6
If a link between two elements needs a lot of explaining, you probably
need to add, intermediate elements between the two existing elements
that will more clearly specify what is happening.
Suggestion 7
Keep the diagram as simple as possible, subject to the earlier
suggestions, The purpose of the diagram is not to describe every detail
Diagraming notation
STOCKS
It is explained by accumulation or
levels
Stocks can be used to depict
material and nonmaterial
accumulation
FLOWS
It is explained by flow rates
Flows are used to depict activities
(i.e., things in motion), valve
control the flow
Principle 6.
Stocks are changed only by the flows . A stock variable is computed by the
change, due to flow variables, that alters the previous value of the stock.
The earlier value of the stock is carried forward from the previous period. It
is altered by flows over the intervening time interval. The present value of
a stock variable can be computed without the present values of any other
stock variable
Principle 7.
Stocks and flows are not distinguished by units of measure. The units of
measure of a variable do not distinguish between a stock and a flow. The
identification must recognize the difference between a variable created by
integration and one that is a policy statement in the system.
Principle 8.
No flow can be measured except as an average over a period of time. No
flow can control another flow without an intervening stock variable.
Principle 9.
Flows depend only on stocks and constants. No flow variable depends
directly on any other flow variable. The flow equations of a system are of
simple algebraic form .They do not involve time or the solution interval.
They are not dependent on their own past values .
Principle 10.
Stock and flow variables must alternate. Any path through the structure of a
system encounters alternating stock and flow variables.
Principle 11.
Stocks completely describe the system condition. Only the values of the
stock variables are needed to fully describe the condition of a system.
Flow variables are not needed because they can be computed from
stocks,
Principle 12.
A policy or flow equation recognizes a local goal towards which that
decision strives. It compares the goal with the current system condition
to detect a discrepancy, and uses the discrepancy to guide the action.
In differential
form
Where inflow(s) is the value of the inflow at any time s between the initial
time to and the current time t. Eventually the rate of change of any stock
can be represented with its derivatives.
The assumption that flows remain constant throughout the time interval dt
is reasonable if the dynamics of the system are slow enough and dt is
small enough. The definitions of reasonable and slow enough depend on
the required accuracy, which depends on the purpose of the model.
As the time step gets smaller, the accuracy of Euler's approximation
improves.
At the limit, when dt becomes an infinitesimal moment of time the above
equation reduces
to the exact continuous-time differential equation
governing the dynamics of the system:
The use of a finite time step and resulting approximations of flows over
the interval introduce error, know as integration error or dt error.
This error depends on how quickly the flows change relative to the time
step.
The faster the dynamics of the system, or the longer the dt the larger
the integration error.
Select a time step for your model that is a power of 2, such as 2, 1,0.5
, 0.25, etc.
Make sure your time step is evenly divisible into the interval between
data points
Select a time step one-fourth to one-tenth as large as the smallest
time constant in your model.
Test for integration error by cutting the time step in half and running
the model again. If
in behaviour no longer
matter.
Note that Euler integration is almost always fine in models where there
are large errors in parameters, initial conditions, historical data and
especially model structure. Test the robustness of your result to Euler
Groundwater aquifer
production causal diagram
The following steps are a useful for analysis and formulating:Issue statement
It is simply a statement of the problem which makes it clear what the
purpose of the model will be.
Variable identification
Identification of key quantities that will need to be included in the
model for the model to be able to address the issues at hand.
It can sometimes be useful just to write down all of the variables that
might be important and try to rank them in order to identify the most
important ones.
Reference modes
Reference mode is a pattern of behaviour over time.
Reference modes are drawn as graphs over time for key variables, but
are not necessarily graphs of observed behaviour. Rather, they are
cartoons that show a particular characteristic of behaviour that is
interesting.
For example, a Water company's Water sales history may be growing
but bumpy, and the reference mode may be the up and down movement
around the growth trend.
Reference modes can refer to either past behaviour or future behaviour.
Realty Check
Define some realty check statements about how things must interrelate.
These include a basic understanding of what factors are involved and
how they interact, along with the consequences for some
variables of significant changes in other variables.
Realty check information is often simply recorded as notes about what
consequences need to exist.
Dynamic hypothesis
It a theory about what structure exists that generates the
reference mode.
A dynamic hypothesis can be stated verbally, as a causal loop diagram or
a stock and flow diagram. The dynamic hypotheses you generate can be
used to determine what will be kept in models, and what will be excluded.
Like all hypotheses, dynamic hypotheses are not always right. Refinement
and revision is an important part of developing good models .
Simulation models
It is the refinement and closure of a set of dynamic hypotheses to an
explicit set of mathematical relationships.
These models generate behaviour through simulation.
A simulation model provides a laboratory in which you can experiment to
understand how different elements of structure determine behaviour.
This process is iterative and flexible.
The basic model structure should involve one stock variable water in tub,
and two flow variables, faucet flow and drain flow. The volume of water in
tub increases through the flow of water from the faucet and decreases
through the drain outflow. Starting model structure is as follows.
Next define the auxiliary variable called drain function, which will be
a graphical function of water in tub. This function is an increasing
function , as more water in the tub implies higher outflow. We shall
define the x-range from 0 to 40 and the y-range from 0 to 2, and enter
the two values: (0,0) and (40,2). Note that the input variable is water in
tub, and that the output variable is drain function. This graphical
Results of bathtub
simulation
A simple system dynamic model has been developed using STELA software
showing how climate change risks could affect, both positively and
negatively, the economic performance of firms. This model aims to assist
in the understanding of academics and managers for the what if
scenarios
for climate
risks model which have been organized in
The key variables
of change
the proposed
two main sets: the financial performance of firms (e.g. the corporate
economic performance)
and the effects of climate change on firms' operation (e.g. corporate
climate change performance). Economists have examined the evolution of
corporate profits under different market conditions (e.g. perfect
competition, oligopoly and monopoly), demographic conditions (e.g.
increase of population, the composition of population), macroeconomic
conditions (e.g. inflation, and various levels of risk taken by managers (e.g.
risk takers, risk
neutral,
risk averse)).
the model,
economic
The totaland
revenue
(TR) is In
calculated
asthe
thevariable
productcorporate
of the price
(P) and
performance
(e.g.The
profits)
standard
relationship
of the
sales (Quantity).
totalarises
costsfrom
(TC) the
consists
of the
fixed costs
(FC) and
revenue
minus
the(VC).
costs as the classical economics and business literature
the variable
costs
show
In the case of this model, the total cost includes the firms' expenditures for
the climate change adaptation and mitigation strategies and rate of fines.
The potential physical risks in the cases where firms have unexpected
financial losses from an extreme weather event (e.g. droughts and floods)
are also added to TC. The financial losses of physical risks are associated
with the severity of the damage and the probability of an extreme events
happening (Risk = Damage*Probability). The expenditures of firms are also
The trends
of the main
variables in
the third
scenario
The trends of
key variables
of the fourth
scenario
activity, by
integrating in the
same simulation environment design, operation and control.
Compared with steady state simulation, both modelling and software
technology are much more demanding.
A simple flash cannot be seen only as a 'generic' multi-phase equilibrium
vessel, but needs the specification of the vessel type and geometry, as well
as the relation between flow and
pressure drop for inlet and outlet lines. In addition, key operating variables,
as levels,
temperatures or pressures, should be kept at desired values by means of
Dynamic flow sheeting is based on the unsteady state balance of mass
controllers.
and energy, and may be formulated in general terms by the following
Therefore, dynamic simulation without process control implementation has
equation:
little practical sense.
1/cAin*dcA/dt= ((cAin-cA)-kcA)/cAin
dCA/d= ((1-CA)-DaCA
Following Fig. presents the transient of a CSTR for CA, o= 1 with Da= 1 and
Da=3.
Faster reaction gives higher conversion, but
shorter transient.
The heat transfer term can be calculated by assuming that the thermal
agent has a
constant temperature T:
The equations contain partial derivatives with both time and length.
Three approaches are usually employed:1. Transformation of partial differential equations in algebraic equations
by using finite
differences. The most known approach is the 'method of lines'.
2. Use of special functions, as orthogonal polynomials in the class of
methods based on
'collocation', to approximate concentration and temperature profiles.
3. Replacement of PFR by a series of CSTR's.
Finite difference methods are implemented in gPROMS (2001). Aspen
Dynamics
uses the third approach. Care should be paid to a convenient description
of a PFR. A
number of ten CSTR's is sufficient, but when the temperature variation is
highly
gPROMS
model
builder.
used
to build,
nonlinear,
the useis
of aseveral
PFR
reactorsIt
in is
series
is recommended
Implementation of controllers
The majority of controllers in industry are based on Single Input Single
Output (SISO)
loops. The implementation of such controllers consists of a succession of
operations, as
follows:
Select the process variable (PV) that has to be controlled. This may be a
stream or
unit variable, usually pressure, temperature, concentration, mass or
volumetric flow
rates, as well as the liquid level. The variation can be expressed as a
percentage from
the range (PVmax - PVmin). Setpoint SP is the PV value that should be kept at
a desired
value. Usually the setpoint is positioned close to the midrange.
Define the controller output (OP) as the manipulated variable. This is
usually a
stream flow rate or heat duty. The steady state design supplies the
nominal value. The
maximum output may be taken as twice the nominal value. The minimum
output may
In the above relation OPss is the steady state value, or the bias of the
manipulated
variable, and is the error defined as difference between PV and set point.
Mode of action.
In direct action, when the process variable PV is above the setpoint
(negative error) the manipulated variable (OP) is increased (negative gain),
and vice versa. For instance, consider level control by outlet flow. When
the level rises above the setpoint the outlet flow must increases too.
In reverse action, when PV increases above SP (negative error), the
manipulated variable decreases. Here we may give as example the control
of purity by reflux. When the purity of the product increases above the
setpoint, the reflux flow rate must diminish.
Prepare the controller view and recorder settings.
a plant
wide
control
structure
Modify
the design to
ensure
that the. manipulated variables are
effective for control.
Prepare the dynamic run.
3. Dynamic flow sheeting
Implement the basic control structures of units, primarily of levels and
pressures.
Develop of a plant wide control structure .
Implement and tune the controllers of units, usually of PID type.
4. Analysis of results
Study the plant performance in closed loop faced to different
disturbances.
Carry out dynamic controllability analysis if necessary .
Perform refinement of design and control, and finally optimisation.
An important issue in the above procedure is the degrees of freedom
analysis (DOF)
in dynamic simulation.
Two important variables, used to evaluate the spray system behaviour, are
the water evaporated and the mean spray temperature.
The total water evaporated by volume unit of entering brine (M evap,sp),
during the spraying time, is given by:
the sum of the
volumes of the brine
solution and of the
NaCl salt precipitated
in the drop, and it
relates to the drop