Construction of meshes for the finite volume method. Finite volume method. Dividing the volume of a cube into finite volumes

The advantage of this method is that it is based on conservation laws. Therefore, in contrast to the finite difference method, the control volume method ensures a conservative numerical scheme, which makes it possible to obtain solutions that are acceptable in accuracy even on relatively coarse grids.

The main idea of ​​the method is quite simple and easily amenable to physical interpretation. When discretizing the Reynolds-averaged Navier-Stokes equations, the computational domain is divided into a large number of non-overlapping elementary volumes, so that each volume contains only one computational (nodal) point. The set of elementary volumes is called the computational mesh. Grid cells can have different shapes. The most commonly used are hexahedrons (hexahedrons) and tetrahedrons (tetrahedrons). The control volume method allows the use of cells with an arbitrary number of faces (pyramids, prisms, complex polyhedra, etc.).

The solution to the system of equations (1)–(18) is represented as a set of values ​​of the desired parameters at the centers of these volumes. For example, if we divide the volume of a room into 1000 individual elementary volumes (cells), then as a result of the solution we will have 1000 values ​​of temperature, speed, pressure, etc. In Fig. Figure 2 shows a fragment of the computational domain. Cells are numbered with indices i, j, k.

Rice. 2. Fragment of the computational domain

Integration of differential equations is carried out over each elementary volume. Integrals are calculated using interpolation formulas, which are used to determine the values ​​of the desired variables between the calculated points. As a result, a discrete analogue of the original equations at nodal points is obtained, which reflects the law of conservation of the studied variables in each finite volume.

It should be noted that in most modern computational hydrodynamic packages such as “STAR-CD”, “FLUENT”, “CFX” and many others, the control volume method is implemented to discretize the model equations.

Calculation grids

The process of constructing a mesh is one of the key moments of conducting a numerical experiment. Selecting and constructing a computational grid adequate for the problem under consideration is a rather complex and time-consuming procedure. A rational choice of mesh can significantly simplify the numerical solution of the problem.

Rice. 3. Grid cell configurations

Grid cells can have different shapes (Fig. 3) and sizes that are best suited for solving a specific problem. The simplest type of grid is when the cells are identical and have a cubic shape.

As a rule, near solid surfaces the mesh becomes denser, i.e., the cells have a smaller size normal to the surface. This is done to improve the accuracy of calculations in those areas where the flow gradients of the studied parameters change more quickly, for example, in the boundary layer.

You can increase the accuracy of calculations and reduce the approximation error in 2 ways:

· increasing the order of sampling accuracy;

· decreasing the grid step.

When solving non-stationary problems, the cell sizes Δx and the time integration step Δt are related by the CFL condition (Courant-Friedrichs-Levy): , u- speed.

Universal computer programs currently used in engineering practice allow working on arbitrary unstructured meshes using highly skewed elements. In this case, the order of discretization accuracy, as a rule, does not exceed the second. To obtain a high-quality solution, it is necessary to construct computational grids with small steps.

The STAR-CCM package has switched to the use of polyhedral cells (similar to a soccer ball), which, by combining cells, eliminates the appearance of highly skewed cells.

The main advantage of unstructured meshes compared to regular ones is greater flexibility in discretizing a physical region of complex shape. In this case, the grid cells must have comparable volumes or areas and must not intersect. However, the disadvantages of this type of mesh include an increase in the mesh dimension. As practice shows, for the same object, an unstructured mesh, when constructed correctly, has approximately twice as many cells as a structured one, which naturally leads to an increase in computation time in relation to regular meshes. However, in many cases, unstructured meshes are the only possible construction option due to the complexity of the object geometry. In addition, with a rational choice of meshing algorithm, the time spent on constructing an unstructured mesh turns out to be significantly less than the time required to construct a structured (block-structured) mesh. As a result, the total time spent on solving the problem (including meshing time and calculation time) can be much less when using unstructured meshes than in the case of structured ones.

Determining the required mesh size is, in itself, a very difficult task. The universal method that should be followed when choosing the grid dimension comes down to the fact that the resulting solution should not change when the number of cells increases (grid convergence).

For typical problems, conducting a grid convergence study is not necessary, since you can rely on previously obtained results. When moving to study a new type of problem, it is imperative to carry out a study of grid convergence and determine the requirements for the computational grid.

Note that when solving real problems of ventilation and air conditioning, the characteristic number of cells is, as a rule, from 500 thousand to 3 - 4 million, depending on the geometric complexity of the object, the set of required parameters and the specifics of the problem. In this case, the computation time on a cluster consisting, for example, of 24 cores can reach up to a week, and when solving non-stationary problems - up to several weeks.

The STAR-CCM+ package includes a module for creating computational meshes. There are also separate packages for generating meshes, for example, the widely used one is ANSYS, ICEM CFD (ICEM). Meshes built in external packages can be imported into the STAR-CCM+ package.

Chapter 1. Methods for discretizing systems of conservation laws.

1.1. Technological principles of discretization methods for initial-boundary value problems using finite element spaces.

1.1.1. Finite element methods.

1.1.2. Finite volume methods.

1.2. Upwind schemes on simplicial grids.

1.3. Methods for solving the stationary system of Navier-Stokes equations.

Chapter 2. Construction of discrete analogues of convective-diffusion-reaction equations using the finite volume method

2.1. MKO/FE discretization of convective-diffusion type problems.

2.1.1. Triangulation and a method for constructing a dual mesh.

2.1.2. Integral form of conservation laws.

2.1.3. Approximation of diffusion fluxes and calculation of the MKO/FE stiffness matrix.

2.1.4. Approximation of source terms.

2.1.5. Calculation of the MCO/FE mass matrix.

2.1.6. Accounting for boundary conditions.

2.2. Construction of multidimensional upwind schemes on simplicial grids.

2.2.1. Calculation of convective local matrices.

2.2.2. Schemes with weighing mass flows.

2.2.3. Modification of exponential schemes.

2.2.4. Some properties of counterflow schemes and principles of their construction.

2.2.5. An analogue of the exponential scheme for schemes with the calculation of unknowns at the centers of cells.

2.3. New classes of MKO integral formulas.

2.3.1. Integration of monomials of barycentric coordinates.

2.3.2. On possible combinations of polynomial representations.

2.3.3. On increasing the order of interpolation polynomials of the local solution representation.

2.4.4. Use of inconsistent finite elements.

2.4. Element-wise assembly of global matrices

Chapter 3. Modeling the flow field of viscous incompressible media.

3.1. Mathematical model.

3.2. Integral form of conservation laws.

3.3. Taking into account the relationship between velocity and pressure fields.

3.3.1. Ry-Chow interpolation for calculating mass fluxes.

3.3.2. Discretization of the continuity equation.

3.3.3. Accounting for boundaries with non-zero mass flow.

3.3.4. General iteration scheme 1.

3.4. Accelerating the convergence of iterative schemes.

3.4.1. Correction of pressure and velocity fields

3.4.2. General iteration scheme II.

3.5. Solving systems of linear algebraic equations.

Chapter 4. Numerical experiments.

4.1. Stability analysis for boundary layer type solutions.

4.2. Accelerating flow in a round pipe.

4.3. Flow in the initial section of a smooth channel.

4.4. Laminar flow of a jet from a point nozzle (source jet)

4.5. Laminar flow behind a flat asymmetric backstep

4.5.1. Calculation using various upstream schemes

4.5.2. Input effect when calculating flows behind a backward step using MKO/FE on simplicial grids.

4.5.3. Comparison of different methods for solving systems of linear algebraic equations.

Recommended list of dissertations

  • Modeling of internal flows of a viscous incompressible fluid by the finite element method using counterflow schemes 2007, Candidate of Physical and Mathematical Sciences Gobysh, Albina Vladimirovna

  • Numerical schemes based on finite-volume/finite-element approximations for solving long-wave hydrodynamics problems 2004, candidate of physical and mathematical sciences Styvrin, Andrey Vadimovich

  • Parallel technologies for solving boundary value problems 2005, Doctor of Physical and Mathematical Sciences Vasilevsky, Yuri Viktorovich

  • Finite volume method for convection-diffusion problems and two-phase flow models 2010, Candidate of Physical and Mathematical Sciences Nikitin, Kirill Dmitrievich

  • Three-dimensional modeling of impurity transfer processes in porous media of complex structure 2007, Candidate of Physical and Mathematical Sciences Kapyrin, Ivan Viktorovich

Introduction of the dissertation (part of the abstract) on the topic “Technologies of the finite volume/finite element method on simplicial grids for problems of convective-diffusion type”

Numerical solution of problems of mathematical physics is one of the main methods for studying real phenomena. The combined use of computational and physical experiments in the analysis of any phenomenon allows, on the one hand, to reduce the number of expensive experimental measurements, and on the other hand, to verify and improve mathematical models.

As the speed of computing systems increases, new demands are placed on numerical methods for solving problems of mathematical physics. The development and improvement of modern methods for discretizing conservation laws, which provide the ability to simulate ever new classes of problems and obtain significantly better results when solving known ones, is an important area of ​​research.

Modern computational algorithms should provide the most accurate description of areas with complex geometry. This is possible using non-orthogonal and unstructured meshes. Compared to arbitrary non-orthogonal meshes, for unstructured simplicial meshes (triangulation in the two-dimensional case and partition into tetrahedrons in the three-dimensional case), local condensations are easier to implement (for example, behind a back step, in a zone of sudden narrowing, in the vicinity of the attachment point), and also, if necessary , adaptation of the computational grid depending on the behavior of the solution. Thus, even when discretizing conservation laws in geometrically simple domains that can be accurately represented by a collection of rectangular elements, unstructured simplicial meshes have a number of advantages. Despite the obvious advantages of unstructured grids for approximating arbitrary regions and the possibility of automatically constructing simplicial partitions, they have practically not been used in computational fluid dynamics, and only in the last 15 years have they become increasingly popular. According to the testimony of B. Stoufflett et al., the reason for this is the sharply increasing calculation time when moving to unstructured approaches. The fact is that the position of non-zero elements in the matrices of discrete analogues depends on the contiguity of grid nodes and arbitrarily, the matrices are stored using universal formats and data structures. The operations of multiplying a sparse matrix by a vector and incomplete factorization become much more “expensive”. At the same time, systems of computational fluid dynamics equations are interconnected nonlinear systems of equations, the implicit solution schemes of which have a multi-level iterative nature, so that at each of the “global” iterations it is necessary to solve several systems of linear algebraic equations. It was with the advent of powerful computing systems, as well as thanks to the development of adaptive and multigrid methods, that it became possible to use unstructured grids and corresponding spatial discretization schemes for modeling hydro-gasdynamic processes.

The most common discretization method in the unstructured case is the finite element method (FEM). Let us note such advantages of the method as the preservation of the symmetric nature of the self-adjoint part of differential operators in their discrete analogues (this is achieved by a special choice of the space of test functions coinciding with the space of trial functions), the possibility of increasing the accuracy of approximation by increasing the degree of interpolation polynomials of the local solution representation (the so-called p and h-p versions of FEM, ), natural consideration of boundary conditions of the second and third kind. The finite element method has an established technological basis, in particular

Methods for approximating internal products under the assumption of a piecewise polynomial representation of the solution and parameters of a boundary value problem, namely: the use of basis decomposition of the corresponding finite element space, classes of integral formulas that make it possible to accurately integrate arbitrary products of basis functions over partition elements and edges (faces) of elements,

Standard interpolation apparatus.

The technologies of the method make it possible to simply and uniformly construct discrete analogues of initial boundary value problems, with various types of boundary conditions under the assumption of a certain degree of smoothness of the solution and piecewise polynomial behavior of the coefficients of the equations and boundary conditions , .

In a number of applications, such as modeling supersonic and transonic gas flows and calculations using shallow water models, the local conservatism of the schemes used to discretize conservation laws is very important. The finite element method does not allow one to trace with satisfactory accuracy the features of emerging discontinuous solutions, and the traditional approach to solving such problems is the finite volume method. When discretizing a system of conservation laws by the finite volume method, the computational domain is approximated by a set of open finite volumes, then the researcher takes a “step back”, moving to the integral form of the original system of equations; Using the Ostrogradsky-Gauss formula, we move from volume integration to boundary integral, so that the method of approximating flows through the faces of finite volumes completely determines the computational scheme. According to S. Patankar's monograph, "for most researchers working in the field of hydrodynamics and heat transfer, the finite element method still seems shrouded in mystery. The variational formulation and even the Galerkin method do not lend themselves to simple physical interpretation." At the same time, finite volume schemes have a certain physical meaning of the balance of fluxes and source terms in each of the finite volumes that approximate the computational domain, which makes the finite volume method more attractive. The “simplicity” of MKO is one of the reasons for the lack of a general technological basis for the method.

So, the advantages of the classical version of the MKO (finite volume/finite difference method, FVDM) include the local conservatism of discrete schemes, greater simplicity and clarity, and the possibility of naturally taking into account boundary conditions of the second kind. In addition, in the case of solving problems with a predominance of convection, the implementation of counterflow schemes is simplified, since the flows through the faces of finite volumes are both analyzed and approximated quantities.

Attempts to systematize finite-volume approximations led to a partial combination of FEM technologies and the principle of integration over finite volumes; the earliest of them go back to the work of B. R. Baliga, K. Prakash and S. Patankar and are known as CVFEM methods (control-volume-based finite element methods), hereinafter referred to as finite volume/finite element methods (FVM/FE). The authors of the method pursued the goal of constructing conservative schemes of the finite volume method, using one of the main advantages of FEM - the ability to approximate complex geometries using unstructured meshes. The profile functions in this class of methods are “of an auxiliary nature”; the belonging of the solution to finite element spaces is not emphasized. Barycentric sets are used as a dual partition.

For the first time, the problem of the lack of universal technological principles of the finite volume/finite difference method (MKO/KR, FVDM) is discussed in the work of Z. Kaya “On the finite volume/element method”. The author draws the reader's attention to the "unsystematic nature of the finite volume/finite difference method"; When approximating systems of conservation laws by the finite volume/finite difference method, approximations of various classes can be used within the same work, which significantly complicates the analysis of the convergence of such schemes. A solution to this problem is proposed - the joint use of the ideas of the finite element method (searching for a solution in some finite element space and using the piecewise polynomial behavior of the solution to calculate flows) and the integral form of conservation laws. Thus, finite volume/element methods (FME/E, “box methods”, FVE) arose in an attempt to create “more systematic finite volume technologies”. The absence of general technological principles of finite volume/finite difference methods is also noted in the works of Ya. JI. Guryeva and V.P. Ilyin.

Finite volume/finite element methods (FVE) and finite volume/finite element methods (CVFEM) use consistent finite element spaces of functions linear on simplexes and belong to the class of cell-vertex finite volume schemes, Fig. 1, a.

A number of computational fluid dynamics schemes (modeling of viscous incompressible flows) use inconsistent finite element spaces, in particular, the Crousey-Raviard space linear on elements continuous at the centers of the edges of test functions. Finite volume methods using inconsistent finite element spaces were proposed by S. Choi and D. Kwak, studied in a number of works by other authors (the so-called subvolume methods, covolume method) and are schemes with the calculation of unknowns at the centers of edges (

The most common schemes for solving gas dynamics problems and modeling anthropogenic disasters using shallow water equations are cell-centered finite volume schemes, Fig. 1, f. Their popularity is due to the fact that in the case of calculating unknowns in centroids, most gas dynamics schemes (S.K. Godunov schemes, TVD schemes) can be transferred to unstructured grids without fundamental technological changes. o a in

Fig.1. Location of calculation points in relation to the FE grid nodes.

This work primarily considers classes of finite volume methods with the calculation of unknowns at triangulation nodes (MKO/E, MKO/FE) and edge centers (subvolume methods); in the future we will also say “finite volume methods using finite element spaces.” These classes of methods, according to a number of studies (, ), for convection-diffusion problems provide better approximations to the solution than methods with the calculation of unknowns at the centers of cells. One of the main reasons is that for the methods listed above, the continuity of the first derivatives of test functions on the elements of the dual mesh is preserved.

An effective approach to solving problems with a predominance of convection is the use of the Galerkin method with symmetric test functions for the self-adjoint part of differential operators and upstream MCO schemes for their asymmetric part, the so-called. mixed finite element/volume methods (FEM/O, MEV, mixed element/volume method).

The dissertation work is devoted, in particular, to improving the technologies of the finite volume method for the indicated classes of methods (MKO/E, MKO/CE, FEM/O, subvolume methods). At the moment, these methods do not have established technologies for taking into account the piecewise polynomial behavior of the solution, source terms and transfer coefficients. We can list the following reasons for the imperfection of the apparatus for exact integration of polynomials in finite volume methods using finite element spaces:

1. Unlike the finite element method, the finite volume method does not have a p-version, since with the introduction of additional nodes and several types of dual meshes, the local conservatism of a number of variables of the system of conservation laws in relation to “alien” finite volumes is violated. Thus, approximations are limited to lower order finite element spaces.

2. Compared to the finite element method, finite volume methods are characterized by greater freedom in choosing the spaces of test functions, which in this case turn out to be related to the location of the points of calculation of the unknowns in relation to the discretization nodes (schemes with the location of the unknowns at nodes, midpoints of edges, centroids simplexes) and the method of constructing a dual grid (using barycentric, orthocentric, circumcentric sets). Combined with the ability to use collocated or staggered grids, this gives the full variety of existing MCM schemes in each application.

For MCM methods for discretizing conservation laws that use finite element spaces, a careful selection of these spaces for solution, coefficients of equations and source terms partly loses its meaning if the method does not have developed means of taking into account piecewise polynomial representations, in particular, the apparatus for exact integration of polynomials over elements of the dual mesh, subdomains of elements and segments of border edges. As a consequence, the results of calculations using the constructed schemes should be considered from the point of view of the effects of numerical integration, taking into account various methods of their implementation; it becomes significantly more difficult to compare research results with the works of other authors, etc.

So, this work is devoted to the revision of existing MCM/FEM technologies for constructing discrete analogues of convection-diffusion type problems.

The technology for taking into account the piecewise polynomial representation of the solution, the coefficients of the equation and those included in the boundary conditions, as well as source terms in finite volume methods using finite element spaces must satisfy the following requirements:

1) allow arbitrary combinations of polynomial representations of coefficients and solutions on partition elements, as well as increasing the degree of interpolation polynomials of the local solution representation;

2) use unified principles of approximation when calculating the contributions of elements corresponding to various terms of the equation (diffusion, convective, reaction terms, source terms), as well as contributions from edges that approximate parts of boundaries with different types of boundary conditions specified on them;

3) allow a homogeneous generalization to the three-dimensional case;

4) take into account the experience of well-developed finite element technologies, in particular, the use of basis expansion of finite element spaces and the advantages of accurately integrating piecewise polynomial representations of the solution and transfer coefficients;

5) provide a unified technological basis for mixed FEM/O approximations that use two sets of test functions - finite volume and finite element - to approximate one equation;

6) the principles of technology should remain unchanged during the transition from the use of consistent finite element spaces (finite volume/finite element methods with calculation of unknowns at nodes) to the use of inconsistent finite elements (methods with calculation of unknowns at the centers of triangulation edges);

7) the technology can be used to approximate various classes of physical problems.

Of the existing technologies of finite volume methods using finite element spaces (finite volume/element methods (FVE), finite volume/finite element methods (CVFEM), subvolume methods, mixed volume/element methods (MEV)), none one does not meet the above requirements. Thus, the creation of new technologies for these classes of methods using simplicial partitions and barycentric sets as dual ones seems to be a relevant research topic.

In the case of a significant predominance of convection, comparison of various MCO discretization schemes, as well as comparison of calculations using the finite element method and the finite volume method, actually comes down to a comparison of the corresponding upwind schemes.

The most studied and often used in the unstructured case are upwind schemes of the class of finite volume methods with the calculation of variables at the centers of cells. Despite the fact that the edges of the partition elements are not parallel to the coordinate axes, these schemes in most cases are of a one-dimensional nature, since they come down to solving the problem of the decay of a discontinuity on the lines connecting the centroids of simplexes. Calculations using such schemes do not reproduce the multidimensional structure of the flow and have excessive numerical diffusion. To construct upstream second-order approximation schemes, a significant expansion of the template is necessary, which in the unstructured case leads to a significant complication of the corresponding data structures.

Upstream schemes for schemes with the calculation of unknowns at triangulation nodes and the midpoints of its edges are currently few in number (see). In some cases, the upstream approximation principle comes down to using one value of a scalar substance - at a simplex node lying upstream, or two weighted values ​​- at the ends of a simplex edge lying upstream. Only one of the known schemes, the FLO (Flow Oriented Upwind Scheme), developed by K. Prakash and S. Patankar, takes advantage of the calculation of unknowns at the nodes - the ability to construct asymmetric profile functions. But calculations using this scheme are considered unsatisfactory, since the scheme does not have the property of positivity, and iterative processes often diverge.

Estimating the numerical diffusion introduced by the use of upwind schemes on simplicial grids is a problem in its own right. Existing works in this direction, providing theoretical estimates of convergence characteristics, are limited to a variety of schemes for calculating variables in the centers of cells. Therefore, estimating the convergence rate of upwind MCO/FE schemes using a series of numerical experiments is of particular importance.

So, the construction and comparative analysis of upwind MCO/FE schemes on unstructured grids is a current research topic.

The goal of the work is to develop computational technologies for finite volume methods using finite element spaces to approximate problems of convective-diffusion type. To achieve this goal, the following research objectives were formulated:

1) improvement of technologies for discretizing systems of conservation laws using the finite volume/finite element method on simplicial grids, using barycentric partitions as dual partitions;

2) development of technologies for approximation of problems of convective-diffusion type with significant first derivatives; construction, implementation and comparative analysis of upstream schemes on unstructured grids, in particular, conducting computational experiments to assess the order of approximation of the proposed and most accurate known schemes, as well as comparison of the characteristics of upstream schemes based on MCE/FE and FEM;

3) creation, based on the developed technologies, of software packages that make it possible to adequately simulate viscous incompressible flows of liquids and gases in geometrically complex areas, in stationary and non-stationary cases.

Research methods. Methods of computational mathematics. Comparative analysis of technologies for exact integration of polynomials in finite element methods, finite volumes/elements, distributed residuals. Experimental assessment of the convergence rate of upwind flow schemes for problems with an analytical solution. Calculations on a set of condensed finite element partitions, followed by analysis of convergence to experimental data.

The scientific novelty of the work is as follows:

1. A new technology is proposed for taking into account the piecewise polynomial representation of the solution, transfer coefficients and source terms when discretizing initial-boundary value problems using the methods of finite volumes/elements, finite volumes/finite elements and subvolumes. The technology is based on the use of basis expansion of finite element spaces in terms of barycentric simplicial coordinates, with further exact integration of their monomials. For the MKO/FE, MKO/E schemes with the calculation of variables at triangulation nodes, three classes of formulas for the exact integration of monomials of barycentric coordinates are proposed: over segments of the dual mesh in an element, over barycentric subregions and segments of boundary edges. For subvolume methods using inconsistent finite element spaces, it is proposed to use the principle of exact integration of basis functions and the corresponding integral formulas are obtained.

2. A method is proposed for constructing upwind MCO/FE schemes on simplicial grids, based on separate approximation of mass fluxes and scalar substance values ​​on segments of the dual grid. The concepts of a local matrix of weight coefficients of a countercurrent scheme, internal to the elements of the schemes, and local positivity of the schemes are introduced. A counterflow scheme of exponential class has been proposed, and its analogue has been constructed for the MKO with the calculation of unknown simplexes in barycenters.

3. Experimental estimates of the convergence rate of the upwind scheme with weighing of mass flows and the proposed exponential class scheme were obtained. Using solutions of the boundary layer type, the stability of the constructed schemes was analyzed and compared with upstream FEM schemes.

4. Using the proposed approximation technologies for convection-diffusion type problems, a set of programs was created for modeling viscous incompressible flows in natural velocity-pressure variables and a number of computational experiments were carried out confirming the effectiveness of the constructed schemes.

Structure and scope of the dissertation. The dissertation consists of an introduction, four chapters, a conclusion, a list of references, an appendix and contains 173 pages, including 10 tables and 51 figures. The bibliography contains 117 titles.

Similar dissertations in the specialty "Mathematical modeling, numerical methods and software packages", 05.13.18 code HAC

  • Numerical method for calculating compressible viscous gas flows in a wide range of Mach numbers 2004, Candidate of Physical and Mathematical Sciences Chirkov, Denis Vladimirovich

  • Method for numerical study of flow around spatial configurations by solving the Navier-Stokes equations based on high-order accuracy schemes 2010, Doctor of Physical and Mathematical Sciences Volkov, Andrey Viktorovich

  • Numerical modeling of the motion of a viscous incompressible fluid with free boundaries using the generalized natural neighbors method 2008, Candidate of Physical and Mathematical Sciences Rein, Tatyana Sergeevna

  • Development of high-precision computing technology based on the spectral finite element method 2007, candidate of physical and mathematical sciences Poponin, Vladimir Sergeevich

  • Study of viscous fluid flows in channels of complex shape 2002, candidate of physical and mathematical sciences Firsov, Dmitry Konstantinovich

Conclusion of the dissertation on the topic “Mathematical modeling, numerical methods and software packages”, Voitovich, Tatyana Viktorovna

Conclusion

This work is devoted to the development of computational technologies for finite volume methods on simplicial grids, using finite element spaces and barycentric partitions as dual ones for approximating problems of convective-diffusion type! The work obtained the following main results for defense:

1. A new technology is proposed for taking into account the piecewise polynomial representation of the solution, transfer coefficients and source terms when discretizing initial-boundary value problems using the methods of finite volumes/elements, finite volumes/finite elements and subvolumes. The technology is based on the use of basis expansion of finite element spaces in terms of barycentric simplicial coordinates, with further exact integration of their monomials. For the MKO/FE, MKO/E schemes with the calculation of variables at triangulation nodes, three classes of formulas for the exact integration of monomials of barycentric coordinates are proposed: over segments of the dual mesh in an element, over barycentric subregions and segments of boundary edges. For subvolume methods using inconsistent finite element spaces, it is proposed to use the principle of exact integration of basis functions and the corresponding integral formulas are obtained.

2. A method is proposed for constructing upwind MCO/FE schemes on simplicial grids, based on separate approximation of mass fluxes and scalar substance values ​​on segments of the dual grid. The concepts of a local matrix of weight coefficients of an upstream scheme, internal to the elements of the schemes, and local positivity of the schemes are introduced. A counterflow scheme of exponential class has been proposed, and its analogue has been constructed for the MKO with the calculation of unknown simplexes in barycenters.

3. Experimental estimates of the convergence rate of the upwind scheme with weighing of mass flows and the proposed exponential class scheme were obtained. Using solutions of the boundary layer type, the stability of the constructed schemes was analyzed and compared with upstream FEM schemes. It is shown that the completed MCO/FE schemes make it possible to track the features of boundary layer solutions much more accurately than the schemes of the Petrov-Galerkin method with asymmetric basis functions (Legendre polynomials), finite element schemes of Rice and Schnipke, as well as combined finite element schemes of a higher order of approximation developed by T. Sheu, S. Wang, and S. Tsai.

4. Using the proposed approximation schemes for convective-diffusion type problems, a set of programs was created for modeling viscous incompressible flows in natural velocity-pressure variables, on combined grids, using interpolation polynomials of pressure and velocity of the same order; A number of computational experiments were carried out to confirm the effectiveness of the constructed circuits.

5. For a reference flow in a channel behind a backward step, the interaction of the input effect and the effect of using upstream approximations is shown for the first time.

So, the technology proposed in the work for discretizing initial-boundary value problems using the finite element/finite volume method on simplicial grids is an effective way to approximate systems of conservation laws, the developed upwind schemes have good convergence characteristics, and the use of discretization methods for a system of Navier-Stokes equations with the same order interpolation for the components of the velocity-pressure vector allows one to obtain results that are in good agreement with experimental data. Classes of finite volume/finite element methods on simplicial meshes, the technological basis of which is the exact integration of monomials of barycentric coordinates, are effective methods for modeling viscous incompressible flows in areas with complex boundary geometry.

List of references for dissertation research Candidate of Physical and Mathematical Sciences Voitovich, Tatyana Viktorovna, 2000

1. Belotserkovsky O.M., Numerical modeling in continuum mechanics. M.: Science. Head. ed. physics and mathematics literature, 1984.

2. A. S. Boldarev, V. A. Gasilov. O. G. Olkhovskaya, Towards the solution of hyperbolic equations on unstructured grids // Mathematical modeling. 1996. T. 8, No. 3. pp. 51-78.

3. P. A. Voinovich, D. M. Sharov, Modeling of discontinuous gas flows on unstructured grids // Mathematical Modeling. 1993. T. 5. No. 7, pp. 86-114.

4. I. J1. Guryeva, Computational technology of the finite volume method // Dis. for the Candidate of Science degree. f.-m. Sci. Novosibirsk 1997. - 115 p.

5. Zhukov M.F., Solonenko O.P., High-temperature dusty jets in the processing of powder materials. Novosibirsk IT SB RAS. 1990.

6. V. P. Ilyin, Balanced difference schemes of increased accuracy on non-uniform rectangular grids. Novosibirsk 1994. - 31 p. (Preprint/CC SB RAS No. 1031).

7. Ilyin V.P., Turakulov A.A., On integro-balance approximations of three-dimensional boundary value problems. Novosibirsk, 1993. - 24 p. - (Preprint/CC SB RAS: No. 986).

8. V. M. Kovenya, N. N. Yanenko, Splitting method in problems of gas dynamics. Novosibirsk, Science. 1989.

9. A. Ladyzhenskaya, Mathematical problems in the dynamics of viscous incompressible fluid. M.: Tqc. publishing house f.-m. lit.- 1961.

10. D. Oden, Finite elements in nonlinear continuum mechanics. M.: Mir, 1976.

11. Patankar S., Numerical methods for solving problems of heat transfer and fluid dynamics. -M.:. Energoatomizdat, 1984.

12. N. Pissanetski S. Technology of sparse matrices. M.: Mir. 1988.

13. Preparata F. Sheimos M. Computational geometry; Introduction. M." Mir, 1984.

14. A. A. Samarsky, Introduction to the theory of difference schemes. M.: Nauka, 1971.

15. L Segerlind, Application of the finite element method M.: Mir. 1979

16. N. K. Sukanek, R. P. Rhodes, Formulation of the condition on the axis of symmetry in the numerical calculation of symmetric flows // Rocketry and Cosmonautics, 1978. Vol. 16. No. 10). pp. 96-98.

17. R. Temam, Navier-Stokes equations, Theory and numerical analysis // M.: Mir. 1981.

18. K. Fletcher, Numerical methods based on the Galerkin method II M.: Mir, 1991

19. D. Shi, Numerical methods in heat transfer problems. M.; World, 1988.

20. G. Schlichting, Boundary Layer Theory. M.: Foreign publishing house. lit. 1956.

21. E. P. Shurina, T. V. Voitovich, Analysis of algorithms for finite element and finite volume methods on unstructured meshes when solving the Navier-Stokes equations // Computational technologies. 1997. T. 2. No. 4. P. 84104.

22. E. P. Shurina, O. P. Solonenko, T. V. Voitovich, New technology of the finite volume method on simplicial grids for problems of convective-diffusion type. Novosibirsk 1999. -51 e.- (Preprint/ ITAM SB RAS; No. 8-99).

23. I. Yu. Chumakov, “Use of different conditions for pressure at the outlet boundary when calculating complex internal flows of incompressible fluid on combined grids,” Vestn. they say scientists. Ser. Applied mathematics and mechanics. 1997. T 1. P. 55-62.

24. N. N. Yanenko, Method of fractional steps for solving multidimensional problems of mathematical physics. Novosibirsk: Nauka, 1967.

25. A Finite Element Primer. National Agency for Finite Element Methods & Standards //NEL. Glasgow, 1986.

26. K. Ajmani, W-F Ng. M-S. Lion, Preconditioned conjugate gradient methods for the Navier-Stokes Equations//J. Comput. Phys. 1994. Vol. 1 10. P. 68-81.

27. F. Angrand, A Dervieux, Some explicit triangular finite element schemes for the Euler equations//Int. J.forNumer. Methods in Fluids. 1984. Vol. 4. P. 749-764.

28. P. Arminjon, A. Dervieux, Construction of TVD-Hke Artificial Viscosities on Two-Dimensional Arbitrary FEM Grids // J. Comput. Phys., 1993. Vol. 106. P. 176-198.

29. B. Armaly, F. Durst, J. C. F. Pereira, B. Schoenung, Experimental and theoretical investigation of backward-facing step flow //J. Fluid Mech. 1983. Vol. 127.473496.

30. F. Babuska, Error bounds for finite element methods//Numer. Math. 1971 Vol.16. P. 322-333.

31. Babuska, B. A. Szabo, I. N. Katz, The p-version of the finite element method // SIAM J. Numer. Anal. 1981. Vol. 18. P. 516-544.

32. P. Balland, E. Suli, Analysis of the cell-vertex finite volume method for hyperbolic problems with variable coefficients // SIAM J. Numer. Anal. 1997. Vol. 34. P. 1127-1151.

33. R. E. Bank, B. D. Welfert, A posteriori error estimates for the Stokes problem // SIAM J. Numer. Anal. 1991. Vol. 28. P. 591-623.

34. T. J. Barth, D. C. Jespersen, The design and application of upwind schemes on unstructured meshes // AIAA paper 89-0336.

35. E. Barton, A numerical study of flow over a confined backward-facing step // Int. J.ForNumer. Methods in Fluids. 1995. Vol. 21. P. 653-665.

36. E. Barton, The entrance effect of laminar flow over a backward-facing step geometry // Int. J.forNumer. Methods in Fluids. 1995. Vol. 25. P. 633-644.

37. S. Benharbit, A. Chalabi, J. P Vila, Numerical viscosity and convergence of finite volume methods for conservation laws with boundary conditions // SIAM J. Nu-mer. Anal. 1995. Vol. 32. P 775-796.

38. Z. Cai, On the finite volume element method //Numer. Math. 1991 Vol. 58 P. 713735.

39. Z. Cai, S. McCormick, On the accuracy of the finite volume element method for diffusion equations on composite grids // SIAM J. Numer. Anal. 1990. Vol. 27. P. 636-655.

40. Z. Cai, J. Mandel, S. McCormick, The finite volume element method for diffusion equations on general triangulations // SIAM J. Numer. Anal. 1991 Vol 28. P. 392402.

41. M. C. Ciccoli, Adaptive Domain Decomposition Algorithms and Finite Volume/Finite Element Approximation for Advection-Diffusion Equations // Journal of Scientific Computing. 1996. Vol 11. P 299-341.

42. P. Chatzipantelidis, A finite volume method based on the Crouzeix-Raviart element for elliptic PDE"s in two dimensions //Numer. Math. 1999, Vol. 82. P. 409-432.

43. K. H. Chen, R H. Pletcher, Primitive variable- strongly implicit calculation procedure for viscous flows at all speeds // AIAA J. 1991. Vol. 29. P1241-1249.

44. S. Chou, D. Kwak, P. S. Vassilevski, Mixed Covolume methods for elliptic problems on triangular grids // SIAM J. Numer. Anal. 1998. Vol. 35. P. 1850-1861.

45. Christie, D. F. Griffiths, A. R. Mitchell and O. C. Zienkiewicz, Finite element methods for second order differential equations with significant first derivatives // Int. J. Numer. Methods Eng. 1976. Vol. 10. 1389-1396.

46. ​​J.-P. Croisille, Finite Volume Box Schemes // Proc. of Second Intern. Symp. on Finite Volumes for Complex Applications, 19-22 July., 1999, Duisburg, Germany. HERMES Science Publications, Paris, 1999.

47. V. Cockburn, F. Coquel. P. G. Lefloch, Convergence of the finite volume method for multidimensional conservation laws // SIAM J. Numer. Anal. 1995. Vol. 32.687-705.

48. L. Davidson, A pressure correction method for unstructured meshes with arbitrary control volumes // Int. J. for Numer. Methods in Fluids. 1998. Vol. 22. P. 265-281.

49. C. Debiez, A. Dervieux, K. Meg, B. Nkonga, Computation of unsteady flows with mixed finite volume/finite element upwind methods // Int. J. for Numer. Methods in Fluids. 1998. Vol. 27. P. 193-206.

50. M. Delanaye, J. A. Essers, Quadratic-reconstruction Finite volume scheme for Compressible flows on unstructured adaptive grids // AIAA Journal. 1997. Vol. 35. P. 631-639.

51. Dervieux A., Steady Euler simulation using unstructured meshes // VKI Lectures series. 1985. No. 1884-04.

52. Eisenberg M. A., Malvern L. E., On finite element integration in natural coordinates // Int. J. Numer. Methods Eng. 1973. Vol. 7. 574-575.

53. A. Fezoui, Class of implicite upwind schemes for Euler simulations with unstructured meshes//J. Sotr. Phys. 1989. Vol. 84. P. 174-206.

54. C. Gallo, G. Manzini, A mixed finite element/finite volume approach for solving biodegradation transport in groundwater // Int. J. for Numer. Methods in Fluids.1998. Vol. 26. P. 533-556.

55. T. Gallouet, J. P. Vila, Finite volume schemes for conservation laws of mixed type // SIAM J. Numer. Anal. 1991. Vol. 28. P. 1548-1573.

56. P. M. Gresho, S. T. Chan, R. L. Lee, G. D. Upson, A modified finite element method for solving the time-dependent. Incompressible Navier-Stokes equations. Part 2: Applications // Int. J. for Numer. Methods in Fluids, 1984. Vol. 4. P. 619640.

57. A. Grundmann, H. M. Moller, Invariant integration formulas for i-simplex by combinatonal methods // SIAM J. Numer. Anal 1978 Vol. 15, pp. 282-290.

58. W. Hackbusch, On first and second order box schemes // Computing. 1989. Vol. 41. P. 277-296.

59. L. P. Hackman, G. D. Raithby, A. B. Strong. Numerical predictions of flows over backward-facing steps // Int. J. for Numer. Methods in Fluids. 1984. Vol. 4. P. 71 1-724.

60. L. Hallo, C. Ribault, M. Buffat, An implicit mixed finite volume-finite-element method for solving 3D turbulent compressible flows. Int. J. for Numeric Methods in Fluids, 1997. Vol. 25. P. 1241-1261.

61. F. H. Harlow, J. E. Welch, Numerical calculation of time-dependent viscosity incompressible flow of fluid with free surface // Phys. Fluids. 1965. Vol. 8. P. 21822189.

62. F. Ilinca, D. Pelletier, A. Garon, An adaptive finite element method for a two-equation turbulence model in wall-bounded flows. Int. J. for Numer. Methods in Fluids. 1997. Vol. 124. P 101-120.

63. E. Issman, G. Degrez, H. Deconinck, Implicit Upwind Residual-Distribution Euler and Navier-Stokes Solver on Unstructured Meshes // AIAA Journal, 1996. Vol. 34. P. 2021-2028.

64. J. P. Jessee, W. A. ​​Fiveland, “A cell-vertex algorithm for the incompressible Navier-Stokes equations on non-orthogonal grids,” Int. J. for Numer. Methods in Fluids. 1996. Vol. 23. P. 271-293.

65. Jianguo H., Shitong X., On the finite volume element method for general self-adjoint elliptic problems // SIAM .J Numer. Anal. 1998. Vol. 35. P. 1762-1774.

66. M. Lallemand, H. Steve, A. Dervieux, Unstructured Multigridding by volume agglomeration: current status // Computers Fluids, 1992 Vol. 21. P. 397-433.

67. Y. Liu, M. Vinokur, Exact integration of polynomials and symmetric quadrature formulas over arbitrary polyhedral grids // J. Comput. Phys. 1998. Vol. 140. P. 122-147.

68. D. Marcum, Turbulence models for unstructured finite element calculations // Int. J.ForNumer. Methods in Fluids. 1995, Vol. 20. P. 803-817.

69. C. Masson, H. I. Saabas, B. R. Baliga, Co-located equal-order control-volume finite element method for two-dimensional axisymmetric incompressible fluid flow // Int J. For Numer. Methods in Fluids. 1994. Vol. 18. P. 1-26.

70. S. Mattiussi, An Analysis of Finite Vol. Finite Element and Finite Difference Methods Using Some Concepts from Algebraic Topology // J. Comput. Phys. 1997. Vol. 133. P. 289-309.

71. D. Mavriplis, Multigrid solution of two-dimensional Euler equations on unstructured triangular meshes // AIAA Journal, 1988. Vol 26. P. 824-831.

72. P. R. McHugh, D. A. Knoll, “Fully coupled finite volume solutions of the incompressible Navier-Stpkes and energy equations using an inexact Newton method,” Int. J. For Numer. Methods in Fluids. 1994. Vol. 19. P. 439-455.

73. Y. Murthy, S. Mathur, Periodic flow and heat transfer using ustructured meshes // Int. J. for Numer. Methods in Fluids. 1997. Vol. 25. P. 659-677.

74. S. Muzaferija, D. Gosman, Finite-Volume CFD Procedure and Adaptive Error Control Strategy of Grids of Arbitrary Topology // J. Comput. Phys., 1997, Vol. 138. P. 766-787

75. P. Nithiarasu, O. C. Zienkiewlcz, V. V. K. Satya Sai, K. Morgan, R. Codina, M. Vazquez, Shock capturing viscosities for the general fluid mechanics algorithm // Int. J. for Numer. Methods in Fluids. 1998. Vol. 28. P. 1325-1353.

76. K. Ohmori, T. Ushijima, A technique of upstream type applied to a linear nonconforming finite element approximation of convective diffusion equations // R.A.I.R.O. Anal. Numer.

77. D. Pan, J. C. Cheng, Upwind finite volume Navier-Stokes Computations on Uns-structured Triangular Meshes // AIAA Journal, 1993. Vol. 31. P. 1618-1625.

78. S. V. Potapov, A mixed FE FV algorithm in non-linear solid dynamics // Proc. of Second Intern. Symp. on Finite Volumes for Complex Applications. 19-22 July, 1999. Duisburg, Germany. - HERMES Science Publications. Paris. 1999. P. 271278.

79. C. Prakash, S. V. Patankar, A control volume-based finite-element method for solving the Navier-Stokes equations using equal-order velocity-pressure interpolation //Numer. Heat Transfer. 1985. Vol. 8. P. 259-280.

80. S. Ramadhyani, S. V. Patankar, Solution of the Poisson equation: comparison of the Galerkin and control-volume methods // Int. J. Numer. Methods Eng. 1980. Vol. 15.1395-1418.

81. Rida S., McKenty F., Meng F. L., Reggio M., A staggered volume control scheme for unstructured triangular grids // Int. J. for Numer. Methods in Fluids. 1995. Vol. 25. P. 697-717.

82. P. L. Roe, Approximate Riemann Solvers, Parameter Vectors, and Difference Schemes //! Sotr. Phys. 1981. Vol. 43. P. 357-372.

83. C. Rohde, Upwind Finite volume schemes for weakly coupled hyperbolic systems of conservation laws in 2D // Numer. Math. 1998. Vol. 81. P. 85-123.

84. Tony W. H. Sheu, S. K. Wang, S. F. Tsai, Development of a high-resolution scheme for a multi-dimensional advection-diffusion equation // J. Sotr. Phys. 1998. Vol. 144. P. 1-16.

85. Saad Y., Iterative Methods for Sparse Linear Systems. PSW Publishing Co., Boston, MA, 1995.

86. V. V. K. S. Sai, O. C. Zienkiewicz, M. T. Manzari, P. R. M. Lyra, K. Morgan, General purpose versus special algorithms for high-speed flows with shocks // Int. J. Numer. Meth. Fluids. 1998. Vol. 27. P. 57-80.

87. J. L. Sohn, Evaluation of FIDAP on some classical laminar and turbulent benchmarks // Int. J. for Numer. Methods in Fluids. 1988. Vol. 8. P. 1469-1490.

88. In Stoufflet, Investigation of generalized flux vector splitting for compressible flows on triangular meshes // Int. J. for Numer. Methods in Fluids. 1995. Vol. 20. P. 1047-1059.

89. B. Stouflette. J. Periaux, F. Fezoui, A. Dervieux, Numerical simulation of 3-D hypersonic Euler flows around space vehicles using adapted finite elements // AIAA Paper 87-0560.

90. C. Taylor, P. Hood, A numerical solution of the Navier-Stokes equations using the finite element technique // Computers and Fluids. 1973. Vol. 1. P. 73-100.

91. Thomadakis M, Leschziner M., A pressure-correction method for the solution of incompressible viscous flows on unstructured grids // Int.J. for Numeric Methods in Fluids. -1996. Vol. 22 P 581-601.

92. A. K. Verma, V. Eswaran, Overlapping volume control approach for convection-diffusion problems // Int. J. for Numer. Methods in Fluids. 1996. Vol. 23. P. 865-882.

93. M. M. T. Wang, T. W. H. Sheu, On a compact mixed-order finite element for solving the three-dimensional incompressible Navier-Stokes equations // Int. J. for Numer. Methods in Fluids. 1997. Vol. 25. P. 513-522.

94. M. M. T. Wang, T. W. H. Sheu, Implementation of a free boundary condition to Navier-Stokes equations // Int. J. Numer. Methods Heat and Fluid Flow, 1997. Vol.7. P. 95-111.

95. D. Winterscheidt, K. S. Surana, p-Version least squares finite element formulation for two-dimensional, incompressible fluid flow // Int. J. Numer. Meth. Fluids, 1994. Vol. 18. P. 43-69.

96. A. M. Winslow, Numerical solution of the quasilinear Poisson equation in a nonuniform triangle mesh, J. Comput. Phys. 1967. Vol. 2. 149-172.

97. A. Younes, R. Mose. P. Ackerer. G. Chavent, A new formulation of the mixed finite element method for solving elliptic and parabolic PDE with triangular elements // J. Comput. Phys., 1999. Vol. 149. P. 148-167.

98. P.J. Zwart, G. D. Raithby, M. J. Raw, The integrated space-time finite volume method and its application to moving boundary problems // J. Comput. Phys. 1999. Vol. 154. P. 497-519.

99. O. C. Zienkiewicz, The Finite Element Method in Engineering Science // McGraw-Hill London. 1971.

100. O.C. Zienkiewicz, R. Codina, A general algorithm for compressible and incompressible flow. Part 1: The split, characteristic based scheme // Int. J. Numer. Meth. Fluids. 1995. Vol. 20. P. 869-885.

101. S. M. Rhie and W. L. Chow, A numerical study of the turbulent flow past an isolated aerofoil with trailing edge separation // AIAA Paper No. 82-0998. 1982.

102. R. I. Issa, Solution of the implicitly discretized fluid flow equations by operator-splitting//J. Comput. Phys. Vol. 62. P. 40-65.1985.

103. J. Kim, S. J. Kline, J. P. Johnston, Investigation of a Reattaching Turbulent Shear Layer: Flow Over a Backward-Facing Step, Journal of Fluids Eng., Vol. 102, pp. 302-308.117. http//www.ict.nsc.ru/linpar

Please note that the scientific texts presented above are posted for informational purposes only and were obtained through original dissertation text recognition (OCR). Therefore, they may contain errors associated with imperfect recognition algorithms. There are no such errors in the PDF files of dissertations and abstracts that we deliver.

Some time ago I was looking for a description of operations and processes occurring in the OpenFOAM numerical modeling library. I found many abstract descriptions of the operation of the finite volume method, classical difference schemes, and various physical equations. I wanted to know in more detail - where did these values ​​come from in such and such an output file at such and such an iteration, what expressions are behind certain parameters in the fvSchemes, fvSolution settings files?
For those who are also interested in this - this article. Those who are well acquainted with OpenFOAM or the methods implemented in it - write about the errors and inaccuracies found in a personal message.

There were already a couple of articles about OpenFOAM on Habré:

Therefore, I will not dwell on the fact that it is “an open (GPL) platform for numerical simulation, designed for simulations associated with solving partial differential equations using the finite volume method, and is widely used to solve problems in continuum mechanics.”

Today I will use a simple example to describe the operations that occur during calculations in OpenFOAM.

So, given the geometry - a cube with a side of 1 meter:

We are faced with the task of modeling the flow-propagation of a certain scalar field (temperature, amount of matter), which is given by the following transport equation (1) inside the volume of the body.

(1)
,

Where a scalar quantity, for example, expresses temperature [K] or the concentration of a certain substance, and expresses the transfer of a substance, mass flow [kg/s].

This equation is, for example, used to model heat propagation
,
where k is thermal conductivity, and is temperature [K].

The divergence operator is actually

operator .
Let me remind you that there is a nabla operator (Hamilton operator), which is written as follows:
,

Where i, j, k are unit vectors.
If we scalarly multiply the nabla operator by a vector quantity, we obtain the divergence of this vector:

“From the point of view of physics, the divergence of a vector field is an indicator of the extent to which a given point in space is a source or sink of this field”

If you multiply the nabla operator by a scalar, you get the gradient of that scalar:

A gradient shows an increase or decrease in some direction in the magnitude of a scalar.


The boundary conditions of the problem are as follows: there is an input face, an exit face, and the remaining faces are smooth walls.

Dividing the volume of a cube into finite volumes

Our grid will be very simple - we divide the cube into 5 equal cells along the Z axis.

Lots of formulas

The finite volume method provides that (1) in integral form (2) will be satisfied for each finite volume.

(2)
,

Where is the geometric center of the final volume.

Center of final volume


Let us simplify and transform the first term of expression (2) as follows:

(2.1) (HJ-3.12)*

As you can see, we assumed that the scalar quantity changes linearly inside the finite volume and the value of the quantity at some point inside the finite volume can be calculated as:

To simplify the second term of expression (2), we use the generalized Gauss-Ostrogradsky theorem: the integral of the divergence of the vector field over the volume is equal to the vector flux through the surface bounding the given volume. In human language, “the sum of all flows into/from a finite volume is equal to the sum of flows through the faces of this finite volume”:

(2.3)
,

Where is the closed surface limiting the volume,
- vector directed along the normal from the volume.

Vector S



Considering that the finite volume is limited by a set of flat faces, expression (2.3) can be transformed to the sum of integrals over the surface:

(2.4) (HJ-3.13)
,

Where expresses the value of the variable at the center of the face,
- area vector, coming out from the center of the face, directed away from the cell (locally), away from the cell with a lower index to the cell with a higher index (global).

A little more about vector S

In order not to store the same vector parameters twice, because It is obvious that for two neighboring cells, the normal vector to the edge between the cells, directed away from the center of the cell, will differ only in direction-sign. Therefore, an owner-neighbor relationship was created between the edge and the cell. If the area vector (global, positive direction from a cell with a lower index to a cell with a larger index) indicates FROM the center of the cell, such a relationship between the cell and the vector, and more precisely between the cell and the face, is denoted owner). If this vector points inside the cell in question, then the neighbor. The direction affects the sign of the value (+ for owner and - for neighbor) and this is important when summing, see below.

About difference schemes

The value at the center of the face is calculated through the values ​​at the centers of adjacent cells - this method of expression is called a difference scheme. In OpenFOAM, the type of difference scheme is specified in the file /system/fvSchemes:

DivSchemes ( default none; div(phi,psi) Gauss linear; )

Gauss- means that the central difference scheme is selected;
linear- means that interpolation from the centers of cells to the centers of faces will occur linearly.

Let us assume that our scalar quantity changes linearly inside the finite volume from the center to the edges. Then the value approximated at the center of the face will be calculated according to the formula:

Where are the weights and are calculated as

Where are the cell volumes.
For cases of skewed cells, there are more complex formulas for calculating approximation weights.

Thus, the phi_f values ​​at the cell edge centers are calculated based on the values ​​at the cell centers. Gradient values ​​grad(phi) are calculated based on phi_f values.
And this entire algorithm can be represented in the form of the following pseudocode.
1. We declare an array of gradients of finite volumes, initialize it with zeros 2. We go through all the internal faces (which are not boundary) > We calculate flux_f = phi_f*S_f. Calculate phi_f values ​​based on phi values ​​in cell cents > Add flux_f to the gradient of the owner element and -flux_f to the gradient of the neighbor element 3. Iterate over all the boundary faces > Calculate flux_f = phi_f*S_f > Add flux_f to the gradient of the owner element (neighbor -the boundary faces have no elements) 4. Let’s go through all the elements > Divide the resulting gradient sum by the volume of the element

Time sampling

Taking into account (2.1) and (2.4), expression (2) takes the form:

(3)

According to the finite volume method, time discretization is carried out and expression (3) is written as:

(4)

Let's integrate (4):

(4.1)

Let's divide the left and right sides into:

(5)

Data for sampling matrix

Now we can obtain a system of linear equations for each finite volume.

Below is the numbering of the grid nodes that we will use.

Node coordinates are stored in /constant/polyMesh/points

24 ((0 0 0) (1 0 0) (0 1 0) (1 1 0) (0 0 0.2) (1 0 0.2) (0 1 0.2) (1 1 0.2) (0 0 0.4) (1 0 0.4) (0 1 0.4) (1 1 0.4) (0 0 0.6) (1 0 0.6) (0 1 0.6) (1 1 0.6) (0 0 0.8) (1 0 0.8) (0 1 0.8) (1 1 0.8) (0 0 1) (1 0 1) (0 1 1) (1 1 1))

Numbering of nodes-centers of cells (50, 51 - centers of boundary faces):

Numbering of face center nodes:

Element volumes:

Interpolation coefficients needed to calculate values ​​on cell faces. The subscript "e" denotes the "right edge of the cell". Right relative to the view, as in the figure “Numbering of nodes-centers of cells”:

Formation of the sampling matrix

For P = 0.
Expression (5) describing the behavior of the quantity

Will be transformed into a system of linear algebraic equations, each of the form:

Or, according to the indices of points on the faces

And all flows to/from a cell can be expressed as a sum

Where, for example, is the flow linearization coefficient at the center point of cell E,
- flow linearization coefficient at the center point of the face,
- nonlinear part (for example, constant).

According to the numbering of the faces, the expression will take the form:

Taking into account the boundary conditions for the element P_0, the linear algebraic equation can be represented as

...substitute the previously obtained coefficients...

The flux from inlet"a is directed into the cell and therefore has a negative sign.

Since in our control expression we also have, in addition to the diffusion term, a time term, but the final equation looks like

For P = 1.

For P = 4.

A system of linear algebraic equations (SLAE) can be represented in matrix form as

A(i,j) === 40.5 0.5 0 0 0 -0.5 40 0.5 0 0 0 -0.5 40 0.5 0 0 0 -0.5 40 0.5 0 0 0 -0.5 40.5

Psi = dimensions; internalField nonuniform List 5(0.0246875 0.000308546 3.85622e-06 4.81954e-08 5.95005e-10);

On the basis of which the values ​​for the vector are obtained

Then the vector is substituted into the SLAE and a new iteration of the vector calculation occurs.

And so on until the discrepancy reaches the required limits.

Links

* Some equations in this article are taken from the dissertation of Jasak Hrvoje (HJ is the equation number) and if anyone wants to read more about them (

Continuing the topic:
Plaster

Everyone knows what cereals are. After all, man began to grow these plants more than 10 thousand years ago. That’s why even now such names of cereals as wheat, rye, barley, rice,...