The content of Japanese Patent Application No. 2021-003775, on the basis of which priority benefits are claimed in an accompanying application data sheet, is in its entirety incorporated herein by reference.
Certain embodiment (s) of the present invention relate (s) to a simulation apparatus, a simulation method, and a computer readable medium storing a program.
A simulation method of analyzing a movement of a fluid by approximating the movement of the fluid as a movement of a particle system is known. The simulation method is called a particle method. In the particle method, a fluid is represented by a plurality of particles, and a wall boundary disposed in a flow field of the fluid is also generally represented by a plurality of particles.
In fluid analysis by the particle method, a spatial resolution is determined according to diameters of the particles. The diameters of the particles should be set to be sufficiently small with respect to a length scale of the fluid movement to be analyzed. In general, the length scale of the fluid movement varies depending on a portion. For example, in a region apart from a wall of an object disposed in a fluid, even in a case where the diameters of the particles are set to be large, analysis can be performed with sufficiently high accuracy. On the other hand, in the vicinity of the wa1ll, the length scale of the fluid movement is represented by a thickness of a boundary layer . Thus, in order to accurately analyze the movement of the fluid in the vicinity of the wall, the diameters of the particles should be set to be smaller than a thickness of the boundary layer.
In order to perform analysis for the entire analysis space with a high precision, even in a region apart from the wall, the diameters of the particles should be set to be small according to the thickness of the boundary layer . For this reason, the number of the particles disposed in the analysis space increases, and as a result, an amount of calculation increases.
There is a need for providing a simulation apparatus, a simulation method, and a computer readable medium storing a program capable of maintaining high analysis accuracy and reducing an amount of calculation in analysis using the particle method.
According to an embodiment of the present invention, there is provided a simulation apparatus that analyzes a flow of a fluid using a particle method, the apparatus including: an input unit to which a simulation condition is input; and a processing unit that develops a position of each of a plurality of particles in a time domain using the particle method based on the simulation condition which is input to the input unit, in which the processing unit divides an analysis space into a plurality of division regions, disposes, in each of the plurality of division regions, the plurality of particles having sizes different from each other for each division region, determines whether or not to add new particles to the division region and determines a portion to which particles are to be added, for each of the plurality of division regions, based on a current number of the particles in the division region and a degree of density of the particles at a boundary surface between the division regions, in a case where a position of each of the plurality of particles is developed in a time domain for each of the plurality of division regions, and adds new particles to a portion determined as the portion to which particles are to be added in a case where new particles are to be added.
According to another embodiment of the present invention, there is provided a simulation method of analyzing a flow of a fluid using a particle method, the method including: dividing an analysis space into a plurality of division regions; disposing, in each of the plurality of division regions, a plurality of particles having sizes different from each other for each division region; determining whether or not to add new particles to the division region and determining a portion to which particles are to be added, for each of the plurality of division regions, based on a current number of the particles in the division region and a degree of density of the particles at a boundary surface between the division regions, in a case where a position of each of the plurality of particles is developed in a time domain for each of the plurality of division regions; and adding new particles to a portion determined as the portion to which particles are to be added in a case where new particles are to be added.
According to still another embodiment of the present invention, there is provided a computer readable medium storing a program that causes a computer to execute a process, the process including: dividing an analysis space into a plurality of division regions; disposing, in each of the plurality of division regions, a plurality of particles having sizes different from each other for each division region; determining whether or not to add new particles to the division region and determining a portion to which particles are to be added, for each of the plurality of division regions, based on a current number of the particles in the division region and a degree of density of the particles at a boundary surface between the division regions, in a case where a position of each of the plurality of particles is developed in a time domain for each of the plurality of division regions; and adding new particles to a portion determined as the portion to which particles are to be added in a case where new particles are to be added.
By disposing the plurality of particles having sizes different from each other for each division region, it is possible to set a spatial resolution to be different for each division region. By setting sizes of the particles in the division region for which a high spatial resolution is required to be small, analysis can be performed with a required high spatial resolution. By setting sizes of the particles in the division region for which a high spatial resolution is not required to be large, it is possible to reduce the number of the particles. Thereby, an amount of calculation in a simulation can be reduced. By adding new particles to the portion that is determined as a portion to which particles are to be added, it is possible to keep the number of the particles in the division region substantially constant.
Before explaining one embodiment of the present invention, a general particle method will be briefly described. The particle method includes an SPH method, a dissipative particle method, an MPS method, and the like. A fluid having a volume V and a density ρ0 is represented as a set of N particles 20. A density ρi of an i-th particle is represented by the following equation using a distribution function w.
The distribution function w (rij) is called a kernel function, and is rotationally symmetric around the origin. rij indicates a distance between centers of an i-th particle and a j-th particle,5 and mj indicates a mass of the j-th particle. As the distribution function w(r), for example, the following function can be used.
Here, h indicates a kernel width, and can be set to, for example, a value similar to an average particle distance in an initial state. The kernel width h can be considered as a diameter of the particle.
The following movement equation z is applied as a governing equation of a particle system.
m
i
{dot over (v)}
i
=F
i
vis
+m
i
g (3).
Here, mi indicates a mass of the i-th particle, vi indicates a velocity of the i-th particle, vidot indicates an acceleration of the i-th particle, Fiprs indicates a pressure gradient force between the particles, Fivis indicates a viscous force between he particles, and g indicates a gravitational acceleration.
The pressure gradient force FiPrs can be represented by the following equation.
Here, Pi indicates a pressure of the i-th particle, Pj indicates a pressure of the j -th particle, and Pi can be represented by the following equation.
P
i
=k
0(ρf−ρof) (5)
Here, k0 indicates a gas constant, pi indicates a density of the i-th particle represented by Equation (1) , and ρ0i indicates a reference density of the i-th particle.
The viscous force Fivis can be represented by the following equation.
Here, μ indicates a viscosity of the fluid.
By numerically solving the movement equation as Equation (3) , the velocity v of the particle is developed in a time domain. Further, a position of the particle is developed in a time domain based on the velocity v of the particle. Every time the position of the particle changes, the density of the particle is calculated using Equation (1).
Next, a simulation apparatus and a simulation method according to an embodiment of the present invention will be described with reference to
A plurality of particles 20 are disposed in each of the division regions 15. Note that
In the embodiment, the following three technical elements are required as compared with a particle method in the related art.
A first technical element is a technique for dividing the analysis space 10 into a plurality of division regions 15 having a certain shape. A second technical element is a technique for exchanging physical quantities of the particles 20 between two adjacent division regions 15 among the plurality of division regions 15. A third technical element is a technique for controlling the particles 20 that flow into each of the plurality of division regions 15 and the particles 20 that flow from each of the plurality of division regions 15. Hereinafter, these techniques will be described.
Technique for Dividing Analysis Space into Plurality of Division Regions
First, the technique for dividing the analysis space into the plurality of division regions 15 will be described.
For example, a signed distance function (SDF) is used as a method for dividing the analysis space 10 (
In order to calculate a value of the signed distance function φ, as an initial condition, φ=0 on the boundary S is given, and the following advection equation may be solved.
Here, t indicates time, and v indicates an artificial advection velocity.
The position and the shape of the boundary S for dividing the analysis space 10 are determined, and the signed distance function φ is calculated using the boundary S. The analysis space 10 is divided into the plurality of division regions 15 by at least one equivalent surface on which values of the signed distance function φ are equal. The equivalent surface is a boundary surface between two division regions 15 that are in contact with each other. As a shape of the boundary S, for example, a shape based on a shape of the space 10 disposed in the analysis space 10 may be adopted.
The shape of the boundary S can be arbitrarily determined by a user using CAD data or the like. Thus, the analysis space 10 can be divided into the plurality of division regions 15 having a certain shape.
Next, a specific example of obtaining values of the signed distance function φ at a plurality of discretized grid points in the analysis space 10 will be described with reference to
By performing discretization of Equation (7) , the value of the signed distance function φ is developed in a time domain. In a case where the values of the signed distance function φ at all the grid points Pare converged, the calculation is ended. The convergence value corresponds to the value of the signed distance function φ at each grid point P. In this way, the value of the signed distance function φ at the position of each of the plurality of grid points P defined in the analysis space 10 can be determined. A surface including the plurality of grid points P having substantially the same value of the signed distance function φ is adopted as the boundary of the division region 15.
Technique for Exchanging Physical Quantities between Two Adjacent Division Regions
Next, a technique for exchanging physical quantities between two adjacent division regions 15 will be described with reference to
As an example, thicknesses of the buffer regions 16A and 16B are approximately four times the particle diameter h of the particle 20A having a larger size. The particle diameter h is the same as the kernel width h which is used in the definition of the kernel function w(r) of Equation (2).
In the buffer region 16A obtained by extending the division region 15A, a plurality of particles 20AB having the same size as the particles 20A in the division region 15A as an extension source are disposed. Similarly, in the buffer region 16B obtained by extending the division region 15B, a plurality of particles 20BB having the same size as the particles 20B in the division region 15B as an extension source are disposed.
The physical quantities of the particle 20AB in the buffer region 16A are calculated by kernel interpolation of the physical quantities of the plurality of particles 20B in the region of the division region 15B that overlaps with the buffer region 16A, instead of being calculated by solving the movement equation of Equation (3). For example, the physical quantities Ai of the i-th particle 20AB in the buffer region 16A are calculated by the following Equation. Specifically, the physical quantities Ai indicate a density and a velocity of the i-th particle 20AB.
Here, in Equation (8) , the sigma on the right side means summing of the particles 20B in the region of the division region 15B overlapping with the buffer region 16A. mj and ρj indicate a mass and a density of the j-th particle 20B in the division region 15B. Aj indicates physical quantities of the j-th particle 20B in the division region 15B. WA (rij) indicates a kernel function defined for the division region 15A, and rij indicates a distance between the i-th particle 20AB in the buffer region 16A and the j-th particle 20B in the division region 15B.
For the particle 20AB in the buffer region 16A, the movement equation of Equation (3) is not solved. On the other hand, the particle 20AB in the buffer region 16A is treated as a particle that affects the particle 20A when solving the movement equation for the particle 20A in the division region 15A as an extension source.
As in Equation (8) , the physical quantities Aj of the j-th particle 20BB in the buffer region 16B are calculated by the following Equation.
Here, in Equation (9) , the sigma on the right side means summing of the particles 20A in the region of the division region 15A overlapping with the buffer region 16B. mi and ρi indicate a mass and a density of the i-th particle 20A in the division region 15A. Ai indicates physical quantities of the i-th particle 20A in the division region 15A. WB (rij) indicates a kernel function defined for the division region 15B, and rijindicates a distance between the j-th particle 20BB in the buffer region 16B and the i-th particle 20A in the division region 15A. Technique for Controlling Particles Flowing into Division Region and Particles Flowing from Division Region
Next, a technique for controlling the particles flowing into the division regions 15 and the particles flowing from the division regions 15 will be described with reference to
In a simulation by the particle method, since the plurality of particles are moved according to a flow, it is necessary to remove or add the particles in accordance with the particles flowing from the division regions 15 and the particles flowing into the division regions 15. In a case where processing of removing and adding the particles is not consistent with the physical quantities in the flow field, a calculation failure occurs, and analysis accuracy is decreased.
In a case where the analysis space 10 (
n·vds=0 (10)
Here, n indicates a normal vector toward the outside of the boundary surface Sp. v indicates a velocity of the fluid. Equation (10) means that a mass of the fluid is maintained in the division region 15.
A square equidistance grid is provided in the analysis space 10, and a plurality of grid points P along the boundary surface Sp are extracted. For example, a grid point which is located in the division region 15 and of which a distance from the boundary surface Sp is equal to or shorter than 21/2×h is extracted as a grid point P along the boundary surface Sp. Here, h indicates the kernel width shown in Equation (2). In
In a case where Equation (10) is discretized using the grid points P disposed along the boundary surface Sp, the following continuous equation is obtained.
Here, ni indicates a normal vector of the boundary surface Sp at a position of an i-th grid point P, and vi indicates the velocity of the fluid. The sigma symbol on the right side means summing of all grid points P along the boundary surface Sp. As indicates a representative region at each grid point P, and can be defined by, for example, the following equation.
Δs=h2 (12)
By checking a sign of each factor on the left side of Equation (11) at a certain time t, a portion at which the fluid is flowing into the division region 15 and a portion at which the fluid is flowing from the division region 15 can be specified. At the grid point P at which an inner product of the normal vector ni and the velocity vi is positive, the fluid flows from the division region 15, and at the grid point P at which the inner product is negative, the fluid flows into the division region 15.
In the simulation to which the particle method is applied, Equation (11) is equivalent to the following equation.
N(t)=const. (13)
Here, N(t) is the number of the particles existing in the division region 15 at a time t. Equation (13) means that the number N(t) of the particles is constant. Equation (13) means that discretized continuous Equation (11) is satisfied by keeping the number of the particles existing in the division region 15 constant.
The number Nin (t) of the particles to be added into the division region 15 at a certain time t can be represented by the following equation.
N
in(t)=N0−N(t) (14)
Here, N0 is the number of the particles existing in the division region 15 in an initial state of the calculation.
In order to determine a portion into which the particles are to be added in a case where the particles in the division region 15 are insufficient, a vacancy rate xi(t) at the position of the i-th grid point P is defined by the following equation.
Here, Wij represents a value of the kernel function given by a distance between the position of the i-th grid point P and the position of the j -th particle . The vacancy rate xi(t) obtained by Equation (15) is 1 in a case where the particles do not exist in the vicinity of the i-th grid point P, and is 0 in a case where the particles are spread in the vicinity of the i-th grid point P. It can be said that the vacancy rate xi(t) represents a degree of density of the particles at the position of the i-th grid point P.
By combining Equation (11) to Equation (15), a differential equation for determining a timing at which the particles flow into the i-th grid point P is defined as follows.
Here, α is a certain constant, and can be set to, for example, α=1/N0. χi0 is a value of Equation (15) in an initial state at the position of the i-th grid point P. A function Fi is defined for all grid points P along the boundary surface Sp.
For all grid points P, the function Fi in Equation (16) is developed in a time domain in a state where the initial value is set to 0. At a timing at which the value of the function Fi exceeds 1, the particles are added to the position of the i-th grid point P, and the value of the function Fi is initialized to 0. The physical quantities of the particles to be newly added can be obtained by using Equation (8). By determining the timing and the position at which the particles flow by using the differential Equation (16), the continuous Equation (13) can be satisfied for the division region 15 having a certain flow field and a certain shape. The particles flowing from the division region 15 are excluded from the calculation. For example, the particles that flow from the division region 15 and flow into the adjacent division region 15 are excluded from the calculation even in a case of the adjacent division region 15.
Next, a physical meaning of Equation (16) will be described.
Equation (16) means that the function Fi is developed in a time domain based on a current number N(t) of the particles in the division region 15 and the vacancy rate χi(t) at the boundary surface Sp between the division regions 15, that is, the degree of density of the particles. More specifically, for each of a plurality of portions (grid points P) defined on the boundary surface between the division regions 15, based on a difference between the current number N (t) of the particles in the division region 15 and the number N0 of the particles in the initial state and a difference between the current degree χi(t) of density of the particles at the portion and the degree χi0 of density of the particles in the initial state, whether or not to add the particles to the corresponding portion is determined.
In a case where the current number N(t) of the particles in the division region 15 is larger than the number N0 of the particles in the initial state, the value of the function Fi does not increase. Further, in a case where the current degree χi(t) of density at the i-th grid point P is higher than the degree χi0 of density in the initial state, the value of the function Fi at the i-th grid point P does not increase. In other words, when a state where the current number N(t) of the particles in the division region 15 is smaller than the number N0 of the particles in the initial state continues and a state where the current degree of density is lower than the degree of density in the initial state continues, the particles can be added into the portion at which a sparse state continues.
Further, at the i-th grid point P, it is determined whether the fluid is flowing into the division region 15 as a determination target or flowing from the division region 15 as a determination target. In a case where the fluid is flowing from the division region 15, a value of “otherwise” in Equation (16) is adopted. In other words, new particles are not added to the grid point P at which an outflow of the fluid continues. On the contrary, the grid point P at which an inflow of the fluid continues is listed as a candidate for a portion into which new particles are to be added. That is, based on a determination result of an inflow or an outflow for each grid point P, whether or not to add new particles to the grid point P is determined.
The processing unit 31 executes a simulation by the particle method based on the simulation condition and the command which are input. Further, the processing unit 31 outputs a simulation result to the output unit 32. The simulation result includes information representing a state of a particle in a particle system that is a simulation target, a temporal change in physical quantities of the particle system, and the like. The processing unit 31 includes, for example, a central processing unit (CPU) of a computer. A program for causing the computer to execute the simulation by the particle method is stored in the storage unit 33. The output unit 32 includes a communication device, a removable media writing device, a display, and the like.
First, the processing unit 31 acquires the simulation condition which is input to the input unit 30 (step S1). The simulation condition includes information for defining the fluid as a simulation target, an initial condition, a boundary condition, information for dividing the analysis space 10 into the plurality of division regions 15 (
The processing unit 31 defines a buffer region in each of the plurality of division regions 15 (step S3). For example, as illustrated in
After the particles 20 are disposed, the processing unit 31 calculates the physical quantities of the particles 20, that is, the velocity and the density of the particles 20, by solving the movement equation of the particles 20 for each of the division regions 15 (step S5). The movement equation is represented by Equation (3). Next, for the particles 20AB and 20BB in the buffer regions 16A and 16B (
Next, the processing unit 31 controls the number of the particles for each of the division regions (step S7). The number of the particles is controlled by using the method described with reference to
In a case where the calculation for developing the physical quantities of the particles in a time domain is completed, the processing unit 31 outputs an analysis result to the output unit 32 (
Excellent Effects according to Example
Next, excellent effects according to the embodiment will be described.
In the embodiment, the simulation can be performed by setting spatial resolutions, that is, diameters of the particles 20 to be different from each other for each of the plurality of division regions 15 (
Further, in the embodiment, as described with reference to
In order to verify the excellent effects according to the embodiment, an actual simulation of a flow field is performed using the simulation method according to the embodiment. Hereinafter, the simulation will be described with reference to
The Reynolds number Re is defined by the following equation using a kinematic viscosity coefficient v of the fluid.
The simulation is performed under three conditions in which the Reynolds number Re is 200, 300, and 500. The minimum diameter h0 of the particles is set to h0=10D/Re. Here, h0 means the kernel width h of Equation (2) . A value of the minimum diameter h0 is a minimum value required to resolve the flow field in the vicinity of the sphere.
A magnitude of the initial velocity of the particles is U, and a direction of the particles is a positive x-axis. The flow field is developed in a time domain during a period for which a dimensionless timing t×D/U changes from 0 to 30. Further, during a period for which the dimensionless timing changes from 15 to 30, a time average value of a drag coefficient that acts on the sphere is calculated.
It can be seen that the drag coefficient obtained by the simulation matches with the experimental value. It is confirmed that the flow field can be accurately analyzed by the simulation method according to the embodiment.
In a case where the simulation method according to the embodiment is used, the number of the particles when the Reynolds number Re is 200, 300, and 500 is approximately 390,000, approximately 1.2 million, and approximately 4.7 million. On the other hand, in a method of disposing the particles having a diameter h0 over the entire analysis space without dividing the analysis space, the number of the particles when the Reynolds number Re is 200, 300, and 500 is approximately 28 million, approximately 96 million, and approximately 432 million. It can be seen that the number of the particles can be significantly reduced by using the simulation method according to the embodiment . Thereby, it is possible to significantly reduce a calculation load.
Further, in the vicinity of the sphere that requires a high spatial resolution, the diameters of the particles are set to h0. Therefore, analysis of the flow field can be performed with a sufficient spatial resolution.
The above-described example has been presented as an example, and the present invention is not limited to the above-described example. For example, it is obvious to those skilled in the related art that various modifications, improvements, and combinations in the example may be made.
It should be understood that the invention is not limited to the above-described embodiment, but may be modified into various forms on the basis of the spirit of the invention. Additionally, the modifications are included in the scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2021-003775 | Jan 2021 | JP | national |