Arithmetic device and program
Patent Information
- Application Number
- JP2022089206
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2025-06-06
AI Technical Summary
The spatial element size and shape variation in finite element and finite volume methods complicates parallelization and limits calculation speed in simulations of coupled flow, temperature, and electromagnetic fields.
The method unifies spatial elements to cubes, using a dual lattice to place physical quantities at nodes and centers, and employs discrete Nabla operators for gradient, rotation, and divergence calculations, enabling parallel execution on CPUs, GPUs, and other parallel operations.
This approach speeds up and facilitates parallelization of time-evolving differential equation calculations, enhancing computational efficiency.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a device and method for rapidly performing discrete nabla operations, including gradient, rotation, and divergence calculations, in numerical fluid simulations and electromagnetic field simulations. [Background technology]
[0002] The time-evolving differential equations for coupled fields of flow, temperature, and electromagnetic forces are complex. The physical phenomena of these coupled fields are simulated by discretizing the time-evolving differential equations governing them and repeatedly calculating the variables in the equations at each time and spatial position. In common simulation methods such as the finite element method and the finite volume method, the shape of the spatial elements can be arbitrary, such as a polyhedron, during discretization. Furthermore, the physical variables are placed at the nodes of the grid of the discretized spatial elements in the finite element method, and at the centers of the faces of the discretized spatial elements in the finite volume method. [Overview of the project] [Problems that the invention aims to solve]
[0003] However, this presents a challenge: the size and shape of spatial elements vary depending on their position, requiring different calculations for each element, which generally makes parallelization difficult and limits the speed of computation. [Means for solving the problem]
[0004] The computing device according to the present invention is a computing device that discretizes time-evolving differential equations governing physical phenomena of flow fields, temperature fields, electromagnetic fields, or fields coupled thereto, and calculates the variables in the equations at each time and spatial position, comprising: a main processing unit that defines the physical system / model to be computed and initial conditions / boundary conditions; a computed cube grid group generation unit that generates a group of computed cube grids based on the defined physical system; a discrete nabla calculation unit that performs discrete nabla calculations on each grid generated based on the defined initial conditions / boundary conditions; and a display unit that displays the computed results, wherein the discrete nabla calculation unit comprises gradient calculation means that calculates the gradient from the cube grid center coordinates, the length of one side of the cube grid, and scalar functions placed at the grid nodes; rotation calculation means that calculates the rotation from the cube grid center coordinates, the length of one side of the cube grid, and one vector function placed at the grid nodes; and divergence calculation means that calculates the divergence from the cube grid center coordinates, the length of one side of the cube grid, and two vector functions placed at the grid nodes.
[0005] Furthermore, the calculation method according to the present invention comprises a main processing unit procedure for defining the physical system / model to be calculated and the initial conditions / boundary conditions; a calculation cube grid group generation unit procedure for generating a group of calculation cube grids based on the defined physical system; a discrete nabla calculation unit procedure for performing discrete nabla calculations on each grid generated based on the defined initial conditions / boundary conditions; and a display unit procedure for displaying the calculated results. The method also comprises a gradient calculation procedure for calculating the gradient from the cube grid center coordinates, the length of one side of the cube grid, and scalar functions placed at the grid nodes; a rotation calculation procedure for calculating the rotation from the cube grid center coordinates, the length of one side of the cube grid, and one vector function placed at the grid nodes; and a divergence calculation procedure for calculating the divergence from the cube grid center coordinates, the length of one side of the cube grid, and two vector functions placed at the grid nodes. [Effects of the Invention]
[0006] According to the present invention, by unifying the spatial element shape to a cube and using a method for calculating discrete nabla operators (gradient, curl, divergence) that incorporates the advantages of the finite element method, namely placing physical quantities at the nodes, and the advantages of the finite volume method, namely placing physical quantities at the element centers, using a dual lattice, the calculation of time-evolving differential equations can be accelerated and parallelized. [Brief explanation of the drawing]
[0007] [Figure 1] This is a schematic diagram showing an embodiment of the computing device according to the present invention. [Figure 2] Figure 1 is a detailed flowchart of the main processing unit 1. [Figure 3] Figure 1 is a schematic diagram illustrating an embodiment of the discrete nabla operation unit 3. [Figure 4] Figure 3 is a detailed flowchart of the gradient calculation module 6. [Figure 5] Figure 3 is a detailed flowchart of the rotation calculation module 7. [Figure 6] Figure 3 is a detailed flowchart of the divergence calculation module 8. [Figure 7] This document provides supplementary information for the gradient calculation module 6, rotation calculation module 7, and divergence calculation module 8 shown in Figure 3. [Figure 8] This is supplementary explanatory material for the computational cubic lattice group generation unit shown in Figure 1. [Modes for carrying out the invention]
[0008] Figure 1 is a schematic diagram showing an embodiment of the computing device according to the present invention.
[0009] In Figure 1, the main processing unit 1 is composed of a computer consisting of a CPU, non-volatile memory such as ROM or flash memory, RAM, etc.
[0010] The main processing unit 1 is connected to the computational cube grid group generation unit 2. The computational cube grid group generation unit 2 divides the physical system defined in the main processing unit 1 into cubes with a specified side length of 2h, and generates a set of cubic main grids with N cells, each containing a cube at the cube grid center coordinate set (x,y,z). It also simultaneously generates sub-grids, which are sets of cubic grids of the same size, each centered at a node in each main grid. The sub-grids are obtained by shifting the main grid by h in each of the x,y, andz axes, as shown in Figure 8. Furthermore, under specified initial and boundary conditions, it determines the initial values of the scalar functions, one-vector functions, and two-vector functions placed at the grid nodes and transmits these to the main processing unit 1.
[0011] The main processing unit 1 is connected to the discrete nabla calculation unit 3. The discrete nabla calculation unit 3 receives the cube grid group data generated by the cube grid group unit 2, and uses the scalar function φ, the one-vector function A, and the two-vector function B to perform discrete nabla calculations at each cube center coordinate (x,y,z) using the gradient calculation module, rotation calculation module, and divergence calculation module built into the discrete nabla calculation unit 3. The calculation result of the time-evolving differential equation at a certain time is then sent to the main processing unit 1. In addition, the display unit 4 is connected to the main processing unit 1 to display the calculation results.
[0012] The operation of the main processing unit 1 in Figure 1 will be explained with reference to the flowchart in Figure 2.
[0013] First, in step 201, the physical system to be calculated, initial conditions, and boundary conditions are defined, and based on these, the computational cubic grid generation unit is instructed to generate the computational cubic grid group. As a result, the grid group data at the initial time is obtained and stored in a storage medium such as ROM or flash memory, or RAM.
[0014] In step 202, the stored lattice group data is sent to the discrete nabla calculation unit, and in step 203, the discrete nabla calculation is performed on the main lattice. Then, in step 204, the discrete nabla calculation is performed on the sublattice. As a result, the calculation result of the time-evolving differential equation at a certain time is obtained, and in step 205, the calculation result is stored in the storage medium. Then, in step 206, it is checked whether all calculation time steps have been completed, and if there are remaining calculation steps, the calculation result stored in step 205 is sent as input to the discrete nabla calculation in step 203, and the calculation is performed again.
[0015] After all calculation time steps are completed, in step 207, the calculation results are displayed by the display unit. Then, in step 208, the routine in Figure 2 ends.
[0016] Next, the operation of the discrete nabla operation unit 3 in Figure 1 will be explained with reference to the schematic configuration diagram in Figure 3, the flowcharts in Figures 4, 5, and 6, and the supplementary explanatory diagram in Figure 7.
[0017] First, the cube's central coordinates (x,y,z), the side length of the cube's grid (2h), the number of cells (N), the scalar function φ, the one-vector function A, and the two-vector function B are stored in the grid data storage module 5. The grid data storage module 5 consists of non-volatile memory such as ROM or flash memory, RAM, etc.
[0018] The stored scalar function φ, one-vector function A, and two-vector function B are divided into data sets, each representing the function values in the main grid and its adjacent sub-grids, with a number of sets roughly equal to the number of cells N. The divided data sets of function values are φ1, φ2, φ3, ...φ N , A1, A2, A3, ...A N , and B1, B2, B3, ...B N This is the result.
[0019] Scalar function value data set φ1, φ2, φ3, ... φ NIt is sent to each of the gradient calculation modules 6 prepared in a number approximately equal to the number of cells N, and the gradient at each lattice center is calculated. Each gradient calculation module 6 is independent of each other, and each gradient calculation can be executed sequentially or in parallel. Each gradient calculation module 6 is calculated according to the procedure of the flowchart in FIG. 4. First, at step 401, the gradient φ x in the x-axis direction is calculated. φ x =(φ n2 +φ n3 +φ n7 +φ n6 )-(φ n1 +φ n4 +φ n8 +φ n5 ) At the same time as this, or next to this, at step 402, the gradient φ y in the y-axis direction is calculated. φ y =(φ n4 +φ n8 +φ n7 +φ n3 )-(φ n1 +φ n5 +φ n6 +φ n2 ) At the same time as this, or next to this, at step 403, the gradient φ z in the z-axis direction is calculated. φ z =(φ n5 +φ n6 +φ n7 +φ n8 )-(φ n1 +φ n2 +φ n3 +φ n4 ) Finally, at step 404, the gradient (▽φ) c at the target lattice is calculated. (▽φ) c =1 / 4{φ x / (2h)i+φ y / (2h)j+φ z / (2h)k} However, i, j, and k are unit vectors in the x, y, and z axis directions respectively The subscripts n1 to n8 are node numbers in the cubic lattice of interest, and are assigned to each node of the cube as shown in Figure 7. Then, in step 405, the routine shown in Figure 4 ends.
[0020] Also, a set of single-vector function value data A1, A2, A3, ... A N The data is sent to rotation calculation modules 7, of which there are approximately the same number as the number of cells N, and the rotation at each grid center is calculated. Each rotation calculation module 7 is independent of the others, and each rotation calculation can be executed sequentially or in parallel. Each rotation calculation module 7 performs the calculation according to the procedure in the flowchart in Figure 5. First, in step 501, the x-axis rotation A is calculated. x Calculate. A x =( A e9 +A e6 -A e12 -A e5 )+(A e8 +A e11 -A e7 -A e10 ) Simultaneously with this, or immediately after, in step 502, cycle A in the y-axis direction. y Calculate. A y =( A e1 +A e10 -A e4 -A e9 )+(A e2 +A e12 -A e3 -A e11 ) Simultaneously with this, or immediately after, in step 503, cycle in the z-axis direction A z Calculate. A y =( A e5 +A e2 -A e8 -A e1 )+(A e4 +A e7 -A e3 -A e6 ) Finally, in step 504, the rotation (▽×A) around the center of the lattice of interest. c Calculate. ($\nabla\times\mathbf{A}$) c $=\frac{1}{2}\left\{\mathbf{A}\right.$ x $ / (2h)$ 2 $\mathbf{i}+\mathbf{A}$ y $ / (2h)$ 2 $\mathbf{j}$ $+\mathbf{A}$ z $ / (2h)$ 2 $\mathbf{k}\}$ However, the subscripts e1 to e12 are the side numbers in the target cubic lattice and are arranged on each side of the cube as shown in FIG. 7. Then, in step 505, the routine in FIG. 5 ends.
[0021] In addition, the two-vector function value data groups B1, B2, B3,... B N are respectively transmitted to the divergence operation modules 8 prepared in approximately the same number as the number of cells N, and the divergence of each lattice plane is calculated. Note that each divergence operation module 8 is independent of each other, and each divergence operation can be executed sequentially or in parallel. Each divergence operation module 8 is calculated according to the procedure in the flowchart of FIG. 6. First, at step 601, the flux B x in the x-axis direction is calculated. B x $=B$ f1 $+B$ f2 At the same time as this, or next to this, at step 602, the flux B y in the y-axis direction is calculated. B y $=B$ f3 $+B$ f4 At the same time as this, or next to this, at step 603, the flux B z in the z-axis direction is calculated. B z $=B$ f5 $+B$ f6 Finally, at step 604, the divergence ($\nabla\cdot\mathbf{B}$) at the center of the target lattice is calculated. ($\nabla\cdot\mathbf{B}$) c $=(B$ x $+B$ y $+B$ z ) / (2h)$ 3 However, the subscripts f1 to f6 are the face numbers of the target cubic lattice and are arranged on each face of the cube as shown in FIG. 7. Then, in step 602, the routine shown in Figure 6 ends.
[0022] The gradient calculation module 6, rotation calculation module 7, and divergence calculation module 8 operate independently of each other, and the operation of each module can be performed in parallel in time. Furthermore, each module can be executed in parallel using sequential processing units equipped in multiple computing devices such as CPUs (Central Processing Units) and GPUs (Graphics Processing Units), or parallel calculations using logic circuits such as ASICs (Application Specific Integrated Circuits), CPLDs (Complex Programmable Logic Devices), and FPGAs (Field Programmable Gate Arrays). It is also possible to create a dedicated computing integrated circuit using a Large Scale Integration (LSI).
[0023] The calculation results are stored in the arithmetic data storage module 9, which is a storage medium such as ROM or flash memory, or RAM.
[0024] In the above-described embodiment, the gradient calculation module, rotation calculation module, and divergence calculation module are one of the following: CPU, GPU, ASIC, CPLD, or FPGA. However, a combination of these may also be used.
[0025] Furthermore, the present invention may be applied to any modification within the scope of the obvious embodiments described above. [Industrial applicability]
[0026] The calculations are not limited to flow fields, temperature fields, or electromagnetic fields; they can be applied to any field or physical motion analysis described by differential equations, including acoustic fields and structural analysis. [Explanation of Symbols]
[0027] 1: Main processing unit 2: Computational Cubic Lattice Group Generation Unit 3: Discrete Gradient Calculation Unit 4: Display Unit 5: Lattice Data Storage Module 6: Gradient Calculation Module 7: Rotation Calculation Module 8: Divergence Calculation Module 9: Calculation Data Storage Module x: x - coordinate y: y - coordinate z: z - coordinate 2h: Length of One Side of the Cubic Lattice N: Number of Cells φ: Scalar Function A: 1 - Vector Function B: 2 - Vector Function n1, n2, …: Node Numbers in the Target Cubic Lattice e1, e2, …: Edge Numbers in the Target Cubic Lattice f1, f2, …: Face Numbers of the Target Cubic Lattice φ x [[ID=4O]]: Gradient in the x - direction φ y : Gradient in the y - direction φ z : Gradient in the z - direction A x : Circulation in the x - direction A y : Circulation in the y - direction A z : Circulation in the z - direction B x : Divergence in the x - direction B y : Divergence in the y - direction B z : Divergence in the z - direction (▽φ) c : Gradient in the Target Lattice (▽×A) c : Rotation in the Target Lattice (▽·B) c : Divergence in the Target Lattice
Claims
1. A calculation device for discretizing a time differential evolution equation governing a physical system and calculating a discrete nabla calculation value in the time differential evolution equation at each time and space position, comprising: a main processing unit for defining initial and boundary conditions of said physical system; a cubic lattice group generating unit for dividing the physical system into a plurality of cubic lattices of the same size, each having a side length of 2h, based on the initial condition and the boundary condition of the physical system, and generating a cubic lattice group in which a physical quantity is allocated to each of the cubic lattices; a discrete nabla calculation unit for calculating the discrete nabla calculation value of the center of each of the cubic lattices based on the length and the physical quantity of each of the cubic lattices; A computing device comprising:
2. An arithmetic device as described in claim 1, wherein the discrete nabla calculation unit is configured to execute the discrete nabla calculation value of each of the cubic lattices sequentially or in parallel for each of the cubic lattices.
3. An arithmetic device as described in claim 1, wherein in a pair of adjacent first and second cubic lattices among the multiple cubic lattices, a center of the first cubic lattice coincides with one node of the second cubic lattice, and one node of the first cubic lattice coincides with a center of the second cubic lattice, and the first and second cubic lattices form dual lattices.
4. The discrete nabla calculation unit is configured such that the physical quantity is a scalar function value φ, the cubic lattice group generating unit places the scalar function value φ at eight lattice nodes of each of the cubic lattices; The arithmetic device of claim 1, wherein the discrete nabla calculation unit comprises a plurality of gradient calculation modules for calculating a gradient vector value ∇φ as the discrete nabla calculation value at the center of each cubic lattice based on the length of each cubic lattice and the scalar function value φ placed at the lattice node.
5. Each of the gradient calculation modules is The gradient vector value (∇φ) at the center of each cubic lattice c of (∇φ) c =1 / 4{φ x / (2h)i+φ y / (2h)j+φ z / (2h)k} where φ x is the gradient component of the gradient vector value in the x-axis direction. φ y is the gradient component of the gradient vector value in the y-axis direction. φ z is the gradient component of the gradient vector value in the z-axis direction. i is a unit vector in the x-axis direction, j is a unit vector in the y-axis direction, k is a unit vector in the z-axis direction The arithmetic device according to claim 4, which performs the calculation according to the following formula:
6. The physical quantity is a type 1 vector function value A, the cubic lattice group generating unit arranges the type 1 vector function values A on the 12 lattice edges of each of the cubic lattices; The calculation device described in claim 1, wherein the discrete nabla calculation unit includes a plurality of rotation calculation modules for calculating a rotation vector value ∇×A as the discrete nabla calculation value at the center of each cubic lattice based on the length of each cubic lattice and the type 1 vector function value A arranged on the lattice edge.
7. Each of the rotation calculation modules includes: Rotation vector value (∇×A) of the center of each cubic lattice c of <h2 style=";text-align:left;direction:ltr">(∇×A)<h2 style=";text-align:left;direction:ltr"> c <h2 style=";text-align:left;direction:ltr"> 21 / 2{A<h2 style=";text-align:left;direction:ltr"> x <h2 style=";text-align:left;direction:ltr"> / (2)h)<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> i+A<h2 style=";text-align:left;direction:ltr"> y <h2 style=";text-align:left;direction:ltr"> / (2)h)<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> j <h2 style=";text-align:left;direction:ltr">+A<h2 style=";text-align:left;direction:ltr"> z <h2 style=";text-align:left;direction:ltr"> / (2)h)<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> k} where A x is the rotation (circulation) component of the rotation vector value in the x-axis direction, A y is the rotation (circulation) component of the rotation vector value in the y-axis direction, A z is the rotation (circulation) component of the rotation vector value in the z-axis direction, i is a unit vector in the x-axis direction, j is a unit vector in the y-axis direction, k is a unit vector in the z-axis direction The arithmetic device according to claim 6, which performs the calculation according to the following formula:
8. The physical quantity is a type 2 vector function value B, the cubic lattice group generating unit arranges the type 2 vector function values B on six lattice planes of each of the cubic lattices; The calculation device described in claim 1, wherein the discrete nabla calculation unit comprises a plurality of divergence calculation modules for calculating a divergence scalar value ∇·B as the discrete nabla calculation value at the center of each cubic lattice based on the length of each cubic lattice and the scalar function value φ arranged on the lattice plane.
9. Each of the divergence calculation modules comprises: The divergence scalar value (∇ B) at the center of each cubic lattice c of (∇・B) c =(B x +B y +B z ) / (2h) 3 where B x is the divergence (flow velocity) component of the divergence scalar value in the x-axis direction, B y is the divergence (flow velocity) component in the y-axis direction of the divergence scalar value, B z is the divergence (flow velocity) component in the z-axis direction of the divergence scalar value, i is a unit vector in the x-axis direction, j is a unit vector in the y-axis direction, k is a unit vector in the z-axis direction The arithmetic device according to claim 8, which performs the calculation according to the following formula:
10. A calculation program for discretizing a time differential evolution equation governing a physical system and calculating a discrete nabla calculation value in the time differential evolution equation at each time and space position, comprising: a main procedure for defining initial and boundary conditions for said physical system; a cubic lattice group generation procedure for dividing the physical system into a plurality of cubic lattices of the same size, each having a side length of 2h, based on the initial condition and the boundary condition of the physical system, and generating a cubic lattice group in which a physical quantity is allocated to each of the cubic lattices; a discrete nabla calculation procedure for calculating the discrete nabla calculation value of the center of each of the cubic lattices based on the length and the physical quantity of each of the cubic lattices; A calculation program for executing the above by a computer.