Codyn is a general purpose open source software framework for modeling and simulating Coupled Dynamical Systems. It uses object oriented concepts to define coupled systems in a concise manner using a special purpose modeling language allowing the user to directly define dynamical systems.
Design
Codyn has been designed as a core C library with an elegant public API, and a set of tools built on top of this C library. This approach ensures that the the core C library exposes all relevant API to built your own external tools, if needed. Furthermore, the C library can be easily expanded externally to add new integrator schemes, new io methods and additional mathematical functions. The core C library is furthermore built on top of GObject which provides a number of advantages (such as automatic bindings for various programming languages, including Python and automatic documentation generation).
A graphical user interface is provided to design, manipulate and test dynamical systems easily. States can be easily monitored and plotted to investigate the resulting dynamics. This application is particularly useful to play with parameters and designs of your system in an interactive manner.
The core codyn library features a small byte code compiler and corresponding interpreter which converts high level representations of the dynamical equations into instructions which can be evaluated. One of the various numerical integrator schemes that are built into the library can then integrate the system. This approach allows you to model dynamical systems in simple text files which can be integrated without any further compilation.
Math
The math in codyn supports basic mathematical functions and fully supports vectors and matrices. Various computationally intensive matrix operations (such as solving linear systems and matrix multiplication) are implemented using BLAS and LAPACK. Users can also easily define their own functions using the modeling language. Evaluation of mathematical expressions is done with a minimal memory profile and are optimized for execution speed.
In addition to basic math, a limited set of symbolic math is also available in codyn. In particular, symbolic derivation and simplification of mathematical expressions can be very useful.
Performance
Although the core codyn library is designed to be fast, the mathematical expressions are still interpreted by software. In addition, due to the object oriented approach of modeling the dynamical system, and the possibilities to modify a system dynamically, the resulting evaluation of the dynamical system is suboptimal when compared to a lowest level possible implementation in C. The tool cdn-rawc addresses this problem by converting the high level representation of the dynamical system to a low level C implementation. It generates an optimized C file with a small public API which can be compiled without any external libraries. The generated code is both pretty and can be easily customized (for example with optimized math functions). The code can also easily run on microcontrollers.
Community
For any questions related to Codyn, please visit the codyn-users google group.