WO2021161503A1 - Design program and design method - Google Patents

Design program and design method Download PDF

Info

Publication number
WO2021161503A1
WO2021161503A1 PCT/JP2020/005765 JP2020005765W WO2021161503A1 WO 2021161503 A1 WO2021161503 A1 WO 2021161503A1 JP 2020005765 W JP2020005765 W JP 2020005765W WO 2021161503 A1 WO2021161503 A1 WO 2021161503A1
Authority
WO
WIPO (PCT)
Prior art keywords
grid
fluid
values
grid points
tensor
Prior art date
Application number
PCT/JP2020/005765
Other languages
French (fr)
Japanese (ja)
Inventor
学尚 秋間
Original Assignee
富士通株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士通株式会社 filed Critical 富士通株式会社
Priority to PCT/JP2020/005765 priority Critical patent/WO2021161503A1/en
Publication of WO2021161503A1 publication Critical patent/WO2021161503A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • the present invention relates to a design program and a design method.
  • computational fluid dynamics uses basic equations that describe the motion of fluids, such as the Navier-Stokes equation, which is a second-order nonlinear differential equation.
  • the Navier-Stokes equation which is a second-order nonlinear differential equation.
  • the physical quantity of is calculated.
  • Computational fluid dynamics may be used in the design of various machines and structures such as aircraft, automobiles and ships.
  • a fluid simulation method for calculating the physical quantity of a fluid using a shape model represented by a structured grid has been proposed.
  • an estimation method for estimating the wind speed distribution around a building using a convolutional neural network (CNN) has been proposed.
  • a learning method has been proposed in which the matrix data used for the CNN convolution operation is divided into two to reduce the calculation amount of the convolution operation.
  • an image processing method for converting an input image into an output image using a multilayer CNN has been proposed.
  • Japanese Unexamined Patent Publication No. 2004-62749 Japanese Unexamined Patent Publication No. 2012-83958 JP-A-2018-4568 Japanese Unexamined Patent Publication No. 2018-16806 Japanese Unexamined Patent Publication No. 2019-8383
  • the fluid simulation includes iterative numerical calculation for many grid points, the amount of calculation is large and the calculation time may be long. Therefore, it may not be practical to perform a fluid simulation comprehensively for many alternatives of object shapes mentioned at the design stage. Therefore, it is conceivable to try a fluid simulation for some object shapes and use the results to generate an approximate model showing the relationship between the object shape and the physical quantity of the fluid.
  • the approximate model By using the approximate model, the approximate value of the physical quantity of the fluid can be calculated at high speed for a certain object shape, and a good object shape can be narrowed down from a large number of alternatives.
  • the grid points of an evenly spaced orthogonal grid are placed in the space where the object and the fluid exist, and the physical quantity of each grid point of the orthogonal grid is approximated.
  • a method of performing machine learning so that the model outputs can be considered.
  • the physical quantity at each lattice point of the orthogonal lattice is sampled from the trial fluid simulation result, and the correspondence between the parameter indicating the object shape and the sampled physical quantity is used as training data for generating an approximate model. become.
  • the gradient of the physical quantity of the fluid (the ratio of the change of the physical quantity to the change of the position) is large near the boundary between the fluid and the object, and the gradient of the physical quantity of the fluid may be small in the region away from the boundary.
  • the approximate model using the orthogonal grids at equal intervals there is a problem that an error due to sampling occurs because the grid points of the output are coarse, and the prediction error of the physical quantity near the boundary becomes large.
  • the interval between the orthogonal grids of the approximate model is reduced as a whole, the approximate model becomes large and the cost of machine learning increases in order to generate a highly accurate approximate model.
  • a design program causes the computer to perform the following processes.
  • a plurality of first grid points that are arranged in a region having a boundary defined by a specific object shape and that indicate a physical quantity of a fluid calculated by simulation in association with a plurality of grid points that are not evenly spaced.
  • Acquire simulation result data including values.
  • the plurality of first values are rearranged into the multidimensional array structure to generate teacher data including the plurality of first values of the multidimensional array structure.
  • teacher data including the plurality of first values of the multidimensional array structure.
  • an approximate model for predicting the distribution of the physical quantity of the fluid from the object shape is generated.
  • a computer-executed design method is provided.
  • FIG. 1 is a diagram illustrating an example of a design device according to the first embodiment.
  • the design device 10 of the first embodiment performs a fluid simulation by numerical fluid dynamics. Further, the design device 10 uses the simulation result for a specific object shape to generate an approximate model that predicts the simulation result from the object shape by machine learning.
  • the design device 10 may be a client device or a server device.
  • the design device 10 can also be referred to as a computer, an information processing device, a simulation device, a machine learning device, or the like.
  • the design device 10 has a storage unit 11 and a processing unit 12.
  • the storage unit 11 may be a volatile semiconductor memory such as a RAM (RandomAccessMemory) or a non-volatile storage such as an HDD (HardDiskDrive) or a flash memory.
  • the processing unit 12 is, for example, a processor such as a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), or a DSP (Digital Signal Processor). However, the processing unit 12 may include an electronic circuit for a specific purpose such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array).
  • the processor executes a program stored in a memory (may be a storage unit 11) such as a RAM.
  • a set of multiple processors is sometimes referred to as a "multiprocessor" or simply a "processor.”
  • the storage unit 11 stores the simulation result data 14.
  • the simulation result data 14 shows the result of a fluid simulation by numerical fluid dynamics executed for a specific object shape.
  • the object shape is the shape of an object that is supposed to come into contact with a fluid such as air or water, and is, for example, the shape of an aircraft wing or the shape of an automobile.
  • the area to be simulated has a boundary defined by a specific object shape.
  • This boundary is, for example, the boundary between an object and a fluid, and corresponds to the outer circumference of the object.
  • the region is a two-dimensional plane or a three-dimensional space.
  • the grid points arranged in the region are formed by, for example, a structured grid including a plurality of coordinate axes. In that case, each grid point is identified by two-dimensional or three-dimensional coordinates. Seen from a certain grid point, there are grid points adjacent to each coordinate axis. However, the grid points of the first embodiment are not the grid points of the orthogonal grids at equal intervals, and the intervals are not even. At least one coordinate axis does not have to be a straight line. For example, a structured grid having a coordinate axis corresponding to a curve indicating a boundary and a coordinate axis in which the distance between the coordinates becomes narrower as it is closer to the boundary can be considered.
  • grid points 13-1 to 13-9 are arranged in the area.
  • Grid points 13-1, 13-2, 13-3 are lined up on the same curve
  • grid points 13-4, 13-5, 13-6 are lined up on the same curve
  • grid points 13-7, 13-8, 13-9 are lined up on the same curve.
  • These three curves are along a certain coordinate axis and are, for example, curves parallel to the boundary.
  • grid points 13-1, 13-4, 13-7 are lined up on the same curve
  • grid points 13-2, 13-5, 13-8 are lined up on the same curve
  • grid points 13-3, 13- 6, 13-9 are lined up on the same curve.
  • These three curves are along a certain coordinate axis, for example, a curve extending outward from the boundary.
  • the grid points 13-1, 13-2, 13-3 are closer to the boundary than the grid points 13-7, 13-8, 13-9.
  • the distance between the grid points 13-1 and the grid points 13-4 is narrower than the distance between the grid points 13-4 and the grid points 13-7. In this way, the closer to the boundary, the narrower the spacing between the grid points may be.
  • the simulation result data 14 includes a value (first value) indicating the physical quantity of the fluid calculated by the fluid simulation in association with the grid points 13-1 to 13-9.
  • the value v6 of, the value v7 of the grid point 13-7, the value v8 of the grid point 13-8, and the value v9 of the grid point 13-9 are calculated.
  • These values v1 to v9 represent, for example, the velocity of the fluid at the corresponding grid point.
  • the processing unit 12 sets the values v1 to v9 of the grid points 13-1 to 13-9 in a multidimensional array structure based on the adjacency relationship between the grid points 13-1 to 13-9. Sort to.
  • a multidimensional array containing values v1 to v9 is sometimes called a tensor.
  • the number of dimensions (order) of a multidimensional array depends on the number of dimensions of the region and the number of dimensions of the values v1 to v9. For example, when the area to be simulated is two-dimensional and the values v1 to v9 are one-dimensional scalar values, the values v1 to v9 are stored in a two-dimensional array (second-order tensor).
  • grid points 13-1 In sorting into a multidimensional array structure, grid points 13-1 to so that close grid points are associated with close elements of the multidimensional array and distant grid points are associated with distant elements of the multidimensional array. It is preferred that the adjacency of 13-9 is preserved. It is preferred that adjacent grid points are associated with adjacent elements of a multidimensional array.
  • the processing unit 12 determines the elements of the multidimensional array associated with each grid point based on the coordinates. It may be.
  • the structured grid has an L axis and a J axis
  • L coordinate with the first dimension (row) of the multidimensional array
  • J coordinate with the second dimension (column) of the multidimensional array.
  • the processing unit 12 generates input data 16 including a value (second value) indicating the specific object shape from the specific object shape targeted for simulation.
  • the input data 16 may include some parameters that reflect the shape of the object.
  • the processing unit 12 calculates a distance value indicating the distance between the grid points and the boundary for each of the grid points 13-1 to 13-9.
  • the distance value corresponds to the Euclidean distance between the point on the boundary closest to a certain lattice point and the lattice point, and is, for example, the value of a signed distance function (SDF).
  • SDF signed distance function
  • the processing unit 12 rearranges the distance values of the grid points 13-1 to 13-9 into a multidimensional array structure similar to that of the teacher data 15 to obtain the input data 16. In that case, the elements at the same position between the teacher data 15 and the input data 16 correspond to the same grid point.
  • the processing unit 12 associates the teacher data 15 with the input data 16 to generate training data including the teacher data 15 and the input data 16. Then, the processing unit 12 uses this training data to generate an approximate model 17 by machine learning.
  • the approximation model 17 is a prediction model that predicts the distribution of the physical quantity of the fluid from the shape of the object, and calculates an approximation value of the result of the fluid simulation without performing the fluid simulation by the iterative method.
  • the teacher data 15 corresponds to the objective variable which is the output of the approximate model 17, and the input data 16 corresponds to the explanatory variable which is the input of the approximate model 17.
  • the approximate model 17 is, for example, a convolutional neural network.
  • the approximation model 17 includes an encoder that converts a multidimensional array of high-dimensional inputs into a low-dimensional feature data by a convolution operation, and a decoder that converts the feature data into a multidimensional array of a high-dimensional output by a deconvolution operation. May include.
  • the values of the plurality of lattice points calculated by the fluid simulation are rearranged into a multidimensional array structure based on the adjacency relationship of the plurality of lattice points, and the teacher data. 15 is generated. Then, an approximate model 17 is generated by machine learning from the input data 16 and the teacher data 15 indicating the object shape.
  • the values included in the simulation result data 14 are sorted according to the adjacency relationship of the lattice points and used as they are.
  • the elements of the multidimensional array correspond to the lattice points of the orthogonal lattice at equal intervals
  • the prediction error of the part of the area can be reduced.
  • the scale of the approximate model 17 can be reduced and the cost of machine learning can be reduced as compared with the case where the teacher data 15 adopts orthogonal grids at equal intervals and attempts to improve the accuracy by reducing the grid intervals. ..
  • the information processing apparatus of the second embodiment simulates the airflow around the wing of an aircraft based on computational fluid dynamics. Further, the information processing apparatus of the second embodiment generates an approximate model for predicting the airflow around the blade from the shape of the blade by machine learning using the simulation results for several blades having different shapes.
  • the information processing device of the second embodiment may be a client device or a server device.
  • the information processing device of the second embodiment can also be referred to as a computer, a simulation device, a machine learning device, a design device, or the like.
  • FIG. 2 is a diagram showing a hardware example of the information processing apparatus according to the second embodiment.
  • the information processing apparatus 100 of the second embodiment includes a CPU 101, a RAM 102, an HDD 103, an image interface 104, an input interface 105, a medium reader 106, and a communication interface 107. These units included in the information processing apparatus 100 are connected to the bus.
  • the information processing device 100 corresponds to the design device 10 of the first embodiment.
  • the CPU 101 corresponds to the processing unit 12 of the first embodiment.
  • the RAM 102 or the HDD 103 corresponds to the storage unit 11 of the first embodiment.
  • the CPU 101 is a processor that executes program instructions.
  • the CPU 101 loads at least a part of the programs and data stored in the HDD 103 into the RAM 102 and executes the program.
  • the CPU 101 may include a plurality of processor cores, and the information processing device 100 may include a plurality of processors. A collection of multiple processors is sometimes referred to as a "multiprocessor" or simply a "processor.”
  • the RAM 102 is a volatile semiconductor memory that temporarily stores a program executed by the CPU 101 and data used by the CPU 101 for calculation.
  • the information processing device 100 may include a type of memory other than RAM, or may include a plurality of memories.
  • HDD 103 is a non-volatile storage that stores software programs such as OS (Operating System), middleware, and application software, and data.
  • the information processing device 100 may include other types of storage such as a flash memory and an SSD (Solid State Drive), or may include a plurality of storages.
  • the image interface 104 outputs an image to the display device 111 connected to the information processing device 100 in accordance with a command from the CPU 101.
  • the display device 111 any kind of display device such as a CRT (Cathode Ray Tube) display, a liquid crystal display (LCD: Liquid Crystal Display), an organic EL (OEL: Organic Electro-Luminescence) display, and a projector can be used. ..
  • An output device other than the display device 111 such as a printer may be connected to the information processing device 100.
  • the input interface 105 receives an input signal from the input device 112 connected to the information processing device 100.
  • the input device 112 any kind of input device such as a mouse, a touch panel, a touch pad, and a keyboard can be used.
  • a plurality of types of input devices may be connected to the information processing device 100.
  • the medium reader 106 is a reading device that reads programs and data recorded on the recording medium 113.
  • the recording medium 113 any kind of recording medium such as a magnetic disk such as a flexible disk (FD) or HDD, an optical disk such as a CD (Compact Disc) or a DVD (Digital Versatile Disc), or a semiconductor memory is used. Can be done.
  • the medium reader 106 copies, for example, a program or data read from the recording medium 113 to another recording medium such as the RAM 102 or the HDD 103.
  • the read program is executed by, for example, the CPU 101.
  • the recording medium 113 may be a portable recording medium, and may be used for distribution of programs and data. Further, the recording medium 113 and the HDD 103 may be referred to as a computer-readable recording medium.
  • the communication interface 107 is connected to the network 114 and communicates with other information processing devices via the network 114.
  • the communication interface 107 may be a wired communication interface connected to a wired communication device such as a switch or a router, or may be a wireless communication interface connected to a wireless communication device such as a base station or an access point.
  • FIG. 3 is a diagram showing an example of arrangement of grid points in a fluid simulation.
  • shape data 151 showing the shape of the blade to be simulated is given.
  • the shape data 151 is generated by, for example, CAD (Computer Aided Design) software.
  • the shape data 151 includes, for example, data of a curve indicating the outer circumference of the blade. It is assumed that air, which is a fluid, exists on the outside of the wing, and the curve indicating the outer circumference of the wing corresponds to the boundary between the wing and the fluid. In the second embodiment, for the sake of simplicity, a two-dimensional shape of the wing as viewed from the lateral direction is assumed.
  • a plurality of lattice points are arranged in the two-dimensional region where the fluid exists. These grid points are formed by a structured grid that is a non-orthogonal grid. The generation of grid points of a structured grid is described in, for example, the following non-patent document. Kazuhiro Nakahashi, "Lattice Generation in Computational Fluid Dynamics", Information Processing, Vol. 30 No. 7, pp. 767-774, July 1989.
  • the structural grid of the second embodiment is a structural grid of a boundary-fitting curvilinear coordinate system in which the coordinate axes are determined based on the boundary curve, and is a boundary curve J-axis and an L-axis extending outward from the boundary. It has two coordinate axes.
  • the J-axis is a curve that follows the outer circumference of the wing shown in FIG. 3 in the order of lower right, lower left, upper left, and upper right.
  • the L-axis is a curve extending outward from the J-axis.
  • the L coordinate interval is determined by a predetermined calculation formula such as an exponential function.
  • Curves 152-1 to 152-6 are, for example, parallel to the boundary. The distance between two adjacent curves 152-1 to 152-6 increases as the distance from the boundary increases.
  • the lattice points used in the fluid simulation are not the lattice points of the orthogonal lattices at equal intervals, but are the lattice points of the structured lattice given a certain order by the L-axis and the J-axis. With respect to a certain grid point, at most two grid points having the same L coordinate and at most two grid points having the same J coordinate are adjacent to each other.
  • the grid points used in the fluid simulation can be represented by a matrix 154 based on the L and J coordinates.
  • the matrix 154 is a matrix of 48 rows and 432 columns.
  • the rows of the matrix 154 correspond to the L coordinates
  • the columns of the matrix 154 correspond to the J coordinates.
  • the information processing apparatus 100 calculates a velocity vector indicating the fluid velocity at each grid point by fluid simulation.
  • the velocity vector is a two-dimensional vector including an X component and a Y component.
  • the X-axis is in the right direction of the shape data 151 in FIG. 3, and the Y-axis is in the upward direction of the shape data 151 in FIG.
  • the information processing device 100 assigns a variable indicating a velocity vector to each grid point.
  • the information processing device 100 disperses the Navier-Stokes equations, which are second-order nonlinear differential equations that describe the behavior of a fluid, and generates simultaneous equations that show the relationships between variables.
  • the information processing apparatus 100 generates a coefficient matrix representing simultaneous equations, a solution vector, and a right-hand side vector, and obtains a solution of simultaneous equations by an iterative method. In the iterative method, a temporary value is assigned to the solution vector, the error of the right-hand side vector is calculated based on the assigned value, and the value of the solution vector is changed so that the error becomes small until the error converges. repeat.
  • FIG. 4 is a diagram showing a simulation example of the fluid velocity.
  • Graph 171 is a graph that visualizes the velocity vector near the boundary calculated by the fluid simulation.
  • the velocity vector is represented by arrows.
  • the arrow line of graph 171 shown in FIG. 4 is from the lower left to the upper right. Therefore, these velocity vectors include a positive X component and a positive Y component.
  • the grid points are at the left end of the arrow.
  • the velocity vector at the grid points is represented by the direction and length of the arrow.
  • the information processing apparatus 100 tries fluid simulation for some blade shapes, uses the simulation results as training data, and generates an approximate model for predicting the velocity vector from the blade shapes by machine learning.
  • the approximate model it is possible to calculate the approximate value of the velocity vector for various shapes at high speed without performing the fluid simulation by the iterative method, and the simulation result can be predicted.
  • FIG. 5 is a diagram showing a structural example of an approximate model.
  • the approximate model 160 is a multi-layer convolutional neural network (DCNN).
  • the approximation model 160 includes an encoder 161 and a decoder 162.
  • the encoder 161 includes a plurality of convolution layers that perform a convolution operation, and converts the input tensor 163 into feature data having a size smaller than that of the input tensor 163.
  • the decoder 162 includes a plurality of convolution layers that perform deconvolution operations, and converts the feature data into an output tensor 164 having a size larger than that of the feature data.
  • the input tensor 163 is a tensor having a height of 48 ⁇ a width of 432 ⁇ 1 channel.
  • the input tensor 163 corresponds to a two-dimensional array (second-order tensor) and corresponds to one set of a matrix 154 having 48 rows ⁇ 432 columns.
  • the output tensor 164 is a tensor having a height of 48 ⁇ a width of 432 ⁇ 2 channels.
  • the output tensor 164 corresponds to a three-dimensional array (third-order tensor), and corresponds to two sets of a matrix 154 having 48 rows ⁇ 432 columns.
  • the height and width of the output tensor 164 are the same as those of the input tensor 163.
  • the input tensor 163 input to the approximate model 160 is input data indicating the shape of the wing.
  • the SDF value defined by the signed distance function is used as an index representing the shape of the wing.
  • the SDF value is calculated for each grid point.
  • the SDF value indicates the distance from the boundary to the grid point, that is, the distance between the point on the boundary closest to the grid point and the grid point.
  • the generation of the signed distance function is described, for example, in the following non-patent document. Kohei Okita, Kenji Ono, "Accuracy of Fluid Solver Using Shape Representation by Signed Distance Function", RIKEN Symposium 2008 VCAD System Research (3rd), November 2008.
  • the SDF value is positive outside the boundary and negative inside the boundary. Since the fluid is outside the boundary, the second embodiment deals with a positive SDF value.
  • the input tensor 163 is a rearrangement of SDF values of a plurality of grid points based on the coordinates of those grid points.
  • the SDF values of the near grid points are placed close together and the SDF values of the distant grid points are placed apart.
  • the height direction of the input tensor 163 corresponds to the L axis
  • the width direction of the input tensor 163 corresponds to the J axis.
  • the output tensor 164 output from the approximate model 160 is output data showing the distribution of the velocity vector of the fluid.
  • the first channel of the output tensor 164 represents the X component of the velocity vector
  • the second channel of the output tensor 164 represents the Y component of the velocity vector.
  • the output tensor 164 is a rearrangement of velocity vectors of a plurality of grid points based on the coordinates of those grid points. In the output tensor 164, the velocity vectors of the near grid points are placed close together and the velocity vectors of the distant grid points are placed apart.
  • the height direction of the output tensor 164 corresponds to the L axis
  • the width direction of the output tensor 164 corresponds to the J axis.
  • the elements (1, 1, 2) of the output tensor 164 are the Y components of the velocity vector of the grid point.
  • the elements (6, 5, 2) of the output tensor 164 are the Y components of the velocity vector of the grid point.
  • the information processing apparatus 100 prepares training data in which an explanatory variable corresponding to the input tensor 163 and an objective variable corresponding to the output tensor 164 are associated with each other. Performing a fluid simulation on one shape of the wing produces a set of input and output tensors.
  • the information processing apparatus 100 executes, for example, a fluid simulation a plurality of times (for example, 2000 times) to generate training data including a plurality of sets of input tensors and output tensors. At this time, the information processing apparatus 100 automatically generates another shape by giving distortion to one shape created by the user.
  • FIG. 6 is a diagram showing an example of a convolution operation.
  • a convolution operation which is a multiply-accumulate operation, is performed.
  • the tensor 165 is a tensor input to the convolution layer.
  • Kernel 166 is a filter applied to the input tensor 165. Kernel 166 is prepared for each convolution layer.
  • the feature map 167 is a tensor output from the convolution layer and is the result of a convolution operation between the tensor 165 and the kernel 166. Normally, the sides of the kernel 166 are shorter than the sides of the tensor 165.
  • the sides of the feature map 167 are the same length as the sides of the tensor 165 or shorter than the sides of the tensor 165.
  • the kernel 166 is first superimposed on the upper left of the tensor 165. Multiplication is performed between the overlapping elements of the tensor 165 and the elements of the kernel 166, and the sum of these products is the upper left element of the feature map 167. After that, the product-sum operation is repeated by shifting the kernel 166 on the tensor 165 by a predetermined stride.
  • This convolution operation can be expressed as a neural network.
  • the kernel 166 has a size of 3x3 and a stride of 2.
  • the center of the kernel 166 is aligned with the element a22 of the tensor 165.
  • This total value becomes element b11 of the feature map 167.
  • the element b12 of the feature map 167 is calculated.
  • the element b21 of the feature map 167 is calculated, and by aligning the center of the kernel 166 with the element a44 of the tensor 165, the element b22 of the feature map 167 is calculated. Is calculated.
  • the element b22 is calculated as a33 * k11 + a34 * k12 + a35 * k13 + a43 * k21 + a44 * k22 + a45 * k23 + a53 * k31 + a54 * k32 + a55 * k33.
  • the height and width of the feature map 167 will be the same as the tensor 165.
  • the height and width of the feature map 167 is 1/2 that of the tensor 165.
  • the stride is 3, the height and width of the feature map 167 is 1/3 of the tensor 165.
  • the size of the feature map 167 depends on the stride. By setting the number of channels of the kernel 166 to 2 or more, the number of channels of the feature map 167 can be increased more than the number of channels of the tensor 165.
  • the element of kernel 166 corresponds to the weight of the edge included in the neural network, and is a parameter whose value is adjusted in machine learning.
  • the size and stride of kernel 166 are hyperparameters whose values do not change in machine learning.
  • the size and stride of kernel 166 are pre-adjusted so that the height and width of the output tensor 164 match the height and width of the input tensor 163, based on the number of L and J coordinates of the grid points. ..
  • the information processing apparatus 100 may automatically determine the kernel size and stride of each convolution layer based on the number of L coordinates and the number of J coordinates.
  • the height and width of the output tensor 164 can also be adjusted by padding to extend the height and width by adding elements of predetermined value around the existing tensor.
  • a deconvolution operation which is a multiply-accumulate operation, is performed.
  • the deconvolution operation is sometimes called a transposed convolution operation.
  • the deconvolution operation corresponds to the reverse operation of the above convolution operation.
  • one element included in the input tensor is multiplied by a plurality of elements included in the kernel, and a multiplication result having the same size as the kernel is obtained. This multiplication is performed on all the elements contained in the input tensor. The result of this multiplication is shifted by the stride, and the overlapping parts are summed to obtain the output tensor.
  • the stride When the stride is 1, the height and width of the output tensor will be the same as the input tensor. With a stride of 2, the height and width of the output tensor is twice that of the input tensor. With a stride of 3, the height and width of the output tensor is three times that of the input tensor. Thus, even in the deconvolution operation, the size of the output tensor depends on the stride.
  • a general convolutional neural network may include a pooling layer and a fully connected layer in addition to the convolutional layer.
  • the approximate model 160 includes a convolution layer, but does not include a pooling layer or a fully connected layer.
  • the fitted model 160 may include only the convolution layer.
  • the approximate model 160 does not include the pooling layer because the operation equivalent to that of the pooling layer can be realized by adjusting the kernel size and stride of the convolution layer.
  • the approximate model 160 does not include the fully connected layer because the input tensor 163 and the output tensor 164 have substantially the information on the adjacency between the grid points, but the information on the adjacency is lost in the fully connected layer. This is because there is a risk that it will end up. Further, by mounting only the convolution layer, the structure of the approximate model 160 can be simplified.
  • the significance of defining the input / output of the approximate model by rearranging the lattice points of the non-orthogonal lattice used in the fluid simulation according to the L coordinate and the J coordinate will be described.
  • the grid points of the orthogonal grid at equal intervals are generated from the shape data, and the grid points of the orthogonal grid are input.
  • a method of associating the elements of the tensor and the output tensor can be considered.
  • the element of the input tensor becomes the SDF value at the lattice point of the orthogonal lattice
  • the element of the output tensor becomes the velocity vector at the lattice point of the orthogonal lattice.
  • a bilinear interpolation method or a linear interpolation method is used for the interpolation process.
  • the bilinear interpolation method four lattice points around the position of interest are detected, and the weighted average of the velocity vectors of these four lattice points is calculated according to the distance between the position of interest and the four lattice points. , Estimate the velocity vector at the position of interest.
  • this interpolation process is performed when the training data is generated, a sampling error may occur in the training data, and the prediction accuracy of the approximate model may decrease due to the sampling error.
  • the sampling error due to the interpolation processing becomes large, and the prediction accuracy of the approximate model may be significantly lowered near the boundary.
  • the grid spacing must be reduced. However, reducing the grid spacing increases the height and width of the input and output tensors, increasing the number of nodes included in the fitted model. For this reason, the execution time of machine learning for generating an approximate model becomes long, and the amount of training data to be prepared also increases.
  • the method of the second embodiment it is possible to avoid the sampling error due to the interpolation processing and improve the prediction accuracy of the approximate model.
  • maintaining the adjacency between the grid points of the non-orthogonal grid makes it easier to improve the prediction accuracy of the approximate model.
  • FIG. 7 is a diagram showing an example of prediction of fluid velocity by another approximate model.
  • Graph 172 is a graph that visualizes the velocity vector near the boundary predicted by an approximate model using lattice points of an orthogonal lattice for input and output.
  • Graph 172 shows the distribution of velocity vectors for the same blade shape as Graph 171.
  • the velocity vector at the lattice point of the non-orthogonal lattice is estimated from the velocity vector at the lattice point of the orthogonal lattice output by the approximate model by the bilinear interpolation method. Comparing the graph 171 and the graph 172, the difference in the velocity vector depending on the position is not properly expressed in the graph 172. Therefore, the prediction accuracy of the velocity vector near the boundary is low.
  • FIG. 8 is a diagram showing an example of prediction of fluid velocity by an approximate model.
  • Graph 173 is a graph that visualizes the velocity vector near the boundary predicted by an approximate model using grid points of a non-orthogonal lattice for input and output.
  • Graph 173 shows the distribution of velocity vectors for the same blade shape as graphs 171 and 172. Since the approximate model directly calculates the velocity vector of the grid points for fluid simulation, the output of the approximate model is not interpolated. Comparing Graph 171 and Graph 173, Graph 173 appropriately expresses the difference in velocity vector depending on the position. Therefore, it can be said that the prediction accuracy of the velocity vector near the boundary is higher than that of the approximate model used in Graph 172.
  • the orthogonal lattice adopted by the approximate model of Graph 172 includes 256 X-coordinates and 256 Y-coordinates, and has 65536 lattice points.
  • the spacing between the orthogonal grids is larger than the grid spacing on the fluid simulation near the boundary. That is, in the vicinity of the boundary, the lattice points of the orthogonal lattice of the approximate model are coarser than those of the non-orthogonal lattice of the fluid simulation.
  • the non-orthogonal lattice adopted by the approximate model of the second embodiment includes 48 L coordinates and 432 J coordinates, and has 20736 lattice points. Therefore, in the method of the second embodiment, the scale of the approximate model is smaller and the prediction accuracy is higher.
  • FIG. 9 is a block diagram showing a functional example of the information processing device.
  • the information processing device 100 includes a shape data storage unit 121, a grid parameter storage unit 122, a grid point data storage unit 123, a distance data storage unit 124, a fluid data storage unit 125, a training data storage unit 126, and an approximate model storage unit 127. .. These storage units are realized by using, for example, the storage area of the RAM 102 or the HDD 103. Further, the information processing apparatus 100 includes a grid generation unit 131, a distance calculation unit 132, a simulation execution unit 133, a tensor conversion unit 134, a learning unit 135, and a prediction unit 136. These processing units are realized, for example, by using a program executed by the CPU 101.
  • the shape data storage unit 121 stores shape data created by the user using CAD software.
  • the shape data represents the shape of the blade including the outer circumference of the blade.
  • the shape data storage unit 121 may store shape data for at least one shape.
  • the grid parameter storage unit 122 stores parameters for automatically generating grid points.
  • the parameters include the number of L coordinates and the number of J coordinates. This parameter is commonly applied to various shapes. Therefore, the number of L coordinates and the number of J coordinates are common.
  • the grid point data storage unit 123 stores grid point data indicating grid points for fluid simulation automatically generated from the shape data. This grid point is a grid point of a structured grid that is not evenly spaced and is not an orthogonal grid. Lattice point data is generated for each blade shape.
  • the distance data storage unit 124 stores distance data indicating the SDF value of each grid point calculated by the signed distance function. Distance data is generated for each wing shape.
  • the fluid data storage unit 125 stores fluid data indicating the velocity vector of each grid point calculated by the fluid simulation. Fluid data is generated for each blade shape.
  • the training data storage unit 126 stores training data in which an input tensor corresponding to an explanatory variable and an output tensor corresponding to an objective variable are associated with each other.
  • the output tensor corresponds to the teacher data.
  • the training data includes a plurality of sets of input tensors and output tensors (for example, 2000 sets).
  • the input tensor is generated from the distance data and the output tensor is generated from the fluid data.
  • the approximate model storage unit 127 stores the approximate model generated by machine learning.
  • the approximate model contains model parameters such as kernel elements for each convolution layer.
  • the grid generation unit 131 reads the user-created shape data from the shape data storage unit 121.
  • the grid generation unit 131 generates a large number of shape data (for example, 2000 patterns of shape data) indicating different blade shapes by applying distortion to the blade shape indicated by the user-created shape data. However, it is also possible for the user to create shape data of different blade shapes.
  • the grid generation unit 131 reads out the grid parameters from the grid parameter storage unit 122.
  • the grid generation unit 131 sets the L-axis and the J-axis for each shape data, sets the L-coordinates and the J-coordinates as many as the number specified by the grid parameters, and generates the grid points of the structured grid.
  • the grid generation unit 131 stores grid point data indicating the positions of the generated grid points in the grid point data storage unit 123.
  • the distance calculation unit 132 reads the shape data from the shape data storage unit 121 and reads the grid point data from the grid point data storage unit 123.
  • the distance calculation unit 132 generates a signed distance function for calculating the distance from the boundary which is the outer circumference of the blade shape according to a predetermined algorithm for each shape data.
  • the distance calculation unit 132 calculates the SDF value of each grid point using the signed distance function, and stores the distance data indicating the SDF value in the distance data storage unit 124.
  • the simulation execution unit 133 reads the grid point data from the grid point data storage unit 123.
  • the simulation execution unit 133 assigns a velocity vector variable to each lattice point for each lattice point data, and uses the Navier-Stokes equation as a basic equation to generate a coefficient matrix and a right-hand side vector of simultaneous equations.
  • the simulation execution unit 133 obtains a solution of simultaneous equations by an iterative method, and stores fluid data indicating the solution in the fluid data storage unit 125.
  • the initial value of the solution may be given by the prediction unit 136.
  • the initial value given by the prediction unit 136 is an approximate value of the velocity vector of each grid point calculated by the prediction unit 136.
  • the simulation execution unit 133 substitutes the initial value given by the prediction unit 136 into the variable and starts the solution by the iterative method. Starting a fluid simulation using an approximate value of a variable is sometimes called a "warm start".
  • a predetermined initial value is used.
  • Using an approximate value is equivalent to omitting the middle stage of the iterative operation.
  • the tensor conversion unit 134 reads the distance data from the distance data storage unit 124.
  • the tensor conversion unit 134 rearranges the SDF values included in the distance data based on the L coordinate and the J coordinate to generate an input tensor.
  • the tensor conversion unit 134 reads fluid data from the fluid data storage unit 125.
  • the tensor conversion unit 134 rearranges the velocity vectors included in the fluid data based on the L coordinate and the J coordinate to generate an output tensor.
  • the lattice parameters stored in the lattice parameter storage unit 122 are referred to.
  • the tensor conversion unit 134 associates the input tensor and the output tensor for the same blade shape and stores them in the training data storage unit 126.
  • the tensor conversion unit 134 provides the input tensor to the prediction unit 136.
  • the learning unit 135 reads training data from the training data storage unit 126.
  • the learning unit 135 adjusts hyperparameters such as the kernel size and stride of each convolution layer of the approximate model according to the size of the input tensor and the size of the output tensor. Then, the learning unit 135 adjusts parameters such as kernel elements of each convolution layer of the approximate model using the training data.
  • the learning unit 135 stores the approximate model in the approximate model storage unit 127.
  • the prediction unit 136 reads the approximate model from the approximate model storage unit 127.
  • the prediction unit 136 acquires an input tensor from the tensor conversion unit 134 and inputs it to the approximate model.
  • the prediction unit 136 reads the output tensor from the approximation model, rearranges the velocity vectors included in the output tensor, and generates approximation data indicating the prediction of the simulation result.
  • the prediction unit 136 When performing a warm start, the prediction unit 136 provides approximate data to the simulation execution unit 133. When the warm start is not performed, for example, the prediction unit 136 visualizes the velocity vector indicated by the approximate data on the shape data as shown in the graph 173, and displays the visualization data on the display device 111. The prediction unit 136 may store the approximate data in the non-volatile storage, or may transmit the approximate data to another information processing device.
  • the grid generation unit 131 can be implemented by using the grid generation library program. Further, the distance calculation unit 132 can be implemented by using the SDF library program. Further, the simulation execution unit 133 can be implemented by using the CFD library program.
  • FIG. 10 is a diagram showing an example of a grid parameter table and a grid point table.
  • the grid parameter storage unit 122 stores the grid parameter table 141.
  • the number of L coordinates and the number of J coordinates are registered as lattice parameters in the lattice parameter table 141.
  • the L-coordinate number and the J-coordinate number are determined in advance according to the type of the object to be designed. If the types of objects are the same, the L-coordinate number and the J-coordinate number are not changed even if the shapes are different. As described above, for example, the L coordinate number is 48 and the J coordinate number is 432.
  • the grid point data storage unit 123 stores the grid point table 142.
  • the grid point ID, L coordinate, J coordinate, X coordinate, and Y coordinate of each of the plurality of grid points are registered in the grid point table 142.
  • the grid point ID is an identification number that identifies the grid points.
  • the L coordinate is the coordinate of the structural grid and is defined by the L axis extending outward from the boundary.
  • the J coordinate is the coordinate of the structural grid and is the coordinate defined by the J axis along the boundary.
  • the X coordinate is the coordinate of the orthogonal grid and is the coordinate defined by the X axis in the left-right direction of the CAD drawing.
  • the Y coordinate is the coordinate of the orthogonal grid and is the coordinate defined by the Y axis in the vertical direction of the CAD drawing.
  • FIG. 11 is a diagram showing an example of a distance table and a fluid table.
  • the distance data storage unit 124 stores the distance table 143.
  • the grid point ID and SDF value of each of the plurality of grid points are registered in the distance table 143.
  • the grid point ID corresponds to the grid point ID of the grid point table 142.
  • the SDF value is the distance between the grid points and the boundary, that is, the Euclidean distance between the point on the boundary closest to the grid point and the grid point.
  • the SDF value is a positive real number because the grid points are outside the boundary.
  • the fluid data storage unit 125 stores the fluid table 144.
  • the lattice point ID, the velocity X component, and the velocity Y component of each of the plurality of lattice points are registered.
  • the grid point ID corresponds to the grid point ID of the grid point table 142.
  • the velocity X component is the X component of the velocity vector, that is, the component in the left-right direction on the CAD drawing.
  • the velocity Y component is the Y component of the velocity vector, that is, the component in the vertical direction on the CAD drawing.
  • FIG. 12 is a flowchart showing an example of a procedure for learning an approximate model.
  • the grid generation unit 131 reads out the shape data created by the CAD software. Further, the lattice generation unit 131 reads out the number of L coordinates and the number of J coordinates, which are the lattice parameters registered in the lattice parameter table 141.
  • the grid generation unit 131 generates a variation of the shape data by giving a distortion to the object shape indicated by the shape data read in step S10. By combining the original shape data and variations, for example, about 2000 different object shapes are prepared.
  • the grid generation unit 131 selects one object shape.
  • the grid generation unit 131 generates grid points of a structured grid in which each coordinate axis is a curve and the grid points are not evenly spaced, based on the grid parameters read in step S10 and the boundary of the object shape selected in step S12. do. For example, the grid generation unit 131 sets the curve indicating the boundary as the J-axis, and sets the J-coordinates on the J-axis at equal intervals by the number of J-coordinates in step S10.
  • the J coordinate is a non-negative integer that increases by 1 clockwise.
  • the grid generation unit 131 sets the L-coordinate on the L-axis by the number of L-coordinates in step S10, with the curve extending outward from the boundary as the L-axis.
  • the intervals of the L coordinates are not even, and the closer to the boundary, the narrower the intervals.
  • the L coordinate is a non-negative integer that increases by 1 from the boundary to the outside.
  • the grid generation unit 131 generates a grid point table 142 showing the L coordinate, J coordinate, X coordinate, and Y coordinate of the generated grid points.
  • the distance calculation unit 132 generates a signed distance function that defines the distance from the boundary based on the object shape selected in step S12.
  • the distance calculation unit 132 calculates the SDF value of each grid point based on the grid point table 142 generated in step S13 and the signed distance function, and generates a distance table 143 showing the calculated SDF value.
  • the simulation execution unit 133 assigns a velocity vector variable to each grid point based on the grid point table 142 generated in step S13.
  • the simulation execution unit 133 generates simultaneous equations describing the constraints between variables based on the Navier-Stokes equation, which is a basic equation, and finds a solution of the simultaneous equations by an iterative method.
  • the solution of the simultaneous equations is a velocity vector indicating the fluid velocity at each grid point.
  • the simulation execution unit 133 generates a fluid table 144 showing the calculated velocity vector.
  • the tensor conversion unit 134 associates the lattice points with the elements of the tensor based on the number of L coordinates and the number of J coordinates registered in the lattice parameter table 141.
  • the first dimension (row) of the tensor corresponds to the L coordinate
  • the second dimension (column) of the tensor corresponds to the J coordinate.
  • the tensor conversion unit 134 rearranges the SDF values of the plurality of grid points included in the distance table 143 generated in step S14 into the tensor format according to the correspondence in step S16. This distance tensor becomes the input tensor. Further, the tensor conversion unit 134 rearranges the velocity vectors of the plurality of lattice points included in the fluid table 144 generated in step S15 into the tensor format according to the correspondence in step S16. The first channel of the tensor corresponds to the X component, and the second channel of the tensor corresponds to the Y component. This fluid velocity tensor becomes the output tensor. The tensor conversion unit 134 associates the distance tensor with the fluid velocity tensor and adds them to the training data.
  • step S18 The grid generation unit 131 determines whether all the object shapes have been selected in step S12. When all the object shapes are selected, the process proceeds to step S19, and when unselected object shapes remain, the process returns to step S12.
  • the learning unit 135 determines the hyperparameters of the approximate model based on the size of the distance tensor and the size of the fluid velocity tensor. Hyperparameters include the kernel size and stride of each convolution layer. The learning unit 135 determines the parameters of the approximate model by machine learning using the training data generated in step S17. The parameters include kernel elements for each convolution layer.
  • the approximate model is a predictive model that predicts the fluid velocity tensor from the distance tensor. The learning unit 135 stores the generated approximate model in the approximate model storage unit 127.
  • FIG. 13 is a flowchart showing an example of a procedure for speeding up the simulation.
  • the grid generation unit 131 reads out the shape data created by the CAD software. Further, the lattice generation unit 131 reads out the number of L coordinates and the number of J coordinates, which are the lattice parameters registered in the lattice parameter table 141.
  • the lattice generation unit 131 is a lattice point of a structural lattice in which each coordinate axis is a curve and the lattice points are not evenly spaced based on the object shape indicated by the shape data read in step S20 and the lattice parameter read out in step S20. To generate.
  • the grid generation unit 131 generates a grid point table 142 showing the L coordinate, J coordinate, X coordinate, and Y coordinate of the generated grid points.
  • the distance calculation unit 132 generates a signed distance function that defines the distance from the boundary based on the object shape indicated by the shape data.
  • the distance calculation unit 132 calculates the SDF value of each grid point based on the grid point table 142 generated in step S21 and the signed distance function, and generates a distance table 143 showing the calculated SDF value.
  • the tensor conversion unit 134 associates the lattice points with the elements of the tensor based on the number of L coordinates and the number of J coordinates registered in the lattice parameter table 141.
  • the tensor conversion unit 134 rearranges the SDF values of the plurality of grid points included in the distance table 143 generated in step S22 into the tensor format according to the correspondence in step S23. This distance tensor becomes the input tensor.
  • the prediction unit 136 reads the approximate model from the approximate model storage unit 127.
  • the prediction unit 136 inputs the distance tensor generated in step S24 into the approximation model to generate a fluid velocity tensor indicating an approximate value of the velocity vector of each grid point.
  • the prediction unit 136 rearranges the velocity vectors included in the fluid velocity tensor generated in step S25 in the order for fluid simulation based on the number of L coordinates and the number of J coordinates.
  • the format of the sorted velocity vector is, for example, fluid table 144.
  • the simulation execution unit 133 assigns a velocity vector variable to each grid point based on the grid point table 142 generated in step S21.
  • the simulation execution unit 133 generates simultaneous equations describing the constraints between variables based on the Navier-Stokes equations.
  • the simulation execution unit 133 substitutes the approximate value of the velocity vector calculated by the prediction unit 136 into the variable as the initial value. As a result, the simulation execution unit 133 can perform a warm start.
  • the simulation execution unit 133 starts the iterative method from the state in which the initial value is assigned to the variable in step S26, and finds the solution of the simultaneous equations.
  • the solution calculated here is a velocity vector with higher accuracy than the approximate value calculated by the prediction unit 136. By performing a warm start, the number of iterations is smaller than when an initial value deviating from the approximate value is used.
  • the prediction unit 136 visualizes the velocity vector of each grid point calculated in step S27 and displays it on the display device 111. It is also possible to omit steps S26 and S27 and visualize the approximate value of the velocity vector of each grid point calculated in step S25.
  • grid points of a structured grid that is not an orthogonal grid are generated, and the fluid velocity of each grid point is calculated by fluid simulation. Therefore, the lattice points can be arranged at high density near the boundary, and the fluid velocity near the boundary having a large gradient can be calculated with high accuracy.
  • an approximate model is generated from the simulation results for some object shapes, and the distribution of the fluid velocity is predicted from the object shapes by the approximate model. Therefore, it is not necessary to comprehensively execute the fluid simulation by the iterative method for a large number of shape proposals, the amount of calculation can be reduced, and the approximate value of the fluid velocity can be calculated at high speed. Therefore, the design work for examining a large number of shape proposals is streamlined.
  • the fluid velocity included in the simulation result is used as it is after being sorted according to the adjacency relationship of the grid points of the structured grid. Therefore, unlike the case where the orthogonal grid is used for the input / output of the approximate model, it is not necessary to perform the interpolation process for estimating the fluid velocity at a position different from the fluid simulation, and the sampling error due to the interpolation process can be suppressed. Therefore, the prediction accuracy of the approximate model is improved. In particular, the prediction accuracy near the boundary where the gradient of the fluid velocity is large is greatly improved.
  • the scale of the approximate model can be reduced compared to the case where an orthogonal grid is used for the input and output of the approximate model and the accuracy is improved by reducing the grid spacing. Therefore, the execution time of machine learning is shortened, and the training data size can be reduced.
  • the output of the approximate model directly corresponds to the grid points of the structured grid used in the fluid simulation. Therefore, the warm start of the fluid simulation using the output of the approximate model can be executed without the interpolation processing, and the output of the approximate model can be smoothly used.
  • the SDF value is used as the input of the approximate model, and a plurality of SDF values are arranged according to the adjacency relationship of the grid points. Therefore, it is possible to accurately represent the shape of an object without adopting an orthogonal lattice.
  • the approximate model includes a convolutional layer, but does not include a pooling layer or a fully connected layer. Therefore, it is possible to prevent the loss of information on the adjacency relationship between a plurality of grid points in the calculation process inside the approximate model. Further, by using the convolution layer, the approximate model can be flexibly adjusted according to the size of the input / output.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Computer Hardware Design (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention reduces prediction error for an approximation model that predicts a simulation result. Simulation result data (14) is acquired, the data including a plurality of first values which indicate a physical amount of a fluid calculated by a simulation and which are associated with a plurality of unequally-spaced lattice points arranged in a region having a border prescribed by a specific object shape. On the basis of the adjacency relationship between the plurality of lattice points, the plurality of first values are rearranged into a multi-dimensional array structure to generate teaching data (15) which includes the plurality of first values of the multi-dimensional array structure. The teaching data (15) and input data (16), which includes second values indicating a specific object shape, are used to generate an approximation model (17) for predicting the distribution of the physical amounts of the fluid from the object shape.

Description

設計プログラムおよび設計方法Design program and design method
 本発明は設計プログラムおよび設計方法に関する。 The present invention relates to a design program and a design method.
 計算機シミュレーションの一分野として、空気や水などの流体の挙動を数値解析によって解く数値流体力学(CFD:Computational Fluid Dynamics)がある。数値流体力学では、二階非線形微分方程式であるナビエ・ストークス方程式など、流体の運動を記述する基礎方程式が使用される。流体が存在する空間を格子点によって離散的に表現し、基礎方程式を離散化した大規模連立方程式を生成し、大規模連立方程式の近似解を反復法によって求めることで、各格子点の流速などの物理量が算出される。数値流体力学は、航空機、自動車、船舶などの各種の機械や建造物の設計に利用されることがある。 One field of computer simulation is computational fluid dynamics (CFD), which solves the behavior of fluids such as air and water by numerical analysis. Computational fluid dynamics uses basic equations that describe the motion of fluids, such as the Navier-Stokes equation, which is a second-order nonlinear differential equation. By discretely expressing the space where the fluid exists by lattice points, generating large-scale simultaneous equations that discretize the basic equations, and finding the approximate solution of the large-scale simultaneous equations by the iterative method, the flow velocity of each lattice point, etc. The physical quantity of is calculated. Computational fluid dynamics may be used in the design of various machines and structures such as aircraft, automobiles and ships.
 なお、構造格子によって表現された形状モデルを用いて流体の物理量を算出する流体シミュレーション方法が提案されている。また、畳み込みニューラルネットワーク(CNN:Convolutional Neural Network)を用いて建物周辺の風速分布を推定する推定方法が提案されている。また、CNNの畳み込み演算に用いる行列データを二分割して、畳み込み演算の計算量を削減する学習方法が提案されている。また、多層CNNを用いて入力画像を出力画像に変換する画像処理方法が提案されている。 A fluid simulation method for calculating the physical quantity of a fluid using a shape model represented by a structured grid has been proposed. In addition, an estimation method for estimating the wind speed distribution around a building using a convolutional neural network (CNN) has been proposed. Further, a learning method has been proposed in which the matrix data used for the CNN convolution operation is divided into two to reduce the calculation amount of the convolution operation. Further, an image processing method for converting an input image into an output image using a multilayer CNN has been proposed.
特開2004-62749号公報Japanese Unexamined Patent Publication No. 2004-62749 特開2012-83958号公報Japanese Unexamined Patent Publication No. 2012-83958 特開2018-4568号公報JP-A-2018-4568 特開2018-160086号公報Japanese Unexamined Patent Publication No. 2018-16806 特開2019-8383号公報Japanese Unexamined Patent Publication No. 2019-8383
 流体シミュレーションは多数の格子点に対する反復的な数値計算を含むため、計算量が大きく計算時間が長くなることがある。そのため、設計段階で挙げられる物体形状の多数の代替案に対して、流体シミュレーションを網羅的に実行することは現実的でないことがある。そこで、幾つかの物体形状に対して流体シミュレーションを試行し、その結果を用いて、物体形状と流体の物理量との間の関係を示す近似モデルを生成する方法が考えられる。近似モデルを用いることで、ある物体形状に対して流体の物理量の近似値を高速に算出することができ、多数の代替案の中から良好な物体形状を絞り込むことができる。 Since the fluid simulation includes iterative numerical calculation for many grid points, the amount of calculation is large and the calculation time may be long. Therefore, it may not be practical to perform a fluid simulation comprehensively for many alternatives of object shapes mentioned at the design stage. Therefore, it is conceivable to try a fluid simulation for some object shapes and use the results to generate an approximate model showing the relationship between the object shape and the physical quantity of the fluid. By using the approximate model, the approximate value of the physical quantity of the fluid can be calculated at high speed for a certain object shape, and a good object shape can be narrowed down from a large number of alternatives.
 物体形状から流体の物理量を予測する近似モデルの1つの単純な生成方法として、物体および流体が存在する空間に等間隔の直交格子の格子点を配置し、直交格子の各格子点の物理量を近似モデルが出力するように機械学習を行う方法が考えられる。この場合、試行した流体シミュレーション結果から直交格子の各格子点における物理量をサンプリングし、物体形状を示すパラメータとサンプリングされた物理量との対応関係を、近似モデルを生成するための訓練データとして使用することになる。 As one simple method of generating an approximate model that predicts the physical quantity of a fluid from the shape of an object, the grid points of an evenly spaced orthogonal grid are placed in the space where the object and the fluid exist, and the physical quantity of each grid point of the orthogonal grid is approximated. A method of performing machine learning so that the model outputs can be considered. In this case, the physical quantity at each lattice point of the orthogonal lattice is sampled from the trial fluid simulation result, and the correspondence between the parameter indicating the object shape and the sampled physical quantity is used as training data for generating an approximate model. become.
 しかし、流体と物体との境界付近では流体の物理量の勾配(位置の変化に対する物理量の変化の比率)が大きく、境界から離れた領域では流体の物理量の勾配が小さいことがある。このため、等間隔の直交格子を使用する近似モデルでは、出力の格子点が粗いためにサンプリングに伴う誤差が生じ、境界付近の物理量の予測誤差が大きくなるという問題がある。一方、近似モデルの直交格子の間隔を全体的に小さくすると、近似モデルが大規模になり、高精度の近似モデルを生成するには機械学習のコストが大きくなってしまう。 However, the gradient of the physical quantity of the fluid (the ratio of the change of the physical quantity to the change of the position) is large near the boundary between the fluid and the object, and the gradient of the physical quantity of the fluid may be small in the region away from the boundary. For this reason, in the approximate model using the orthogonal grids at equal intervals, there is a problem that an error due to sampling occurs because the grid points of the output are coarse, and the prediction error of the physical quantity near the boundary becomes large. On the other hand, if the interval between the orthogonal grids of the approximate model is reduced as a whole, the approximate model becomes large and the cost of machine learning increases in order to generate a highly accurate approximate model.
 1つの側面では、本発明は、シミュレーション結果を予測する近似モデルの予測誤差を低減させる設計プログラムおよび設計方法を提供することを目的とする。 In one aspect, it is an object of the present invention to provide a design program and a design method that reduce the prediction error of an approximate model that predicts a simulation result.
 1つの態様では、コンピュータに以下の処理を実行させる設計プログラムが提供される。特定の物体形状によって規定される境界をもつ領域に配置された格子点であって、間隔が均等でない複数の格子点に対応付けて、シミュレーションにより算出された流体の物理量を示す複数の第1の値を含むシミュレーション結果データを取得する。複数の格子点の間の隣接関係に基づいて、複数の第1の値を多次元配列構造に並べ替えて、多次元配列構造の複数の第1の値を含む教師データを生成する。特定の物体形状を示す第2の値を含む入力データと教師データとを用いて、物体形状から流体の物理量の分布を予測する近似モデルを生成する。 In one aspect, a design program is provided that causes the computer to perform the following processes. A plurality of first grid points that are arranged in a region having a boundary defined by a specific object shape and that indicate a physical quantity of a fluid calculated by simulation in association with a plurality of grid points that are not evenly spaced. Acquire simulation result data including values. Based on the adjacency between the plurality of grid points, the plurality of first values are rearranged into the multidimensional array structure to generate teacher data including the plurality of first values of the multidimensional array structure. Using the input data including the second value indicating a specific object shape and the teacher data, an approximate model for predicting the distribution of the physical quantity of the fluid from the object shape is generated.
 また、1つの態様では、コンピュータが実行する設計方法が提供される。 Also, in one aspect, a computer-executed design method is provided.
 1つの側面では、シミュレーション結果を予測する近似モデルの予測誤差が低減する。
 本発明の上記および他の目的、特徴および利点は本発明の例として好ましい実施の形態を表す添付の図面と関連した以下の説明により明らかになるであろう。
On one side, the prediction error of the fitted model that predicts the simulation results is reduced.
The above and other objects, features and advantages of the present invention will become apparent by the following description in connection with the accompanying drawings representing preferred embodiments of the present invention.
第1の実施の形態の設計装置の例を説明する図である。It is a figure explaining the example of the design apparatus of 1st Embodiment. 第2の実施の形態の情報処理装置のハードウェア例を示す図である。It is a figure which shows the hardware example of the information processing apparatus of 2nd Embodiment. 流体シミュレーションの格子点の配置例を示す図である。It is a figure which shows the arrangement example of the lattice point of the fluid simulation. 流体速度のシミュレーション例を示す図である。It is a figure which shows the simulation example of a fluid velocity. 近似モデルの構造例を示す図である。It is a figure which shows the structural example of the approximate model. 畳み込み演算の例を示す図である。It is a figure which shows the example of the convolution operation. 他の近似モデルによる流体速度の予測例を示す図である。It is a figure which shows the prediction example of the fluid velocity by another approximate model. 近似モデルによる流体速度の予測例を示す図である。It is a figure which shows the prediction example of the fluid velocity by the approximate model. 情報処理装置の機能例を示すブロック図である。It is a block diagram which shows the functional example of an information processing apparatus. 格子パラメータテーブルと格子点テーブルの例を示す図である。It is a figure which shows the example of the grid parameter table and the grid point table. 距離テーブルと流体テーブルの例を示す図である。It is a figure which shows the example of the distance table and the fluid table. 近似モデル学習の手順例を示すフローチャートである。It is a flowchart which shows the procedure example of approximate model learning. シミュレーション高速化の手順例を示すフローチャートである。It is a flowchart which shows the procedure example of the simulation speedup.
 以下、本実施の形態を図面を参照して説明する。
 [第1の実施の形態]
 第1の実施の形態を説明する。
Hereinafter, the present embodiment will be described with reference to the drawings.
[First Embodiment]
The first embodiment will be described.
 図1は、第1の実施の形態の設計装置の例を説明する図である。
 第1の実施の形態の設計装置10は、数値流体力学による流体シミュレーションを行う。また、設計装置10は、特定の物体形状に対するシミュレーション結果を用いて、機械学習により、物体形状からシミュレーション結果を予測する近似モデルを生成する。設計装置10は、クライアント装置でもよいしサーバ装置でもよい。設計装置10を、コンピュータ、情報処理装置、シミュレーション装置、機械学習装置などと言うこともできる。
FIG. 1 is a diagram illustrating an example of a design device according to the first embodiment.
The design device 10 of the first embodiment performs a fluid simulation by numerical fluid dynamics. Further, the design device 10 uses the simulation result for a specific object shape to generate an approximate model that predicts the simulation result from the object shape by machine learning. The design device 10 may be a client device or a server device. The design device 10 can also be referred to as a computer, an information processing device, a simulation device, a machine learning device, or the like.
 設計装置10は、記憶部11および処理部12を有する。記憶部11は、RAM(Random Access Memory)などの揮発性半導体メモリでもよいし、HDD(Hard Disk Drive)やフラッシュメモリなどの不揮発性ストレージでもよい。処理部12は、例えば、CPU(Central Processing Unit)、GPU(Graphics Processing Unit)、DSP(Digital Signal Processor)などのプロセッサである。ただし、処理部12は、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)などの特定用途の電子回路を含んでもよい。プロセッサは、RAMなどのメモリ(記憶部11でもよい)に記憶されたプログラムを実行する。複数のプロセッサの集合を「マルチプロセッサ」または単に「プロセッサ」と言うこともある。 The design device 10 has a storage unit 11 and a processing unit 12. The storage unit 11 may be a volatile semiconductor memory such as a RAM (RandomAccessMemory) or a non-volatile storage such as an HDD (HardDiskDrive) or a flash memory. The processing unit 12 is, for example, a processor such as a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), or a DSP (Digital Signal Processor). However, the processing unit 12 may include an electronic circuit for a specific purpose such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array). The processor executes a program stored in a memory (may be a storage unit 11) such as a RAM. A set of multiple processors is sometimes referred to as a "multiprocessor" or simply a "processor."
 記憶部11は、シミュレーション結果データ14を記憶する。シミュレーション結果データ14は、特定の物体形状を対象に実行された数値流体力学による流体シミュレーションの結果を示す。物体形状は、空気や水などの流体に接することが想定される物体の形状であり、例えば、航空機の翼の形状や自動車の形状である。 The storage unit 11 stores the simulation result data 14. The simulation result data 14 shows the result of a fluid simulation by numerical fluid dynamics executed for a specific object shape. The object shape is the shape of an object that is supposed to come into contact with a fluid such as air or water, and is, for example, the shape of an aircraft wing or the shape of an automobile.
 流体シミュレーションでは、流体が存在する領域に複数の格子点を配置し、各格子点に対して速度や圧力などの流体の物理量を示す変数を割り当てる。そして、例えば、ナビエ・ストークス方程式などの基礎方程式に基づいて、変数間の関係を記述した大規模連立方程式を生成し、大規模連立方程式を表す係数行列を用いて反復法により変数の解を求める。反復法では、例えば、変数に仮の値を代入し、代入した値のもとで右辺ベクトルの誤差を算出し、誤差が小さくなるように変数の値を変化させることを繰り返す。 In the fluid simulation, multiple grid points are placed in the area where the fluid exists, and variables indicating the physical quantity of the fluid such as velocity and pressure are assigned to each grid point. Then, for example, based on a basic equation such as the Navier-Stokes equation, a large-scale simultaneous equation that describes the relationship between variables is generated, and a solution of the variable is obtained by an iterative method using a coefficient matrix that represents the large-scale simultaneous equation. .. In the iterative method, for example, a temporary value is assigned to a variable, an error of the right-hand side vector is calculated based on the assigned value, and the value of the variable is changed so as to reduce the error.
 シミュレーション対象の領域は、特定の物体形状によって規定される境界をもつ。この境界は、例えば、物体と流体との境界であり、物体の外周に相当する。領域は、二次元平面または三次元空間である。領域に配置される格子点は、例えば、複数の座標軸を含む構造格子によって形成される。その場合、各格子点は、二次元または三次元の座標によって識別される。ある格子点から見て、座標軸毎に隣接する格子点が存在する。ただし、第1の実施の形態の格子点は、等間隔の直交格子の格子点ではなく、間隔が均等でない。少なくとも1つの座標軸が直線でなくてもよい。例えば、境界を示す曲線に応じた座標軸と、境界に近いほど座標の間隔が狭くなる座標軸とをもつ構造格子が考えられる。 The area to be simulated has a boundary defined by a specific object shape. This boundary is, for example, the boundary between an object and a fluid, and corresponds to the outer circumference of the object. The region is a two-dimensional plane or a three-dimensional space. The grid points arranged in the region are formed by, for example, a structured grid including a plurality of coordinate axes. In that case, each grid point is identified by two-dimensional or three-dimensional coordinates. Seen from a certain grid point, there are grid points adjacent to each coordinate axis. However, the grid points of the first embodiment are not the grid points of the orthogonal grids at equal intervals, and the intervals are not even. At least one coordinate axis does not have to be a straight line. For example, a structured grid having a coordinate axis corresponding to a curve indicating a boundary and a coordinate axis in which the distance between the coordinates becomes narrower as it is closer to the boundary can be considered.
 一例として、領域には格子点13-1~13-9が配置される。格子点13-1,13-2,13-3が同一曲線上に並び、格子点13-4,13-5,13-6が同一曲線上に並び、格子点13-7,13-8,13-9が同一曲線上に並ぶ。これら3つの曲線は、ある座標軸に沿っており、例えば、境界と平行な曲線である。また、格子点13-1,13-4,13-7が同一曲線上に並び、格子点13-2,13-5,13-8が同一曲線上に並び、格子点13-3,13-6,13-9が同一曲線上に並ぶ。これら3つの曲線は、ある座標軸に沿っており、例えば、境界からその外側に向かって伸びる曲線である。格子点13-1,13-2,13-3の方が格子点13-7,13-8,13-9よりも境界に近い。格子点13-1と格子点13-4の間隔は、格子点13-4と格子点13-7の間隔よりも狭い。このように、境界に近いほど格子点の間隔が狭いことがある。 As an example, grid points 13-1 to 13-9 are arranged in the area. Grid points 13-1, 13-2, 13-3 are lined up on the same curve, grid points 13-4, 13-5, 13-6 are lined up on the same curve, grid points 13-7, 13-8, 13-9 are lined up on the same curve. These three curves are along a certain coordinate axis and are, for example, curves parallel to the boundary. In addition, grid points 13-1, 13-4, 13-7 are lined up on the same curve, grid points 13-2, 13-5, 13-8 are lined up on the same curve, and grid points 13-3, 13- 6, 13-9 are lined up on the same curve. These three curves are along a certain coordinate axis, for example, a curve extending outward from the boundary. The grid points 13-1, 13-2, 13-3 are closer to the boundary than the grid points 13-7, 13-8, 13-9. The distance between the grid points 13-1 and the grid points 13-4 is narrower than the distance between the grid points 13-4 and the grid points 13-7. In this way, the closer to the boundary, the narrower the spacing between the grid points may be.
 シミュレーション結果データ14は、格子点13-1~13-9と対応付けて、流体シミュレーションにより算出された流体の物理量を示す値(第1の値)を含む。格子点13-1の値v1、格子点13-2の値v2、格子点13-3の値v3、格子点13-4の値v4、格子点13-5の値v5、格子点13-6の値v6、格子点13-7の値v7、格子点13-8の値v8および格子点13-9の値v9が算出されている。これらの値v1~v9は、例えば、該当する格子点における流体の速度を表す。 The simulation result data 14 includes a value (first value) indicating the physical quantity of the fluid calculated by the fluid simulation in association with the grid points 13-1 to 13-9. Grid point 13-1 value v1, grid point 13-2 value v2, grid point 13-3 value v3, grid point 13-4 value v4, grid point 13-5 value v5, grid point 13-6 The value v6 of, the value v7 of the grid point 13-7, the value v8 of the grid point 13-8, and the value v9 of the grid point 13-9 are calculated. These values v1 to v9 represent, for example, the velocity of the fluid at the corresponding grid point.
 処理部12は、シミュレーション結果データ14を取得すると、格子点13-1~13-9の間の隣接関係に基づいて、格子点13-1~13-9の値v1~v9を多次元配列構造に並べ替える。値v1~v9を含む多次元配列をテンソルと言うことがある。多次元配列の次元数(階数)は、領域の次元数と値v1~v9の次元数に依存する。例えば、シミュレーション対象の領域が二次元であり、値v1~v9が一次元のスカラ値である場合、値v1~v9が二次元配列(二階のテンソル)に格納される。 When the processing unit 12 acquires the simulation result data 14, the processing unit 12 sets the values v1 to v9 of the grid points 13-1 to 13-9 in a multidimensional array structure based on the adjacency relationship between the grid points 13-1 to 13-9. Sort to. A multidimensional array containing values v1 to v9 is sometimes called a tensor. The number of dimensions (order) of a multidimensional array depends on the number of dimensions of the region and the number of dimensions of the values v1 to v9. For example, when the area to be simulated is two-dimensional and the values v1 to v9 are one-dimensional scalar values, the values v1 to v9 are stored in a two-dimensional array (second-order tensor).
 多次元配列構造への並べ替えでは、近い格子点が多次元配列の近い要素に対応付けられ、離れた格子点が多次元配列の離れた要素に対応付けられるように、格子点13-1~13-9の隣接関係が保存されることが好ましい。隣接する格子点が多次元配列の隣接する要素に対応付けられることが好ましい。格子点13-1~13-9に、複数の座標軸によって規定される座標が割り当てられている場合、処理部12は、座標に基づいて、各格子点に対応付ける多次元配列の要素を決定するようにしてもよい。例えば、構造格子がL軸とJ軸をもつ場合、L座標を多次元配列の第一次元(行)に対応付け、J座標を多次元配列の第二次元(列)に対応付けることが考えられる。 In sorting into a multidimensional array structure, grid points 13-1 to so that close grid points are associated with close elements of the multidimensional array and distant grid points are associated with distant elements of the multidimensional array. It is preferred that the adjacency of 13-9 is preserved. It is preferred that adjacent grid points are associated with adjacent elements of a multidimensional array. When the coordinates defined by a plurality of coordinate axes are assigned to the grid points 13-1 to 13-9, the processing unit 12 determines the elements of the multidimensional array associated with each grid point based on the coordinates. It may be. For example, when the structured grid has an L axis and a J axis, it is conceivable to associate the L coordinate with the first dimension (row) of the multidimensional array and the J coordinate with the second dimension (column) of the multidimensional array. Be done.
 ただし、格子点13-1~13-9が等間隔の直交格子を形成していないため、多次元配列の要素の位置が領域上での格子点13-1~13-9の位置そのものを表しているわけではない。処理部12は、多次元配列構造の値v1~v9を含む教師データ15を生成する。例えば、(1,1)=v1、(1,2)=v2、(1,3)=v3、(2,1)=v4、(2,2)=v5、(2,3)=v6、(3,1)=v7、(3,2)=v8、(3,3)=v9のように、値v1~v9が並んでいる。 However, since the grid points 13-1 to 13-9 do not form an orthogonal grid at equal intervals, the positions of the elements of the multidimensional array represent the positions of the grid points 13-1 to 13-9 on the region itself. I'm not. The processing unit 12 generates teacher data 15 including the values v1 to v9 of the multidimensional array structure. For example, (1,1) = v1, (1,2) = v2, (1,3) = v3, (2,1) = v4, (2,2) = v5, (2,3) = v6, Values v1 to v9 are lined up, such as (3,1) = v7, (3,2) = v8, (3,3) = v9.
 また、処理部12は、シミュレーション対象とした特定の物体形状から、当該特定の物体形状を示す値(第2の値)を含む入力データ16を生成する。入力データ16は、物体形状を反映した何らかのパラメータを含んでいればよい。一例として、処理部12は、格子点13-1~13-9それぞれについて、その格子点と境界との距離を示す距離値を算出する。距離値は、ある格子点から最も近い境界上の点と当該格子点との間のユークリッド距離に相当し、例えば、符号付き距離関数(SDF:Signed Distance Function)の値である。処理部12は、格子点13-1~13-9の距離値を、教師データ15と同様の多次元配列構造に並べ替えて入力データ16とする。その場合、教師データ15と入力データ16の間で同じ位置にある要素は、同一の格子点に対応している。 Further, the processing unit 12 generates input data 16 including a value (second value) indicating the specific object shape from the specific object shape targeted for simulation. The input data 16 may include some parameters that reflect the shape of the object. As an example, the processing unit 12 calculates a distance value indicating the distance between the grid points and the boundary for each of the grid points 13-1 to 13-9. The distance value corresponds to the Euclidean distance between the point on the boundary closest to a certain lattice point and the lattice point, and is, for example, the value of a signed distance function (SDF). The processing unit 12 rearranges the distance values of the grid points 13-1 to 13-9 into a multidimensional array structure similar to that of the teacher data 15 to obtain the input data 16. In that case, the elements at the same position between the teacher data 15 and the input data 16 correspond to the same grid point.
 処理部12は、教師データ15と入力データ16を対応付けて、教師データ15と入力データ16を含む訓練データを生成する。そして、処理部12は、この訓練データを用いて、機械学習により近似モデル17を生成する。近似モデル17は、物体形状から流体の物理量の分布を予測する予測モデルであり、反復法による流体シミュレーションを行わずに流体シミュレーションの結果の近似値を算出するものである。教師データ15は、近似モデル17の出力である目的変数に相当し、入力データ16は、近似モデル17の入力である説明変数に相当する。近似モデル17は、例えば、畳み込みニューラルネットワークである。近似モデル17は、高次元の入力の多次元配列を、畳み込み演算によって低次元の特徴データに変換するエンコーダと、特徴データを、逆畳み込み演算によって高次元の出力の多次元配列に変換するデコーダとを含んでもよい。 The processing unit 12 associates the teacher data 15 with the input data 16 to generate training data including the teacher data 15 and the input data 16. Then, the processing unit 12 uses this training data to generate an approximate model 17 by machine learning. The approximation model 17 is a prediction model that predicts the distribution of the physical quantity of the fluid from the shape of the object, and calculates an approximation value of the result of the fluid simulation without performing the fluid simulation by the iterative method. The teacher data 15 corresponds to the objective variable which is the output of the approximate model 17, and the input data 16 corresponds to the explanatory variable which is the input of the approximate model 17. The approximate model 17 is, for example, a convolutional neural network. The approximation model 17 includes an encoder that converts a multidimensional array of high-dimensional inputs into a low-dimensional feature data by a convolution operation, and a decoder that converts the feature data into a multidimensional array of a high-dimensional output by a deconvolution operation. May include.
 第1の実施の形態の設計装置によれば、流体シミュレーションにより算出された複数の格子点の値が、それら複数の格子点の隣接関係に基づいて多次元配列構造に並べ替えられて、教師データ15が生成される。そして、物体形状を示す入力データ16と教師データ15から、機械学習により近似モデル17が生成される。 According to the design apparatus of the first embodiment, the values of the plurality of lattice points calculated by the fluid simulation are rearranged into a multidimensional array structure based on the adjacency relationship of the plurality of lattice points, and the teacher data. 15 is generated. Then, an approximate model 17 is generated by machine learning from the input data 16 and the teacher data 15 indicating the object shape.
 近似モデル17を利用することで、反復法による流体シミュレーションを実行しなくても、他の物体形状に対するシミュレーション結果を予測することができる。よって、計算量を削減でき、流体の物理量の近似値を高速に算出することができる。このため、物体形状の多数の代替案を検討する設計作業が効率化される。 By using the approximate model 17, it is possible to predict the simulation results for other object shapes without executing the fluid simulation by the iterative method. Therefore, the amount of calculation can be reduced, and the approximate value of the physical quantity of the fluid can be calculated at high speed. Therefore, the design work for considering a large number of alternatives for the object shape is streamlined.
 また、多次元配列構造の教師データ15を生成するにあたり、シミュレーション結果データ14に含まれる値が、格子点の隣接関係に応じて並べ替えられた上でそのまま使用される。このとき、多次元配列の要素を等間隔の直交格子の格子点に対応させる場合と異なり、シミュレーション結果データ14と教師データ15との間で格子点を変換するためのサンプリングを行わなくてよい。よって、サンプリングに伴う誤差の発生を抑制でき、近似モデル17の予測精度を向上させることができる。 Further, in generating the teacher data 15 of the multidimensional array structure, the values included in the simulation result data 14 are sorted according to the adjacency relationship of the lattice points and used as they are. At this time, unlike the case where the elements of the multidimensional array correspond to the lattice points of the orthogonal lattice at equal intervals, it is not necessary to perform sampling for converting the lattice points between the simulation result data 14 and the teacher data 15. Therefore, the occurrence of an error due to sampling can be suppressed, and the prediction accuracy of the approximate model 17 can be improved.
 特に、流体シミュレーションにおいて、境界付近など一部領域に格子点が高密度に配置されている場合に、当該一部領域の予測誤差を低減することができる。また、教師データ15が等間隔の直交格子を採用し、その格子間隔を小さくして精度向上を試みる場合と比べて、近似モデル17の規模を小さくすることができ、機械学習のコストを低減できる。 In particular, in fluid simulation, when grid points are arranged at high density in a part of the area such as near the boundary, the prediction error of the part of the area can be reduced. Further, the scale of the approximate model 17 can be reduced and the cost of machine learning can be reduced as compared with the case where the teacher data 15 adopts orthogonal grids at equal intervals and attempts to improve the accuracy by reducing the grid intervals. ..
 [第2の実施の形態]
 次に、第2の実施の形態を説明する。
 第2の実施の形態の情報処理装置は、数値流体力学に基づいて、航空機の翼周辺の気流のシミュレーションを行う。また、第2の実施の形態の情報処理装置は、形状の異なる幾つかの翼に対するシミュレーション結果を用いて、機械学習により、翼の形状から翼周辺の気流を予測する近似モデルを生成する。第2の実施の形態の情報処理装置は、クライアント装置でもよいしサーバ装置でもよい。第2の実施の形態の情報処理装置を、コンピュータ、シミュレーション装置、機械学習装置、設計装置などと言うこともできる。
[Second Embodiment]
Next, a second embodiment will be described.
The information processing apparatus of the second embodiment simulates the airflow around the wing of an aircraft based on computational fluid dynamics. Further, the information processing apparatus of the second embodiment generates an approximate model for predicting the airflow around the blade from the shape of the blade by machine learning using the simulation results for several blades having different shapes. The information processing device of the second embodiment may be a client device or a server device. The information processing device of the second embodiment can also be referred to as a computer, a simulation device, a machine learning device, a design device, or the like.
 図2は、第2の実施の形態の情報処理装置のハードウェア例を示す図である。
 第2の実施の形態の情報処理装置100は、CPU101、RAM102、HDD103、画像インタフェース104、入力インタフェース105、媒体リーダ106および通信インタフェース107を有する。情報処理装置100が有するこれらのユニットは、バスに接続されている。情報処理装置100は、第1の実施の形態の設計装置10に対応する。CPU101は、第1の実施の形態の処理部12に対応する。RAM102またはHDD103は、第1の実施の形態の記憶部11に対応する。
FIG. 2 is a diagram showing a hardware example of the information processing apparatus according to the second embodiment.
The information processing apparatus 100 of the second embodiment includes a CPU 101, a RAM 102, an HDD 103, an image interface 104, an input interface 105, a medium reader 106, and a communication interface 107. These units included in the information processing apparatus 100 are connected to the bus. The information processing device 100 corresponds to the design device 10 of the first embodiment. The CPU 101 corresponds to the processing unit 12 of the first embodiment. The RAM 102 or the HDD 103 corresponds to the storage unit 11 of the first embodiment.
 CPU101は、プログラムの命令を実行するプロセッサである。CPU101は、HDD103に記憶されたプログラムやデータの少なくとも一部をRAM102にロードし、プログラムを実行する。CPU101は複数のプロセッサコアを備えてもよく、情報処理装置100は複数のプロセッサを備えてもよい。複数のプロセッサの集合を「マルチプロセッサ」または単に「プロセッサ」と言うことがある。 The CPU 101 is a processor that executes program instructions. The CPU 101 loads at least a part of the programs and data stored in the HDD 103 into the RAM 102 and executes the program. The CPU 101 may include a plurality of processor cores, and the information processing device 100 may include a plurality of processors. A collection of multiple processors is sometimes referred to as a "multiprocessor" or simply a "processor."
 RAM102は、CPU101が実行するプログラムやCPU101が演算に使用するデータを一時的に記憶する揮発性半導体メモリである。情報処理装置100は、RAM以外の種類のメモリを備えてもよく、複数のメモリを備えてもよい。 The RAM 102 is a volatile semiconductor memory that temporarily stores a program executed by the CPU 101 and data used by the CPU 101 for calculation. The information processing device 100 may include a type of memory other than RAM, or may include a plurality of memories.
 HDD103は、OS(Operating System)やミドルウェアやアプリケーションソフトウェアなどのソフトウェアのプログラム、および、データを記憶する不揮発性ストレージである。情報処理装置100は、フラッシュメモリやSSD(Solid State Drive)など他の種類のストレージを備えてもよく、複数のストレージを備えてもよい。 HDD 103 is a non-volatile storage that stores software programs such as OS (Operating System), middleware, and application software, and data. The information processing device 100 may include other types of storage such as a flash memory and an SSD (Solid State Drive), or may include a plurality of storages.
 画像インタフェース104は、CPU101からの命令に従って、情報処理装置100に接続された表示装置111に画像を出力する。表示装置111として、CRT(Cathode Ray Tube)ディスプレイ、液晶ディスプレイ(LCD:Liquid Crystal Display)、有機EL(OEL:Organic Electro-Luminescence)ディスプレイ、プロジェクタなど、任意の種類の表示装置を使用することができる。情報処理装置100に、プリンタなど表示装置111以外の出力デバイスが接続されてもよい。 The image interface 104 outputs an image to the display device 111 connected to the information processing device 100 in accordance with a command from the CPU 101. As the display device 111, any kind of display device such as a CRT (Cathode Ray Tube) display, a liquid crystal display (LCD: Liquid Crystal Display), an organic EL (OEL: Organic Electro-Luminescence) display, and a projector can be used. .. An output device other than the display device 111 such as a printer may be connected to the information processing device 100.
 入力インタフェース105は、情報処理装置100に接続された入力デバイス112から入力信号を受け付ける。入力デバイス112として、マウス、タッチパネル、タッチパッド、キーボードなど、任意の種類の入力デバイスを使用することができる。情報処理装置100に複数種類の入力デバイスが接続されてもよい。 The input interface 105 receives an input signal from the input device 112 connected to the information processing device 100. As the input device 112, any kind of input device such as a mouse, a touch panel, a touch pad, and a keyboard can be used. A plurality of types of input devices may be connected to the information processing device 100.
 媒体リーダ106は、記録媒体113に記録されたプログラムやデータを読み取る読み取り装置である。記録媒体113として、フレキシブルディスク(FD:Flexible Disk)やHDDなどの磁気ディスク、CD(Compact Disc)やDVD(Digital Versatile Disc)などの光ディスク、半導体メモリなど、任意の種類の記録媒体を使用することができる。媒体リーダ106は、例えば、記録媒体113から読み取ったプログラムやデータを、RAM102やHDD103などの他の記録媒体にコピーする。読み取られたプログラムは、例えば、CPU101によって実行される。なお、記録媒体113は可搬型記録媒体であってもよく、プログラムやデータの配布に用いられることがある。また、記録媒体113やHDD103を、コンピュータ読み取り可能な記録媒体と言うことがある。 The medium reader 106 is a reading device that reads programs and data recorded on the recording medium 113. As the recording medium 113, any kind of recording medium such as a magnetic disk such as a flexible disk (FD) or HDD, an optical disk such as a CD (Compact Disc) or a DVD (Digital Versatile Disc), or a semiconductor memory is used. Can be done. The medium reader 106 copies, for example, a program or data read from the recording medium 113 to another recording medium such as the RAM 102 or the HDD 103. The read program is executed by, for example, the CPU 101. The recording medium 113 may be a portable recording medium, and may be used for distribution of programs and data. Further, the recording medium 113 and the HDD 103 may be referred to as a computer-readable recording medium.
 通信インタフェース107は、ネットワーク114に接続され、ネットワーク114を介して他の情報処理装置と通信する。通信インタフェース107は、スイッチやルータなどの有線通信装置に接続される有線通信インタフェースでもよいし、基地局やアクセスポイントなどの無線通信装置に接続される無線通信インタフェースでもよい。 The communication interface 107 is connected to the network 114 and communicates with other information processing devices via the network 114. The communication interface 107 may be a wired communication interface connected to a wired communication device such as a switch or a router, or may be a wireless communication interface connected to a wireless communication device such as a base station or an access point.
 次に、流体シミュレーションについて説明する。
 図3は、流体シミュレーションの格子点の配置例を示す図である。
 流体シミュレーションでは、シミュレーション対象の翼の形状を示す形状データ151が与えられる。形状データ151は、例えば、CAD(Computer Aided Design)ソフトウェアによって生成される。形状データ151は、例えば、翼の外周を示す曲線のデータを含む。翼の外側には流体である空気が存在することが想定されており、翼の外周を示す曲線は翼と流体との間の境界に相当する。第2の実施の形態では説明を簡単にするため、翼を横方向から見た二次元形状を想定する。
Next, the fluid simulation will be described.
FIG. 3 is a diagram showing an example of arrangement of grid points in a fluid simulation.
In the fluid simulation, shape data 151 showing the shape of the blade to be simulated is given. The shape data 151 is generated by, for example, CAD (Computer Aided Design) software. The shape data 151 includes, for example, data of a curve indicating the outer circumference of the blade. It is assumed that air, which is a fluid, exists on the outside of the wing, and the curve indicating the outer circumference of the wing corresponds to the boundary between the wing and the fluid. In the second embodiment, for the sake of simplicity, a two-dimensional shape of the wing as viewed from the lateral direction is assumed.
 形状データ151から、流体が存在する二次元領域に複数の格子点が配置される。これらの格子点は、非直交格子である構造格子によって形成される。構造格子の格子点の生成については、例えば、次の非特許文献に記載がある。中橋和博、「計算流体力学における格子生成」、情報処理、Vol. 30 No. 7、pp. 767~774、1989年7月。 From the shape data 151, a plurality of lattice points are arranged in the two-dimensional region where the fluid exists. These grid points are formed by a structured grid that is a non-orthogonal grid. The generation of grid points of a structured grid is described in, for example, the following non-patent document. Kazuhiro Nakahashi, "Lattice Generation in Computational Fluid Dynamics", Information Processing, Vol. 30 No. 7, pp. 767-774, July 1989.
 第2の実施の形態の構造格子は、境界の曲線に基づいて座標軸が定まる境界適合曲線座標系の構造格子であり、境界の曲線であるJ軸と境界から外に向かって伸びるL軸の2つの座標軸をもつ。J軸は、図3に示す翼の外周を右下、左下、左上、右上の順に辿る曲線である。翼の右下の格子点がJ座標=40をもち、翼の右上の格子点がJ座標=471をもつ。J軸上に432個のJ座標が等間隔に配置される。L軸は、J軸から外側に向かって伸びる曲線である。境界に最も近い格子点がL座標=1をもち、境界から最も離れた格子点がL座標=48をもつ。L軸上に48個のL座標が配置される。L座標の間隔は等間隔ではない。境界に近いほどL座標の間隔が小さくなり、境界から遠いほどL座標の間隔が大きくなる。L座標の間隔は、指数関数など所定の計算式によって決定される。 The structural grid of the second embodiment is a structural grid of a boundary-fitting curvilinear coordinate system in which the coordinate axes are determined based on the boundary curve, and is a boundary curve J-axis and an L-axis extending outward from the boundary. It has two coordinate axes. The J-axis is a curve that follows the outer circumference of the wing shown in FIG. 3 in the order of lower right, lower left, upper left, and upper right. The lower right grid point of the wing has J coordinate = 40, and the upper right grid point of the wing has J coordinate = 471. 432 J coordinates are arranged at equal intervals on the J axis. The L-axis is a curve extending outward from the J-axis. The grid point closest to the boundary has L coordinate = 1, and the grid point farthest from the boundary has L coordinate = 48. Forty-eight L coordinates are arranged on the L axis. The intervals of the L coordinates are not equal. The closer to the boundary, the smaller the L-coordinate interval, and the farther from the boundary, the larger the L-coordinate interval. The L coordinate interval is determined by a predetermined calculation formula such as an exponential function.
 曲線152-1は、L座標=1の曲線である。曲線152-2は、L座標=2の曲線である。曲線152-3は、L座標=3の曲線である。曲線152-4は、L座標=4の曲線である。曲線152-5は、L座標=5の曲線である。曲線152-6は、L座標=6の曲線である。曲線152-1~152-6は、例えば、境界と平行である。曲線152-1~152-6のうち隣接する2つの曲線の間隔は、境界から遠いほど大きくなる。 Curve 152-1 is a curve with L coordinate = 1. Curve 152-2 is a curve with L coordinate = 2. Curve 152-3 is a curve with L coordinate = 3. Curve 152-4 is a curve with L coordinate = 4. The curve 152-5 is a curve with L coordinate = 5. The curve 152-6 is a curve with L coordinate = 6. Curves 152-1 to 152-6 are, for example, parallel to the boundary. The distance between two adjacent curves 152-1 to 152-6 increases as the distance from the boundary increases.
 曲線153-1は、J座標=40の曲線である。曲線153-2は、J座標=41の曲線である。曲線153-3は、J座標=42の曲線である。曲線153-4は、J座標=43の曲線である。曲線153-5は、J座標=44の曲線である。曲線153-1~153-5は、例えば、曲線152-1~152-6と直角に交差するように生成される。 Curve 153-1 is a curve with J coordinate = 40. The curve 153-2 is a curve with J coordinate = 41. The curve 153-3 is a curve with J coordinate = 42. The curve 153-4 is a curve with J coordinate = 43. The curve 153-5 is a curve with J coordinate = 44. Curves 153-1 to 153-5 are generated, for example, to intersect curves 152-1 to 152-6 at right angles.
 整数のL座標に相当する曲線と整数のJ座標に相当する曲線との間の交点が、格子点として採用される。よって、図3に示した範囲では、曲線152-1~152-6と曲線153-1~153-5との間の30個の交点が格子点として採用される。このように、流体シミュレーションに用いる格子点は、等間隔の直交格子の格子点ではないものの、L軸およびJ軸によって一定の秩序が与えられた構造格子の格子点である。ある格子点に対して、L座標が同じ高々2個の格子点とJ座標が同じ高々2個の格子点とが隣接する。 The intersection between the curve corresponding to the L coordinate of the integer and the curve corresponding to the J coordinate of the integer is adopted as the grid point. Therefore, in the range shown in FIG. 3, 30 intersections between the curves 152-1 to 152-6 and the curves 153-1 to 153-5 are adopted as the grid points. As described above, the lattice points used in the fluid simulation are not the lattice points of the orthogonal lattices at equal intervals, but are the lattice points of the structured lattice given a certain order by the L-axis and the J-axis. With respect to a certain grid point, at most two grid points having the same L coordinate and at most two grid points having the same J coordinate are adjacent to each other.
 流体シミュレーションに用いる格子点は、L座標とJ座標に基づいて行列154で表現することが可能である。行列154は、48行432列の行列である。行列154の行がL座標に対応し、行列154の列がJ座標に対応する。例えば、行列154の要素(1,1)は、L座標=1,J座標=40の格子点、すなわち、曲線152-1と曲線153-1の交点に対応する。行列154の要素(6,5)は、L座標=6,J座標=44の格子点、すなわち、曲線152-6と曲線153-5の交点に対応する。なお、後述する近似モデルのため、翼の形状に関係なくL座標の個数とJ座標の個数は一定とする。 The grid points used in the fluid simulation can be represented by a matrix 154 based on the L and J coordinates. The matrix 154 is a matrix of 48 rows and 432 columns. The rows of the matrix 154 correspond to the L coordinates, and the columns of the matrix 154 correspond to the J coordinates. For example, the elements (1,1) of the matrix 154 correspond to the grid points of L coordinate = 1, J coordinate = 40, that is, the intersections of the curve 152-1 and the curve 153-1. The elements (6, 5) of the matrix 154 correspond to the grid points of L coordinate = 6, J coordinate = 44, that is, the intersections of the curves 152-6 and the curves 153-5. Since it is an approximate model described later, the number of L coordinates and the number of J coordinates are constant regardless of the shape of the wing.
 形状データ151から格子点を生成すると、情報処理装置100は、流体シミュレーションにより各格子点における流体速度を示す速度ベクトルを算出する。速度ベクトルは、X成分とY成分を含む二次元ベクトルである。X軸は、図3の形状データ151の右方向であり、Y軸は、図3の形状データ151の上方向である。 When the grid points are generated from the shape data 151, the information processing apparatus 100 calculates a velocity vector indicating the fluid velocity at each grid point by fluid simulation. The velocity vector is a two-dimensional vector including an X component and a Y component. The X-axis is in the right direction of the shape data 151 in FIG. 3, and the Y-axis is in the upward direction of the shape data 151 in FIG.
 流体シミュレーションでは、情報処理装置100は、各格子点に対して速度ベクトルを示す変数を割り当てる。情報処理装置100は、流体の挙動を記述した二階非線形微分方程式であるナビエ・ストークス方程式を離散化して、変数の間の関係を示す連立方程式を生成する。情報処理装置100は、連立方程式を表す係数行列と解ベクトルと右辺ベクトルとを生成し、反復法により連立方程式の解を求める。反復法では、解ベクトルに仮の値を代入し、代入した値のもとで右辺ベクトルの誤差を算出し、誤差が小さくなるように解ベクトルの値を変化させることを、誤差が収束するまで繰り返す。 In the fluid simulation, the information processing device 100 assigns a variable indicating a velocity vector to each grid point. The information processing device 100 disperses the Navier-Stokes equations, which are second-order nonlinear differential equations that describe the behavior of a fluid, and generates simultaneous equations that show the relationships between variables. The information processing apparatus 100 generates a coefficient matrix representing simultaneous equations, a solution vector, and a right-hand side vector, and obtains a solution of simultaneous equations by an iterative method. In the iterative method, a temporary value is assigned to the solution vector, the error of the right-hand side vector is calculated based on the assigned value, and the value of the solution vector is changed so that the error becomes small until the error converges. repeat.
 図4は、流体速度のシミュレーション例を示す図である。
 グラフ171は、流体シミュレーションによって算出された境界付近の速度ベクトルを可視化したグラフである。グラフ171では、速度ベクトルが矢線によって表現されている。図4に示すグラフ171の矢線は、左下から右上に向かっている。よって、これらの速度ベクトルは、正のX成分と正のY成分を含んでいる。格子点は、矢線の左端に存在する。格子点における速度ベクトルが、矢線の向きと長さで表現される。
FIG. 4 is a diagram showing a simulation example of the fluid velocity.
Graph 171 is a graph that visualizes the velocity vector near the boundary calculated by the fluid simulation. In graph 171 the velocity vector is represented by arrows. The arrow line of graph 171 shown in FIG. 4 is from the lower left to the upper right. Therefore, these velocity vectors include a positive X component and a positive Y component. The grid points are at the left end of the arrow. The velocity vector at the grid points is represented by the direction and length of the arrow.
 グラフ171に示すように、境界に近いほど速度ベクトルの勾配、すなわち、位置を微少量だけ変化させたときの速度ベクトルの変化量が大きく、境界から遠いほど速度ベクトルの勾配が小さい。境界付近に格子点を高密度に配置することで、境界付近の速度ベクトルの分布を精度よく表現することが可能となる。 As shown in Graph 171, the closer to the boundary, the larger the gradient of the velocity vector, that is, the greater the amount of change in the velocity vector when the position is changed by a small amount, and the farther from the boundary, the smaller the gradient of the velocity vector. By arranging the grid points at high density near the boundary, it is possible to accurately express the distribution of the velocity vector near the boundary.
 次に、近似モデルについて説明する。
 翼の設計においては、様々な形状の候補の中から好ましい形状を絞り込むことになる。一方、反復法による流体シミュレーションは計算量が大きく計算時間が長くなる。このため、多数の形状の候補に対して前述の流体シミュレーションを実行することは現実的でない。そこで、情報処理装置100は、幾つかの翼の形状について流体シミュレーションを試行し、シミュレーション結果を訓練データとして用いて、翼の形状から速度ベクトルを予測する近似モデルを機械学習によって生成する。近似モデルを利用することで、反復法による流体シミュレーションを行わずに、様々な形状に対する速度ベクトルの近似値を高速に算出することができ、シミュレーション結果を予測できる。
Next, an approximate model will be described.
In the design of the wing, a preferable shape is narrowed down from various shape candidates. On the other hand, the fluid simulation by the iterative method requires a large amount of calculation and a long calculation time. Therefore, it is not realistic to perform the above-mentioned fluid simulation for a large number of shape candidates. Therefore, the information processing apparatus 100 tries fluid simulation for some blade shapes, uses the simulation results as training data, and generates an approximate model for predicting the velocity vector from the blade shapes by machine learning. By using the approximate model, it is possible to calculate the approximate value of the velocity vector for various shapes at high speed without performing the fluid simulation by the iterative method, and the simulation result can be predicted.
 図5は、近似モデルの構造例を示す図である。
 近似モデル160は、多層畳み込みニューラルネットワーク(DCNN:Deep Convolutional Neural Network)である。近似モデル160は、エンコーダ161およびデコーダ162を含む。エンコーダ161は、畳み込み演算を行う複数の畳み込み層を含み、入力テンソル163を、入力テンソル163よりもサイズの小さい特徴データに変換する。デコーダ162は、逆畳み込み演算を行う複数の畳み込み層を含み、特徴データを、特徴データよりもサイズの大きい出力テンソル164に変換する。
FIG. 5 is a diagram showing a structural example of an approximate model.
The approximate model 160 is a multi-layer convolutional neural network (DCNN). The approximation model 160 includes an encoder 161 and a decoder 162. The encoder 161 includes a plurality of convolution layers that perform a convolution operation, and converts the input tensor 163 into feature data having a size smaller than that of the input tensor 163. The decoder 162 includes a plurality of convolution layers that perform deconvolution operations, and converts the feature data into an output tensor 164 having a size larger than that of the feature data.
 入力テンソル163は、高さ48×幅432×1チャネルのテンソルである。入力テンソル163は、二次元配列(二階のテンソル)に相当し、48行×432列である行列154の1セットに相当する。出力テンソル164は、高さ48×幅432×2チャネルのテンソルである。出力テンソル164は、三次元配列(三階のテンソル)に相当し、48行×432列である行列154の2セットに相当する。出力テンソル164の高さおよび幅は、入力テンソル163と同じである。 The input tensor 163 is a tensor having a height of 48 × a width of 432 × 1 channel. The input tensor 163 corresponds to a two-dimensional array (second-order tensor) and corresponds to one set of a matrix 154 having 48 rows × 432 columns. The output tensor 164 is a tensor having a height of 48 × a width of 432 × 2 channels. The output tensor 164 corresponds to a three-dimensional array (third-order tensor), and corresponds to two sets of a matrix 154 having 48 rows × 432 columns. The height and width of the output tensor 164 are the same as those of the input tensor 163.
 近似モデル160に入力される入力テンソル163は、翼の形状を示す入力データである。第2の実施の形態では、翼の形状を表す指標として、符号付き距離関数によって定義されるSDF値を用いる。SDF値は、各格子点に対して算出される。SDF値は、境界から格子点までの距離、すなわち、格子点に最も近い境界上の点と当該格子点との間の距離を示す。符号付き距離関数の生成については、例えば、次の非特許文献に記載がある。沖田浩平、小野謙二、「符号付き距離関数による形状表現を用いた流体ソルバーの精度」、理研シンポジウム2008 VCADシステム研究(第3回)、2008年11月。SDF値は、境界の外側では正となり、境界の内側では負となる。流体は境界の外側に存在するため、第2の実施の形態では正のSDF値を扱う。 The input tensor 163 input to the approximate model 160 is input data indicating the shape of the wing. In the second embodiment, the SDF value defined by the signed distance function is used as an index representing the shape of the wing. The SDF value is calculated for each grid point. The SDF value indicates the distance from the boundary to the grid point, that is, the distance between the point on the boundary closest to the grid point and the grid point. The generation of the signed distance function is described, for example, in the following non-patent document. Kohei Okita, Kenji Ono, "Accuracy of Fluid Solver Using Shape Representation by Signed Distance Function", RIKEN Symposium 2008 VCAD System Research (3rd), November 2008. The SDF value is positive outside the boundary and negative inside the boundary. Since the fluid is outside the boundary, the second embodiment deals with a positive SDF value.
 入力テンソル163は、複数の格子点のSDF値を、それら格子点の座標に基づいて並べ替えたものである。入力テンソル163において、近い格子点のSDF値は近くに配置され、離れた格子点のSDF値は離れて配置される。入力テンソル163の高さ方向はL軸に対応し、入力テンソル163の幅方向はJ軸に対応する。例えば、入力テンソル163の要素(1,1)は、L座標=1,J座標=40の格子点のSDF値である。入力テンソル163の要素(6,5)は、L座標=6,J座標=44の格子点のSDF値である。 The input tensor 163 is a rearrangement of SDF values of a plurality of grid points based on the coordinates of those grid points. In the input tensor 163, the SDF values of the near grid points are placed close together and the SDF values of the distant grid points are placed apart. The height direction of the input tensor 163 corresponds to the L axis, and the width direction of the input tensor 163 corresponds to the J axis. For example, the element (1,1) of the input tensor 163 is the SDF value of the grid point of L coordinate = 1, J coordinate = 40. The elements (6, 5) of the input tensor 163 are the SDF values of the grid points of the L coordinate = 6, J coordinate = 44.
 近似モデル160から出力される出力テンソル164は、流体の速度ベクトルの分布を示す出力データである。出力テンソル164の第1チャネルは、速度ベクトルのX成分を表し、出力テンソル164の第2チャネルは、速度ベクトルのY成分を表す。出力テンソル164は、複数の格子点の速度ベクトルを、それら格子点の座標に基づいて並べ替えたものである。出力テンソル164において、近い格子点の速度ベクトルは近くに配置され、離れた格子点の速度ベクトルは離れて配置される。出力テンソル164の高さ方向はL軸に対応し、出力テンソル164の幅方向はJ軸に対応する。 The output tensor 164 output from the approximate model 160 is output data showing the distribution of the velocity vector of the fluid. The first channel of the output tensor 164 represents the X component of the velocity vector, and the second channel of the output tensor 164 represents the Y component of the velocity vector. The output tensor 164 is a rearrangement of velocity vectors of a plurality of grid points based on the coordinates of those grid points. In the output tensor 164, the velocity vectors of the near grid points are placed close together and the velocity vectors of the distant grid points are placed apart. The height direction of the output tensor 164 corresponds to the L axis, and the width direction of the output tensor 164 corresponds to the J axis.
 例えば、出力テンソル164の要素(1,1,1)は、L座標=1,J座標=40の格子点の速度ベクトルのX成分である。出力テンソル164の要素(1,1,2)は、当該格子点の速度ベクトルのY成分である。出力テンソル164の要素(6,5,1)は、L座標=6,J座標=44の格子点の速度ベクトルのX成分である。出力テンソル164の要素(6,5,2)は、当該格子点の速度ベクトルのY成分である。 For example, the element (1,1,1) of the output tensor 164 is the X component of the velocity vector of the lattice point of the L coordinate = 1, J coordinate = 40. The elements (1, 1, 2) of the output tensor 164 are the Y components of the velocity vector of the grid point. The elements (6, 5, 1) of the output tensor 164 are the X component of the velocity vector of the lattice point of the L coordinate = 6, J coordinate = 44. The elements (6, 5, 2) of the output tensor 164 are the Y components of the velocity vector of the grid point.
 機械学習によって近似モデル160を生成するにあたり、情報処理装置100は、入力テンソル163に相当する説明変数と出力テンソル164に相当する目的変数とを対応付けた訓練データを用意する。翼の1つの形状に対して流体シミュレーションを実行することで、一組の入力テンソルと出力テンソルが生成される。情報処理装置100は、例えば、流体シミュレーションを複数回(例えば、2000回)実行して、複数組の入力テンソルと出力テンソルを含む訓練データを生成する。このとき、情報処理装置100は、ユーザが作成した1つの形状に歪みを与えることで、他の形状を自動的に生成する。 In generating the approximate model 160 by machine learning, the information processing apparatus 100 prepares training data in which an explanatory variable corresponding to the input tensor 163 and an objective variable corresponding to the output tensor 164 are associated with each other. Performing a fluid simulation on one shape of the wing produces a set of input and output tensors. The information processing apparatus 100 executes, for example, a fluid simulation a plurality of times (for example, 2000 times) to generate training data including a plurality of sets of input tensors and output tensors. At this time, the information processing apparatus 100 automatically generates another shape by giving distortion to one shape created by the user.
 図6は、畳み込み演算の例を示す図である。
 近似モデル160のエンコーダ161に含まれる各畳み込み層では、積和演算である畳み込み演算が行われる。テンソル165は、畳み込み層に入力されるテンソルである。カーネル166は、入力されたテンソル165に対して適用されるフィルタである。カーネル166は、畳み込み層毎に用意される。特徴マップ167は、畳み込み層から出力されるテンソルであり、テンソル165とカーネル166との間の畳み込み演算の結果である。通常、カーネル166の辺はテンソル165の辺よりも短い。特徴マップ167の辺は、テンソル165の辺と同じ長さかテンソル165の辺よりも短い。
FIG. 6 is a diagram showing an example of a convolution operation.
At each convolution layer included in the encoder 161 of the approximate model 160, a convolution operation, which is a multiply-accumulate operation, is performed. The tensor 165 is a tensor input to the convolution layer. Kernel 166 is a filter applied to the input tensor 165. Kernel 166 is prepared for each convolution layer. The feature map 167 is a tensor output from the convolution layer and is the result of a convolution operation between the tensor 165 and the kernel 166. Normally, the sides of the kernel 166 are shorter than the sides of the tensor 165. The sides of the feature map 167 are the same length as the sides of the tensor 165 or shorter than the sides of the tensor 165.
 畳み込み演算では、まずテンソル165の左上にカーネル166が重ね合わせられる。重なり合っているテンソル165の要素とカーネル166の要素との間で乗算が行われ、それら積の合計が特徴マップ167の左上の要素となる。その後、所定のストライドだけテンソル165上でカーネル166をシフトさせて積和演算を行うことが繰り返される。この畳み込み演算は、ニューラルネットワークとして表現することができる。 In the convolution operation, the kernel 166 is first superimposed on the upper left of the tensor 165. Multiplication is performed between the overlapping elements of the tensor 165 and the elements of the kernel 166, and the sum of these products is the upper left element of the feature map 167. After that, the product-sum operation is repeated by shifting the kernel 166 on the tensor 165 by a predetermined stride. This convolution operation can be expressed as a neural network.
 例えば、カーネル166のサイズが3×3であり、ストライドが2であるとする。まず、カーネル166の中心をテンソル165の要素a22に合わせる。すると、9組の要素の積の合計であるa11*k11+a12*k12+a13*k13+a21*k21+a22*k22+a23*k23+a31*k31+a32*k32+a33*k33が算出される。この合計値が特徴マップ167の要素b11となる。 For example, assume that the kernel 166 has a size of 3x3 and a stride of 2. First, the center of the kernel 166 is aligned with the element a22 of the tensor 165. Then, a11 * k11 + a12 * k12 + a13 * k13 + a21 * k21 + a22 * k22 + a23 * k23 + a31 * k31 + a32 * k32 + a33 * k33, which is the sum of the products of the nine sets of elements, is calculated. This total value becomes element b11 of the feature map 167.
 次に、カーネル166を右方向に2だけシフトし、カーネル166の中心をテンソル165の要素a24に合わせることで、特徴マップ167の要素b12が算出される。同様にして、カーネル166の中心をテンソル165の要素a42に合わせることで、特徴マップ167の要素b21が算出され、カーネル166の中心をテンソル165の要素a44に合わせることで、特徴マップ167の要素b22が算出される。要素b22は、a33*k11+a34*k12+a35*k13+a43*k21+a44*k22+a45*k23+a53*k31+a54*k32+a55*k33と算出される。 Next, by shifting the kernel 166 to the right by 2 and aligning the center of the kernel 166 with the element a24 of the tensor 165, the element b12 of the feature map 167 is calculated. Similarly, by aligning the center of the kernel 166 with the element a42 of the tensor 165, the element b21 of the feature map 167 is calculated, and by aligning the center of the kernel 166 with the element a44 of the tensor 165, the element b22 of the feature map 167 is calculated. Is calculated. The element b22 is calculated as a33 * k11 + a34 * k12 + a35 * k13 + a43 * k21 + a44 * k22 + a45 * k23 + a53 * k31 + a54 * k32 + a55 * k33.
 ストライドが1の場合、特徴マップ167の高さおよび幅はテンソル165と同じになる。ストライドが2の場合、特徴マップ167の高さおよび幅はテンソル165の1/2になる。ストライドが3の場合、特徴マップ167の高さおよび幅はテンソル165の1/3になる。このように、特徴マップ167のサイズはストライドに依存する。なお、カーネル166のチャネル数を2以上とすることで、特徴マップ167のチャネル数をテンソル165のチャネル数よりも増やすことができる。 When the stride is 1, the height and width of the feature map 167 will be the same as the tensor 165. When the stride is 2, the height and width of the feature map 167 is 1/2 that of the tensor 165. When the stride is 3, the height and width of the feature map 167 is 1/3 of the tensor 165. Thus, the size of the feature map 167 depends on the stride. By setting the number of channels of the kernel 166 to 2 or more, the number of channels of the feature map 167 can be increased more than the number of channels of the tensor 165.
 カーネル166の要素は、ニューラルネットワークに含まれるエッジの重みに相当し、機械学習の中で値が調整されるパラメータである。これに対して、カーネル166のサイズやストライドは、機械学習の中で値が不変なハイパーパラメータである。カーネル166のサイズおよびストライドは、格子点のL座標の個数およびJ座標の個数に基づいて、出力テンソル164の高さおよび幅が入力テンソル163の高さおよび幅と一致するように予め調整される。情報処理装置100が、L座標の個数およびJ座標の個数に基づいて、各畳み込み層のカーネルサイズおよびストライドを自動的に決定してもよい。また、既存のテンソルの周囲に所定値の要素を追加して高さおよび幅を拡張するパディングによっても、出力テンソル164の高さおよび幅を調整することができる。 The element of kernel 166 corresponds to the weight of the edge included in the neural network, and is a parameter whose value is adjusted in machine learning. On the other hand, the size and stride of kernel 166 are hyperparameters whose values do not change in machine learning. The size and stride of kernel 166 are pre-adjusted so that the height and width of the output tensor 164 match the height and width of the input tensor 163, based on the number of L and J coordinates of the grid points. .. The information processing apparatus 100 may automatically determine the kernel size and stride of each convolution layer based on the number of L coordinates and the number of J coordinates. The height and width of the output tensor 164 can also be adjusted by padding to extend the height and width by adding elements of predetermined value around the existing tensor.
 近似モデル160のデコーダ162に含まれる各畳み込み層では、積和演算である逆畳み込み演算(Deconvolution)が行われる。逆畳み込み演算を、転置畳み込み演算(Transposed Convolution)と言うこともある。逆畳み込み演算は、上記の畳み込み演算の逆の操作に相当する。逆畳み込み演算では、入力のテンソルに含まれる1つの要素に対して、カーネルに含まれる複数の要素との間で乗算が行われ、カーネルと同じサイズの乗算結果が得られる。この乗算が入力のテンソルに含まれる全ての要素に対して行われる。この乗算結果をストライドだけずらし、重なる部分を合計して出力のテンソルが得られる。 In each convolution layer included in the decoder 162 of the approximate model 160, a deconvolution operation, which is a multiply-accumulate operation, is performed. The deconvolution operation is sometimes called a transposed convolution operation. The deconvolution operation corresponds to the reverse operation of the above convolution operation. In the deconvolution operation, one element included in the input tensor is multiplied by a plurality of elements included in the kernel, and a multiplication result having the same size as the kernel is obtained. This multiplication is performed on all the elements contained in the input tensor. The result of this multiplication is shifted by the stride, and the overlapping parts are summed to obtain the output tensor.
 ストライドが1の場合、出力のテンソルの高さおよび幅は入力のテンソルと同じになる。ストライドが2の場合、出力のテンソルの高さおよび幅は入力のテンソルの2倍になる。ストライドが3の場合、出力のテンソルの高さおよび幅は入力のテンソルの3倍になる。このように、逆畳み込み演算でも出力のテンソルのサイズはストライドに依存する。 When the stride is 1, the height and width of the output tensor will be the same as the input tensor. With a stride of 2, the height and width of the output tensor is twice that of the input tensor. With a stride of 3, the height and width of the output tensor is three times that of the input tensor. Thus, even in the deconvolution operation, the size of the output tensor depends on the stride.
 なお、一般的な畳み込みニューラルネットワークは、畳み込み層に加えてプーリング層や全結合層を含むことがある。これに対して、近似モデル160は、畳み込み層を含む一方、プーリング層や全結合層を含まない。近似モデル160が、畳み込み層のみを含むようにしてもよい。近似モデル160がプーリング層を含まないのは、畳み込み層のカーネルサイズやストライドを調整することで、実質的にプーリング層と同等の演算を実現できるためである。近似モデル160が全結合層を含まないのは、入力テンソル163や出力テンソル164が格子点の間の隣接関係の情報を実質的にもっているところ、全結合層ではこの隣接関係の情報が失われてしまうおそれがあるからである。また、畳み込み層のみで実装することで、近似モデル160の構造を簡潔にすることができる。 A general convolutional neural network may include a pooling layer and a fully connected layer in addition to the convolutional layer. On the other hand, the approximate model 160 includes a convolution layer, but does not include a pooling layer or a fully connected layer. The fitted model 160 may include only the convolution layer. The approximate model 160 does not include the pooling layer because the operation equivalent to that of the pooling layer can be realized by adjusting the kernel size and stride of the convolution layer. The approximate model 160 does not include the fully connected layer because the input tensor 163 and the output tensor 164 have substantially the information on the adjacency between the grid points, but the information on the adjacency is lost in the fully connected layer. This is because there is a risk that it will end up. Further, by mounting only the convolution layer, the structure of the approximate model 160 can be simplified.
 ここで、流体シミュレーションで用いた非直交格子の格子点を、L座標およびJ座標に応じて並べ替えて、近似モデルの入出力を定義することの意義について説明する。
 近似モデルの入出力を定義する他の方法として、流体シミュレーションで用いた非直交格子の格子点とは別に、等間隔の直交格子の格子点を形状データから生成し、直交格子の格子点を入力テンソルおよび出力テンソルの要素に対応付ける方法が考えられる。この場合、入力テンソルの要素は、直交格子の格子点におけるSDF値になり、出力テンソルの要素は、直交格子の格子点における速度ベクトルになる。直交格子の格子点を採用することで、第2の実施の形態の方法と異なり、入力テンソルおよび出力テンソルの要素の位置が、翼を含む空間における位置と直接的に対応することになる。
Here, the significance of defining the input / output of the approximate model by rearranging the lattice points of the non-orthogonal lattice used in the fluid simulation according to the L coordinate and the J coordinate will be described.
As another method of defining the input / output of the approximate model, separately from the grid points of the non-orthogonal grid used in the fluid simulation, the grid points of the orthogonal grid at equal intervals are generated from the shape data, and the grid points of the orthogonal grid are input. A method of associating the elements of the tensor and the output tensor can be considered. In this case, the element of the input tensor becomes the SDF value at the lattice point of the orthogonal lattice, and the element of the output tensor becomes the velocity vector at the lattice point of the orthogonal lattice. By adopting the grid points of the orthogonal grid, unlike the method of the second embodiment, the positions of the elements of the input tensor and the output tensor directly correspond to the positions in the space including the blade.
 しかし、近似モデルが直交格子の格子点を採用した場合、シミュレーション結果が示す格子点と近似モデルの出力が示す格子点との間にずれが生じる。このため、シミュレーション結果から訓練データを生成するにあたり、非直交格子の格子点の速度ベクトルから直交格子の格子点の速度ベクトルを推定する補間処理を行うことになる。また、近似モデルによって予測したシミュレーション結果を利用するにあたり、直交格子の格子点の速度ベクトルから非直交格子の格子点の速度ベクトルを推定する補間処理を行うことになる。 However, when the approximate model adopts the grid points of the orthogonal grid, there is a gap between the grid points shown by the simulation result and the grid points shown by the output of the approximate model. Therefore, when generating training data from the simulation results, interpolation processing is performed to estimate the velocity vector of the lattice points of the orthogonal lattice from the velocity vector of the lattice points of the non-orthogonal lattice. Further, in using the simulation result predicted by the approximate model, an interpolation process is performed to estimate the velocity vector of the lattice points of the non-orthogonal lattice from the velocity vector of the lattice points of the orthogonal lattice.
 補間処理には、例えば、バイリニア補間法や線形補間法が用いられる。バイリニア補間法では、着目する位置の周辺にある4つの格子点を検出し、着目する位置と4つの格子点との距離に応じて、これら4つの格子点の速度ベクトルの加重平均を算出して、着目する位置における速度ベクトルを推定する。 For the interpolation process, for example, a bilinear interpolation method or a linear interpolation method is used. In the bilinear interpolation method, four lattice points around the position of interest are detected, and the weighted average of the velocity vectors of these four lattice points is calculated according to the distance between the position of interest and the four lattice points. , Estimate the velocity vector at the position of interest.
 訓練データの生成の際にこの補間処理が行われると、訓練データにサンプリング誤差が発生し、サンプリング誤差によって近似モデルの予測精度が低下することがある。特に、境界付近は速度ベクトルの勾配が大きいため、補間処理によるサンプリング誤差が大きくなり、境界付近では近似モデルの予測精度が大きく低下することがある。また、直交格子の格子点を採用しつつ近似モデルの予測精度を上げるには、格子間隔を小さくすることになる。しかし、格子間隔を小さくすると、入力テンソルおよび出力テンソルの高さおよび幅が大きくなり、近似モデルに含まれるノードが増加する。このため、近似モデルを生成する機械学習の実行時間が長くなると共に、用意すべき訓練データも多くなってしまう。 If this interpolation process is performed when the training data is generated, a sampling error may occur in the training data, and the prediction accuracy of the approximate model may decrease due to the sampling error. In particular, since the gradient of the velocity vector is large near the boundary, the sampling error due to the interpolation processing becomes large, and the prediction accuracy of the approximate model may be significantly lowered near the boundary. Further, in order to improve the prediction accuracy of the approximate model while adopting the grid points of the orthogonal grid, the grid spacing must be reduced. However, reducing the grid spacing increases the height and width of the input and output tensors, increasing the number of nodes included in the fitted model. For this reason, the execution time of machine learning for generating an approximate model becomes long, and the amount of training data to be prepared also increases.
 これに対して、第2の実施の形態の方法によれば、補間処理によるサンプリング誤差を回避して、近似モデルの予測精度を向上させることができる。また、非直交格子の格子点の間の隣接関係を維持することで、近似モデルの予測精度が向上しやすくなる。以下では、近似モデルの入出力に直交格子の格子点を用いた場合の予測精度と、近似モデルの入出力に流体シミュレーションの格子点を用いた場合の予測精度の例を説明する。 On the other hand, according to the method of the second embodiment, it is possible to avoid the sampling error due to the interpolation processing and improve the prediction accuracy of the approximate model. In addition, maintaining the adjacency between the grid points of the non-orthogonal grid makes it easier to improve the prediction accuracy of the approximate model. In the following, an example of the prediction accuracy when the grid points of the orthogonal grid are used for the input / output of the approximate model and the prediction accuracy when the grid points of the fluid simulation are used for the input / output of the approximate model will be described.
 図7は、他の近似モデルによる流体速度の予測例を示す図である。
 グラフ172は、入出力に直交格子の格子点を用いる近似モデルによって予測された、境界付近の速度ベクトルを可視化したグラフである。グラフ172は、グラフ171と同じ翼形状についての速度ベクトルの分布を示している。ここではグラフ171と比較するため、近似モデルが出力する直交格子の格子点における速度ベクトルから、バイリニア補間法により、非直交格子の格子点における速度ベクトルを推定している。グラフ171とグラフ172を比較すると、グラフ172では、位置による速度ベクトルの違いが適切に表現されていない。よって、境界付近の速度ベクトルの予測精度が低くなっている。
FIG. 7 is a diagram showing an example of prediction of fluid velocity by another approximate model.
Graph 172 is a graph that visualizes the velocity vector near the boundary predicted by an approximate model using lattice points of an orthogonal lattice for input and output. Graph 172 shows the distribution of velocity vectors for the same blade shape as Graph 171. Here, in order to compare with Graph 171, the velocity vector at the lattice point of the non-orthogonal lattice is estimated from the velocity vector at the lattice point of the orthogonal lattice output by the approximate model by the bilinear interpolation method. Comparing the graph 171 and the graph 172, the difference in the velocity vector depending on the position is not properly expressed in the graph 172. Therefore, the prediction accuracy of the velocity vector near the boundary is low.
 図8は、近似モデルによる流体速度の予測例を示す図である。
 グラフ173は、入出力に非直交格子の格子点を用いる近似モデルによって予測された、境界付近の速度ベクトルを可視化したグラフである。グラフ173は、グラフ171,172と同じ翼形状についての速度ベクトルの分布を示している。近似モデルが流体シミュレーション用の格子点の速度ベクトルを直接算出するため、近似モデルの出力に対して補間処理は行われていない。グラフ171とグラフ173を比較すると、グラフ173では、位置による速度ベクトルの違いが適切に表現されている。よって、グラフ172で使用した近似モデルと比べて、境界付近の速度ベクトルの予測精度が高いと言える。
FIG. 8 is a diagram showing an example of prediction of fluid velocity by an approximate model.
Graph 173 is a graph that visualizes the velocity vector near the boundary predicted by an approximate model using grid points of a non-orthogonal lattice for input and output. Graph 173 shows the distribution of velocity vectors for the same blade shape as graphs 171 and 172. Since the approximate model directly calculates the velocity vector of the grid points for fluid simulation, the output of the approximate model is not interpolated. Comparing Graph 171 and Graph 173, Graph 173 appropriately expresses the difference in velocity vector depending on the position. Therefore, it can be said that the prediction accuracy of the velocity vector near the boundary is higher than that of the approximate model used in Graph 172.
 なお、グラフ172の近似モデルが採用する直交格子は、X座標256個とY座標256個を含み、65536個の格子点をもつ。この直交格子の間隔は、境界付近の流体シミュレーション上の格子間隔よりも大きい。すなわち、境界付近では、流体シミュレーションの非直交格子よりも近似モデルの直交格子の方が、格子点が粗くなっている。一方、第2の実施の形態の近似モデルが採用する非直交格子は、L座標48個とJ座標432個を含み、20736個の格子点をもつ。よって、第2の実施の形態の方法の方が、近似モデルの規模が小さくなり、かつ、予測精度が高くなる。 The orthogonal lattice adopted by the approximate model of Graph 172 includes 256 X-coordinates and 256 Y-coordinates, and has 65536 lattice points. The spacing between the orthogonal grids is larger than the grid spacing on the fluid simulation near the boundary. That is, in the vicinity of the boundary, the lattice points of the orthogonal lattice of the approximate model are coarser than those of the non-orthogonal lattice of the fluid simulation. On the other hand, the non-orthogonal lattice adopted by the approximate model of the second embodiment includes 48 L coordinates and 432 J coordinates, and has 20736 lattice points. Therefore, in the method of the second embodiment, the scale of the approximate model is smaller and the prediction accuracy is higher.
 次に、情報処理装置100の機能について説明する。
 図9は、情報処理装置の機能例を示すブロック図である。
 情報処理装置100は、形状データ記憶部121、格子パラメータ記憶部122、格子点データ記憶部123、距離データ記憶部124、流体データ記憶部125、訓練データ記憶部126および近似モデル記憶部127を有する。これらの記憶部は、例えば、RAM102またはHDD103の記憶領域を用いて実現される。また、情報処理装置100は、格子生成部131、距離算出部132、シミュレーション実行部133、テンソル変換部134、学習部135および予測部136を有する。これらの処理部は、例えば、CPU101が実行するプログラムを用いて実現される。
Next, the function of the information processing apparatus 100 will be described.
FIG. 9 is a block diagram showing a functional example of the information processing device.
The information processing device 100 includes a shape data storage unit 121, a grid parameter storage unit 122, a grid point data storage unit 123, a distance data storage unit 124, a fluid data storage unit 125, a training data storage unit 126, and an approximate model storage unit 127. .. These storage units are realized by using, for example, the storage area of the RAM 102 or the HDD 103. Further, the information processing apparatus 100 includes a grid generation unit 131, a distance calculation unit 132, a simulation execution unit 133, a tensor conversion unit 134, a learning unit 135, and a prediction unit 136. These processing units are realized, for example, by using a program executed by the CPU 101.
 形状データ記憶部121は、CADソフトウェアを用いてユーザが作成した形状データを記憶する。形状データは、翼の外周を含む翼の形状を表している。形状データ記憶部121は、少なくとも1つの形状についての形状データを記憶していればよい。 The shape data storage unit 121 stores shape data created by the user using CAD software. The shape data represents the shape of the blade including the outer circumference of the blade. The shape data storage unit 121 may store shape data for at least one shape.
 格子パラメータ記憶部122は、格子点を自動的に生成するためのパラメータを記憶する。パラメータは、L座標の個数とJ座標の個数を含む。様々な形状に対して、このパラメータが共通に適用される。よって、L座標の個数およびJ座標の個数は共通である。格子点データ記憶部123は、形状データから自動的に生成された流体シミュレーション用の格子点を示す格子点データを記憶する。この格子点は、間隔が均等でなく直交格子でない構造格子の格子点である。格子点データは、翼の形状毎に生成される。 The grid parameter storage unit 122 stores parameters for automatically generating grid points. The parameters include the number of L coordinates and the number of J coordinates. This parameter is commonly applied to various shapes. Therefore, the number of L coordinates and the number of J coordinates are common. The grid point data storage unit 123 stores grid point data indicating grid points for fluid simulation automatically generated from the shape data. This grid point is a grid point of a structured grid that is not evenly spaced and is not an orthogonal grid. Lattice point data is generated for each blade shape.
 距離データ記憶部124は、符号付き距離関数によって算出された各格子点のSDF値を示す距離データを記憶する。距離データは、翼の形状毎に生成される。流体データ記憶部125は、流体シミュレーションによって算出された各格子点の速度ベクトルを示す流体データを記憶する。流体データは、翼の形状毎に生成される。 The distance data storage unit 124 stores distance data indicating the SDF value of each grid point calculated by the signed distance function. Distance data is generated for each wing shape. The fluid data storage unit 125 stores fluid data indicating the velocity vector of each grid point calculated by the fluid simulation. Fluid data is generated for each blade shape.
 訓練データ記憶部126は、説明変数に相当する入力テンソルと目的変数に相当する出力テンソルとを対応付けた訓練データを記憶する。出力テンソルは、教師データに相当する。訓練データは、入力テンソルと出力テンソルを複数組(例えば、2000組)含む。入力テンソルは距離データから生成され、出力テンソルは流体データから生成される。近似モデル記憶部127は、機械学習によって生成された近似モデルを記憶する。近似モデルは、各畳み込み層のカーネルの要素などのモデルパラメータを含む。 The training data storage unit 126 stores training data in which an input tensor corresponding to an explanatory variable and an output tensor corresponding to an objective variable are associated with each other. The output tensor corresponds to the teacher data. The training data includes a plurality of sets of input tensors and output tensors (for example, 2000 sets). The input tensor is generated from the distance data and the output tensor is generated from the fluid data. The approximate model storage unit 127 stores the approximate model generated by machine learning. The approximate model contains model parameters such as kernel elements for each convolution layer.
 格子生成部131は、形状データ記憶部121からユーザ作成の形状データを読み出す。格子生成部131は、ユーザ作成の形状データが示す翼形状に歪みを付与することで、異なる翼形状を示す多数の形状データ(例えば、2000パターンの形状データ)を生成する。ただし、異なる翼形状の形状データをユーザが作成することも可能である。格子生成部131は、格子パラメータ記憶部122から格子パラメータを読み出す。格子生成部131は、形状データ毎に、L軸およびJ軸を設定し、格子パラメータが指定する個数だけL座標およびJ座標を設定して、構造格子の格子点を生成する。格子生成部131は、生成した格子点の位置を示す格子点データを格子点データ記憶部123に格納する。 The grid generation unit 131 reads the user-created shape data from the shape data storage unit 121. The grid generation unit 131 generates a large number of shape data (for example, 2000 patterns of shape data) indicating different blade shapes by applying distortion to the blade shape indicated by the user-created shape data. However, it is also possible for the user to create shape data of different blade shapes. The grid generation unit 131 reads out the grid parameters from the grid parameter storage unit 122. The grid generation unit 131 sets the L-axis and the J-axis for each shape data, sets the L-coordinates and the J-coordinates as many as the number specified by the grid parameters, and generates the grid points of the structured grid. The grid generation unit 131 stores grid point data indicating the positions of the generated grid points in the grid point data storage unit 123.
 距離算出部132は、形状データ記憶部121から形状データを読み出し、格子点データ記憶部123から格子点データを読み出す。距離算出部132は、形状データ毎に所定のアルゴリズムに従って、翼形状の外周である境界からの距離を算出するための符号付き距離関数を生成する。距離算出部132は、符号付き距離関数を用いて各格子点のSDF値を算出し、SDF値を示す距離データを距離データ記憶部124に格納する。 The distance calculation unit 132 reads the shape data from the shape data storage unit 121 and reads the grid point data from the grid point data storage unit 123. The distance calculation unit 132 generates a signed distance function for calculating the distance from the boundary which is the outer circumference of the blade shape according to a predetermined algorithm for each shape data. The distance calculation unit 132 calculates the SDF value of each grid point using the signed distance function, and stores the distance data indicating the SDF value in the distance data storage unit 124.
 シミュレーション実行部133は、格子点データ記憶部123から格子点データを読み出す。シミュレーション実行部133は、格子点データ毎に、各格子点に速度ベクトルの変数を割り当て、ナビエ・ストークス方程式を基礎方程式として用いて、連立方程式の係数行列および右辺ベクトルを生成する。シミュレーション実行部133は、反復法により連立方程式の解を求め、解を示す流体データを流体データ記憶部125に格納する。 The simulation execution unit 133 reads the grid point data from the grid point data storage unit 123. The simulation execution unit 133 assigns a velocity vector variable to each lattice point for each lattice point data, and uses the Navier-Stokes equation as a basic equation to generate a coefficient matrix and a right-hand side vector of simultaneous equations. The simulation execution unit 133 obtains a solution of simultaneous equations by an iterative method, and stores fluid data indicating the solution in the fluid data storage unit 125.
 ただし、解の初期値が予測部136から与えられることがある。予測部136から与えられる初期値は、予測部136が算出した各格子点の速度ベクトルの近似値である。その場合、シミュレーション実行部133は、予測部136から与えられた初期値を変数に代入して、反復法による求解を開始する。変数の近似値を用いて流体シミュレーションを開始することを「ウォームスタート」と言うことがある。近似値を用いることで、所定の初期値を用いる場合と比べて、反復回数を減らすことができる。近似値を用いることは、反復操作の途中段階までを省略することに相当する。 However, the initial value of the solution may be given by the prediction unit 136. The initial value given by the prediction unit 136 is an approximate value of the velocity vector of each grid point calculated by the prediction unit 136. In that case, the simulation execution unit 133 substitutes the initial value given by the prediction unit 136 into the variable and starts the solution by the iterative method. Starting a fluid simulation using an approximate value of a variable is sometimes called a "warm start". By using an approximate value, the number of iterations can be reduced as compared with the case where a predetermined initial value is used. Using an approximate value is equivalent to omitting the middle stage of the iterative operation.
 テンソル変換部134は、距離データ記憶部124から距離データを読み出す。テンソル変換部134は、距離データに含まれるSDF値をL座標およびJ座標に基づいて並べ替えて、入力テンソルを生成する。また、テンソル変換部134は、流体データ記憶部125から流体データを読み出す。テンソル変換部134は、流体データに含まれる速度ベクトルをL座標およびJ座標に基づいて並べ替えて、出力テンソルを生成する。並べ替えでは、格子パラメータ記憶部122に記憶された格子パラメータが参照される。 The tensor conversion unit 134 reads the distance data from the distance data storage unit 124. The tensor conversion unit 134 rearranges the SDF values included in the distance data based on the L coordinate and the J coordinate to generate an input tensor. Further, the tensor conversion unit 134 reads fluid data from the fluid data storage unit 125. The tensor conversion unit 134 rearranges the velocity vectors included in the fluid data based on the L coordinate and the J coordinate to generate an output tensor. In the sorting, the lattice parameters stored in the lattice parameter storage unit 122 are referred to.
 近似モデルの学習時には、テンソル変換部134は、同じ翼形状についての入力テンソルと出力テンソルとを対応付けて、訓練データ記憶部126に格納する。近似モデルの利用時には、テンソル変換部134は、入力テンソルを予測部136に提供する。 At the time of learning the approximate model, the tensor conversion unit 134 associates the input tensor and the output tensor for the same blade shape and stores them in the training data storage unit 126. When using the approximate model, the tensor conversion unit 134 provides the input tensor to the prediction unit 136.
 学習部135は、訓練データ記憶部126から訓練データを読み出す。学習部135は、入力テンソルのサイズおよび出力テンソルのサイズに合わせて、近似モデルの各畳み込み層のカーネルサイズやストライドなどのハイパーパラメータを調整する。そして、学習部135は、訓練データを用いて、近似モデルの各畳み込み層のカーネル要素などのパラメータを調整する。学習部135は、近似モデルを近似モデル記憶部127に格納する。 The learning unit 135 reads training data from the training data storage unit 126. The learning unit 135 adjusts hyperparameters such as the kernel size and stride of each convolution layer of the approximate model according to the size of the input tensor and the size of the output tensor. Then, the learning unit 135 adjusts parameters such as kernel elements of each convolution layer of the approximate model using the training data. The learning unit 135 stores the approximate model in the approximate model storage unit 127.
 予測部136は、近似モデル記憶部127から近似モデルを読み出す。予測部136は、テンソル変換部134から入力テンソルを取得して近似モデルに入力する。予測部136は、近似モデルから出力テンソルを読み出し、出力テンソルに含まれる速度ベクトルを並べ替えて、シミュレーション結果の予測を示す近似データを生成する。 The prediction unit 136 reads the approximate model from the approximate model storage unit 127. The prediction unit 136 acquires an input tensor from the tensor conversion unit 134 and inputs it to the approximate model. The prediction unit 136 reads the output tensor from the approximation model, rearranges the velocity vectors included in the output tensor, and generates approximation data indicating the prediction of the simulation result.
 ウォームスタートを行う場合、予測部136は、近似データをシミュレーション実行部133に提供する。ウォームスタートを行わない場合、例えば、予測部136は、近似データが示す速度ベクトルを、グラフ173のように形状データ上で可視化し、可視化データを表示装置111に表示させる。予測部136は、近似データを不揮発性ストレージに保存してもよく、近似データを他の情報処理装置に送信してもよい。 When performing a warm start, the prediction unit 136 provides approximate data to the simulation execution unit 133. When the warm start is not performed, for example, the prediction unit 136 visualizes the velocity vector indicated by the approximate data on the shape data as shown in the graph 173, and displays the visualization data on the display device 111. The prediction unit 136 may store the approximate data in the non-volatile storage, or may transmit the approximate data to another information processing device.
 なお、格子生成部131は、格子生成ライブラリプログラムを利用して実装することが可能である。また、距離算出部132は、SDFライブラリプログラムを利用して実装することが可能である。また、シミュレーション実行部133は、CFDライブラリプログラムを利用して実装することが可能である。 The grid generation unit 131 can be implemented by using the grid generation library program. Further, the distance calculation unit 132 can be implemented by using the SDF library program. Further, the simulation execution unit 133 can be implemented by using the CFD library program.
 図10は、格子パラメータテーブルと格子点テーブルの例を示す図である。
 格子パラメータ記憶部122は、格子パラメータテーブル141を記憶する。格子パラメータテーブル141には、格子パラメータとしてL座標数およびJ座標数が登録される。L座標数およびJ座標数は、設計対象の物体の種類に応じて予め決めておく。物体の種類が同じであれば、形状が異なってもL座標数およびJ座標数は変化させない。前述のように、例えば、L座標数が48であり、J座標数が432である。
FIG. 10 is a diagram showing an example of a grid parameter table and a grid point table.
The grid parameter storage unit 122 stores the grid parameter table 141. The number of L coordinates and the number of J coordinates are registered as lattice parameters in the lattice parameter table 141. The L-coordinate number and the J-coordinate number are determined in advance according to the type of the object to be designed. If the types of objects are the same, the L-coordinate number and the J-coordinate number are not changed even if the shapes are different. As described above, for example, the L coordinate number is 48 and the J coordinate number is 432.
 格子点データ記憶部123は、格子点テーブル142を記憶する。格子点テーブル142には、複数の格子点それぞれの格子点ID、L座標、J座標、X座標およびY座標が登録される。格子点IDは、格子点を識別する識別番号である。L座標は、構造格子の座標であって、境界から外側に伸びるL軸により規定される座標である。J座標は、構造格子の座標であって、境界に沿ったJ軸により規定される座標である。X座標は、直交格子の座標であって、CAD図面の左右方向のX軸により規定される座標である。Y座標は、直交格子の座標であって、CAD図面の上下方向のY軸により規定される座標である。 The grid point data storage unit 123 stores the grid point table 142. The grid point ID, L coordinate, J coordinate, X coordinate, and Y coordinate of each of the plurality of grid points are registered in the grid point table 142. The grid point ID is an identification number that identifies the grid points. The L coordinate is the coordinate of the structural grid and is defined by the L axis extending outward from the boundary. The J coordinate is the coordinate of the structural grid and is the coordinate defined by the J axis along the boundary. The X coordinate is the coordinate of the orthogonal grid and is the coordinate defined by the X axis in the left-right direction of the CAD drawing. The Y coordinate is the coordinate of the orthogonal grid and is the coordinate defined by the Y axis in the vertical direction of the CAD drawing.
 図11は、距離テーブルと流体テーブルの例を示す図である。
 距離データ記憶部124は、距離テーブル143を記憶する。距離テーブル143には、複数の格子点それぞれの格子点IDおよびSDF値が登録される。格子点IDは、格子点テーブル142の格子点IDに対応する。SDF値は、格子点と境界との間の距離、すなわち、格子点から最も近い境界上の点と当該格子点との間のユークリッド距離である。格子点は境界の外側に存在するため、SDF値は正の実数である。
FIG. 11 is a diagram showing an example of a distance table and a fluid table.
The distance data storage unit 124 stores the distance table 143. The grid point ID and SDF value of each of the plurality of grid points are registered in the distance table 143. The grid point ID corresponds to the grid point ID of the grid point table 142. The SDF value is the distance between the grid points and the boundary, that is, the Euclidean distance between the point on the boundary closest to the grid point and the grid point. The SDF value is a positive real number because the grid points are outside the boundary.
 流体データ記憶部125は、流体テーブル144を記憶する。流体テーブル144には、複数の格子点それぞれの格子点ID、速度X成分および速度Y成分が登録される。格子点IDは、格子点テーブル142の格子点IDに対応する。速度X成分は、速度ベクトルのX成分、すなわち、CAD図面上の左右方向の成分である。速度Y成分は、速度ベクトルのY成分、すなわち、CAD図面上の上下方向の成分である。 The fluid data storage unit 125 stores the fluid table 144. In the fluid table 144, the lattice point ID, the velocity X component, and the velocity Y component of each of the plurality of lattice points are registered. The grid point ID corresponds to the grid point ID of the grid point table 142. The velocity X component is the X component of the velocity vector, that is, the component in the left-right direction on the CAD drawing. The velocity Y component is the Y component of the velocity vector, that is, the component in the vertical direction on the CAD drawing.
 次に、情報処理装置100の処理手順について説明する。
 図12は、近似モデル学習の手順例を示すフローチャートである。
 (S10)格子生成部131は、CADソフトウェアにより作成された形状データを読み出す。また、格子生成部131は、格子パラメータテーブル141に登録された格子パラメータであるL座標数およびJ座標数を読み出す。
Next, the processing procedure of the information processing apparatus 100 will be described.
FIG. 12 is a flowchart showing an example of a procedure for learning an approximate model.
(S10) The grid generation unit 131 reads out the shape data created by the CAD software. Further, the lattice generation unit 131 reads out the number of L coordinates and the number of J coordinates, which are the lattice parameters registered in the lattice parameter table 141.
 (S11)格子生成部131は、ステップS10で読み出した形状データが示す物体形状に歪みを与えることで、形状データのバリエーションを生成する。元の形状データとバリエーションとを合わせて、例えば、2000個程度の異なる物体形状を用意する。 (S11) The grid generation unit 131 generates a variation of the shape data by giving a distortion to the object shape indicated by the shape data read in step S10. By combining the original shape data and variations, for example, about 2000 different object shapes are prepared.
 (S12)格子生成部131は、物体形状を1つ選択する。
 (S13)格子生成部131は、ステップS10で読み出した格子パラメータとステップS12で選択した物体形状の境界とに基づいて、各座標軸が曲線であり格子点が等間隔でない構造格子の格子点を生成する。例えば、格子生成部131は、境界を示す曲線をJ軸とし、ステップS10のJ座標数だけJ軸上に等間隔にJ座標を設定する。J座標は、時計回りに1ずつ増える非負整数とする。また、格子生成部131は、境界から外に向かって伸びる曲線をL軸とし、ステップS10のL座標数だけL軸上にL座標を設定する。L座標の間隔は均等でなく、境界に近いほど間隔が狭くなるようにする。L座標は、境界から外側に向かって1ずつ増える非負整数とする。格子生成部131は、生成した格子点のL座標、J座標、X座標およびY座標を示す格子点テーブル142を生成する。
(S12) The grid generation unit 131 selects one object shape.
(S13) The grid generation unit 131 generates grid points of a structured grid in which each coordinate axis is a curve and the grid points are not evenly spaced, based on the grid parameters read in step S10 and the boundary of the object shape selected in step S12. do. For example, the grid generation unit 131 sets the curve indicating the boundary as the J-axis, and sets the J-coordinates on the J-axis at equal intervals by the number of J-coordinates in step S10. The J coordinate is a non-negative integer that increases by 1 clockwise. Further, the grid generation unit 131 sets the L-coordinate on the L-axis by the number of L-coordinates in step S10, with the curve extending outward from the boundary as the L-axis. The intervals of the L coordinates are not even, and the closer to the boundary, the narrower the intervals. The L coordinate is a non-negative integer that increases by 1 from the boundary to the outside. The grid generation unit 131 generates a grid point table 142 showing the L coordinate, J coordinate, X coordinate, and Y coordinate of the generated grid points.
 (S14)距離算出部132は、ステップS12で選択された物体形状に基づいて、境界からの距離を定義する符号付き距離関数を生成する。距離算出部132は、ステップS13で生成された格子点テーブル142と符号付き距離関数とに基づいて、各格子点のSDF値を算出し、算出したSDF値を示す距離テーブル143を生成する。 (S14) The distance calculation unit 132 generates a signed distance function that defines the distance from the boundary based on the object shape selected in step S12. The distance calculation unit 132 calculates the SDF value of each grid point based on the grid point table 142 generated in step S13 and the signed distance function, and generates a distance table 143 showing the calculated SDF value.
 (S15)シミュレーション実行部133は、ステップS13で生成された格子点テーブル142に基づいて、各格子点に速度ベクトルの変数を割り当てる。シミュレーション実行部133は、基礎方程式であるナビエ・ストークス方程式に基づいて、変数の間の制約を記述した連立方程式を生成し、反復法によって連立方程式の解を求める。連立方程式の解は、各格子点における流体速度を示す速度ベクトルである。シミュレーション実行部133は、算出した速度ベクトルを示す流体テーブル144を生成する。 (S15) The simulation execution unit 133 assigns a velocity vector variable to each grid point based on the grid point table 142 generated in step S13. The simulation execution unit 133 generates simultaneous equations describing the constraints between variables based on the Navier-Stokes equation, which is a basic equation, and finds a solution of the simultaneous equations by an iterative method. The solution of the simultaneous equations is a velocity vector indicating the fluid velocity at each grid point. The simulation execution unit 133 generates a fluid table 144 showing the calculated velocity vector.
 (S16)テンソル変換部134は、格子パラメータテーブル141に登録されたL座標数およびJ座標数に基づいて、格子点をテンソルの要素に対応付ける。テンソルの第1次元(行)がL座標に対応し、テンソルの第2次元(列)がJ座標に対応する。 (S16) The tensor conversion unit 134 associates the lattice points with the elements of the tensor based on the number of L coordinates and the number of J coordinates registered in the lattice parameter table 141. The first dimension (row) of the tensor corresponds to the L coordinate, and the second dimension (column) of the tensor corresponds to the J coordinate.
 (S17)テンソル変換部134は、ステップS14で生成された距離テーブル143に含まれる複数の格子点のSDF値を、ステップS16の対応関係に従ってテンソル形式に並べ替える。この距離テンソルは入力テンソルとなる。また、テンソル変換部134は、ステップS15で生成された流体テーブル144に含まれる複数の格子点の速度ベクトルを、ステップS16の対応関係に従ってテンソル形式に並べ替える。テンソルの第1チャネルがX成分に対応し、テンソルの第2チャネルがY成分に対応する。この流体速度テンソルは出力テンソルとなる。テンソル変換部134は、距離テンソルと流体速度テンソルとを対応付けて訓練データに追加する。 (S17) The tensor conversion unit 134 rearranges the SDF values of the plurality of grid points included in the distance table 143 generated in step S14 into the tensor format according to the correspondence in step S16. This distance tensor becomes the input tensor. Further, the tensor conversion unit 134 rearranges the velocity vectors of the plurality of lattice points included in the fluid table 144 generated in step S15 into the tensor format according to the correspondence in step S16. The first channel of the tensor corresponds to the X component, and the second channel of the tensor corresponds to the Y component. This fluid velocity tensor becomes the output tensor. The tensor conversion unit 134 associates the distance tensor with the fluid velocity tensor and adds them to the training data.
 (S18)格子生成部131は、ステップS12で全ての物体形状を選択したか判断する。全ての物体形状を選択した場合はステップS19に進み、未選択の物体形状が残っている場合はステップS12に戻る。 (S18) The grid generation unit 131 determines whether all the object shapes have been selected in step S12. When all the object shapes are selected, the process proceeds to step S19, and when unselected object shapes remain, the process returns to step S12.
 (S19)学習部135は、距離テンソルのサイズおよび流体速度テンソルのサイズに基づいて、近似モデルのハイパーパラメータを決定する。ハイパーパラメータには、各畳み込み層のカーネルサイズやストライドが含まれる。学習部135は、ステップS17で生成された訓練データを用いて、機械学習により近似モデルのパラメータを決定する。パラメータには、各畳み込み層のカーネルの要素が含まれる。近似モデルは、距離テンソルから流体速度テンソルを予測する予測モデルである。学習部135は、生成した近似モデルを近似モデル記憶部127に保存する。 (S19) The learning unit 135 determines the hyperparameters of the approximate model based on the size of the distance tensor and the size of the fluid velocity tensor. Hyperparameters include the kernel size and stride of each convolution layer. The learning unit 135 determines the parameters of the approximate model by machine learning using the training data generated in step S17. The parameters include kernel elements for each convolution layer. The approximate model is a predictive model that predicts the fluid velocity tensor from the distance tensor. The learning unit 135 stores the generated approximate model in the approximate model storage unit 127.
 図13は、シミュレーション高速化の手順例を示すフローチャートである。
 (S20)格子生成部131は、CADソフトウェアにより作成された形状データを読み出す。また、格子生成部131は、格子パラメータテーブル141に登録された格子パラメータであるL座標数およびJ座標数を読み出す。
FIG. 13 is a flowchart showing an example of a procedure for speeding up the simulation.
(S20) The grid generation unit 131 reads out the shape data created by the CAD software. Further, the lattice generation unit 131 reads out the number of L coordinates and the number of J coordinates, which are the lattice parameters registered in the lattice parameter table 141.
 (S21)格子生成部131は、ステップS20で読み出した形状データが示す物体形状とステップS20で読み出した格子パラメータとに基づいて、各座標軸が曲線であり格子点が等間隔でない構造格子の格子点を生成する。格子生成部131は、生成した格子点のL座標、J座標、X座標およびY座標を示す格子点テーブル142を生成する。 (S21) The lattice generation unit 131 is a lattice point of a structural lattice in which each coordinate axis is a curve and the lattice points are not evenly spaced based on the object shape indicated by the shape data read in step S20 and the lattice parameter read out in step S20. To generate. The grid generation unit 131 generates a grid point table 142 showing the L coordinate, J coordinate, X coordinate, and Y coordinate of the generated grid points.
 (S22)距離算出部132は、形状データが示す物体形状に基づいて、境界からの距離を定義する符号付き距離関数を生成する。距離算出部132は、ステップS21で生成された格子点テーブル142と符号付き距離関数とに基づいて、各格子点のSDF値を算出し、算出したSDF値を示す距離テーブル143を生成する。 (S22) The distance calculation unit 132 generates a signed distance function that defines the distance from the boundary based on the object shape indicated by the shape data. The distance calculation unit 132 calculates the SDF value of each grid point based on the grid point table 142 generated in step S21 and the signed distance function, and generates a distance table 143 showing the calculated SDF value.
 (S23)テンソル変換部134は、格子パラメータテーブル141に登録されたL座標数およびJ座標数に基づいて、格子点をテンソルの要素に対応付ける。
 (S24)テンソル変換部134は、ステップS22で生成された距離テーブル143に含まれる複数の格子点のSDF値を、ステップS23の対応関係に従ってテンソル形式に並べ替える。この距離テンソルは入力テンソルとなる。
(S23) The tensor conversion unit 134 associates the lattice points with the elements of the tensor based on the number of L coordinates and the number of J coordinates registered in the lattice parameter table 141.
(S24) The tensor conversion unit 134 rearranges the SDF values of the plurality of grid points included in the distance table 143 generated in step S22 into the tensor format according to the correspondence in step S23. This distance tensor becomes the input tensor.
 (S25)予測部136は、近似モデル記憶部127から近似モデルを読み出す。予測部136は、ステップS24で生成された距離テンソルを近似モデルに入力して、各格子点の速度ベクトルの近似値を示す流体速度テンソルを生成する。 (S25) The prediction unit 136 reads the approximate model from the approximate model storage unit 127. The prediction unit 136 inputs the distance tensor generated in step S24 into the approximation model to generate a fluid velocity tensor indicating an approximate value of the velocity vector of each grid point.
 (S26)予測部136は、L座標数およびJ座標数に基づいて、ステップS25で生成された流体速度テンソルに含まれる速度ベクトルを、流体シミュレーションのための順序に並べ替える。並べ替え後の速度ベクトルの形式は、例えば、流体テーブル144のようになる。シミュレーション実行部133は、ステップS21で生成された格子点テーブル142に基づいて、各格子点に速度ベクトルの変数を割り当てる。シミュレーション実行部133は、ナビエ・ストークス方程式に基づいて、変数の間の制約を記述した連立方程式を生成する。シミュレーション実行部133は、予測部136により算出された速度ベクトルの近似値を変数に初期値として代入する。これにより、シミュレーション実行部133は、ウォームスタートを行うことができる。 (S26) The prediction unit 136 rearranges the velocity vectors included in the fluid velocity tensor generated in step S25 in the order for fluid simulation based on the number of L coordinates and the number of J coordinates. The format of the sorted velocity vector is, for example, fluid table 144. The simulation execution unit 133 assigns a velocity vector variable to each grid point based on the grid point table 142 generated in step S21. The simulation execution unit 133 generates simultaneous equations describing the constraints between variables based on the Navier-Stokes equations. The simulation execution unit 133 substitutes the approximate value of the velocity vector calculated by the prediction unit 136 into the variable as the initial value. As a result, the simulation execution unit 133 can perform a warm start.
 (S27)シミュレーション実行部133は、ステップS26で変数に初期値が代入された状態から反復法を開始し、連立方程式の解を求める。ここで算出される解は、予測部136により算出された近似値よりも精度が高い速度ベクトルである。ウォームスタートを行うことで、近似値から乖離した初期値を用いる場合よりも反復回数が少なくなる。 (S27) The simulation execution unit 133 starts the iterative method from the state in which the initial value is assigned to the variable in step S26, and finds the solution of the simultaneous equations. The solution calculated here is a velocity vector with higher accuracy than the approximate value calculated by the prediction unit 136. By performing a warm start, the number of iterations is smaller than when an initial value deviating from the approximate value is used.
 (S28)予測部136は、ステップS27で算出された各格子点の速度ベクトルを可視化し、表示装置111に表示させる。なお、ステップS26,S27を省略し、ステップS25で算出された各格子点の速度ベクトルの近似値を可視化することも可能である。 (S28) The prediction unit 136 visualizes the velocity vector of each grid point calculated in step S27 and displays it on the display device 111. It is also possible to omit steps S26 and S27 and visualize the approximate value of the velocity vector of each grid point calculated in step S25.
 第2の実施の形態の情報処理装置によれば、直交格子でない構造格子の格子点が生成され、各格子点の流体速度が流体シミュレーションによって算出される。よって、境界付近に高密度に格子点を配置することができ、勾配の大きい境界付近の流体速度を高精度に算出することができる。また、幾つかの物体形状に対するシミュレーション結果から近似モデルが生成され、近似モデルによって物体形状から流体速度の分布が予測される。よって、多数の形状案に対して反復法による流体シミュレーションを網羅的に実行しなくてよく、計算量を削減でき、流体速度の近似値を高速に算出することができる。このため、多数の形状案を検討する設計作業が効率化される。 According to the information processing apparatus of the second embodiment, grid points of a structured grid that is not an orthogonal grid are generated, and the fluid velocity of each grid point is calculated by fluid simulation. Therefore, the lattice points can be arranged at high density near the boundary, and the fluid velocity near the boundary having a large gradient can be calculated with high accuracy. In addition, an approximate model is generated from the simulation results for some object shapes, and the distribution of the fluid velocity is predicted from the object shapes by the approximate model. Therefore, it is not necessary to comprehensively execute the fluid simulation by the iterative method for a large number of shape proposals, the amount of calculation can be reduced, and the approximate value of the fluid velocity can be calculated at high speed. Therefore, the design work for examining a large number of shape proposals is streamlined.
 また、近似モデルの機械学習に用いる訓練データを生成するにあたり、シミュレーション結果に含まれる流体速度が、構造格子の格子点の隣接関係に応じて並べ替えられた上でそのまま使用される。よって、近似モデルの入出力に直交格子を採用する場合と異なり、流体シミュレーションと異なる位置の流体速度を推定する補間処理を行わなくてよく、補間処理に伴うサンプリング誤差を抑制できる。このため、近似モデルの予測精度が向上する。特に、流体速度の勾配が大きい境界付近の予測精度が大きく改善する。 In addition, when generating training data used for machine learning of an approximate model, the fluid velocity included in the simulation result is used as it is after being sorted according to the adjacency relationship of the grid points of the structured grid. Therefore, unlike the case where the orthogonal grid is used for the input / output of the approximate model, it is not necessary to perform the interpolation process for estimating the fluid velocity at a position different from the fluid simulation, and the sampling error due to the interpolation process can be suppressed. Therefore, the prediction accuracy of the approximate model is improved. In particular, the prediction accuracy near the boundary where the gradient of the fluid velocity is large is greatly improved.
 また、近似モデルの入出力に直交格子を採用し、格子間隔を小さくすることで精度向上を試みる場合と比べて、近似モデルの規模を小さくすることができる。よって、機械学習の実行時間が短縮されると共に、訓練データサイズが小さくて済む。また、近似モデルの出力が、流体シミュレーションで使用する構造格子の格子点に直接対応している。よって、近似モデルの出力を利用した流体シミュレーションのウォームスタートを、補間処理なしに実行することができ、近似モデルの出力を円滑に利用することができる。 In addition, the scale of the approximate model can be reduced compared to the case where an orthogonal grid is used for the input and output of the approximate model and the accuracy is improved by reducing the grid spacing. Therefore, the execution time of machine learning is shortened, and the training data size can be reduced. In addition, the output of the approximate model directly corresponds to the grid points of the structured grid used in the fluid simulation. Therefore, the warm start of the fluid simulation using the output of the approximate model can be executed without the interpolation processing, and the output of the approximate model can be smoothly used.
 また、近似モデルの入力としてSDF値が使用されると共に、複数のSDF値が格子点の隣接関係に合わせて並べられる。よって、直交格子を採用しなくても、物体形状を精度よく表現することが可能となる。また、近似モデルには、畳み込み層が含まれる一方、プーリング層や全結合層は含まれない。よって、近似モデルの内部の計算過程で、複数の格子点の間の隣接関係の情報が失われることを抑制できる。また、畳み込み層を利用することで、入出力のサイズに合わせて近似モデルを柔軟に調整することができる。 In addition, the SDF value is used as the input of the approximate model, and a plurality of SDF values are arranged according to the adjacency relationship of the grid points. Therefore, it is possible to accurately represent the shape of an object without adopting an orthogonal lattice. Also, the approximate model includes a convolutional layer, but does not include a pooling layer or a fully connected layer. Therefore, it is possible to prevent the loss of information on the adjacency relationship between a plurality of grid points in the calculation process inside the approximate model. Further, by using the convolution layer, the approximate model can be flexibly adjusted according to the size of the input / output.
 上記については単に本発明の原理を示すものである。更に、多数の変形や変更が当業者にとって可能であり、本発明は上記に示し、説明した正確な構成および応用例に限定されるものではなく、対応する全ての変形例および均等物は、添付の請求項およびその均等物による本発明の範囲とみなされる。 The above merely indicates the principle of the present invention. Moreover, numerous modifications and modifications are possible to those skilled in the art, and the present invention is not limited to the exact configurations and applications described and described above, and all corresponding modifications and equivalents are attached. It is considered to be the scope of the present invention according to the claims and their equivalents.
 10 設計装置
 11 記憶部
 12 処理部
 13-1~13-9 格子点
 14 シミュレーション結果データ
 15 教師データ
 16 入力データ
 17 近似モデル
10 Design equipment 11 Storage unit 12 Processing unit 13-1 to 13-9 Lattice points 14 Simulation result data 15 Teacher data 16 Input data 17 Approximate model

Claims (6)

  1.  コンピュータに、
     特定の物体形状によって規定される境界をもつ領域に配置された格子点であって、間隔が均等でない複数の格子点に対応付けて、シミュレーションにより算出された流体の物理量を示す複数の第1の値を含むシミュレーション結果データを取得し、
     前記複数の格子点の間の隣接関係に基づいて、前記複数の第1の値を多次元配列構造に並べ替えて、前記多次元配列構造の前記複数の第1の値を含む教師データを生成し、
     前記特定の物体形状を示す第2の値を含む入力データと前記教師データとを用いて、物体形状から前記流体の物理量の分布を予測する近似モデルを生成する、
     処理を実行させる設計プログラム。
    On the computer
    A plurality of first grid points that are arranged in a region having a boundary defined by a specific object shape and that indicate a physical quantity of a fluid calculated by simulation in association with a plurality of grid points that are not evenly spaced. Get simulation result data including values
    Based on the adjacency relationship between the plurality of grid points, the plurality of first values are rearranged into a multidimensional array structure to generate teacher data including the plurality of first values of the multidimensional array structure. death,
    Using the input data including the second value indicating the specific object shape and the teacher data, an approximate model for predicting the distribution of the physical quantity of the fluid from the object shape is generated.
    A design program that executes processing.
  2.  前記複数の格子点は、前記境界を示す曲線に応じた第1の座標軸と、前記境界に近いほど座標の間隔が狭くなる第2の座標軸と、を含む複数の座標軸に基づいて生成され、
     前記教師データの生成では、前記複数の格子点それぞれを、前記複数の座標軸によって規定される座標に基づいて、前記多次元配列構造の中の要素に対応付ける、
     請求項1記載の設計プログラム。
    The plurality of grid points are generated based on a plurality of coordinate axes including a first coordinate axis corresponding to a curve indicating the boundary and a second coordinate axis in which the distance between the coordinates becomes narrower as the distance between the coordinates becomes closer to the boundary.
    In the generation of the teacher data, each of the plurality of grid points is associated with an element in the multidimensional array structure based on the coordinates defined by the plurality of coordinate axes.
    The design program according to claim 1.
  3.  前記コンピュータに更に、
     前記複数の格子点に対応付けて、それぞれ前記境界からの距離を示す複数の距離値を前記第2の値として算出し、
     前記隣接関係に基づいて、前記複数の距離値を前記多次元配列構造に並べ替えて、前記多次元配列構造の前記複数の距離値を含む前記入力データを生成する、
     処理を実行させる請求項1記載の設計プログラム。
    In addition to the computer
    A plurality of distance values indicating distances from the boundary are calculated as the second value in association with the plurality of grid points.
    Based on the adjacency, the plurality of distance values are rearranged into the multidimensional array structure to generate the input data including the plurality of distance values of the multidimensional array structure.
    The design program according to claim 1, wherein the process is executed.
  4.  前記近似モデルは、1回以上の畳み込み演算によって、入力の多次元配列から前記入力の多次元配列よりもサイズの小さい特徴データを生成するエンコーダと、1回以上の逆畳み込み演算によって、前記特徴データから前記特徴データよりもサイズの大きい出力の多次元配列を生成するデコーダとを含む、
     請求項1記載の設計プログラム。
    The approximation model is an encoder that generates feature data smaller in size than the input multidimensional array from the input multidimensional array by one or more convolution operations, and the feature data by one or more deconvolution operations. Includes a decoder that produces a multidimensional array of outputs larger in size than the feature data.
    The design program according to claim 1.
  5.  前記コンピュータに更に、
     他の物体形状を示す第4の値を含む他の入力データを前記近似モデルに入力して、前記多次元配列構造に並んだ複数の第3の値を含む出力データを生成し、
     前記複数の第3の値を前記他の物体形状に応じて並べ替え、並べ替えた前記複数の第3の値を前記流体の物理量の初期値として用いて前記シミュレーションを実行する、
     処理を実行させる請求項1記載の設計プログラム。
    In addition to the computer
    Other input data including a fourth value indicating another object shape is input to the approximate model to generate output data including a plurality of third values arranged in the multidimensional array structure.
    The simulation is executed by rearranging the plurality of third values according to the shape of the other object and using the rearranged plurality of third values as initial values of physical quantities of the fluid.
    The design program according to claim 1, wherein the process is executed.
  6.  コンピュータが、
     特定の物体形状によって規定される境界をもつ領域に配置された格子点であって、間隔が均等でない複数の格子点に対応付けて、シミュレーションにより算出された流体の物理量を示す複数の第1の値を含むシミュレーション結果データを取得し、
     前記複数の格子点の間の隣接関係に基づいて、前記複数の第1の値を多次元配列構造に並べ替えて、前記多次元配列構造の前記複数の第1の値を含む教師データを生成し、
     前記特定の物体形状を示す第2の値を含む入力データと前記教師データとを用いて、物体形状から前記流体の物理量の分布を予測する近似モデルを生成する、
     設計方法。
    The computer
    A plurality of first grid points that are arranged in a region having a boundary defined by a specific object shape and that indicate a physical quantity of a fluid calculated by simulation in association with a plurality of grid points that are not evenly spaced. Get simulation result data including values
    Based on the adjacency relationship between the plurality of grid points, the plurality of first values are rearranged into a multidimensional array structure to generate teacher data including the plurality of first values of the multidimensional array structure. death,
    Using the input data including the second value indicating the specific object shape and the teacher data, an approximate model for predicting the distribution of the physical quantity of the fluid from the object shape is generated.
    Design method.
PCT/JP2020/005765 2020-02-14 2020-02-14 Design program and design method WO2021161503A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2020/005765 WO2021161503A1 (en) 2020-02-14 2020-02-14 Design program and design method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2020/005765 WO2021161503A1 (en) 2020-02-14 2020-02-14 Design program and design method

Publications (1)

Publication Number Publication Date
WO2021161503A1 true WO2021161503A1 (en) 2021-08-19

Family

ID=77292846

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/005765 WO2021161503A1 (en) 2020-02-14 2020-02-14 Design program and design method

Country Status (1)

Country Link
WO (1) WO2021161503A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130118736A1 (en) * 2010-07-29 2013-05-16 Adam Usadi Methods and Systems For Machine - Learning Based Simulation of Flow
JP2016146169A (en) * 2014-12-18 2016-08-12 ダッソー システムズ シムリア コーポレイション Interactive 3d experiences based on data
JP2017535340A (en) * 2014-11-14 2017-11-30 シーメンス ヘルスケア ゲゼルシヤフト ミツト ベシユレンクテル ハフツング Method and system for determining reserve ratio of blood flow based on pure geometric machine learning

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130118736A1 (en) * 2010-07-29 2013-05-16 Adam Usadi Methods and Systems For Machine - Learning Based Simulation of Flow
JP2017535340A (en) * 2014-11-14 2017-11-30 シーメンス ヘルスケア ゲゼルシヤフト ミツト ベシユレンクテル ハフツング Method and system for determining reserve ratio of blood flow based on pure geometric machine learning
JP2016146169A (en) * 2014-12-18 2016-08-12 ダッソー システムズ シムリア コーポレイション Interactive 3d experiences based on data

Similar Documents

Publication Publication Date Title
JP4509860B2 (en) Data division apparatus, data division method and program
US20080162090A1 (en) System, methods, and computer readable media, for product design using t-spline deformation
US9122822B2 (en) Three-dimensional fluid simulation method
Sieger et al. On shape deformation techniques for simulation-based design optimization
US8797316B2 (en) Method for defining fluid/solid boundary for computational fluid dynamics simulations
US20220318591A1 (en) Inference method and information processing apparatus
JP2021516382A (en) Image conversion for machine learning
US9129075B2 (en) Mesh generation system
US11669662B2 (en) Machine learning method and computing system
CN104866645B (en) Designing a physical system constrained by equations
Fierz et al. Maintaining large time steps in explicit finite element simulations using shape matching
JP2014113252A (en) Method, apparatus, and computer program for calculating intracerebral electric current
JP6424651B2 (en) Magnetic field simulator program, magnetic field simulator device and magnetic field simulation method
WO2021161503A1 (en) Design program and design method
JP6700285B2 (en) Simulation of resizable objects using a rigid solver
US20230011312A1 (en) Inference method and information processing apparatus
JP7339923B2 (en) System for estimating material property values
JP2022041425A (en) Simulation program, simulation method, and simulation system
CN114723051A (en) Information processing apparatus, information processing method, and computer-readable recording medium
JP5528249B2 (en) Optimal alignment calculation device and program
US20110119292A1 (en) Nearest neighbor search method
JP5777506B2 (en) Analysis apparatus and simulation method
JP5434849B2 (en) Display processing program, display processing method, and information processing apparatus
JP5971052B2 (en) Evaluation support method, information processing apparatus, and program
US20240202406A1 (en) Structural analysis method and information processing apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20918903

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20918903

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP