-
Asymptote-based scientific animation
Authors:
Migran N. Gevorkyan,
Anna V. Korolkova,
Dmitry S. Kulyabov
Abstract:
This article discusses a universal way to create animation using Asymptote the language for vector graphics. The Asymptote language itself has a built-in library for creating animations, but its practical use is complicated by an extremely brief description in the official documentation and unstable execution of existing examples. The purpose of this article is to eliminate this gap. The method we…
▽ More
This article discusses a universal way to create animation using Asymptote the language for vector graphics. The Asymptote language itself has a built-in library for creating animations, but its practical use is complicated by an extremely brief description in the official documentation and unstable execution of existing examples. The purpose of this article is to eliminate this gap. The method we describe is based on creating a PDF file with frames using Asymptote, with further converting it into a set of PNG images and merging them into a video using FFmpeg. All stages are described in detail, which allows the reader to use the described method without being familiar with the used utilities.
△ Less
Submitted 30 September, 2023;
originally announced October 2023.
-
Implementation of hyperbolic complex numbers in Julia language
Authors:
Anna V. Korolkova,
Migran N. Gevorkyan,
Dmitry S. Kulyabov
Abstract:
Background: Hyperbolic complex numbers are used in the description of hyperbolic spaces. One of the well-known examples of such spaces is the Minkowski space, which plays a leading role in the problems of the special theory of relativity and electrodynamics. However, such numbers are not very common in different programming languages. Purpose: Of interest is the implementation of hyperbolic comple…
▽ More
Background: Hyperbolic complex numbers are used in the description of hyperbolic spaces. One of the well-known examples of such spaces is the Minkowski space, which plays a leading role in the problems of the special theory of relativity and electrodynamics. However, such numbers are not very common in different programming languages. Purpose: Of interest is the implementation of hyperbolic complex in scientific programming languages, in particular, in the Julia language. Methods: The Julia language is based on the concept of multiple dispatch. This concept is an extension of the concept of polymorphism for object-oriented programming languages. To implement hyperbolic complex numbers, the multiple dispatching approach of the Julia language was used. Results: The result is a library that implements hyperbolic numbers. Conclusions: Based on the results of the study, we can conclude that the concept of multiple dispatching in scientific programming languages is convenient and natural.
△ Less
Submitted 4 January, 2023;
originally announced January 2023.
-
Using a template engine as a computer algebra tool
Authors:
Migran N. Gevorkyan,
Anna V. Korolkova,
Dmitry S. Kulyabov
Abstract:
In research problems that involve the use of numerical methods for solving systems of ordinary differential equations (ODEs), it is often required to select the most efficient method for a particular problem. To solve a Cauchy problem for a system of ODEs, Runge-Kutta methods (explicit or implicit ones, with or without step-size control, etc.) are employed. In that case, it is required to search t…
▽ More
In research problems that involve the use of numerical methods for solving systems of ordinary differential equations (ODEs), it is often required to select the most efficient method for a particular problem. To solve a Cauchy problem for a system of ODEs, Runge-Kutta methods (explicit or implicit ones, with or without step-size control, etc.) are employed. In that case, it is required to search through many implementations of the numerical method and select coefficients or other parameters of its numerical scheme. This paper proposes a library and scripts for automated generation of routine functions in the Julia programming language for a set of numerical schemes of Runge-Kutta methods. For symbolic manipulations, we use a template substitution tool. The proposed approach to automated generation of program code allows us to use a single template for editing, instead of modifying each individual function to be compared. On the one hand, this provides universality in the implementation of a numerical scheme and, on the other hand, makes it possible to minimize the number of errors in the process of modifying the compared implementations of the numerical method. We consider Runge-Kutta methods without step-size control, embedded methods with step-size control, and Rosenbrock methods with step-size control. The program codes for the numerical schemes, which are generated automatically using the proposed library, are tested by numerical solution of several well-known problems.
△ Less
Submitted 15 July, 2021;
originally announced July 2021.
-
Approaches to the implementation of generalized complex numbers in the Julia language
Authors:
Migran N. Gevorkyan,
Anna V. Korolkova,
Dmitry S. Kulyabov
Abstract:
In problems of mathematical physics, to study the structures of spaces using the Cayley-Klein models in theoretical calculations, the use of generalized complex numbers is required. In the case of computational experiments, such tasks require their high-quality implementation in a programming language. The proposed small implementation of generalized complex numbers in modern programming languages…
▽ More
In problems of mathematical physics, to study the structures of spaces using the Cayley-Klein models in theoretical calculations, the use of generalized complex numbers is required. In the case of computational experiments, such tasks require their high-quality implementation in a programming language. The proposed small implementation of generalized complex numbers in modern programming languages have several disadvantages. In this article, we propose using the Julia language as the language for implementing generalized complex numbers, not least because it supports the multiple dispatch mechanism. The paper demonstrates the approach to the implementation of one of the types of generalized complex numbers, namely dual numbers. We place particular emphasis on the description of the use of the multiple dispatch mechanism to implement a new numerical type. The resulting implementation of dual numbers can be considered as a prototype for a complete software module for supporting generalized complex numbers.
△ Less
Submitted 19 July, 2020;
originally announced July 2020.
-
A modular extension for a computer algebra system
Authors:
Migran N. Gevorkyan,
Anna V. Korolkova,
Dmitry S. Kulyabov,
Leonid A. Sevastianov
Abstract:
Computer algebra systems are complex software systems that cover a wide range of scientific and practical problems. However, the absolute coverage cannot be achieved. Often, it is required to create a user extension for an existing computer algebra system. In this case, the extensibility of the system should be taken into account. In this paper, we consider a technology for extending the SymPy com…
▽ More
Computer algebra systems are complex software systems that cover a wide range of scientific and practical problems. However, the absolute coverage cannot be achieved. Often, it is required to create a user extension for an existing computer algebra system. In this case, the extensibility of the system should be taken into account. In this paper, we consider a technology for extending the SymPy computer algebra system with a low-level module that implements a random number generator.
△ Less
Submitted 11 May, 2020;
originally announced May 2020.
-
A practical approach to testing random number generators in computer algebra systems
Authors:
Migran N. Gevorkyan,
Dmitry S. Kulyabov,
Anastasia V. Demidova,
Anna V. Korolkova
Abstract:
This paper has a practical aim. For a long time, implementations of pseudorandom number generators in standard libraries of programming languages had poor quality. The situation started to improve only recently. Up to now, a large number of libraries and weakly supported mathematical packages use outdated algorithms for random number generation. Four modern sets of statistical tests that can be us…
▽ More
This paper has a practical aim. For a long time, implementations of pseudorandom number generators in standard libraries of programming languages had poor quality. The situation started to improve only recently. Up to now, a large number of libraries and weakly supported mathematical packages use outdated algorithms for random number generation. Four modern sets of statistical tests that can be used for verifying random number generators are described. It is proposed to use command line utilities, which makes it possible to avoid low-level programming in such languages as C or C++. Only free open source systems are considered.
△ Less
Submitted 19 April, 2020;
originally announced April 2020.
-
Issues in the software implementation of stochastic numerical Runge-Kutta
Authors:
Migran N. Gevorkyan,
Anastasia V. Demidova,
Anna V. Korolkova,
Dmitry S. Kulyabov
Abstract:
This paper discusses stochastic numerical methods of Runge-Kutta type with weak and strong convergences for systems of stochastic differential equations in Itô form. At the beginning we give a brief overview of the stochastic numerical methods and information from the theory of stochastic differential equations. Then we motivate the approach to the implementation of these methods using source code…
▽ More
This paper discusses stochastic numerical methods of Runge-Kutta type with weak and strong convergences for systems of stochastic differential equations in Itô form. At the beginning we give a brief overview of the stochastic numerical methods and information from the theory of stochastic differential equations. Then we motivate the approach to the implementation of these methods using source code generation. We discuss the implementation details and the used programming languages and libraries
△ Less
Submitted 1 November, 2018;
originally announced November 2018.
-
Implementing a Method for Stochastization of One-Step Processes in a Computer Algebra System
Authors:
D. S. Kulyabov,
M. N. Gevorkyan,
A. V. Demidova,
T. R. Velieva,
A. V. Korolkova,
L. A. Sevastianov
Abstract:
When modeling such phenomena as population dynamics, controllable ows, etc., a problem arises of adapting the existing models to a phenomenon under study. For this purpose, we propose to derive new models from the rst principles by stochastization of one-step processes. Research can be represented as an iterative process that consists in obtaining a model and its further re nement. The number of s…
▽ More
When modeling such phenomena as population dynamics, controllable ows, etc., a problem arises of adapting the existing models to a phenomenon under study. For this purpose, we propose to derive new models from the rst principles by stochastization of one-step processes. Research can be represented as an iterative process that consists in obtaining a model and its further re nement. The number of such iterations can be extremely large. This work is aimed at software implementation (by means of computer algebra) of a method for stochastization of one-step processes. As a basis of the software implementation, we use the SymPy computer algebra system. Based on a developed algorithm, we derive stochastic di erential equations and their interaction schemes. The operation of the program is demonstrated on the Verhulst and Lotka-Volterra models.
△ Less
Submitted 8 May, 2018;
originally announced May 2018.
-
Approaches to Stochastic Modeling of Wind Turbines
Authors:
M. N. Gevorkyan,
A. V. Demidova,
Robert A. Sobolewski,
I. S. Zaryadov,
A. V. Korolkova,
D. S. Kulyabov,
L. A. Sevastianov
Abstract:
Background. This paper study statistical data gathered from wind turbines located on the territory of the Republic of Poland. The research is aimed to construct the stochastic model that predicts the change of wind speed with time. Purpose. The purpose of this work is to find the optimal distribution for the approximation of available statistical data on wind speed. Methods. We consider four distr…
▽ More
Background. This paper study statistical data gathered from wind turbines located on the territory of the Republic of Poland. The research is aimed to construct the stochastic model that predicts the change of wind speed with time. Purpose. The purpose of this work is to find the optimal distribution for the approximation of available statistical data on wind speed. Methods. We consider four distributions of a random variable: Log-Normal, Weibull, Gamma and Beta. In order to evaluate the parameters of distributions we use method of maximum likelihood. To assess the the results of approximation we use a quantile-quantile plot. Results. All the considered distributions properly approximate the available data. The Weibull distribution shows the best results for the extreme values of the wind speed. Conclusions. The results of the analysis are consistent with the common practice of using the Weibull distribution for wind speed modeling. In the future we plan to compare the results obtained with a much larger data set as well as to build a stochastic model of the evolution of the wind speed depending on time.
△ Less
Submitted 8 November, 2017;
originally announced November 2017.
-
The Stochastic Processes Generation in OpenModelica
Authors:
M. N. Gevorkyan,
A. V. Demidova,
A. V. Korolkova,
D. S. Kulyabov,
L. A. Sevastianov
Abstract:
Background: Component-based modeling language Modelica (OpenModelica is open source implementation) is used for the numerical simulation of complex processes of different nature represented by ODE system. However, in OpenModelica standard library there is no routines for pseudo-random numbers generation, which makes it impossible to use for stochastic modeling processes. Purpose: The goal of this…
▽ More
Background: Component-based modeling language Modelica (OpenModelica is open source implementation) is used for the numerical simulation of complex processes of different nature represented by ODE system. However, in OpenModelica standard library there is no routines for pseudo-random numbers generation, which makes it impossible to use for stochastic modeling processes. Purpose: The goal of this article is a brief overview of a number of algorithms for generation a sequence of uniformly distributed pseudo random numbers and quality assessment of the sequence given by them, as well as the ways to implement some of these algorithms in OpenModelica system. Methods: All the algorithms are implemented in C language, and the results of their work tested using open source package DieHarder. For those algorithms that do not use bit operations, we describe there realisation using OpwnModelica. The other algorithms can be called in OpenModelica as C functions Results: We have implemented and tested about nine algorithms. DieHarder testing revealed the highest quality pseudo-random number generators. Also we have reviewed libraries Noise and AdvancedNoise, who claim to be adding to the Modelica Standard Library. Conclusions: In OpenModelica system can be implemented generators of uniformly distributed pseudo-random numbers, which is the first step towards to make OpenModelica suitable for simulation of stochastic processes.
△ Less
Submitted 1 April, 2017;
originally announced April 2017.
-
Stochastic Runge-Kutta Software Package for Stochastic Differential Equations
Authors:
M. N. Gevorkyan,
T. R. Velieva,
A. V. Korolkova,
D. S. Kulyabov,
L. A. Sevastyanov
Abstract:
As a result of the application of a technique of multistep processes stochastic models construction the range of models, implemented as a self-consistent differential equations, was obtained. These are partial differential equations (master equation, the Fokker--Planck equation) and stochastic differential equations (Langevin equation). However, analytical methods do not always allow to research t…
▽ More
As a result of the application of a technique of multistep processes stochastic models construction the range of models, implemented as a self-consistent differential equations, was obtained. These are partial differential equations (master equation, the Fokker--Planck equation) and stochastic differential equations (Langevin equation). However, analytical methods do not always allow to research these equations adequately. It is proposed to use the combined analytical and numerical approach studying these equations. For this purpose the numerical part is realized within the framework of symbolic computation. It is recommended to apply stochastic Runge--Kutta methods for numerical study of stochastic differential equations in the form of the Langevin. Under this approach, a program complex on the basis of analytical calculations metasystem Sage is developed. For model verification logarithmic walks and Black--Scholes two-dimensional model are used. To illustrate the stochastic "predator--prey" type model is used. The utility of the combined numerical-analytical approach is demonstrated.
△ Less
Submitted 21 June, 2016;
originally announced June 2016.
-
One-Step Stochastic Processes Simulation Software Package
Authors:
E. G. Eferina,
A. V. Korolkova,
M. N. Gevorkyan,
D. S. Kulyabov,
L. A. Sevastyanov
Abstract:
Background. It is assumed that the introduction of stochastic in mathematical model makes it more adequate. But there is virtually no methods of coordinated (depended on structure of the system) stochastic introduction into deterministic models. Authors have improved the method of stochastic models construction for the class of one-step processes and illustrated by models of population dynamics. P…
▽ More
Background. It is assumed that the introduction of stochastic in mathematical model makes it more adequate. But there is virtually no methods of coordinated (depended on structure of the system) stochastic introduction into deterministic models. Authors have improved the method of stochastic models construction for the class of one-step processes and illustrated by models of population dynamics. Population dynamics was chosen for study because its deterministic models were sufficiently well explored that allows to compare the results with already known ones.
Purpose. To optimize the models creation as much as possible some routine operations should be automated. In this case, the process of drawing up the model equations can be algorithmized and implemented in the computer algebra system. Furthermore, on the basis of these results a set of programs for numerical experiment can be obtained.
Method. The computer algebra system Axiom is used for analytical calculations implementation. To perform the numerical experiment FORTRAN and Julia languages are used. The method Runge--Kutta method for stochastic differential equations is used as numerical method.
Results. The program compex for creating stochastic one-step processes models is constructed. Its application is illustrated by the predator-prey population dynamic system.
Conclusions. Computer algebra systems are very convenient for the purposes of rapid prototy** in mathematical models design and analysis.
△ Less
Submitted 25 March, 2015;
originally announced March 2015.