Aleksandr G. Churbanov, Petr N. Vabishchevich

7 Applied software

Abstract: Nowadays, theoretical studies of applied problems are performed with the extensive use of computational tools (computers and numerical methods). In this chapter, the contemporary concept of the so-called component-based software is discussed. Component-based software is a set of well-developed software components which solve basic individual problems. Computational technologies for scientific research are based on constructing geometrical models, generating computational meshes, applying discretization methods, solving discrete problems approximately, visualizing, and processing calculated data. This chapter gives a brief review of existing applied software which can be used in engineering and scientific computations.

7.1 Numerical simulation

Theoretical and experimental research approaches demonstrate a large degree of independence from one another. Since fundamental models are well-known and deeply validated, the problem of closer coordination and communication of theoretical and experimental research can be formulated. This is a new technology which combines scientific research with numerical simulation technology.

7.1.1 Mathematical modeling

The first stage in the mathematization of scientific knowledge (theoretical level of research) involves creating abstraction independent of the specific nature of a problem, i.e. idealization and specification of its mathematical form (a mathematical model is formulated). The abstraction of a mathematical model causes certain difficulties in its application to the description of a specific problem or process. Nowadays, thanks to experience, the process of idealization and designing abstraction is performed quietly and quickly in most sciences.

The second stage of mathematization involves the study of mathematical models as pure mathematical (abstract) objects. For this, both existing and new, specially developed, mathematical methods are applied. Nowadays, computational tools (computers and numerical methods) provide great opportunities for the investigation of mathematical models.

And finally, the third stage of employing mathematics in applied research is characterized by result interpretation, i.e. the attachment of specific applied meaning to mathematical abstractions. A specialist in applied mathematical modeling always recognizes the specific applied meaning for any mathematical abstractions.

Heuristically, the role of mathematical modeling is apparent in the fact that a computational experiment is conducted instead of the corresponding physical experiment. Instead of studying a phenomenon of nature, we conduct a parametric study of its mathematical model and determine the dependence of the solution on its essential parameters. Such an experiment, in combination with natural tests, allows investigation of the process in a more comprehensive and fruitful manner.

The contemporary level of science and technology is characterized by studying complex nonlinear mathematical models. Under these conditions, computational tools are becoming the basic and predominant instruments of exploration. Conventional analytical methods of applied mathematical modeling perform only an auxiliary and attendant role in this process. They can only be employed for the qualitative study of a problem in a highly simplified statement.

The ability to study complicated mathematical models using numerical methods and computers allows us to consider the methodology of scientific research from a new viewpoint. Nowadays, powerful computers, efficient computational algorithms, and modern software make it possible to arrange scientific research within computational technology which includes both theoretical and experimental investigations.

7.1.2 Basic steps of a computational experiment

Let us present a short description of the basic components of mathematical modeling. We treat a computational experiment as the creation and study of mathematical models using computational tools. The model-algorithm-program triple (Samarskii’s triad) is recognized as the basis of computational experiments.

First, we design a mathematical model for the object under consideration based on known fundamental models. A computational experiment essentially involves the application of a group of close and possibly coupled models. We start with a simple but quite meaningful and close to experimental data model. Further, this model will be refined and tuned, incorporating new factors.

Once the mathematical model has been built, a preliminary study is conducted using traditional methods of applied mathematics. The main purpose of the preliminary study is the extraction of simpler (“model”) problems and their comprehensive analysis.

The next step of computational experiments involves the construction of discrete problems and numerical methods to solve the original continuous problem. Mathematical models usually include partial differential equations as well as systems of ordinary differential and algebraic equations.

A computational experiment is characterized by two peculiarities which must be taken into account when creating adequate software. These are the necessity of multi-variant calculations within the selected model and application of a variety of models (possibly a hierarchy of models). Therefore, we cannot work with only one program. Also, we need to be able to modify our program easily to solve related problems, i.e. to extend the field of applications. Software for computational experiments is based on the use of mathematical libraries, special toolkits, and packages of applied programs. In order to take the main features of computational experiments into account, we need to employ object-oriented programming techniques and modern programming languages.

Finally, we conduct a series of predictions by varying certain parameters of the problem. Experts in the corresponding application area participate in the analysis and interpretation of the data.The numerical results are processed, taking the existing theoretical concepts and available experimental data into account. On analysis of the results, it will become clear whether or not the selected mathematical model and its computational implementation is adequate and correct. If necessary, models and numerical methods are refined and improved and the whole cycle of computational experiments is repeated.

7.1.3 Mathematical models

The success of mathematical modeling is essentially governed by the issues of the mathematical models applied and how appropriate they are for the process under investigation. It seems reasonable to define sub-systems and construct lower level mathematical models in order to study a complex object. Here it is important not to focus on a separate mathematical model corresponding to a single problem, but to try to cover a wide enough class (set) of mathematical models. This set of models should be structured and ordered in a certain way. We are therefore speaking of a hierarchy of applied mathematical models.

Applied models consist of fundamental models (governing equations) supplemented by appropriate boundary and initial conditions, i.e. boundary value problems (BVP) for partial differential equations (PDEs). This transition is associated with the construction of geometric models (computational domains) of the objects being studied. The creation of geometric models is extremely important for the success of predictions. Modern engineering and scientific computations are based on the use of multidimensional (ideally 3D) geometric models.

Applied mathematical models usually describe phenomena of different natures which may be interconnected. This multiphysics leads to mathematical models which are based on systems of nonlinear equations for scalar and vector unknowns. As a rule, time-dependent formulations are considered. In this case, we can construct computational algorithms to determine the state of a system at a new time level by solving simpler problems for sub-systems (schemes of splitting with respect to separate processes).

7.2 Applied software engineering

Traditionally, two types of software are recognized: applied software and system software. The latter is supporting software for the development of general-purpose applications, which is not directly related to applied problems. Below we consider problems associated with software for the numerical analysis of applied mathematical models. We discuss both commercial and free/open source software for multiphysical simulations.

7.2.1 Features of applied software

In the early years of computer use, mathematical models were simple and unreliable. Applied software, in fact, was also primitive. The transition to a new problem or new version of calculations required practically assembling a new program, which was essentially a modification of the previously developed codes.

Modern use of computational tools is characterized by the study of complex mathematical models. Software has therefore greatly expanded, becoming larger as well as more complex in study and use. Current software includes a large set of various program units requiring construction of a certain workflow for efficient employment.

We do not study a particular mathematical problem in numerical simulations, but investigate a class of problems, i.e. we highlight some order of problems and hierarchy of models. Software should therefore focus on a multitasking approach and be able to solve a class of problems by switching rapidly from one problem to another.

The numerical analysis of applied problems is based on multiparametric predictions. Within the framework of a specific mathematical model it is necessary to trace the impact of various parameters on the solution. This feature of numerical simulations requires that the software has been adapted to massive calculations.

Thus, software developed for computational experiments must, on the one hand, be adapted to quick significant modifications, and on the other be sufficiently conservative to focus on massive calculations using a single program.

Our experience shows that applied software is largely duplicated during its life-cycle. Repeating the programming of a code for a similar problem wastes time and eventually money. This problem is resolved by the unification of applied software and its standardization both globally (across the global scientific community), and locally (within a single research team).

7.2.2 Modular structure

The modular structure of applied software is based primarily on modular analysis of the area of application. Within a class of problems, we extract relatively independent sub-problems, which form the basis for covering this class of problems, i.e. each problem of the class can generally be treated as a certain construction designed using individual sub-problems.

An entire program is represented conceptually as a set of modules appropriately connected with one another. These modules are relatively independent and can be developed (coded and verified) separately. The decomposition of the program into a series of program modules implements the idea of structured programming.

A modular structure of programs may be treated as an information graph, the vertices of which are identified with program modules, and the branches (edges) of which correspond to the interface between modules.

Functional independence and content-richness are the main requirements of program modules. A software module can be associated with an application area. For example, in a computational program, a separate module can solve a meaningful sub-problem. Such a module can be named a subject-oriented module.

A software module can be connected with the implementation of a computational method, and therefore the module can be called a mathematical (algorithmic) module (solver). In fact, this means that we conduct a modular analysis (decomposition) at the level of applications or computational algorithms.

Moreover, mathematical modeling is based on the study of a class of mathematical models, and in this sense there is no need to extract a large number of subject-oriented modules. A modular analysis of a class of applied problems is carried out with the purpose of identifying individual, functionally independent mathematical modules.

Software modules may be parts of a program which are not directly related to a meaningful sub-problem in the applied or mathematical sense. They can perform supporting operations and functions. These types of module, referred to as internal modules, include data modules and documentation modules, among others.

Separate parts of the program are extracted for the purpose of autonomous (by different developers) design, debugging, compilation, storage, etc. A module must be independent (relatively) and easily replaced. When creating applied software for computational experiments, we can highlight characteristics of software modules such as actuality, i.e. its use as much as possible in a wider range of problems of this class.

7.3 Software architecture

The structure of applied software is defined according to solving problems. Both general purpose and specialized program packages are used to model multiphysics processes.

7.3.1 Basic components

The basic components of software tools for mathematical modeling are the following:

  • pre-processor – preparation and visualization of input data (geometry, material properties), assembly of computational modules;
  • processor – generation of computational grids, numerical solving of discrete problems;
  • post-processor – data processing, visualization of results, preparation of reports.

An analysis of these components is presented below.

7.3.2 Data preparation

In research applied software, data input is usually conducted manually via editing text input files. A more promising technology is implemented in commercial programs for mathematical modeling. It is associated with the use of a graphical user interface (GUI).

It is necessary to carry out an additional control for input data to solve geometrically complex problems. Due to the modular structure of applied software, the problem of controlling geometric data is resolved on the basis of unified visualization tools.

The core of a pre-processor is a task manager, which allows an executable program to be assembled for a particular problem. It is designed for automatic preparation of numerical schemes to solve specific problems. The task manager includes system tools for solving both steady and time-dependent problems as well as adjoint problems using a multiple block of computational modules. A numerical scheme for adjoint problems includes an appropriately arranged chain of separate computational modules.

7.3.3 Computational modules

Program packages for applied mathematical modeling consist of a set of computational modules which are designed to solve specific applied problems, i.e. to carry out the functions of the processor (generating mesh, solving systems of equations). These software modules are developed by different research groups with individual traditions and programming techniques.

A program package for applied mathematical modeling is a tool for integrating the developed software in a given application area. The use of unified standards of input/output allows the integration of a computational module into a software system for mathematical modeling, which makes automated assembly of computational schemes from separate computational modules possible.

A computational module is designed to solve a particular applied problem. For transient problems, a computational module involves solution of the problem from an initial condition up to the final state. The reusability of computational modules for different problems results from the fact that the computational module provides a parametric study of an individual problem. To solve the problem, we choose a group of variable parameters (geometry, material properties, computational parameters, etc.).

Software system tools provide a user-friendly interface for computational modules on the basis of dialog tools which set the parameters of a problem.

7.3.4 Data processing and visualization

A software system post-processor is used for visualization of computational data. This problem is resolved by the use of a unified standard for the output of computational modules.

Software systems for engineering and scientific calculations require visualization of 1D, 2D, and 3D calculated data for scalar and vector fields.

Data processing (e.g. evaluation of integral field values or critical parameters) is performed in separate computational modules. Software systems for mathematical modeling make it possible to calculate these additional data and to output the results of calculations and include them in other documents and reports.

7.4 General purpose applied software

The idea of end-to-end mathematical modeling (from geometry creation to data visualization) is most completely realized in commercial multiphysical numerical packages. The organization of applied software is also possible for free/open source software; as an example see the salome platform (see Section 7.4.3 below).

7.4.1 User-friendly interface

User interaction with a computer is based on a graphical user interface in modern applied software. GUI is a system of tools based on the representation of all available user system objects and functions in the form of graphic display components (windows, icons, menus, buttons, lists, etc.). The user has random access (using keyboard or mouse) to all visible display objects.

GUI is employed in commercial software for mathematical modeling, such as ANSYS23, Marc, SimXpert, and other products of MSC Software24, STAR-CCM+, and STAR-CD from CD-adapco25, COMSOL Multiphysics26. In these cases, preparation of geometrical models, equation selection, setting of boundary and initial conditions is conducted as easily and clearly as possible for inexperienced users.

7.4.2 Basic features

A pre-processor solves two primary problems in systems for applied mathematical modeling. The first problem involves preparing a geometrical model and specifying a computational domain. The second pre-processor problem consists of preparing an applied model, i.e. selecting and setting governing equations along with initial and boundary conditions.

It is usually possible to import geometry designed in CAD systems to prepare geometrical models (see SolidWork27, CATIA28, Autodesk Inventor29 among others) using the following formats: IGES, STEP, VRML, STL, etc. The second approach is to import from other mathematical modeling systems, in particular from systems of finite element analysis, such as NASTRAN, ABAQUS, ANSYS, etc.

Advanced systems for applied mathematical modeling support their own tools to create and edit geometrical models. Such editors for geometrical modeling provide geometrical primitives and boolean operations. In addition, it is possible to design ad hoc geometrical editors using the Open CASCADE30 library for solid modeling and visualization.

A pre-processor plays a very important role in setting a physical model. We usually work within a fixed set of governing equations, where it is necessary to specify coefficients for individual sub-domains. The setting of material properties is performed in analytical (functional dependence on variables) or table form. Standardization is ensured by using a common database of material properties and convenient tools for their retrieval.

A special technique is used to prescribe boundary and initial conditions. It is necessary to have graphical tools to extract individual parts of surfaces and impose some boundary conditions on them.

A program system for applied mathematical modeling includes advanced tools for data visualization and processing. A post-processor provides, firstly, visualization of numerical results. In a user-friendly GUI, the user can view results, save graphs in chosen formats, and print them. In addition to visualizing 1D, 2D, and 3D scalar and vector fields, special tools may be available for the animation of time-dependent fields.

7.4.3 The Salome platform

Among free multiplatform software for numerical simulation, we can highlight salome31 as a very attractive tool. It is considered to be a platform providing basic features of systems for end-to-end modeling not associated with a specific problem. The program allows users to construct geometries, generate meshes, and visualize results. Thus, we have a unified environment with the basic elements of pre- and post-processing.

Salome does not include computational modules, but has tools to add them and organize calculations. The Python algorithmic language is used to prepare user-defined numerical schemes. Salome can therefore be employed as a platform to integrate third party computational modules in the creation of modern software for applied mathematical modeling.

Among the basic modules of Salome, the Geometry module for creating and editing CAD geometric models with support of import and export is worth mentioning. The Mesh module is designed for generating meshes, including third party generators. The Post–Pro module is applied for the visualization of calculated data. The YACS module is available for the creation, editing, and execution of numerical schemes.

Among the available extensions of SALOME, we note SALOME–. In addition to SALOME itself, this integrated toolkit for mechanical analysis includes the powerful package for finite element analysis, Code_Aster32. It is also possible to integrate SALOME with code_saturne33, which is used to predict 2D and 3D heat and fluid flows.

7.5 Problem-oriented software

In addition to general purpose applied software oriented to a wide class of problems, much attention is paid to special software for the solution of specific applied problems. In developing problem-oriented software, we focus on computational algorithms in contrast to the relatively small possibilities of pre- and post-processing.

7.5.1 Parametric study

In software for end-to-end mathematical modeling, each computational module is associated with the solution of an individual applied problem. A set of such modules must solve all basic problems. To make this possible, a computational module should be focused on the parametric study of applied problems.

Mathematical modeling of complicated applied problems is based, firstly, on solving boundary value problems for systems of steady and unsteady equations of mathematical physics. As a rule, they are supplemented with systems of ordinary and transcendental equations. Next, numerical simulation requires the specification of a computational domain, i.e. creation of a geometric model.

A problem-oriented software system for applied mathematical modeling may not provide tools for fully-fledged 3D editing of geometric models. Modeling is based on the separation of a clearly defined class of problems which will be solved using developed computational modules. Thus there is no need to construct a 3D model, nor do we need to employ an editor for complex 3 D geometric objects. It is sufficient to have a library of standard parametric geometric objects (primitives).

We have a set of parameters of geometric models and define a range of their variations for each computational module. System tools for visualization provide control of input parameters of geometric models. These tools are universal and do not depend on computational modules.

In a parametric study, we control parameters which specify the process being investigated. Users must have options to choose parameters of the applied model under consideration. Coefficients of governing equations, boundary and initial conditions are set for a particular computational module.

Parameters associated with material properties deserve a separate mention. It is necessary to create a unified database of materials and tools to work with this database.

The third set of parameters is computational parameters. These parameters are associated with discretization schemes, methods for solving discrete problems, and other parameters of the computational algorithm. In particular, we need to specify the value of a timestep if we solve a transient problem.

Thus, there are three groups of input parameters in each computational module for parametric study:

  • – parameters of a geometric model;
  • – parameters of an applied mathematical model;
  • – computational parameters.

Only interactive work with a relatively small number of parameters for solving applied problems makes end-to-end modeling software suitable for a wide range of users.

7.5.2 Componet-based implementation of functionalities

The functionality of modern software systems for applied mathematical modeling must reflect the level of development of theory and practice achieved for numerical algorithms and software. This goal is attained by component-oriented programming based on the use of well-developed and verified software for solving basic mathematical problems (general mathematical functionality).

In applied program packages, the actual content of computational problems is the solution of the initial value problem (the Cauchy problem) for systems of ordinary differential equations which reflect mass, momentum, and energy conservation laws. We reach Cauchy problems by discretization in space (using finite element methods, control volume or finite difference schemes). The general features of the system of ordinary differential equations (ODEs) are:

  • – it is nonlinear;
  • – it is coupled (some valuables are dependent on others);
  • – it is stiff, i.e. different scales (in time) are typical for the physical processes considered.

In order to solve the Cauchy problem we need to apply partially implicit schemes (to overcome stiffness) with iterative implementation (to avoid nonlinearity), as well as partial elimination of variables (to decouple unknowns).

Applied software allows the tuning of iterative processes in order to take specific features of problems. It is possible to arrange nested iterative procedures, to define specific stopping criteria and timestep control procedures, and more. In this case, computational procedures demonstrate a very special character and work in a specific (and often very narrow) class of problems; the transition to other seemingly similar problems can drastically reduce its efficiency.

7.5.3 Computational components

It is obviously necessary to apply more efficient computational algorithms in order to implement complicated nonlinear multidimensional transient applied models which take the parallel architecture (cluster, multicore, etc.) of modern computing systems into account. The nature of the algorithms used must be purely mathematical, i.e. involving no other considerations.

The hierarchy of numerical algorithms is listed here (increasing in complexity from top to bottom):

  • linear solvers – direct methods and, first of all, iterative methods if the systems of equations have large dimensions;
  • nonlinear solvers – general methods for solving nonlinear systems of algebraic equations;
  • ODE solvers – to solve the stiff systems of ODEs which appear in some mathematical models.

Solvers must support both sequential and parallel implementations and also reflect modern achievements of numerical analysis and programming techniques. This means, in particular, that we need to use appropriate specialized software developed by specialists in numerical analysis. This software must be deeply verified in practice and greatly appreciated by the international scientific community.

Such applied software systems are presented in particular in the following collections:

  • – Trilinos34 – Sandia National Laboratory;
  • – SUNDIALS35 – Lawrence Livermore National Laboratory;
  • – PETSc36 – Argonne National Laboratory.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset