Example: Optimal residence time of a chemostat (CHEMSTAT)

Background:
The model describes the residence time in a chemostat reactor in form of a steady-state-system.

The Mathematical Model:
The underlying system of equations is

r k2 c - 0.0553 D e  =  0
k
1 s (e - c) - k2 c - 0.0553 D c  =  0
-k
1 s (e - c) + 0.0553 D (s0 - s)  =  0

e, c, and s are the state variables, i.e., the solution variables of the system of equations, depending on a concentration D for which measurements subject to the fitting criterion 0.0553 D e are generated. Parameters to be estimated, are k1 and k2.

Literature:
Edgar T.F., Himmelblau D.M. (1988): Optimization of Chemical Processes, McGraw-Hill

Implementation:
The complete solution of a data fitting problem is described in six steps:

1. Define model type and document the experiment
... set some informative strings, define the mathematical structure and the variables
2. Specify details of the model structure
... set number of equations, tolerances, constraints, concentration values, ...
3. Use editor for declaring variables and for defining functions
... the essential part, you have to know the mathematical equations and how to relate them to the format required by
EASY-FITModelDesign
4. Insert measurement data
... the dirty job, can become boring (but you may import data from text files and EXCEL spreadsheets!)
5. Select termination tolerances and start a data fitting run
... only a few mouse clicks
6. A separate process is started and all computed data are displayed
... MODFIT estimates parameters and performs a statistical analysis

Results:
Then you would like to take a look at reports and graphs:
- parameter values
- experimental data versus fitting criterion

Documentation and parameters: Model structure: Model equations (or use your own favorite editor): Measurement data (or use import function for text file or Excel): Parameters, tolerances and start of a data fitting run: Numerical results (computed by the least squares code DFNLP): Report on parameter values, residuals, performance, etc. (or export to Word): Experimental data versus fitting criterion (also available for Gnuplot): 