DAEPACK is a software library consisting of components for performing symbolic and numeric computations on general Fortran-90 models.
DAEPACK is an acronym for Differential-Algebraic Equation Package, however, its scope is not limited to the analysis of DAEs. The components of DAEPACK can be used by the modeler to provide the necessary information (e.g., sparsity pattern, analytical derivatives, hidden discontinuities, etc.) required when using state-of-the-art algorithms to solve a wide variety of numerical calculations, including the solution of nonlinear algebraic equations, mixed integer nonlinear optimization, parameter estimation, and many others. DAEPACK components are designed to be mixed, matched, and combined with third party numerical components to solve any particular problem at hand. What distinguishes DAEPACK from other numerical libraries (e.g., LINPACK or ODEPACK) is the set of symbolic components that automatically generate the information required to perform the numerical calculation efficiently, robustly, and correctly using state-of-the-art numerical algorithms. This information, which would otherwise have to be provided by the modeler (a very tedious, time consuming, and error prone task), is exploited in a suite of DAEPACK numeric components.
DAEPACK can be used in several different ways. First, DAEPACK can be used standalone, where the modeler assembles the required symbolic and numeric components of DAEPACK, combined with the original model and other numerical routines, and solves a particular problem. The figure below demonstrates how DAEPACK can be used to assist the modeler in performing a dynamic calculation involving a DAE model.
The user provides DAEPACK with a set FORTRAN files containing the model equations. This model is translated and a set of new FORTRAN files are generated, providing the sparsity pattern, analytical derivatives, and a discontinuity-locked version of the the original model. The sparsity pattern can be used with a variety of structural algorithms, providing valuable information about the model. For example, the DAE can be examined to determine if it is high index. Current work involves the development of algorithms for the automatic index reduction of general FORTRAN models. The code generated by the symbolic components are used by a variety of DAEPACK numerical components used in this example. For example, the sparsity pattern and analytical derivatives are used by the block solver component to obtain a consistent set of initial conditions. The block solver, described in the numeric components section of the Features page, often dramatically improves the performance of the consistent initial condition calculation. The sparsity pattern, analytical derivatives, and discontinuity-locked model are used by a set of dynamic calculation components to perform the desired numerical calculation.
DAEPACK is also used with the equation-oriented process simulator ABACUSS II. The figure below contains a diagram showing the architecture of ABACUSS II.
ABACUSS II uses DAEPACK to perform the required numerical calculations. In addition,DAEPACK is used to properly incorporate FORTRAN code, such as physical property subroutines and legacy models, into an overall model. FORTRAN code is no longer treated as ablack box — DAEPACK is used to generate all of the symbolic information so that these external models are treated exactly the same way as the part of the model written in ABACUSS II’s input language. This capability allows the modeler to formulate heterogeneous models, where different parts of the model are expressed in various forms using the appropriate language for a particular task.
A third use of DAEPACK is as an enabling technology for CAPE-OPEN components. The EU-sponsored CAPE-OPEN committee and subsequent Global CAPE-OPEN committee are defining important interface standards for process simulation tools that will greatly improve the flexibility of modern simulation environments. The vision is that tools (e.g., physical property routines, process unit operation models, numerical routines, etc.) written in-house and combined with the products of several third-party vendors can be combined seamlessly to perform the desired calculation. The disadvantage of this, however, is that it forces the modeler developing CAPE-OPEN compliant components to concentrate on issues other than writing a correct model. This is particularly true of the Equation-Set Object which encapsulates
the variables, equations, and other information required when performing dynamic calculations within the CAPE-OPEN framework. The current specification requires the modeler to provide access to the equation structure (dimensions and sparsity pattern), partial derivatives, and variable values. If the system involves discontinuities then the modeler must represent the discontinuous model equations as a State-Transition Network. This, in particular, can be quite problematic since the number of discrete modes may become extremely large even for small problems. Fulfillment of these requirements places a tremendous burden on the modeler. Fortunately, DAEPACK can be used to automatically generate the additional information required to satisfy the CAPE-OPEN specifications. As shown in the figure below, the modeler concentrates on writing a correct model and DAEPACK takes care of the rest.
The CAPE-OPEN committee is defining important interface standards that will greatly increase the flexibility of modern process modeling environments, however, without enabling technologies, such as DAEPACK, these endeavors will never reach their true potential.
Heterogeneous model formulation
The input translation step of DAEPACK was designed from the start to be a flexible as possible, readily extensible to translating models described using languages other than Fortran-90. This capability, within the equation-oriented framework described above, allows the modeler to be very flexible in the model representation. The best model representation can be selected for different portions of the model and, using DAEPACK, the overall model can be solved in a consistent, correct manner.