Computers Windows Internet

Algorithmization of systems functioning processes. Algorithmization and modeling Program input into computer memory. Trial run

FORMALIZATION AND ALGORITHMIZATION OF THE SYSTEM FUNCTIONING PROCESS

SEQUENCE OF DEVELOPMENT AND MACHINE IMPLEMENTATION OF SYSTEM MODELS

With the development of computer technology, the most effective method for studying large systems has become machine modeling, without which it is impossible to solve many major economic problems. Therefore, one of the urgent tasks of training engineers is to master the theory and methods of mathematical modeling, taking into account the requirements of consistency, allowing not only to build models of the objects under study, analyze their dynamics and the ability to control a machine experiment with a model, but also judge to a certain extent about the adequacy of the created models to the systems under study. , about the limits of applicability and correctly organize the modeling of systems on modern computer technology.

Methodical aspects of modeling. Before considering the mathematical, algorithmic, software and applied aspects of computer simulation, it is necessary to study the general methodological aspects for a wide class of mathematical models of objects implemented on computer technology. Simulation using computer technology makes it possible to investigate the mechanism of phenomena occurring in a real object at high or low speeds, when in full-scale experiments with an object it is difficult (or impossible) to track changes that occur within a short time, or when obtaining reliable results is associated with a long period of time. experiment. If necessary, the machine model makes it possible, as it were, to “stretch” or “compress” real time, since machine modeling is associated with the concept of system time, which is different from real time. In addition, with the help of machine simulation in a dialogue system, it is possible to train personnel working with the system in making decisions in managing an object, for example, when organizing a business game, which allows one to develop the necessary practical skills for implementing the management process.

The essence of computer simulation of a system is to conduct an experiment on a computer with a model, which is a certain software package that formally and (or) algorithmically describes the behavior of the elements of the system. S in the process of its functioning, i.e. in their interaction with each other and the external environment E. Machine modeling is successfully used in cases where it is difficult to clearly formulate a criterion for assessing the quality of the functioning of the system and its goal cannot be fully formalized, since it allows you to combine the software and hardware capabilities of a computer with the ability of a person to think in informal categories. In the future, the main attention will be paid to the modeling of systems on universal computers as the most effective tool for research and development of systems of various levels.

User requirements for the model. Let us formulate the basic requirements for the model M system operation process S.

    The completeness of the model should provide the user with the opportunity to obtain the necessary set of estimates of the system characteristics with the required accuracy and reliability.

    The flexibility of the model should make it possible to reproduce various situations when varying the structure, algorithms, and parameters of the system.

    The duration of development and implementation of a model of a large system should be as short as possible, taking into account the constraints on available resources.

    The structure of the model must be block, i.e., allow the possibility of replacing, adding and deleting some parts without reworking the entire model.

    Information support should provide the possibility of effective operation of the model with a database of systems of a certain class.

    Software and hardware should provide an efficient (in terms of speed and memory) machine implementation of the model and convenient communication with the user.

    Purposeful (planned) computer experiments with a system model should be implemented using an analytic-simulation approach in the presence of limited computing resources.

Taking into account these requirements, we consider the main provisions that are valid when modeling systems on a computer S, as well as their subsystems and elements. In machine simulation of the system S characteristics of the process of its functioning are determined on the basis of the model M, built on the basis of the available initial information about the modeling object. Upon receipt of new information about the object, its model is revised and refined taking into account new information, i.e. the modeling process, including the development and machine implementation of the model, is iterative. This iterative process continues until a model is obtained. M, which can be considered adequate in the framework of solving the problem of research and design of the system S.

Computer modeling of systems can be used in the following cases:

a) to study the system S before it is designed, in order to determine the sensitivity of characteristics to changes in the structure, algorithms and parameters of the modeling object and the external environment;

b) at the stage of system design S for the analysis and synthesis of various options for the system and the choice among the competing ones of such an option that would satisfy the specified criterion for evaluating the effectiveness of the system under the accepted restrictions;

c) after completion of the design and implementation of the system, i.e. during its operation, to obtain information that supplements the results of full-scale tests (operation) of a real system, and to obtain forecasts of the evolution (development) of the system in time.

There are general provisions that apply to all of the above cases of machine simulation. Even in cases where specific modeling methods differ from each other and there are various modifications of models, for example, in the field of machine implementation of modeling algorithms using specific software and hardware tools, in the practice of system modeling it is possible to formulate general principles that can form the basis of the methodology machine simulation.

Stages of system modeling. Consider the main stages of system modeling S, which include: building a conceptual model of the system and its formalization; algorithmization of the system model and its machine implementation; obtaining and interpreting the results of system modeling.

Rice. 1. Relationship between the stages of system modeling

The relationship between the listed stages of system modeling and their components (substages) can be represented in the form of a network diagram shown in fig. 1. We list these sub-stages: 1.1 - setting the problem of machine modeling of the system; 1.2 - analysis of the problem of system modeling; 1.3 - determination of requirements for initial information about the modeling object and organization of its collection; 1.4 - putting forward hypotheses and accepting assumptions; 1.5 - definition of parameters and variables of the model; 1.6 - establishing the main content of the model; 1.7 - substantiation of criteria for evaluating the effectiveness of the system; 1.8 - definition of approximation procedures; 1.9 - description of the conceptual model of the system; 1.10 - validation of the conceptual model; 1.11 - preparation of technical documentation for the first stage; 2.1 - building a logical scheme of the model; 2.2 - obtaining mathematical ratios; 2.3 - checking the reliability of the system model; 2.4 - choice of computing tools for modeling; 2.5 - drawing up a plan for the implementation of programming work; 2.6 - building a program scheme; 2.7 - checking the validity of the scheme of the program; 2.8 - programming the model; 2.9 - verification of the reliability of the program; 2.10 - preparation of technical documentation for the second stage; 3.1 - planning a machine experiment with a system model; 3.2 - determination of requirements for computing facilities; 3.3 - carrying out working calculations; 3.4 - analysis of the results of system modeling; 3.5 - presentation of simulation results; 3.6 - interpretation of simulation results; 3.7 - summing up the simulation results and issuing recommendations; 3.8 - drawing up technical documentation for the third stage.

Thus, the system modeling process S is reduced to the implementation of the listed sub-stages, grouped into three stages. At the stage of building a conceptual model
and its formalization, a study of the modeled object is carried out from the point of view of highlighting the main components of the process of its functioning, the necessary approximations are determined and a generalized scheme of the system model is obtained S, which is converted into a machine model
at the second stage of modeling by sequential algorithmization and programming of the model. The last third stage of system modeling is reduced to carrying out, according to the received plan, working calculations on a computer using selected software and hardware, obtaining and interpreting the results of system modeling S taking into account the impact of the external environment E. Obviously, when building a model and its machine implementation, when new information is obtained, it is possible to revise previously made decisions, i.e., the modeling process is iterative. Let's consider the content of each of the stages in more detail.

CONSTRUCTION OF A CONCEPTUAL MODEL OF THE SYSTEM AND ITS FORMALIZATION

At the first stage of machine modeling - building conceptual model
systems S and its formalization - a model is formulated and its formal scheme is built, i.e. the main purpose of this stage is the transition from a meaningful description of the object to its mathematical model, in other words, the formalization process. Simulation of systems on a computer is currently the most versatile and effective method for assessing the characteristics of large systems. The most responsible and least formalized moments in this work are the boundary between the system S and external environment E, simplifying the description of the system and building first a conceptual and then a formal model of the system. The model must be adequate, otherwise it is impossible to obtain positive simulation results, i.e., the study of the system functioning process on an inadequate model loses its meaning. Under adequate model we will understand a model that, with a certain degree of approximation at the level of understanding of the modeled system S model developer reflects the process of its functioning in the external environment E.

Transition from description to block model. It is most rational to build a model of the system functioning according to the block principle. In this case, three autonomous groups of blocks of such a model can be distinguished. Blocks of the first group are a simulator of environmental influences E per system S; blocks of the second group are actually a model of the process of functioning of the system under study S; blocks of the third group- auxiliary and serve for the machine implementation of the blocks of the first two groups, as well as for fixing and processing the simulation results.

Let us consider the mechanism of transition from the description of the process of functioning of some hypothetical system to the model of this process. For clarity, we introduce the idea of ​​describing the properties of the system functioning process S, i.e. about its conceptual model
how a set of some elements conditionally depicted by squares as shown in Fig. 2, a. These squares are a description of some subprocesses of the investigated process of the system functioning S, environmental impact E etc. The transition from the description of the system to its model in this interpretation is reduced to the exclusion from consideration of some secondary elements of the description (elements 5-8, 39-41, 43-47 ). It is assumed that they do not have a significant impact on the course of the processes studied using the model. Part of elements ( 14, 15, 28, 29, 42 ) replaced by passive links , reflecting the internal properties of the system (Fig. 2, b). Some of the elements 1-4, 10, 11, 24, 25 is replaced by input factors X and environmental influences . Combined substitutions are also possible: elements 9, 18, 19, 32, 33 replaced by passive link and the influence of the external environment E . Elements 22, 23, 36, 37 reflect the impact of the system on the environment y.

Rice. 2. System model: a - conceptual; b - block

The remaining elements of the system S grouped into blocks
, reflecting the process of functioning of the system under study. Each of these blocks is sufficiently autonomous, which is expressed in the minimum number of connections between them: The behavior of these blocks must be well studied and a mathematical model is built for each of them, which in turn may contain a number of subblocks. built block model the process of functioning of the system under study S is designed to analyze the characteristics of this process, which can be carried out with the machine implementation of the resulting model.

Mathematical models of processes. After the transition from the description of the simulated system S to her model
, constructed according to the block principle, it is necessary to build mathematical models of the processes occurring in various blocks. A mathematical model is a set of relationships (for example, equations, logical conditions, operators) that determine the characteristics of the system functioning process S depending on the structure of the system, behavior algorithms, system parameters, environmental influences E, initial conditions and time. The mathematical model is the result of the formalization of the process of functioning of the system under study, i.e. constructing a formal (mathematical) description of the process with the degree of approximation to reality necessary within the framework of the study.

To illustrate the possibilities of formalization, consider the process of functioning of some hypothetical system S, which can be broken down into T subsystems with characteristics , with parameters , in the presence of input actions and environmental influences. Then the system of relations of the form

(1)

If the functions
were known, then relations (1) would turn out to be an ideal mathematical model of the system functioning process S. However, in practice, obtaining a model of a fairly simple form for large systems is most often impossible, therefore, usually the process of system functioning S broken down into a number of elementary sub-processes. At the same time, it is necessary to carry out the division into subprocesses in such a way that the construction of models of individual subprocesses is elementary and does not cause difficulties in formalization. Thus, at this stage, the essence of the formalization of subprocesses will consist in the selection of typical mathematical schemes. For example, for stochastic processes, these can be schemes of probabilistic automata (P-schemes), queuing schemes (Q-scheme) etc., which quite accurately describe the main features of real phenomena that make up subprocesses, from the point of view of applied problems being solved.

Thus, the formalization of the process of functioning of any system S must be preceded by the study of its constituent phenomena. As a result, a meaningful description of the process appears, which is the first attempt to clearly state the patterns characteristic of the process under study, and the formulation of the applied problem. A meaningful description is the source material for the subsequent stages of formalization: building a formalized scheme of the system functioning process and a mathematical model of this process. To simulate the process of functioning of the system on a computer, it is necessary to convert the mathematical model of the process into an appropriate modeling algorithm and computer program.

Sub-stages of the first stage of modeling. Let us consider in more detail the main sub-stages of building a conceptual model
system and its formalization (see Fig. 1).

1.1. Statement of the problem of machine simulation of the system. A clear formulation of the task of studying a particular system is given. S and focuses on issues such as: a) recognition of the existence of the problem and the need for machine simulation; b) the choice of methods for solving the problem, taking into account the available resources; c) determining the scope of the task and the possibility of dividing it into subtasks.

It is also necessary to answer the question about the priority of solving various subtasks, to evaluate the effectiveness of possible mathematical methods and software and hardware tools for their solution. Careful study of these issues allows us to formulate the task of the study and begin its implementation. In this case, it is possible to revise the initial statement of the problem in the course of modeling.

1.2. Analysis of the problem of system modeling. The analysis of the problem helps to overcome the difficulties that arise in the future when solving it by modeling. At the second stage under consideration, the main work is reduced precisely to the analysis, including: a) the choice of criteria for evaluating the effectiveness of the system functioning process S; b) definition of endogenous and exogenous model variables M; c) choice of possible identification methods; G) performing a preliminary analysis of the content of the second stage of algorithmization of the system model and its machine implementation; e) performing a preliminary analysis of the content of the third stage of obtaining and interpreting the results of system modeling.

1.3. Determination of requirements for initial information about the modeling object and organization of its collection. After setting the problem of modeling the system S the requirements for information are determined, from which the qualitative and quantitative initial data necessary to solve this problem are obtained. These data help to deeply understand the essence of the problem, the methods of its solution. Thus, at this sub-stage, the following is carried out: a) selection of the necessary information about the system S and environment E; b) preparation of a priori data; c) analysis of available experimental data; d) the choice of methods and means of preliminary processing of information about the system.

At the same time, it must be remembered that both the adequacy of the model and the reliability of the simulation results depend on the quality of the initial information about the object of modeling.

1.4. Making hypotheses and accepting assumptions. Hypotheses when building a system model S serve to fill "gaps" in the understanding of the problem by the researcher. Hypotheses are also put forward regarding the possible results of modeling the system S, the validity of which is checked during a machine experiment. Assumptions assume that some data is unknown or cannot be obtained. Assumptions can be put forward regarding known data that do not meet the requirements for solving the problem. Assumptions make it possible to carry out model simplifications in accordance with the chosen level of modeling. When putting forward hypotheses and making assumptions, the following factors are taken into account: a) the amount of information available for solving problems; b) subtasks for which information is insufficient; c) restrictions on time resources for solving the problem; d) expected simulation results.

Thus, in the process of working with the system model S it is possible to repeatedly return to this sub-stage, depending on the obtained simulation results and new information about the object.

1.5. Definition of model parameters and variables. Before proceeding to the description of the mathematical model, it is necessary to determine the parameters of the system
, input and output variables
,
, environmental impact
. The ultimate goal of this sub-stage is to prepare for the construction of a mathematical model of the system S, functioning in the external environment E, for which it is necessary to consider all the parameters and variables of the model and assess the degree of their influence on the process of functioning of the system as a whole. Description of each parameter and variable should be given in the following form: a) definition and brief description; b) designation symbol and unit of measurement; c) range of change; d) place of application in the model.

1.6. Establishing the main content of the model. At this sub-stage, the main content of the model is determined and the method for constructing the system model is selected, which are developed on the basis of accepted hypotheses and assumptions. In this case, the following features are taken into account: a) the formulation of the problem of modeling the system; b) system structure S and algorithms of its behavior, the impact of the external environment E; c) possible methods and means of solving the modeling problem.

1.7. Justification of the criteria for evaluating the effectiveness of the system. To assess the quality of the process of functioning of the simulated system S it is necessary to choose a certain set of criteria for evaluating efficiency, i.e., in the mathematical formulation, the problem is reduced to obtaining a ratio for evaluating efficiency as a function of the parameters and variables of the system. This function is a response surface in the investigated area of ​​change of parameters and variables and allows you to determine the response of the system. System efficiency S can be estimated using integral or partial criteria, the choice of which depends on the problem under consideration.

1.8. Definition of approximation procedures. To approximate the real processes occurring in the system S, Three types of procedures are commonly used: a) deterministic; b) probabilistic; c) determination of average values.

At deterministic procedure simulation results are uniquely determined by a given set of input actions, parameters and variables of the system S. In this case, there are no random elements that affect the simulation results. Probabilistic(randomized) procedure is used when random elements, including environmental influences E, affect the characteristics of the system functioning process S and when it is necessary to obtain information about the laws of distribution of output variables. Procedure for determining average values is used when, when modeling a system, the average values ​​of output variables in the presence of random elements are of interest.

1.9. Description of the conceptual model of the system. At this sub-stage of building a system model: a) a conceptual model is described
in abstract terms and concepts; b) a description of the model is given using typical mathematical schemes; c) hypotheses and assumptions are finally accepted; d) the choice of a procedure for approximating real processes when building a model is substantiated. Thus, at this sub-stage, a detailed analysis of the problem is carried out, possible methods for solving it are considered, and a detailed description of the conceptual model is given.
, which is then used in the second stage of the simulation.

1.10. Validation of the conceptual model. After the conceptual model
described, it is necessary to check the validity of some of the concepts of the model before proceeding to the next stage of system modeling S. It is quite difficult to check the reliability of a conceptual model, since the process of its construction is heuristic and such a model is described in abstract terms and concepts. One of the model validation methods
- the use of reverse transition operations, which allows you to analyze the model, return to the accepted approximations and, finally, consider again the real processes occurring in the simulated system S. Conceptual Model Validation
should include: a) verification of model intent; b) assessment of the reliability of the initial information; c) consideration of the formulation of the modeling problem; d) analysis of the accepted approximations; e) research of hypotheses and assumptions.

Only after a thorough check of the conceptual model
should proceed to the stage of machine implementation of the model, since errors in the model
do not provide reliable simulation results.

1.11. Preparation of technical documentation for the first stage. V end of the conceptual model building phase
and its formalization, a technical report is drawn up for the stage, which includes: a) a detailed statement of the problem of modeling the system S; b) analysis of the system modeling problem; c) criteria for evaluating the effectiveness of the system; d) parameters and variables of the system model; e) hypotheses and assumptions adopted in the construction of the model; f) description of the model in abstract terms and concepts; g) a description of expected simulation results.

Send your good work in the knowledge base is simple. Use the form below

Students, graduate students, young scientists who use the knowledge base in their studies and work will be very grateful to you.

Posted on http://www.allbest.ru/

Posted on http://www.allbest.ru/

Introduction

1. Analytical review of existing methods and means for solving the problem

1.1 Concept and types of modeling

1.2 Numerical calculation methods

1.3 General concept of the finite element method

2. Algorithmic analysis of the problem

2.1 Statement of the problem

2.2 Description of the mathematical model

2.3 Graphic scheme of the algorithm

3. Software implementation of the task

3.1 Deviations and tolerances of straight pipe threads

3.2 Implementation of the deviation and tolerances of cylindrical pipe threads in the Compass software

3.3 Implementation of the task in the C# programming language

3.4 Implementation of the structural model in the ANSYS package

3.5 Examining the results

Conclusion

List of used literature

Introduction

In the modern world, there is an increasing need to predict the behavior of physical, chemical, biological and other systems. One of the ways to solve the problem is to use a fairly new and relevant scientific direction - computer modeling, a characteristic feature of which is a high visualization of the calculation stages.

This work is devoted to the study of computer simulation in solving applied problems. Such models are used to obtain new information about the object being modeled for an approximate assessment of the behavior of systems. In practice, such models are actively used in various fields of science and production: physics, chemistry, astrophysics, mechanics, biology, economics, meteorology, sociology, other sciences, as well as in applied and technical problems in various fields of radio electronics, mechanical engineering, automotive industry and others. The reasons for this are obvious: and this is the ability to create a model in a short time and quickly make changes to the initial data, enter and correct additional model parameters. An example is the study of the behavior of buildings, parts and structures under mechanical load, the prediction of the strength of structures and mechanisms, the modeling of transport systems, the design of materials and its behavior, the design of vehicles, weather forecasting, emulation of the operation of electronic devices, simulation of crash tests, strength tests and adequacy of pipelines, thermal and hydraulic systems.

The purpose of the course work is to study computer simulation algorithms, such as the finite element method, the boundary difference method, the finite difference method with further practical application for calculating threaded connections for strength; Development of an algorithm for solving a given problem with subsequent implementation in the form of a software product; ensure the required accuracy of the calculation and evaluate the adequacy of the model using different software products.

1 . Analytical review of existing methods and means of solving the problem

1.1 Concept and types of modelsanding

Research problems solved by modeling various physical systems can be divided into four groups:

1) Direct problems, in the solution of which the system under study is given by the parameters of its elements and the parameters of the initial mode, structure or equations. It is required to determine the reaction of the system to the forces acting on it (perturbations).

2) Inverse problems, in which, according to the known reaction of the system, it is required to find the forces (perturbations) that caused this reaction and force the system under consideration to come to a given state.

3) Inverse problems that require the determination of the parameters of the system according to the known course of the process, described by differential equations and the values ​​of forces and reactions to these forces (perturbations).

4) Inductive problems, the solution of which is aimed at compiling or refining equations that describe the processes occurring in a system whose properties (perturbations and response to them) are known.

Depending on the nature of the studied processes in the system, all types of modeling can be divided into the following groups:

deterministic;

Stochastic.

Deterministic modeling depicts deterministic processes, i.e. processes in which the absence of any random influences is assumed.

Stochastic modeling displays probabilistic processes and events. In this case, a number of implementations of a random process are analyzed and the average characteristics are estimated, i.e. set of homogeneous implementations.

Depending on the behavior of the object in time, modeling is classified into one of two types:

static;

Dynamic.

Static modeling is used to describe the behavior of an object at any point in time, while dynamic modeling reflects the behavior of an object over time.

Depending on the form of representation of an object (system), one can distinguish

Physical modeling;

Mathematical modeling.

Physical modeling differs from observation of a real system (natural experiment) in that research is carried out on models that preserve the nature of phenomena and have a physical similarity. An example is a model aircraft being tested in a wind tunnel. In the process of physical modeling, some characteristics of the external environment are set and the behavior of the model is studied under given external influences. Physical modeling can proceed in real and unreal time scales.

Under mathematical modeling is understood the process of establishing correspondence to a given real object of a certain mathematical object, called a mathematical model, and the study of this model on a computer, in order to obtain the characteristics of the real object under consideration.

Mathematical models are built on the basis of the laws identified by the fundamental sciences: physics, chemistry, economics, biology, etc. Ultimately, one or another mathematical model is chosen on the basis of a criterion of practice, understood in a broad sense. After the model is formed, it is necessary to study its behavior.

Any mathematical model, like any other, describes a real object only with a certain degree of approximation to reality. Therefore, in the process of modeling, it is necessary to solve the problem of correspondence (adequacy) of the mathematical model and the system, i.e. conduct an additional study of the consistency of the simulation results with the real situation.

Mathematical modeling can be divided into the following groups:

Analytical;

simulation;

Combined.

With the help of analytical modeling, the study of an object (system) can be carried out if explicit analytical dependencies are known that connect the desired characteristics with the initial conditions, parameters and variables of the system.

However, such dependencies can only be obtained for relatively simple systems. As systems become more complex, their study by analytical methods encounters significant difficulties, which are often insurmountable.

In simulation modeling, the algorithm that implements the model reproduces the process of the system functioning in time, and the elementary phenomena that make up the process are simulated, while maintaining the logical structure, which makes it possible to obtain information about the process states at certain points in time in each link of the system from the initial data.

The main advantage of simulation modeling compared to analytical modeling is the ability to solve more complex problems. Simulation models make it quite easy to take into account such factors as the presence of discrete and continuous elements, non-linear characteristics of system elements, numerous random effects, etc.

At present, simulation modeling is often the only practically accessible method for obtaining information about the behavior of a system, especially at the stage of its design.

Combined (analytical-simulation) modeling allows you to combine the advantages of analytical and simulation modeling.

When constructing combined models, a preliminary decomposition of the process of functioning of an object into constituent subprocesses is carried out, and for those of them, where possible, analytical models are used, and for the remaining subprocesses, simulation models are built.

From the point of view of describing the object and depending on its nature, mathematical models can be divided into models:

analog (continuous);

digital (discrete);

analog-digital.

An analog model is understood as a similar model, which is described by equations relating continuous quantities. A digital model is understood as a model that is described by equations relating discrete quantities presented in digital form. An analog-digital model is understood as a model that can be described by equations connecting continuous and discrete quantities.

1.2 Numerical MethodsWithcouple

To solve a problem for a mathematical model means to specify an algorithm for obtaining the required result from the initial data.

Solution algorithms are conditionally divided into:

exact algorithms that allow you to get the final result in a finite number of actions;

approximate methods - allow, due to some assumptions, to reduce the solution to a problem with an exact result;

numerical methods - involve the development of an algorithm that provides a solution with a given controlled error.

Solving the problems of structural mechanics is associated with great mathematical difficulties, which are overcome with the help of numerical methods, which make it possible, using a computer, to obtain approximate solutions that satisfy practical purposes.

The numerical solution is obtained by discretization and algebraization of the boundary value problem. Discretization is the replacement of a continuous set with a discrete set of points. These points are called grid nodes, and only at them are the values ​​of the function searched. In this case, the function is replaced by a finite set of its values ​​at the grid nodes. Using the values ​​at the grid nodes, one can approximately express the partial derivatives. As a result, the partial differential equation is transformed into algebraic equations (algebraization of the boundary value problem).

Depending on the methods of performing discretization and algebraization, various methods are distinguished.

The first method for solving boundary value problems, which has become widespread, is the method of finite differences (FDM). In this method, discretization consists in covering the solution area with a grid and replacing a continuous set of points with a discrete set. A grid with constant step sizes (regular grid) is often used.

The MKR algorithm consists of three stages:

1. Building a grid in a given area. Approximate values ​​of the function (nodal values) are determined at the grid nodes. The set of nodal values ​​is a grid function.

2. Partial derivatives are replaced by difference expressions. In this case, the continuous function is approximated by a grid function. The result is a system of algebraic equations.

3. Solution of the obtained system of algebraic equations.

Another numerical method is the boundary element method (BEM). It is based on considering a system of equations that includes only the values ​​of variables at the boundaries of the region. The discretization scheme requires partitioning only the surface. The boundary of the region is divided into a number of elements and it is considered that it is necessary to find an approximate solution that approximates the original boundary value problem. These elements are called boundary. Discretization of only the boundary leads to a smaller system of equations of the problem than discretization of the whole body. BEM reduces the dimension of the original problem by one.

When designing various technical objects, the finite element method (FEM) is widely used. The emergence of the finite element method is associated with the solution of space research problems in the 1950s. At present, the field of application of the finite element method is very extensive and covers all physical problems that can be described by differential equations. The most important advantages of the finite element method are the following:

1. The material properties of adjacent elements need not be the same. This allows the method to be applied to bodies composed of several materials.

2. A curved region can be approximated with straight lines or described accurately with curved elements.

3. The dimensions of the elements can be variable. This allows you to enlarge or refine the network of partitioning the area into elements, if necessary.

4. Using the finite element method, it is not difficult to consider boundary conditions with a discontinuous surface load, as well as mixed boundary conditions.

The solution of problems for the FEM contains the following steps:

1. Splitting the given area into finite elements. Numbering of nodes and elements.

2. Construction of stiffness matrices of finite elements.

3. Reduction of loads and influences applied to finite elements to nodal forces.

4. Formation of a general system of equations; taking into account the boundary conditions in it. Solution of the resulting system of equations.

5. Determination of stresses and strains in finite elements.

The main disadvantage of FEM is the need to discretize the whole body, which leads to a large number of finite elements, and, consequently, unknown problems. In addition, the FEM sometimes leads to discontinuities in the values ​​of the quantities under study, since the procedure of the method imposes continuity conditions only at the nodes.

To solve the problem, the finite element method was chosen, since it is the most optimal for calculating structures with a complex geometric shape.

1.3 General concept of the finite element method

The finite element method consists in splitting the mathematical model of the design into some elements, called finite elements. Elements are one-dimensional, two-dimensional and multidimensional. An example of finite elements is provided in Figure 1. The element type depends on the initial conditions. The set of elements into which the structure is divided is called a finite element mesh.

The finite element method generally consists of the following steps:

1. Splitting the area into finite elements. The division of the area into elements usually starts from its border, in order to most accurately approximate the shape of the border. Then the internal regions are partitioned. Often, the division of the area into elements is carried out in several stages. First, they are divided into large parts, the boundaries between which pass where the properties of materials, geometry, and applied load change. Then each subdomain is divided into elements. After the region is divided into finite elements, the nodes are numbered. Numbering would be a trivial task if it did not affect the efficiency of subsequent calculations. If we consider the resulting system of linear equations, we can see that some non-zero elements in the coefficient matrix are between two lines, these distances are called the bandwidth of the matrix. It is the numbering of the nodes that affects the width of the strip, which means that the wider the strip, the more iterations are needed to obtain the desired answer.

simulation algorithm software ansys

Figure 1 - Some finite elements

2. Determination of the approximating function for each element. At this stage, the desired continuous function is replaced by a piecewise continuous function defined on a set of finite elements. This procedure can be performed once for a typical area element and then the resulting function can be used for other area elements of the same type.

3. Combining finite elements. At this stage, the equations relating to individual elements are combined, that is, into a system of algebraic equations. The resulting system is a model of the desired continuous function. We get the stiffness matrix.

4. Solution of the resulting system of algebraic equations. The real construction is approximated by many hundreds of finite elements, systems of equations arise with many hundreds and thousands of unknowns.

The solution of such systems of equations is the main problem in the implementation of the finite element method. Solution methods depend on the size of the resolving system of equations. In this regard, special methods have been developed for storing the stiffness matrix, which make it possible to reduce the amount of RAM required for this. Stiffness matrices are used in each strength calculation method using a finite element mesh.

To solve systems of equations, various numerical methods are used, which depend on the resulting matrix, this is clearly visible in the case when the matrix is ​​not symmetrical, in which case methods such as the conjugate gradient method cannot be used.

Instead of defining equations, a variational approach is often used. Sometimes a condition is set to ensure a small difference between the approximate and true solutions. Since the number of unknowns in the final system of equations is large, the matrix notation is used. At present, there are a sufficient number of numerical methods for solving a system of equations, which makes it easier to obtain a result.

2. Algorithmic analysis of the problem

2 .1 Statement of the problem

It is required to develop an application that simulates the stress-strain state of a flat structure, to carry out a similar calculation in the Ansys system.

To solve the problem, it is necessary: ​​to divide the area into finite elements, number the nodes and elements, set the characteristics of the material and boundary conditions.

The initial data for the project are the scheme of a flat structure with an applied distributed load and fastening (Appendix A), the values ​​of the characteristics of the material (modulus of elasticity -2 * 10^5 Pa, Poisson's ratio -0.3), load 5000H.

The result of the course work is to obtain the displacement of the part in each node.

2.2 Description of the mathematical model

To solve the problem, the finite element method described above is used. The part is divided into triangular finite elements with nodes i, j, k (Figure 2).

Figure 2 - Finite element representation of the body.

The displacements of each node have two components, formula (2.1):

six components of displacements of element nodes form a displacement vector (d):

The movement of any point inside the finite element is determined by relations (2.3) and (2.4):

When (2.3) and (2.4) are combined into one equation, the following relation is obtained:

Deformations and displacements are interconnected as follows:

Substituting (2.5) into (2.6), we obtain relation (2.7):

Relation (2.7) can be represented as:

where [B] is the gradient matrix of the form (2.9):

The shape functions depend linearly on the x, y coordinates, and therefore the gradient matrix does not depend on the coordinates of a point inside the finite element, and the deformations and stresses inside the finite element are constant in this case.

In a plane strained state in an isotropic material, the matrix of elastic constants [D] is determined by formula (2.10):

where E is the modulus of elasticity, is Poisson's ratio.

The finite element stiffness matrix has the form:

where h e is the thickness, A e is the area of ​​the element.

The equilibrium equation of the i-th node has the form:

To take into account the conditions of fixing, there is the following method. Let there be some system of N equations (2.13):

In the case when one of the supports is fixed, i.e. U i =0, use the following procedure. Let U 2 \u003d 0, then:

that is, the corresponding row and column are set to zero, and the diagonal element is set to one. Accordingly, it is equal to zero and F 2 .

To solve the resulting system, we choose the Gauss method. The Gaussian solution algorithm is divided into two stages:

1. direct move: by elementary transformations on strings, the system is brought to a stepped or triangular form, or it is established that the system is inconsistent. The k-th enabling row is selected, where k = 0…n - 1, and for each next row, the elements are converted

for i = k+1, k+2 … n-1; j = k+1,k+2 … n.

2. reverse move: the values ​​of the unknowns are determined. From the last equation of the transformed system, the value of the variable x n is calculated, after that, from the penultimate equation, it becomes possible to determine the variable x n -1 and so on.

2. 3 Graphic scheme of the algorithm

The presented graphic scheme of the algorithm shows the main sequence of actions performed when modeling a structural detail. In block 1, the initial data is entered. Based on the input data, the next step is to build a finite element mesh. Further, in blocks 3 and 4, respectively, the local and global stiffness matrices are constructed. In block 5, the resulting system is solved by the Gauss method. Based on the decision in block 6, the desired displacements in the nodes are determined, and the results are displayed. A brief graphical diagram of the algorithm is shown in Figure 7.

Figure 7 - Graphic scheme of the algorithm

3 . Programsth implementation of the task

3.1 Deviations and tolerances of straight pipe threads

Cylindrical pipe thread (GOST 6357-73) has a triangular profile with rounded tops and troughs. This thread is mainly used for connecting pipes, pipe fittings and fittings.

To achieve the proper tightness of the joint, special sealing materials (linen threads, red lead yarn, etc.) are placed in the gaps formed by the location of the tolerance fields, between the cavities of the bolt and the protrusions of the nut.

The limit deviations of the elements of a cylindrical pipe thread for the diameter “1” of the external and internal threads are given in tables 1 and 2, respectively.

Table 1 - deviations of a pipe external cylindrical thread (according to GOST 6357 - 73)

Table 2 - deviations of a pipe internal cylindrical thread (according to GOST 6357 - 73)

Limit deviations of the external thread of the minimum external diameter, formula (3.1):

dmin=dn + ei (3.1)

where dn is the nominal size of the outer diameter.

Limit deviations of the external thread of the maximum external diameter, calculated by the formula (3.2):

dmax=dn + es (3.2)

Limit deviations of the external thread of the minimum average diameter, formula (3.3):

d2min=d2 + ei (3.3)

where d2 is the nominal size of the average diameter.

Limit deviations of the external thread of the maximum average diameter, calculated by the formula (3.4):

d2max=d2 + es (3.4)

Limit deviations of the external thread of the minimum internal diameter, formula (3.5):

d1min=d1 + ei (3.5)

where d1 is the nominal size of the inner diameter.

Limit deviations of the external thread of the maximum internal diameter, calculated by the formula (3.6):

d1max=d1 + es (3.6)

Limit deviations of the internal thread of the minimum outer diameter, formula (3.7):

Dmin=Dn + EI, (3.7)

where Dn is the nominal size of the outer diameter.

Limit deviations of the internal thread of the maximum external diameter, calculated by the formula (3.8):

Dmax=Dn + ES (3.8)

Limit deviations of the internal thread of the minimum average diameter, formula (3.9):

D2min=D2 + EI (3.9)

where D2 is the nominal size of the average diameter.

Limit deviations of the internal thread of the maximum average diameter, calculated by the formula (3.10):

D2max=D2 + ES (3.10)

Limit deviations of the internal thread of the minimum internal diameter, formula (3.11):

D1min=D1 + EI (3.11)

where D1 is the nominal size of the inner diameter.

Limit deviations of the internal thread of the maximum internal diameter, calculated by the formula (3.12):

D1max=D1 + ES (3.12)

A fragment of the thread sketch can be seen in figure 6 of chapter 3.2.

3.2 Implementation of the deviation and tolerances of cylindrical pipe threads inSoftware "Compass"

Figure 6 - Cylindrical pipe thread with tolerances.

The coordinates of the points are displayed in Table 1 of Appendix D

Copying a built thread:

Select the thread > Editor > copy;

Thread insert:

We put the cursor on the place we need> editor> paste.

The result of the constructed thread can be viewed in Appendix D

3.3 Implementation of the taskchi in C# programming language

To implement the strength calculation algorithm, the MS Visual Studio 2010 development environment was chosen using the language C# from the package . NETFramework 4.0. Using the approach of object-oriented programming, we will create classes containing the necessary data:

Table 3 - structure of the Element class

Variable name

Sub-stages of the first stage of modeling. Algorithmization of system models and their machine implementation

Computer science, cybernetics and programming

Forms of representation of modeling algorithms Sub-stages of the first stage of modeling Let us consider in more detail the main sub-stages of constructing a conceptual model of the MC system and its formalization, see the formulation of the goal and the formulation of the problem of computer simulation of the system. A clear formulation of the task of the goal and the formulation of the study of a specific system S are given, and the main attention is paid to such issues as: recognition of the existence of the goal and the need for machine modeling; b choice of methods for solving the problem, taking into account available resources; to the definition...

Lecture 12. Sub-stages of the first stage of modeling. Algorithmization of system models and their machine implementation. Principles of construction of modeling algorithms. Forms of representation of modeling algorithms

Sub-stages of the first stage of modeling

Let us consider in more detail the main sub-stages of building a conceptual model M K system and its formalization (see Fig. 3.1)

1.1. formulation of the goal and formulation of the problem of machine modeling of the system.A clear formulation of the task of the goal and the formulation of the study of a specific system are given. S and the focus is on issues such as: a) recognition of the existence of purpose and the need for machine simulation; b) the choice of methods for solving the problem, taking into account the available resources; c) determining the scope of the task and the possibility of dividing it into subtasks. In the process of modeling, it is possible to revise the initial statement of the problem, depending on the purpose of modeling and the purpose of the system functioning.

1.2. Analysis of the problem of system modeling.The analysis includes the following questions: a) selection of criteria for evaluating the effectiveness of the system functioning process S ; b) definition of endogenous and exogenous model variables M ; c) choice of possible identification methods;
d) performing a preliminary analysis of the content of the second stage of algorithmization of the system model and its machine implementation; e) performing a preliminary analysis of the content of the third stage of obtaining and interpreting the results of system modeling.

1.3. Determination of requirements for initial information about the modeling object and organization of its collection.After setting the problem of modeling the system S the requirements for information are determined, from which the qualitative and quantitative initial data necessary to solve this problem are obtained. This sub-stage is carried out:
a) selection of the necessary information about the system
S and environment E ;
b) preparation of a priori data; c) analysis of available experimental data; d) the choice of methods and means of preliminary processing of information about the system.

1.4. Making hypotheses and accepting assumptions.Hypotheses when building a system model S serve to fill "gaps" in the understanding of the problem by the researcher. Hypotheses are also put forward regarding the possible results of modeling the system S, the validity of which is checked during a machine experiment. Assumptions assume that some data is unknown or cannot be obtained. Assumptions can be put forward regarding known data that do not meet the requirements for solving the problem. Assumptions make it possible to carry out model simplifications in accordance with the chosen level of modeling. When putting forward hypotheses and making assumptions, the following factors are taken into account: a) the amount of information available for solving problems; b) subtasks for which information is insufficient; c) restrictions on time resources for solving problems; d) expected simulation results.

1.5. Definition of model parameters and variables.Before proceeding to the description of the mathematical model, it is necessary to determine the parameters of the system, input and output variables, the impact of the external environment and assess the degree of their influence on the process of functioning of the system as a whole. Description of each parameter and variable should be given in the following form: a) definition and brief description; b) designation symbol and unit of measure; c) range of changes; d) place of application in the model.

1.6. Establishing the main content of the model.At this sub-stage, the main content of the model is determined and the method for constructing the system model is selected, which are developed on the basis of accepted hypotheses and assumptions. This takes into account the following features:
a) formulation of the goal and statement of the problem of modeling the system;
b) system structure
S and algorithms of its behavior, the impact of the external environment E; c) possible methods and means of solving the modeling problem.

1.7. Justification of the criteria for evaluating the effectiveness of the system.To assess the quality of the process of functioning of the simulated system, it is necessary to determine the set of criteria for evaluating the effectiveness as a function of the parameters and variables of the system. This function is a response surface in the investigated area of ​​changes in parameters and variables and allows you to determine the response of the system.

1.8. Definition of approximation procedures.To approximate the real processes occurring in the system S, Three types of procedures are commonly used: a) deterministic; b) probabilistic; c) determination of average values.

With a deterministic procedure, the simulation results are uniquely determined by a given set of input actions, parameters and variables of the system S. In this case, there are no random elements that affect the simulation results. The probabilistic (randomized) procedure is applied when random elements, including the effects of the external environment E, affect the characteristics of the system functioning process S and when it is necessary to obtain information about the laws of distribution of output variables. The procedure for determining average values ​​is used when, when modeling a system, the average values ​​of output variables are of interest in the presence of random elements.

1.9. Description of the conceptual model of the system.At this sub-stage of building a system model: a) a conceptual model is described M K in abstract terms and concepts; b) the target function is set; c) a description of the model is given using typical mathematical schemes;
d) hypotheses and assumptions are finally accepted; e) the choice of a procedure for approximating real processes when building a model is substantiated.

1.10. Validation of the conceptual model.After the conceptual model M K described, it is necessary to check the validity of some of the concepts of the model before proceeding to the next stage of system modeling S. One of the model validation methods M K : the use of reverse transition operations that allow us to analyze the model, return to the accepted approximations, and finally, consider again the real processes occurring in the simulated system. Conceptual Model Validation M K should include: a) verification of model intent; b) assessment of the reliability of the initial information; c) consideration of the formulation of the modeling problem; d) analysis of the accepted approximations; e) research of hypotheses and assumptions.

1.11. Preparation of technical documentation for the first stage.At the end of the conceptual model building phase M K and its formalization, a technical report is drawn up for the stage, which includes:
a) a detailed statement of the problem of system modeling
S; b) analysis of the system modeling problem; c) criteria for evaluating the effectiveness of the system;
d) parameters and variables of the system model; e) hypotheses and assumptions adopted in the construction of the model; f) description of the model in abstract terms and concepts; g) description of the expected results of the system simulation
S.

3.3. Algorithmization of system models and their machine implementation

At the second stage of modeling - the stage of algorithmization of the model and its machine implementation - the mathematical model formed at the first stage is embodied in a specific machine model.

Principles for constructing modeling algorithms

System operation process S can be considered as a successive change of its states in -dimensional space. Obviously, the task of modeling the process of functioning of the system under study S is the construction of functions z , on the basis of which it is possible to calculate the characteristics of interest for the process of system operation. To do this, there must be relations connecting the functions z with variables, parameters and time, as well as initial conditions at the moment of time.

For a deterministic system, in which there are no random factors, the state of the process at the moment of time can be uniquely determined from the relations of the mathematical model using known initial conditions. If the step is small enough, then in this way it is possible to obtain approximate values z .

For a stochastic system, those. system, which is influenced by random factors, a function of the states of the process z at the moment of time and the relations of the model, determine only the probability distribution for at the moment of time. In the general case, the initial conditions can also be random, given by the corresponding probability distribution. In this case, the structure of the modeling algorithm for stochastic systems corresponds to a deterministic system. Only instead of a state, it is necessary to calculate the probability distribution for possible states.

This principle of constructing modeling algorithms is called principle. This is the most universal principle that allows you to determine the successive states of the system functioning process. S at specified time intervals. But from the point of view of machine time costs, it sometimes turns out to be uneconomical.

When considering the processes of functioning of some systems, it can be found that they are characterized by two types of states: 1) special, inherent in the process of functioning of the system only at certain points in time (the moments of receipt of input or control actions, environmental disturbances, etc.); 2) not special, in which the process is all the rest of the time. Special states are also characterized by the fact that the state functions at these instants of time change abruptly, and between special states the change in coordinates occurs smoothly and continuously or does not occur at all. Thus, following the system simulation S only behind its special states at those moments of time when these states take place, it is possible to obtain the information necessary to construct the function. Obviously, for the described type of systems, modeling algorithms can be constructed according to the "principle of special states". Denote the jump (relay) change of state z as , and the "principle of special states" as principle .

"Principle" makes it possible for a number of systems to significantly reduce the cost of computer time for the implementation of modeling algorithms in comparison with the "principle". The logic of constructing a modeling algorithm that implements the “principle” differs from that considered for the “principle” only in that it includes the procedure for determining the moment of time corresponding to the next special state of the system S. To study the process of functioning of large systems, it is rational to use the combined principle of constructing modeling algorithms that combine the advantages of each of the considered principles.

Forms of representation of modeling algorithms

A convenient form of representation of the logical structure of models is a diagram. At various stages of modeling, generalized and detailed logical schemes of modeling algorithms, as well as program schemes, are compiled.

Generalized (enlarged) modeling algorithm schemespecifies the general procedure for modeling systems without any clarifying details. The generalized scheme shows what needs to be done at the next modeling step.

Detailed scheme of the modeling algorithmcontains refinements that are not in the generalized scheme. A detailed diagram shows not only what should be done at the next step of system modeling, but also how to do it.

Logic diagram of the modeling algorithmrepresents the logical structure of the process model of the system functioning S. The logical scheme indicates a time-ordered sequence of logical operations associated with the solution of the modeling problem.

Program scheme displays the order of software implementation of the modeling algorithm using specific software and algorithmic language.

The logical scheme of the algorithm and the scheme of the program can be made both in an enlarged and in a detailed form. The symbols most commonly used in the practice of computer modeling are shown in fig. 3.3, which shows the main, specific and special symbols of the process. These include: main character: a - process; process specific symbols: b - solution; c - preparation; g - predefined process; e - manual operation; Special symbols: e - connector; g - terminator.

An example of an image of a diagram of a modeling algorithm is shown in fig. 3.3, h .

Typically, a scheme is the most convenient form of representing the structure of modeling algorithms, for example, in the form graph diagrams (Fig. 3.3, i). Here - the beginning, - the end, - the calculation, - the formation, - condition check,- counter, - issuing a result, where g is total number of modeling algorithm statements. As an explanation to the graph diagram of the algorithm, the content of the operators is disclosed in the text, which makes it possible to simplify the representation of the algorithm, but complicates the work with it.

a b h i

in g

j w

Rice. 3.3. Symbols and schemes of modeling algorithms

REFERENCES

1. Soviets B.Ya. Modeling systems: textbook. for universities / B.Ya. Sovetov, S.A. Yakovlev. M. : Vyssh. school, 2001. 343 p.

2. Soviets B.Ya. Modeling systems: textbook. for universities / B.Ya. Sovetov, S.A. Yakovlev. 2nd ed. M.: Higher school, 1998. 319 p.

3. Tarasik V.P. Mathematical modeling of technical systems: textbook. for universities / V.P. Tarasik. M.: Nauka, 1997. 600 p.

4. Introduction to mathematical modeling: textbook. allowance for universities / ed. P.V. Tarasova. Moscow: Intermet Engineering, 2000. 200 p.

5. Ivchenko G.I. Mathematical statistics: textbook for higher education institutions / G.I. Ivchenko, Yu.I. Medvedev. M.: Higher. school, 1984. 248 p.

6. Alyanakh I.N. Modeling of computing systems / I.N. Alliance. L.: Mashinostroenie, 1988. 233 p.

7. Shannon R. Simulation of systems - art and science / R. Shannon. M.: Mir, 1978. 308 p.

P 3

P 4

F 5

R 6

K 7


As well as other works that may interest you

15330. Creating a pool interior in 3Ds Max 1.96MB
Topic 6: Creating the interior of the pool As a result of this work, you should get the rendered scene shown in the figure. 1. Two-dimensional forms. Modifiers of two-dimensional forms Purpose: to master the technology of creating d
15332. Basics of working with still images in the 3D graphics program 3ds max 4.96MB
Topic 5: Basics of working with static images in the 3D graphics program 3ds max. Stages of creating three-dimensional scenes Project Let's create a corner of the part of the room where the table is located. There is a glass of ice on the table. For specified...
15333. The processes of switching on and off a circuit with a capacitor 1.71MB
Calculate pre-switching t = 0 initial t = 0 and steady-state t → ∞ values ​​of currents and voltages on the capacitor in the circuit. 1. in two cases: 1. the key opens; 2. the key is closed. R1= 330 Ohm; R2=220 Ohm; U= 15 V; C= 10 uF Fig...
15334. The processes of switching on and off a circuit with an inductor 75KB
General information A circuit with one inductor as well as a circuit with one capacitor is described by a first order differential equation. Therefore, all currents and voltages in the transient mode change exponentially with the same constant time
15335. Study of transient processes in linear electrical circuits 94KB
Preparing for work In a closed circuit in Fig. 1, after disconnecting it from a source of direct or alternating voltage, damped sinusoidal oscillations may occur due to the initial energy reserve in the electric field of the capacitor and in the magnetic
15336. Studying Dijkstra's algorithm and implementing it for a given graph in the C++ programming language 344.5KB
Laboratory work No. 1 in the discipline Structures and data processing algorithms The purpose of the work: The study of Dijkstra's algorithm and its implementation for a given graph in the programming language C. Dijkstra's algorithm English. Dijkstras algorithm algorithm on graphs invented by N
15337. Learning the heapsort algorithm and implementing it in the C++ programming language 49KB
Laboratory work No. 2 in the discipline Structures and data processing algorithms Purpose of work: Studying the heap sort algorithm and implementing it in the C programming language. Job assignment Write a program that generates a numerical array of pa
15338. Studying the depth-first search algorithm and implementing it in the C++ programming language 150KB
Laboratory work №3 on discipline Structures and data processing algorithms Purpose of the work: Studying the depth-first search algorithm and its implementation in the C programming language. Job task Implement the depth-first search algorithm. Estimate the time...

    formalization and algorithmization of systems functioning processes.

Methodology for the development and machine implementation of system models. Construction of conceptual models of systems and their formalization. Algorithmization of system models and their machine implementation. Obtaining and interpreting the results of system modeling.

Methodology for the development and machine implementation of system models.

Modeling using computer technology (computer, AVM, GVK) allows you to explore the mechanism of phenomena occurring in a real object at high or low speeds, when in full-scale experiments with an object it is difficult to

(or impossible) to follow the changes that occur

within a short time, or when obtaining reliable results involves a long experiment.

The essence of computer simulation of a system is to conduct an experiment on a computer with a model, which is a certain software package that formally and (or) algorithmically describes the behavior of the elements of the system. S in the process of its functioning, i.e. in their interaction with each other and the external environment E.

User requirements for the model. Let us formulate the basic requirements for the model M S.

1. The completeness of the model should provide the user with the opportunity

obtaining the required set of performance estimates

systems with the required accuracy and reliability.

2. The flexibility of the model should enable reproduction

different situations when varying the structure, algorithms

and system settings.

3. Duration of development and implementation of a model of a large system

should be as small as possible, taking into account the restrictions

on available resources.

4. The structure of the model must be block, i.e., allow

the possibility of replacing, adding and deleting some parts

without modifying the entire model.

5. Information support should provide an opportunity

effective operation of the model with a database of systems of a certain

6. Software and hardware should provide efficient (in terms of speed and memory) machine implementation

models and convenient communication with the user.

7. Targeted

(planned) machine experiments with the system model using

analytical and simulation approach in the presence of limited computing resources.

In machine simulation of the system

S characteristics of the process of its functioning are determined

model based M, built on the basis of the existing initial

information about the simulation object. Upon receipt of new information

about the object, its model is reviewed and refined

with new information.

Computer modeling of systems can be used

in the following cases: a) to study the system S before it is designed, in order to determine the sensitivity of the characteristic to changes in the structure, algorithms and parameters of the modeling object and the external environment; b) at the stage of system design S for the analysis and synthesis of various options for the system and the choice among the competing ones of such an option that would satisfy the specified criterion for evaluating the effectiveness of the system under the accepted restrictions; c) after completion of the design and implementation of the system, i.e. during its operation, to obtain information that supplements the results of full-scale tests (operation) of a real system, and to obtain forecasts of the evolution (development) of the system in time.

Stages of system modeling:

    building a conceptual model of the system and its formalization;

    algorithmization of the system model and its machine implementation;

    obtaining and interpreting the results of system modeling.

Here are the sub-steps:

1.1-statement of the problem of machine modeling of the system (goals, tasks for the system being created, a) recognition of the existence of the problem and the need for machine modeling;

b) the choice of methods for solving the problem, taking into account the available resources; c) determining the scope of the task and the possibility of dividing it into subtasks.);

1.2 - analysis of the problem of modeling the system (selection of evaluation criteria, choice of endogenous and exogenous variables, choice of methods, implementation of preliminary analyzes of the 2nd and 3rd stages);

1.3-determination of requirements for initial information about the modeling object

and organization of its collection (carried out: a) selection of the necessary information about the system S and environment E; b) preparation of a priori data; c) analysis of available experimental data; d) the choice of methods and means of preliminary processing of information about the system);

1.4 - putting forward hypotheses and making assumptions (about the functioning of the system, about the processes under study);

1.5 - definition of the parameters and variables of the model (input variables, output variables, model parameters, etc.);

1.6 - establishing the main content of the model (structure, algorithms of its behavior);

1.7 - substantiation of criteria for evaluating the effectiveness of the system;

1.8 - definition of approximation procedures;

1.9 - description of the conceptual model of the system (a) describes the conceptual model in abstract terms and concepts; b) a description of the model is given using typical mathematical schemes; c) hypotheses and assumptions are finally accepted; d) the choice of a procedure for approximating real processes in constructing

1.10 - validation of the conceptual model;

1.11 - preparation of technical documentation for the first stage (a) a detailed statement of the problem of system modeling S; b) analysis of the system modeling problem; c) criteria for evaluating the effectiveness of the system; d) parameters and variables of the system model; e) hypotheses and assumptions adopted in the construction of the model; f) description of the model in abstract terms and concepts; g) description of the expected results of the system simulation S.);

2.1 - building a logical diagram of the model (building a system diagram, for example, according to the block principle with all functional blocks);

2.2 - obtaining mathematical relationships (setting all functions that describe the system);

2.3 - checking the reliability of the system model; (checked: a) possibility

problem solving; b) the accuracy of the reflection of the idea in the logical

scheme; c) the completeness of the logical scheme of the model; d) correctness

mathematical relationships used)

2.4 - choice of modeling tools (final choice of a computer, computer or computer for the modeling process, given that they will be available and quickly produce results);

2.5 - drawing up a plan for the execution of programming work (defining tasks and deadlines for their implementation, also take into account a) the choice of a programming language (system) for the model; b) an indication of the type of computer and the devices necessary for modeling; c) an estimate of the approximate amount of required RAM and external memory; d) approximate costs of computer time for modeling; e) the estimated time spent on programming and debugging a program on a computer.);

2.6 - specification and construction of the program scheme (drawing up a logical block diagram),

2.7 - verification and validation of the program scheme (Verification of the program - proof that the behavior of the program corresponds to the specification for the program);

2.8 - programming the model;

2.9 - verification of the reliability of the program (it is necessary to carry out: a) the reverse translation of the program into the original scheme; b) checking individual parts of the program when solving various test problems; c) combining all parts of the program and checking it as a whole on a control example of modeling a system variant S) ;

2.10 - preparation of technical documentation for the second stage (a) the logical scheme of the model and its description; b) an adequate scheme of the program and accepted designations; c) the full text of the program; d) list of input and output values ​​with explanations; e) instructions for working with the program; e) evaluation of the cost of computer time for modeling with an indication of the required computer resources);

3.1 - planning a computer experiment with a system model (an experiment plan is drawn up with initial parameters and all conditions, the simulation time is determined);

3.2 - determination of requirements for computing facilities (what computers are needed and how long they will work);

3.3 - carrying out working calculations (usually include: a) preparation of sets of initial data for input into a computer; b) verification of the initial data prepared for input; c) carrying out calculations on a computer; d) obtaining output data, i.e. simulation results.);

3.4 - analysis of the results of system modeling (analysis of the output data of the system and their further processing);

3.5 - presentation of simulation results (various visual representations in the form of graphs, tables, diagrams);

3.6 - interpretation of simulation results (transition from information obtained as a result of a computer experiment with a model to a real system);

3.7 - summing up the simulation results and issuing recommendations (the main results are determined, the hypotheses put forward are tested);

3.8 - drawing up technical documentation for the third stage (a) a plan for conducting a machine experiment; b) sets of initial data for modeling; c) system simulation results; d) analysis and evaluation of simulation results; e) conclusions on the obtained simulation results; indication of ways for further improvement of the machine model and possible areas of its application).

Thus, the system modeling process S is reduced to the implementation of the listed sub-stages, grouped into three stages.

At the stage of building a conceptual model Mx and its formalization, a study of the modeled object is carried out from the point of view of highlighting the main components of the process of its functioning, the necessary approximations are determined and a generalized scheme of the system model is obtained S, which is converted into a machine model Mm at the second stage of modeling by sequential algorithmization and programming of the model.

The last third stage of system modeling is reduced to carrying out, according to the received plan, working calculations on a computer using the selected software and hardware, obtaining and interpreting the results of modeling the system S, taking into account the impact of the external environment E.

Construction of conceptual models of systems and their formalization.

At the first stage of machine modeling - building conceptual model Mx of the system S and its formalizations - is formulated model and its formal scheme is built, i.e. the main the purpose of this stage is the transition from a meaningful description

object to its mathematical model, in other words, the process of formalization.

It is most rational to build a model of the system functioning according to the block principle.

In this case, three autonomous groups of blocks of such a model can be distinguished. Blocks of the first group are a simulator of environmental influences E on system 5; blocks of the second group are actually a model of the process of functioning of the system under study S; blocks of the third group - auxiliary

and serve for the machine implementation of the blocks of the first two groups, as well as for fixing and processing the simulation results.

Conceptual model - the subprocesses of the system are displayed, processes that can be ignored are removed from the block system (they do not affect the operation of the model).

More about drawing. The transition from the description of the system to its model in this interpretation is reduced to the exclusion from consideration of some secondary elements of the description (elements

j_ 8,39 - 41,43 - 47). It is assumed that they do not have a significant effect on the course of the processes studied using

models. Part of the elements (14,15, 28, 29, 42) replaced by passive links h, reflecting the internal properties of the system (Fig. 3.2, b). Some of the elements (1 - 4. 10. 11, 24L 25) - is replaced by input factors X and environmental influences v - Combined substitutions are also possible: elements 9, 18, 19, 32, 33 replaced by passive connection A2 and the influence of the external environment E.

Elements 22,23.36.37 reflect the impact of the system on the external environment y.

Mathematical models of processes. After going from description

simulated system S to her model MV built on block

principle, it is necessary to build mathematical models of processes,

taking place in different blocks. Mathematical model

is a set of relationships (for example, equations,

logical conditions, operators) that define the characteristics

system operation process S depending on the

system structure, behavior algorithms, system parameters,

environmental influences E, initial conditions and time.

Algorithmization of system models and their machine implementation.

At the second stage of modeling - the stage of model algorithmization

and its machine implementation - a mathematical model formed

at the first stage, is embodied in a specific machine

model. Practical implementation of the system.

Construction of modeling algorithms.

System operation process S can be viewed as a successive change of its states z=z(z1(t), z2(t),..., zk(t)) in k-dimensional space. Obviously, the task of modeling the process of functioning of the system under study S is the construction of functions z, on the basis of which it is possible to calculate the

characteristics of the system functioning process.

To do this, relations connecting the functions z (states) with variables, parameters and time, as well as initial conditions.

The considered principle of constructing modeling algorithms is called principle At. This is the most universal principle that allows you to determine the successive states of the system functioning process. S at specified time intervals

At. But from the point of view of machine time costs, it sometimes turns out to be uneconomical.

When considering the functioning processes of some systems, it can be found that they are characterized by two types of states:

1) special, inherent in the process of functioning of the system only

at some instants of time (the instants of arrival of the input

or control actions, environmental disturbances, etc.);

2) non-singular, in which the process is the rest of the time.

Special states are also characterized by the circumstance that the state functions zi(t) and instants of time change abruptly, and between special states the change in coordinates zi(t) occurs smoothly and continuously or does not occur at all. So

way, following when modeling the system S only behind its special states at those moments of time when these states take place, it is possible to obtain the information necessary to construct functions z(t). Obviously, for the described type of systems, modeling algorithms can be built according to the “principle of special states”. Denote the jump (relay) change of state z how bz, and the "principle of special states" - as bz principle.

For example, for a queuing system (Q-schemes) as special states, the states at the moments of receipt of requests for service in the device P and at the moments of the end of servicing requests by channels can be selected TO, when the state of the system,

estimated by the number of applications in it, changes abruptly.

A convenient form of representation of the logical structure of models of the processes of functioning of systems and computer programs is a diagram. At various stages of modeling, generalized and detailed logical schemes of modeling algorithms, as well as program schemes, are compiled.

Generalized (enlarged) scheme of the modeling algorithm specifies the general procedure for modeling the system without any clarifying details. The generalized scheme shows what needs to be done at the next step of the simulation, for example, turn to the random number generator.

Detailed scheme of the modeling algorithm contains refinements that are not in the generalized scheme. A detailed diagram shows not only what should be done at the next step of system modeling, but also how to do it.

Logic diagram of the modeling algorithm represents the logical structure of the process model of the system functioning S. The logical scheme indicates a time-ordered sequence of logical operations associated with the solution of the modeling problem.

Program scheme displays the order of software implementation of the modeling algorithm using specific software. The program scheme is an interpretation of the logical scheme of the modeling algorithm by the program developer based on a specific algorithmic language.

Obtaining and interpreting the results of system modeling.

At the third stage of modeling - the stage of obtaining and interpreting the results of modeling - a computer is used to carry out working calculations according to a compiled and debugged program.

The results of these calculations allow us to analyze and formulate conclusions about the characteristics of the process of functioning of the simulated system. S.

In the course of a machine experiment, the behavior of the model under study is studied M system operation process S at a given time interval.

Often simpler evaluation criteria are used, such as the probability of a certain state of the system at a given point in time. t*, the absence of failures and failures in the system on the interval, etc. When interpreting the simulation results, various statistical characteristics are calculated that need to be calculated.

Sovetov B.Ya., Yakovlev S.A.

Systems Modeling. 4th ed. - M.: Higher School, 2005. - S. 84-106.