咨询与建议

看过本文的还看了

相关文献

该作者的其他文献

文献详情 >Component-oriented acausal mod... 收藏

Component-oriented acausal modeling of the dynamical systems in Python language on the example of the model of the sucker rod string

作     者:Kopei, Volodymyr B. Onysko, Oleh R. Panchuk, Vitalii G. 

作者机构:Ivano Frankivsk Natl Tech Univ Oil & Gas Dept Computerized Mech Engn Ivano Frankivsk Ukraine 

出 版 物:《PEERJ COMPUTER SCIENCE》 (PeerJ Comput. Sci.)

年 卷 期:2019年第5卷第10期

页      面:e227页

核心收录:

基  金:The authors received no funding for this work 

主  题:Component-oriented modeling Acausal modeling Hybrid modeling Dynamical system Variable structure system Difference equations Python SymPy Sucker rod string Multi-domain modeling 

摘      要:Typically, component-oriented acausal hybrid modeling of complex dynamic systems is implemented by specialized modeling languages. A well-known example is the Modelica language. The specialized nature, complexity of implementation and learning of such languages somewhat limits their development and wide use by developers who know only general-purpose languages. The paper suggests the principle of developing simple to understand and modify Modelica-like system based on the general-purpose programming language Python. The principle consists in: (1) Python classes are used to describe components and their systems, (2) declarative symbolic tools SymPy are used to describe components behavior by difference or differential equations, (3) the solution procedure uses a function initially created using the SymPy lambdify function and computes unknown values in the current step using known values from the previous step, (4) Python imperative constructs are used for simple events handling, (5) external solvers of differential-algebraic equations can optionally be applied via the Assimulo interface, (6) SymPy package allows to arbitrarily manipulate model equations, generate code and solve some equations symbolically. The basic set of mechanical components (1D translational mass, spring-damper and force) is developed. The models of a sucker rods string are developed and simulated using these components. The comparison of results of the sucker rod string simulations with practical dynamometer cards and Modelica results verify the adequacy of the models. The proposed approach simplifies the understanding of the system, its modification and improvement, adaptation for other purposes, makes it available to a much larger community, simplifies integration into third-party software.

读者评论 与其他读者分享你的观点

用户名:未登录
我的评分