Background
The first step of numerical simulation is grid division, a large number of multi-connected regions can appear in the practical application process, when the multi-connected regions are subjected to grid division, the regions need to be decomposed, and then each decomposed block is subjected to grid division. The quality of the partition directly affects the quality of the grid. The existing partitioning method is mainly manual partitioning and is decomposed according to the characteristic structure of the region. However, for different areas, the partitioning must be performed again, and this method will consume a lot of manpower and time in practical application, and the efficiency and processing capability cannot meet the requirement of real-time performance.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention aims to provide a method for automatically decomposing multiple connected regions based on a two-dimensional heat conduction differential equation, which can automatically divide any multiple connected region into regions and has the advantages of easiness in automatically processing complex connected regions, high efficiency and the like.
In order to achieve the above object, the present invention adopts the following technical solutions:
a method for automatically decomposing a multi-connected region based on a two-dimensional heat conduction differential equation is characterized by comprising the following steps:
step 1) carrying out discretization treatment on a multi-connected area needing to be partitioned;
step 2) setting a certain characteristic structure in the area as a constant heat source, wherein the temperature is constant T;
setting the initial temperature of other characteristic structures to be 0 ℃, and keeping the boundary temperature value to be 0;
step 3) based on two-dimensional steady-state heat conduction differential equation
Where t is temperature, τ is time, α is thermal diffusion coefficient, q
vThe heat generated by an internal heat source is rho, the density and the specific heat are c; the temperature of each internal node can be obtained by a series expansion method or a thermal balance method, and the numerical solution of the two-dimensional steady-state heat conduction of the multi-communication area under the first class boundary condition is calculated to obtain the temperature distribution of the whole multi-communication area when the characteristic structure is used as a constant heat source;
step 4) repeating steps 2) and 3) until all the characteristic structures are used as constant heat sources to perform steps 2) and 3);
step 5) each node has different temperature values under different heat sources, and the connected area to which the node belongs is judged according to the maximum value of the node temperature;
the method for automatically decomposing the multi-connected area based on the two-dimensional heat conduction differential equation is characterized in that the specific content in the step 1) is as follows: a limited set of nodes is determined to replace the original continuous space, and the continuous space area is divided into a plurality of non-overlapping sub-areas.
The method for automatically decomposing the multi-connected region based on the two-dimensional heat conduction differential equation is characterized in that the sub-region division in the step 1) adopts a structured grid to solve: the solution area is divided into a plurality of sub-areas by a series of grid lines parallel to the coordinate axes, the intersection points of the grid lines are used as nodes, the positions of the nodes are represented by reference numerals X, Y of the nodes in two directions, the distance between two adjacent nodes is used as a step length and is recorded as delta X and delta Y, the delta X is the step length on the X axis, and the delta Y is the step length on the Y axis.
The method for automatically decomposing the multi-connected region based on the two-dimensional heat conduction differential equation is characterized in that the step 2) of setting a certain characteristic structure as a constant heat source means that the characteristic structure is mapped into a calculation domain, the characteristic structure is represented by a node, the position of the node is represented by reference numeral X, Y of the node in two directions, and the temperature of the nodes is set as a constant value T.
The method for automatically decomposing the multi-connected region based on the two-dimensional heat conduction differential equation is characterized in that the specific content in the step 3) is as follows: firstly, setting an error value epsilon according to an empirical value, carrying out iterative operation based on a two-dimensional heat conduction differential equation, wherein the temperature of each internal node is equal to the average value of the temperatures of four adjacent nodes at the upper, lower, left and right sides in the last iterative operation, the temperature value of a boundary node is constantly 0 ℃, comparing whether the error value of the temperature of each node and the temperature obtained in the last iterative operation is smaller than epsilon, if so, finishing the iterative operation, obtaining the temperature distribution of the whole multi-connected region when the characteristic structure is used as a constant heat source, and otherwise, continuing the iterative operation.
The method for automatically decomposing the multi-connected region based on the two-dimensional heat conduction differential equation is characterized in that the specific content in the step 5) is as follows: each node has different temperature values under different heat sources, and if the temperature value of the node under the Nth constant heat source is the maximum, the node belongs to the Nth communication area.
The invention achieves the following beneficial effects: the invention has applicability to any complex multi-connected area, is easy to process the complex connected area, has high efficiency, can meet the requirement of engineering, can automatically decompose the multi-connected area during processing, and liberates a large amount of labor force.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
The invention aims to solve the problems that when a multi-connected region is subjected to grid division, the multi-connected region needs to be partitioned, manual partitioning is long in time consumption, and workload is repeated and burdensome. With reference to the attached figure 1, the content of the method is as follows:
step 1) discretizing the multi-connected region shown in fig. 2, dividing the boundary line of the calculation domain into a plurality of sections by using a plurality of points, and connecting the points according to the shape of the calculation domain so that the calculation domain is divided into a plurality of sub-regions which are not overlapped with each other. The method adopts structured grid solving, namely a series of grid lines parallel to coordinate axes are used for dividing a solving area into a plurality of sub-areas, and intersection points of the grid lines are called nodes. The distance between two adjacent nodes is called step size and is marked as Δ X and Δ Y. In this example, as shown in fig. 3, the selected calculation field is a regular rectangular area, X is 100, and Y is 500.
And 2) taking the intersection points of the grid lines as space positions, namely nodes, of which the temperature values need to be determined. The position of the node is indicated by reference X, Y for the point in both directions. A feature structure is mapped into the calculation domain, the feature structure is represented by a plurality of nodes, the feature structure is also a regular rectangular area, coordinates of four vertexes of the feature structure are respectively (Xs, Ys) (Xe, Ye) (Xs, Ye), and Xe is larger than or equal to Xs, and Ye is larger than or equal to Yes. Setting the temperature value of the node representing the characteristic structure to be constant T, namely when X is larger than or equal to Xs, X is smaller than or equal to Xe, Y is larger than or equal to Ys, and Y is smaller than or equal to Ye, the values of the internal nodes are all constant T. The initial temperature values of the remaining nodes are all set to 0 degrees.
Step 3) first, an error value epsilon is set to 0.01. Based on two-dimensional steady-state heat conduction differential equation
For the internal nodes, the temperature of each internal node can be obtained by a series expansion method or a thermal equilibrium method
Wherein u [ x ]][y]Representing internal nodes [ x ] in the last iteration][y]Temperature value of, node x][y]Is [ x-1 ] as an adjacent node][y]、[x+1][y]、[x][y-1]、[x][y+1];w[x][y]For the node [ x ] in the iteration operation][y]And for nodes on the boundary, its temperature value w x][y]Is always 0. Compare all nodes for | w [ x ]][y]-u[x][y]And if the value of | is less than epsilon, finishing the iterative operation, otherwise, continuing the iterative operation. The temperature distribution of the entire multiply connected region is finally obtained, as shown in fig. 4.
Step 4) repeating steps 2) and 3) until all the characteristic structures are used as constant heat sources to perform steps 2) and 3);
and 5) each node has different temperature values under different heat sources, and the connected area to which the node belongs is judged according to the maximum value of the temperature of the node, namely if the temperature value of the node under the Nth constant heat source is the maximum, the node belongs to the Nth connected area.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.