MathLetter #2, February 2008
MathModelica — new version soon to be released
Version 1.3 of MathModelica System Designer and MathModelica System Designer Professional includes several new features, including improved initialization and better handling of experiments. We are now in the final test phase. MathModelica users will receive an email notification as soon as it is available.
Modeling
In our ongoing effort to add new model libraries we have now added the FluidHeatFlow library, which is part of the Modelica Standard Library. The library contains the following very simple-to-use components to model coolant flows as needed to simulate cooling e.g. of electric machines:
- Components: components like different types of pipe models
- Examples: some test examples
- Interfaces: definition of connectors and partial models (containing the core thermodynamic equations)
- Media: definition of media properties
- Sensors: various sensors for pressure, temperature, volume and enthalpy flow
- Sources: various flow sources
Several other features like the ability of saving a total model, having orthogonal connections, and improved graphics handling have also been introduced.
Simulation
A lot of things have happened behind the scenes, with the most important features being improved initialization and addition of so called tearing.
If steady-state equations are specified at the component level, the corresponding system of initial equations at the system level might be overdetermined, if index reduction eliminates some states. On the other hand, steady-state equations are not sufficient to uniquely identify one equilibrium state in the case of closed systems, so additional equations are required. Steady-state initialization problems like this often occur in e.g. fluid systems. With MathModelica System Designer 1.3 we introduce the usage of minimization algorithms for steady-state initialization of overdetermined systems, making it possible to find a unique solution for overdetermined systems of initial equations. This makes it easier to develop easy to use Modelica libraries, as the experienced library developer can set proper initial conditions at a component level. A paper, Overdetermined Steady-State Initialization Problems in Object-Oriented Fluid System Models, will be presented at the 6th International Modelica Conference.
Tearing is a method of reducing the sizes of those equation systems that occur when e.g. transforming the model equations into state space form. It breaks large equation systems apart into smaller subsystems which can be solved faster than the large equation system and thereby improving simulation speed. It can also help in disambiguate between different solutions of nonlinear equation systems by forcing nonlinear equations to be solved according to a certain causality, as well as eliminating so called mixed systems of equations. Libraries like BondLib and Magnetic take extensive advantage of tearing. The interested reader can learn more about tearing in Francois E. Cellier and Ernesto Kofman's book Continuous System Simulation.
Finally several new features have been introduced in the Simulation Center to facilitate handling of experiments:
- A new possibility of saving and opening experiments facilitates the comparison of experiements as well as the possibility of sharing simulations with partners and colleagues.
- It is now possible to import external data (CSV), making it easy to compare simulation results with e.g. measurements.
- View the generated source code.
Control Design beta
As presented at the Wolfram Technology Conference 2007 features for model-based control design in MathModelica with the use of Mathematicas Control System Professional add-on is under way. It will be possible to generate both symbolic as well as numeric state space representations of models developed in MathModelica for use in Mathematica, resulting in an unparalleled combination for model based control design. This feature is currently on beta stage. If you are interested in trying it out please contact us at sales@mathcore.com.
