The system allows the creation of differential-algebraic equation (DAE) models, although the solution facilities for algebraic equations are somewhat limited.

Its be described using a simple example.

`
dx _{1}/dt = (-Ay-x_{1}) / T_{1} `

dx/dt = (x_{1}-y) / T_{2}

y = x²

The initial conditions are: ` x = 0 , x _{1}=1 ` at

As with the algebraic system it is convenient to consider the model as consisting of sections:

- variables
- parameters
- equations, of which there are here two kinds:
- algebraic equations
- differential equations

- initial conditions for differential equations
- a housekeeping or schedule section

Each of these sections will be described briefly.

x1, x, yThe variables are the unknowns in the model. As discussed elsewhere, there are two sorts of variables in DAEs, those which may appear as derivatives in the differential equations, and the `algebraic' variables which do not. This distinction is not made in this section, which serves mainly to define the names to be used for variables.

A=1 ; T1=1 T2 = 2`Parameters' as distinct from `unknowns' in a mathematical problem are quantities which the user knows, but which might be changed at some point to see their effect. It is convenient to give them symbols rather than simply numbers.

A parameter may often be a physical property, e.g. a heat capacity, which can appear several times in a set of equations. If the parameter is defined in one place, then making one change will result in the new parameter value being used throughout the model.

This section of the model enables parameters to be defined and given values if required. If no values are given the parameter defaults to zero. New values can be given when the spreadsheet has been generated.

y = x*xThese are differential equations:

x1.dt = (-A*y-x1)/T1 x.dt = (x1-x)/T2This is the main part of the model and contains the differential and algebraic equations which describe the model. Note the following:

- Differential quations may be written in any order.
- There must be as many equations as variables.
- Each variable must appear once, and only once, on the left hand side on an `=' sign.
- The LHS variable will appear as a derivative for a differential equation, and as a simple variable for an AE.
- The dot `.dt' following a variable name indicates its derivative w.r.t. time. These may only appear on the left hand side on an `=' sign.
- The LHS
**must**be a single variable or its derivative, it may not be an expression. - Differential quations may be written in any order.
- Algebraic equations, as in the algebraic equation solver, must appear in an order such that no algebraic variable appears on the RHS of an `=' sign before it has previously appeared on the LHS.

x=0 ; x1=0This section provides another place where initial values may be given for variables. If no initial values is set for a variable which requires it, then it defaults to zero.

- the timestep for the simulation, here 0.5 time units
- length of the simulation time, here 25 units.

Clicking **Show Model Data ** will provide a listing of the complete model.
This can be copied and pasted into a text file, e.g. in Windows
a Notepad .txt file, save and used to recreate your model.

Course Organiser Last Modified 5/8/04