From DAE Tools
What is DAE Tools?
DAE Tools is a collection of software tools for modelling, simulation and optimization of real-world processes. Process modelling and simulation can be defined as theoretical concepts and computational methods that describe, represent in a mathematical form and simulate the functioning of real-world processes. DAE Tools is initially developed to model and simulate processes in chemical process industry (mass, heat and momentum transfers, chemical reactions, separation processes, thermodynamics). However, DAE Tools can help you develop high-accuracy models of (in general) many different kind of processes/phenomena, simulate/optimize them, visualize and analyse the results. Its features should be sufficient to enable mathematical description of chemical, physical or socio/economic phenomena. The most common are initial value problems of implicit form, which can be formulated as systems of linear, non-linear, and (partial) differential algebraic equations.
Documentation is completely rewritten using Sphinx and will replace the old wiki docs. The preview can be found here.
A new version 1.3.1 will bring the following new features and improvements:
- Numerical simulation of partial differential equations on adaptive unstructured grids using Finite Elements Method. libMesh and deal.II frameworks are adapted to generate daetools equations during the system matrix assembly phase. All details about the mesh, basis functions, quadrature rules, refinement procedure etc. are handled by the libMesh/deal.II libraries. The advantage of this concept is that the generated equations (linear, nonlinear or differential - depending on the class of the system) can be coupled with other FE-unrelated equations in a daetools model and solved altogether by daetools solvers; system discontinuities can be handled as usual in daetools; modelled processes can be optimized, etc.
- Code generators for Modelica (whole simulation or just selected models/ports) and ANSI C. It is already functional (available only in python) and located in the folder daetools/code_generators (with some tests). Almost all features available in daetools can be exported to Modelica and c, except event ports, user defined actions and functions and some limitations on STNs (nested state transition networks are not supported at the moment; might be resolved in the meantime). The existing model analyzer make code generation rather simple (as long as the very basic modelling concepts such as parameters, variables and discontinuous equations are supported in the target language).
- Support for Functional Mock-up Interface for Model Exchange and Co-Simulation (FMI) and Simulink blocks.
A bug fix in 3D plot when detecting free domains (by Caleb Hattingh).
DAE Tools software is used as a reference implementation simulator for NineML (XML-based simulator independent language for spiking neuron network modeling).
DAE Tools v1.2.1 is released on 14 June 2012. It brings several new features and improvements (More details). The most important are:
- Integration speed improvements (more than an order of magnitude, in some cases); no need for a memory copy from/to the DAE solver, a better integration step control and an option to avoid sparse matrix re-creations after a discontinuity
- Added support for units; variables, parameters, domains points must have a numerical value in terms of a unit of measurement (quantity) and units-consistency is strictly enforced (although it can be switched off in the daetools.cfg config file); all constants in equations must be dimensional and assigned units
- A basic support for external functions that can handle and evaluate functions in external libraries (the goal is to support certtain software components such as thermodynamic property packages)
- A new type of 2D plots: Animated2D plot
- Equations can have an optional scaling
- Improved data reporting speed and changes in data reporting during an optimization
- New distribution format (python disutils)
- Mac OSX port
- c++ (cDAE) tutorials
- Support for the information about the progress of a simulation/optimization activity
- Other small improvements and minor bugs fixes
The documentation needs a serious revision and numerous updates; therefore the existing features will be frozen until everything is in place.
In general, there are two types of approaches that can be applied to process modelling: Domain Specific Language approach and a general-purpose programming language approach (such as c/c++, Java or Python). DAE Tools approach is a sort of the hybrid approach: it applies general-purpose programming languages such as c++ and Python, but offers a class-hierarchy/API that resembles a syntax of a DSL as much as possible, an access to the low-level functions, large number of standard and third party libraries and uses state of the art free/open-source software components to accomplish particular tasks (calculating derivatives and sensitivities, solving systems of differential and algebraic systems of equations and optimization problems, processing and plotting results etc). Read more...
The main features
DAE Tools is a cross-platform equation-oriented process modelling and optimization system. All core libraries are written in standard ANSI/ISO c++ . It is highly portable - it can run on every platform with a decent c++ compiler, Boost and standard c/c++ libraries (by now it is tested on 32/64 bit x86 and ARM architectures making it suitable for use in embedded systems). DAE Tools core libraries are small and fast, and each module can be easily extended. Models can be developed in Python (pyDAE module) or c++ (cDAE module), compiled into an independent executable and deployed without a need for any run time libraries.
Various types of processes (lumped or distributed, steady-state or dynamic) can be modelled and optimized. They may range from very simple to those which require complex operating procedures. Equations can be ordinary or discontinuous, where discontinuities are automatically handled by the framework. Model reports containing all information about a model can be exported in XML MathML format automatically creating a high quality documentation. The simulation results can be visualized, plotted and/or exported into various formats.
Currently Sundials IDAS solver is used to solve DAE systems and calculate sensitivities, while BONMIN, IPOPT, and NLOPT solvers are used to solve NLP/MINLP problems. DAE Tools support direct dense and sparse matrix linear solvers (sequential and multi-threaded versions) at the moment. In addition to the built-in Sundials linear solvers, several third party libraries are interfaced: SuperLU/SuperLU_MT, Intel Pardiso, AMD ACML, Trilinos Amesos (KLU, Umfpack, SuperLU, Lapack), and Trilinos AztecOO (with built-in, Ifpack or ML preconditioners) which can take advantage of multi-core/cpu computers. Linear solvers that exploit general-purpose graphics processing units (GPGPU, such as NVidia CUDA) are also available (SuperLU_CUDA, CUSP) but in an early development stage.
DAE Tools models can be exported into some other modelling languages. At the moment, models can be exported into pyDAE (python) and cDAE (c++) but other languages will be supported in the future (such as OpenModelica, EMSO ...).
"Necessity, who is the mother of invention"
Plato, Greek author & philosopher (427 BC - 347 BC), The Republic
"Every good work of software starts by scratching a developer's personal itch"
Eric S. Raymond, hacker, The Cathedral and the Bazaar, 1997
The latter cannot be more true[note 1]. The early ideas of starting a project like this go back into 2007. At that time I have been working on my PhD thesis using one of commercially available process modelling software. It was everything nice and well until I discovered some annoying bugs and lack of certain highly appreciated features. The developers of that proprietary program (as it is a case with all proprietary computer programs) had their own agenda fixing only what they wanted to fix and introducing new features that they anticipated. Although I was able to improve the code and introduce certain features which will help (not only) me - I was helpless. The source code was not available and nobody will ever consider giving it to me to create patches with bugs fixes/new features. Not even if I swear on the holy (c++) bible!!
Very soon the contours of a new process modelling software slowly began to form. It took me a while until I made a definite plan and initial features, and I had to abandon a couple of initial versions...
"Plan to throw one away; you will, anyhow"
Eric S. Raymond, hacker, The Cathedral and the Bazaar, 1997
DAE Tools use the following third party free software libraries (GNU GPL, GNU LGPL, CPL, EPL, BSD or some other type of free/permissive/copy-left licences):
- Sundials IDAS: https://computation.llnl.gov/casc/sundials/main.html
- Boost: http://www.boost.org
- ADOL-C: https://projects.coin-or.org/ADOL-C
- Qt and pyQt4: http://qt.nokia.com, http://www.riverbankcomputing.co.uk/software/pyqt/intro
- Numpy: http://numpy.scipy.org
- Scipy: http://www.scipy.org
- Blas/Lapack/CLapack: http://www.netlib.org
- Minpack: http://www.netlib.org/minpack
- Atlas: http://math-atlas.sourceforge.net
- Trilinos Amesos: http://trilinos.sandia.gov/packages/amesos
- Trilinos AztecOO: http://trilinos.sandia.gov/packages/aztecoo
- SuperLU/SuperLU_MT: http://crd.lbl.gov/~xiaoye/SuperLU/index.html
- Umfpack: http://www.cise.ufl.edu/research/sparse/umfpack
- MUMPS: http://graal.ens-lyon.fr/MUMPS
- IPOPT: https://projects.coin-or.org/Ipopt
- Bonmin: https://projects.coin-or.org/Bonmin
- NLOPT: http://ab-initio.mit.edu/wiki/index.php/NLopt
- CUSP: http://code.google.com/p/cusp-library
DAE Tools can optionally use the following proprietary software libraries:
- AMD ACML linear solver (pyAmdACML module): http://www.amd.com/acml
- Intel MKL linear solvers (pyIntelMKL and pyIntelPardiso modules): http://software.intel.com/en-us/articles/intel-mkl
Please see the corresponding websites for more details about the licences.
How to cite
If you use DAE Tools in your work then please cite it in the following way: D. Nikolic, DAE Tools process modelling software, 2010. http://www.daetools.com
- ↑ However, I do not agree with Eric Raymond and the Open Source Iniative views - they miss the point IMO, but let us leave it beside at the moment.