A New Modelica Model and Scicos Simulation for 0D/1D Nonlinear Complex Systems

Oil & Gas Science and Technology, Nov 2008

The purpose of this article is to show that an improvement in understanding of physical phenomena can be achieved today, with the help of suitable numerical methods and simulation tools. Modeling and simulation are becoming more crucial, since engineers need to analyze very complex systems composed of several components from different domains. These systems are generally simulated by solving differential-algebraic systems which are in general hybrid systems incorporating many variables. The Modelica language allows formal writing of mathematical equations and the expression of models in an acausal way. In this paper, first, we present the advantage of the Modelica language in modeling and simulation of industrial applications. Then, two industrial test cases will be explained: the drilling-well station, which is a large complex 1D implicit system, and an automotive application where we test the advantages of Modelica to simulate switched models, known as commutated models. These applications have already been developed at IFP by Simulink (a Mathworks product). In the drilling case, the Simulink model was built with 116 subsystems and more than 500 blocks, whereas the Scicos model was built with just 9 Scicos/Modelica blocks. The engine model in Simulink is composed of 203 blocks and 30 subsystems, whereas the model in Scicos/Modelica is composed of less than 20 blocks. The simulation time in Simulink varies between 6 and 150 seconds as a function of the selected numerical solver, while in Scicos/Modelica it takes less than 3 seconds.Le but de cet article est de montrer que, grâce à des méthodes et outils numériques adaptés, la résolution, le contrôle et la compréhension des phénomènes physiques complexes sont aujourd'hui possibles. Dans ce travail, après une brève description du langage Modelica et de la méthode numérique "SUNDIALS", utilisée par le simulateur Scicos pour résoudre les systèmes non linéaires 0D/1D, nous traitons deux exemples industriels : en forage, pour résoudre un large système 1D complexe implicite, puis un exemple en contrôle moteur, afin de tester les capacités de ce langage à résoudre dans un même bloc d'équations, la commutation de modèles correspondant à un système 0D hybride (cohabitation du temps continu et discret). Ces modèles ont déjà été mis au point à l'IFP, avec la boîte à outils Simulink du logiciel Matlab. Pour le cas du forage, le modèle Simulink est construit avec 116 sous-systèmes et plus de 500 blocs, alors que le modèle Scicos n'est construit qu'avec 9 Scicos/Modelica blocs. Le modèle moteur Simulink est composé de 203 blocs et 30 sous-systèmes, alors que le modèle en Scicos/Modelica est composé de moins de 20 blocs. Le temps de simulation à l'aide de Simulink varie entre 6 et 150 secondes selon le type de l'intégrateur. En Scicos/Modelica, avec l'intégrateur SUNDIALS, la simulation prend moins de 3 secondes.

A PDF file should load here. If you do not see its contents the file may be temporarily unavailable at the journal website or you do not have a PDF plug-in installed and enabled in your browser.

Alternatively, you can download the file locally and open with any standalone PDF reader:

https://ogst.ifpenergiesnouvelles.fr/articles/ogst/pdf/2008/06/ogst08002.pdf

A New Modelica Model and Scicos Simulation for 0D/1D Nonlinear Complex Systems

Oil & Gas Science and Technology - Rev. IFP, Vol. A New Modelica Model and Scicos Simulation for 0D/1D Nonlinear Complex Systems M. Najafi 1 Z. Benjelloun-Dabaghi 0 0 Institut français du pétrole, IFP , 1-4 avenue de Bois-Préau, 92852 Rueil-Malmaison Cedex - France 1 INRIA , Domaine de Voluceau - Rocquencourt, BP 105, 78153 Le Chesnay Cedex - France - A New Modelica Model and Scicos Simulation for 0D/1D Nonlinear Complex Systems - The purpose of this article is to show that an improvement in understanding of physical phenomena can be achieved today, with the help of suitable numerical methods and simulation tools. Modeling and simulation are becoming more crucial, since engineers need to analyze very complex systems composed of several components from different domains. These systems are generally simulated by solving differential-algebraic systems which are in general hybrid systems incorporating many variables. The Modelica language allows formal writing of mathematical equations and the expression of models in an acausal way. In this paper, first, we present the advantage of the Modelica language in modeling and simulation of industrial applications. Then, two industrial test cases will be explained: the drilling-well station, which is a large complex 1D implicit system, and an automotive application where we test the advantages of Modelica to simulate switched models, known as commutated models. These applications have already been developed at IFP by Simulink (a Mathworks product). In the drilling case, the Simulink model was built with 116 subsystems and more than 500 blocks, whereas the Scicos model was built with just 9 Scicos/Modelica blocks. The engine model in Simulink is composed of 203 blocks and 30 subsystems, whereas the model in Scicos/Modelica is composed of less than 20 blocks. The simulation time in Simulink varies between 6 and 150 seconds as a function of the selected numerical solver, while in Scicos/Modelica it takes less than 3 seconds. INTRODUCTION Scilab (www.scilab.org) is free and open-source software for scientific computing, and Scicos (www.Scicos.org) is a toolbox of Scilab and provides an environment for modeling and simulating dynamical systems [ 4 ]. The underlying formalism in Scicos allows modeling of very general dynamical systems: systems including continuous, discretetime and event-based behaviors, which are generally referred to as hybrid systems. Modeling, in general, can be classified into two major categories: causal and acausal modeling. In causal modeling, the model is decomposed into several modules. Each module may have several inputs and outputs. The evaluation of outputs is based on the inputs and the internal variables. Acausal modeling, on the other hand, is closer to modeling with physical components. In a physical system, it is not possible to classify (at least a priori) a quantity or a variable as input or output. The causality of a variable depends on the complete set of the model’s equations. Scicos is originally based on causal system modeling. In order to implement a causal module, explicit blocks with explicit inputs and outputs (standard Scicos blocks) can be used. Recently, an extension of Scicos has been developed to allow acausal modeling or modeling of physical systems with components. This has been done, in particular, by lifting the causality constraint on Scicos blocks and by introducing the possibility of describing block behaviors with mathematical equations [ 11 ]. Introducing acausal modules into Scicos required the use of a new block type, i.e., implicit blocks or components. The advantage of implicit blocks is providing facilities to model a physical system by interconnecting components. In order to use components in addition to standard Scicos blocks, several new features have been added to Scicos. Components or implicit blocks are interfaced via special links associated with physical quantities such as current or voltage in electronics, or flow or pressure in hydraulics. The connection between two components represents a real physical connection. Internal and input/output behavior of standard explicit blocks is written in C or in Fortran, which are imperative or sequential languages. In order to describe the behavior of implicit blocks the Modelica language was used. In other words, the mathematical formulas describing the behavior of components are written in the Modelica language. Modelica (www.modelica.org) is a modern objectoriented programing language based on equations instead of assignment statements. It has a multi-domain modeling capability. For example, electrical, mechanical, thermal hydraulic, hydraulic and control systems can all be described in Modelica. In Modelica, equations are composed of expressions both on the left hand side and the right hand side. It is not required to write the equations in the form of assignments, nor to write the equations in a specified order. The Modelica compiler of Scic (...truncated)


This is a preview of a remote PDF: https://ogst.ifpenergiesnouvelles.fr/articles/ogst/pdf/2008/06/ogst08002.pdf

M. Najafi, Z. Benjelloun-Dabaghi. A New Modelica Model and Scicos Simulation for 0D/1D Nonlinear Complex Systems, Oil & Gas Science and Technology, 2008, pp. 723-736, Volume 63, Issue 6, DOI: 10.2516/ogst:2008042