Integration of conditional models: Difference between revisions
Created page with '{{missing}} Category:Development' |
No edit summary |
||
| (40 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{ | [[Image:Bouncing-ball.png|thumb|400px|right|A bouncing ball simulated in ASCEND. This is our new implementation which makes use of [[User:Ksenija|Ksenija]]'s new [[EVENT]] syntax. The model files is {{srcbranch|ksenija2|models/ksenija/bball_event3.a4c}}. This supercedes our previously model {{src|models/test/ida/leon/bouncingball.a4c}} by [[User:LeonKwek|Leon Kwek]], which made use of [[WHEN]] syntax, without events. In the earlier model, we needed to model the elasticity of the ball in order to achieve bouncing behaviour. Now, we can directly reverse the direction of the ball's movement, making a faster/simpler model.]] | ||
{{experimental}} | |||
''[[User:Ksenija|Ksenija Bestuzheva]] and [[User:Jpye|John Pye]] are currently working on aspects of this project.'' | |||
Integration of conditional models means solving dynamic systems of equations ([[ODE]]s or [[DAE]]s) that contain 'branching' or conditional logic. Such systems are also sometimes termed [http://en.wikipedia.org/wiki/Hybrid_system hybrid systems]. For example, if a flow velocity increases over time, we would like the solver to at some point switch from a laminar flow model to a turbulent flow model. This requires a solver that can perform [[boundary detection]] and then turn on and off equations within the model, according to which are applicable at that point in the simulation. | |||
This work is proposed as part of the complete integration of the [[IDA]] solver in ASCEND. | |||
A good paper containing a discussion of issues relating to the implementation of this is given by Majer et al<ref>C. Majer, W. Marquardt and E. D. Gilles, 1995, ''Reinitialization of DAEs after discontinuities'', Computers and Chemical Engineering '''19''', 507-512, {{doi|10.1016/0098-1354(95)87087-3}}.</ref>. | |||
Some discussion of the implications of this approach for 'real' modelling is given by Elmegaard & Houbak<ref>B Elmegaard and N Houbak, 2005, ''DNA – A General Energy System Simulation Tool'', Proceedings of 46th Conference on Simulation and Modeling (SIMS 2005), Trondheim, Norway ([http://www.scansims.org/sims2005/SIMS2005_16.pdf pdf], [http://www.dtu.dk/English/Service/Phonebook.aspx?lg=showcommon&id=184624 bibio])</ref>. In particular it is interesting to ponder the case of switching with hysteresis, which requires unidirectional boundaries... | |||
Some discussion of the general issues of integration of conditional modelling, aka dynamic simulation with switching, is given by Pantelides and Barton<ref>Pantelides & Barton, 1993, ''Equation-oriented dynamic simulation current status and future perspectives'', Computers & Chemical Engineering, {{doi|10.1016/0098-1354(93)80240-N |}}</ref>. It might also be interesting to read the perspective of Engell in regard to 'hybrid systems simulation'<ref>S Engell, 1998, ''Modelling and analysis of hybrid systems'', Mathematics and Computers in Simulation '''46''' (5-6), {{doi|10.1016/S0378-4754(98)00076-7}}</ref>. Barton and Pantelides have another paper on combined continuous/discrete modelling that looks good<ref>P I Barton and C C Pantelides, 1994, ''Modeling of combined discrete/continuous processes'' AIChE. J. '''40''', pp. 966–979, {{doi|10.1002/aic.690400608}}</ref>. The earliest paper on this topic seems to be by Fahrland<ref>D A Fahrland, 1970, ''Combined discrete event continuous systems simulation'', Simulation '''14''' (2) pp.61-72, {{doi|10.1177/003754977001400203}}</ref>. | |||
The implementation of boundary detection for IDA is detailed in the IDA manual<ref>[https://computation.llnl.gov/casc/sundials/documentation/ida_guide/node5.html#SECTION00555000000000000000 https://computation.llnl.gov/casc/sundials/documentation/ida_guide/node5.html]</ref> | |||
Data structures for [[conditional modelling]] in ASCEND already exist that can represent boundaries arising from real-valued inequality relations, see for example {{src|models/test/ida/boundaries.a4c}}. A good starting point is {{doxy|d2/d74/a00697.html|system/conditional.h}} for the data structures, and {{doxy|d0/df1/a00685.html|system/analyse.h}} for some functions and routines that manipulate those data structures (used by [[CMSlv]]). | |||
There is some helpful discussion about algorithms for event handling as implemented in the OpenModelica compiler/runtime system<ref>Håkan Lundvall and Peter Fritzson, 2005. ''[https://www.modelica.org/publications/papers/2005-10-Lundvall-Fritzson-SIMS05-EventsinOpenModelica.pdf Event Handling in the OpenModelica Compiler and Runtime System]'' SIMS 05 conference (accessed 23 Mar 2015).</ref>. | |||
== References == | |||
<references/> | |||
== See also == | |||
* [[Event handling]] | |||
* [[Improved DAE syntax]] | |||
* [[Conditional modelling]] | |||
* [[Integrator API]] | |||
[[Category:Development]] | [[Category:Development]] | ||
Latest revision as of 08:06, 24 March 2015

Ksenija Bestuzheva and John Pye are currently working on aspects of this project.
Integration of conditional models means solving dynamic systems of equations (ODEs or DAEs) that contain 'branching' or conditional logic. Such systems are also sometimes termed hybrid systems. For example, if a flow velocity increases over time, we would like the solver to at some point switch from a laminar flow model to a turbulent flow model. This requires a solver that can perform boundary detection and then turn on and off equations within the model, according to which are applicable at that point in the simulation.
This work is proposed as part of the complete integration of the IDA solver in ASCEND.
A good paper containing a discussion of issues relating to the implementation of this is given by Majer et al[1].
Some discussion of the implications of this approach for 'real' modelling is given by Elmegaard & Houbak[2]. In particular it is interesting to ponder the case of switching with hysteresis, which requires unidirectional boundaries...
Some discussion of the general issues of integration of conditional modelling, aka dynamic simulation with switching, is given by Pantelides and Barton[3]. It might also be interesting to read the perspective of Engell in regard to 'hybrid systems simulation'[4]. Barton and Pantelides have another paper on combined continuous/discrete modelling that looks good[5]. The earliest paper on this topic seems to be by Fahrland[6].
The implementation of boundary detection for IDA is detailed in the IDA manual[7]
Data structures for conditional modelling in ASCEND already exist that can represent boundaries arising from real-valued inequality relations, see for example models/test/ida/boundaries.a4c. A good starting point is doxy:system/conditional.h for the data structures, and doxy:system/analyse.h for some functions and routines that manipulate those data structures (used by CMSlv).
There is some helpful discussion about algorithms for event handling as implemented in the OpenModelica compiler/runtime system[8].
References
- ↑ C. Majer, W. Marquardt and E. D. Gilles, 1995, Reinitialization of DAEs after discontinuities, Computers and Chemical Engineering 19, 507-512, doi:10.1016/0098-1354(95)87087-3.
- ↑ B Elmegaard and N Houbak, 2005, DNA – A General Energy System Simulation Tool, Proceedings of 46th Conference on Simulation and Modeling (SIMS 2005), Trondheim, Norway (pdf, bibio)
- ↑ Pantelides & Barton, 1993, Equation-oriented dynamic simulation current status and future perspectives, Computers & Chemical Engineering, doi:10.1016/0098-1354(93)80240-N
- ↑ S Engell, 1998, Modelling and analysis of hybrid systems, Mathematics and Computers in Simulation 46 (5-6), doi:10.1016/S0378-4754(98)00076-7
- ↑ P I Barton and C C Pantelides, 1994, Modeling of combined discrete/continuous processes AIChE. J. 40, pp. 966–979, doi:10.1002/aic.690400608
- ↑ D A Fahrland, 1970, Combined discrete event continuous systems simulation, Simulation 14 (2) pp.61-72, doi:10.1177/003754977001400203
- ↑ https://computation.llnl.gov/casc/sundials/documentation/ida_guide/node5.html
- ↑ Håkan Lundvall and Peter Fritzson, 2005. Event Handling in the OpenModelica Compiler and Runtime System SIMS 05 conference (accessed 23 Mar 2015).