Lecture #3
The Process of Simulating Dynamic Mass Balances
Outline
• Basic simulation procedure• Graphical representation• Post-processing the solution• Multi-scale representation
BASIC PROCEDURE
Dynamic Simulation
1. Formulate the mass balances:
2. Specify the numerical values of the parameters
3. Obtain the numerical solution
4. Analyze the results
dtdx =Sv(x;k)
ki=value; I.C. xio=xi(t=0)
Run a software package
xi
t
viGraphically:
t
Obtaining Numerical Solutions:use anyone you like – we use mathematica
Set up the equationsSet up the equations
Specify parametersSpecify parameters
SolveSolve
Specify graphical outputSpecify graphical output
Plot and exportPlot and export
Typical Mathematica WorkbookStep 1
Step 2
Step 3
Step 4
Results
The Results of Simulation:a table of numbers
1 2 3 4 50
xi
t
Can correlate variables, r2
•off-set in time•on a particular time scale
GRAPHICAL REPRESENTATION
Example Graphical Representation of the Solution, x(t)
Multi-time scale representation:segmenting the x-axis
Dynamic Phase Portrait
Can also plot fluxes vi(t) and pools pi(t) in the same way; this is a very useful representation of the results
Characteristic “Signatures” in the Phase Portrait
POST-PROCESSING THE SOLUTION
Post-processing the Solution1. Computing the fluxes
stst
vi
t
vi
vj
t=ot ∞
v(t)=v(x(t))
dynamic response phase portrait
Post-processing the Solution2. Forming pools; two examples
Compute “pools”: p(t)=Px(t) t
p(t)
Example #2
ATP ADP
AMP ADP
then plot
x1 x2
Keq=1
Example #1
total mass
Post-processing the Solution3. Computing auto correlations
n=3first segment
n=mentire range
n=moff-set in time, =2
Example 1
Example 2
Example 3
MULTI-SCALE REPRESENTATION
Tiling Phase Portraitsx1
x2
x2
x1
x3
x1
k
slope=kr2~1
A series of tiled phase portraits can be prepared,one for each time scale of interest
x1
x2
x3
x1 vs. x2 same as x2 vs. x1
symmetric array
use corresponding locations in array to conveydifferent information•graph•statistics
Representing Multiple Time-Scales:tiling phase portraits on separate time scales
Time: 0 -> 3 sec Time: 3 -> 300 sec
Example System:
Example of Time-Scale Decomposition
time
x10=1
x20=x30=x40=0
x3, x4 donot move
Fast
x4 doesnot move
Intermediate Slow
All Times Fast
Intermediate Slow
Tiled Phase Portraits:overall and on each time scale
expanded scalex3 ~ 0
perfect correlation
Post-processing the Solution1. Forming pools
p1 and p2 are dis-equilibrium variables
p3 is a conservation variable
Tiled Phase Portraits for Pools:L-shaped; dynamically independent
(1/2,1)
(0,0)
(0,0) (0,0)
(1,1) (1,1/2)
no correlations
Summary• Network dynamics are described by dynamic mass balances
dx/dt=Sv(x;k) that are formulated after applying a series of simplifying assumptions
• To simulate the dynamic mass balances we have to specify the numerical values of the kinetic constants (k), the initial conditions (x), and any fixed boundary fluxes.
• The equations with the initial conditions can be integrated numerically using a variety of available software packages.
• The solution is in a file that contains numerical values for the concentration variables at discrete time points. The solution is graphically displayed as concentrations over time, or in a phase portrait.
• The solution can be post-processed following its initial analysis to bring out special dynamic features of the network. We will describe such features in more detail in the following three chapters.