This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2013-122330, filed on Jun. 11, 2013, the entire contents of which are incorporated herein by reference.
This invention relates to a numerical calculation method and apparatus.
As numerical calculation methods for solving the behavior of a continuum such as a fluid or an elastic body, the finite difference method, the finite element method, the finite volume method and the like are known, which calculate approximate solutions of differential equations based on a mesh. Recently, in order to utilize the numerical calculation in a field such as the Computer Aided Engineering (CAE) or the like, these numerical calculation methods are developed, and a problem is solved, in which a fluid and structure interact each other. However, in the methods using the mesh, it is complicated to handle a problem in which an interface such as a free surface exists or a problem in which a moving boundary occurs such as a problem of the interaction between a fluid and a structure. Therefore, it is difficult to create programs.
On the other hand, in a particle method without using the mesh (e.g. Moving Particle Semi-implicit (MPS) method, Smoothed Particle Hydrodynamics (SPH) method, or the like), any special treatment for the moving boundary is not required. Therefore, recently, the particle method is being widely used.
Moreover, as a method for performing high-precision calculation by the particle method, a calculation method using the Riemann solver is known. A certain document discloses a technique for accurately performing simulation by preventing the vibration of the pressure, which is a problem in the calculation of the particle method.
For example, there is a document, which discloses a technique for making the calculation highly accurate by introducing the calculation method (which is called “Riemann solver”) that uses the solutions of the Riemann problem in one-dimensional equations of the inviscid fluid.
Here, an example of a method for introducing the Riemann solver into the particle method will be simply explained. Equations (0-1) to (0-3) of the slightly compressible fluid are considered as follows:
The equation (0-1) represents the law of conservation of mass, the equation (0-2) represents the law of conservation of momentum, and the equation (0-3) represents an equation of state. Here, v (thick v) represents a velocity vector of the fluid, p represents the density, p represents the pressure, and ρ0 represents the density (i.e. reference or criterion density) when the pressure becomes zero. Moreover, c represents the sonic speed, and t represents the time.
Then, the equations (0-1) to (0-3) are discretized as follows:
Here, x (thick x) represents a position vector in the three-dimensional space. Moreover, xi, vi, ρi and mi respectively represent the position vector, velocity vector, density and mass of a particle i. xijn+1/2 represents a relative position vector of particles i and j. Specifically, it is represented as follows:
x
ij
n+1/2
=x
i
n+1/2
−x
j
n+1/2
Moreover, the upper index represents the time as the simulation step. Moreover, the symbols included in the aforementioned equations (0-4) to (0-7) are defined as follows:
Furthermore, W represents a kernel function (also called “weight function”), and the following spline function is used frequently for W:
Here, h represents an influence radius between particles, and about double or triple of an average particle interval at the initial state is used frequently for “h”. β is a value that is adjusted so that the entire-space integral quantity of the kernel function becomes “1”, and β in the two-dimensional space is determined as 0.7 nh2, and β in the three-dimensional space is determined as nh3.
The expressions (0-8) and (0-9) represent intermediate values between the particles i and j, and one-dimensional equation of the fluid is solved numerically to use the solution when advancing the time by dt/2. In other words, as illustrated in
v
j
l
=v
j
n
·l
ij
v
i
l
=v
i
n
·l
ij
The specific determination method is as follows: Firstly, as for the equations (0-1) to (0-3), the equations in case that the space is one-dimensional are put in order as follows:
Then, the equation (0-11) is rewritten in a format of the characteristic equation by using the Riemann invariants q+ and q−.
Then, as for the particles i and j at time n, q+ and q− are represented as follows:
Furthermore, the spatial gradient is calculated as follows:
After preparing the variables as described above, as illustrated in
By substituting the equations (0-16) and (0-17) into the equations (0-5) and (0-6), the simulation in the particle method is accurately performed.
On the other hand, as for the calculation of the interaction between the rigid body and the fluid and simulation of the interflow phenomenon of the separate liquids (e.g. water and oil) that are not mixed, the particle method is expected that can easily handle the free surface or moving boundary. In case of the inter flow phenomenon, because the liquids whose densities are different in a stable state are handled, it is difficult to perform the calculation only by using the standard SPH method, typically.
As a calculation method that handles the interflow of the liquids whose densities are different by the particle method, a certain document discloses the following calculation. In other words, as the equations of the liquids whose densities are different, following equations (0-18) to (0-21) are used.
g represents the acceleration due to the gravity, and ρs represents the reference or criterion density. The point that is different from the equations (0-1) to (0-3) is that the reference or criterion density is different depending on the position. The spatial change of the reference density represents the interflow of the different liquids.
Then, the equations (0-18) to (0-21) are discretized for each particle by the SPH method as follows:
The equation (0-22) represents the law of conservation of mass, and the equation (0-23) represents the law of conservation of momentum, and the equation (0-24) represents the equation of the state. ζ and n are constant parameters. Here, ρs,i represents the reference or criterion density of the particle i.
x
ij
=x
i
−x
j
v
ij
=v
i
−v
j
As for the equations (0-22) to (0-24), the simulation becomes possible by calculating the temporal development by the Euler's method, the leap flog method or the like, which is a numerical analysis method of the typical ordinary differential equations.
However, it is impossible to apply the high-precision calculation by the Riemann solver used in the particle method to the basic equations (0-18) to (0-21) in this technique. Therefore, the calculation accuracy is lowered for the interflow of the liquids that have different density.
In other words, there is no technique for performing the numerical high-precision calculation of the interflow phenomenon of the liquids having different reference or criterion densities.
A numerical calculation method relating to this invention includes: (A) performing a first processing for each second particle of second particles that are identified from a positional relationship with a first particle among a plurality of first particles, wherein the plurality of first particles relate to a first fluid that has a first reference density, and a plurality of second particles relate to a second fluid that has a second reference density, and the first processing comprises: (a1) first calculating a first physical quantity obtained by using, in a Riemann invariant, a ratio of a first density of the first particle to the first reference density, instead of the first density; (a2) second calculating a second physical quantity obtained by using, in the Riemann invariant, a ratio of a second density of the second particle to the second reference density, instead of the second density; (a3) third calculating a gradient of the first physical quantity and a gradient of the second physical quantity; (a4) fourth calculating a time-space intermediate value for the first and second physical quantities between the first particle and the second particle, by using the first physical quantity, the second physical quantity, the gradient of the first physical quantity and the gradient of the second physical quantity; (a5) fifth calculating a time-space intermediate value for pressure between the first particle and the second particle, by using the time-space intermediate value for the first and the second physical quantities; and (a6) sixth calculating a time-space intermediate value for a velocity between the first particle and the second particle, by using the time-space intermediate value for the first and second physical quantities; (B) first updating a velocity of the first particle by using the calculated time-space intermediate value for the pressure; and (C) second updating the first density of the first particle based on the calculated time-space intermediate value for the velocity.
The object and advantages of the embodiment will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the embodiment, as claimed.
Firstly, an approach of the calculation relating to an embodiment of this invention will be explained.
In this embodiment, the equations that represent the following fluid momentum are solved by the particle method.
Here, v and p respectively represent a velocity field and a pressure field of the fluid. Moreover, p and ρs respectively represent the density and reference or criterion density (i.e. density in the state that the pressure is zero) of the fluid. Moreover, c represents the sonic speed.
The equations (1) to (4) are used in a case where the interflow of the liquids whose densities are different and which are not mixed like the water and oil as illustrated in
When the equations (1) to (4) are spatially discretized in the particle method, following equations are obtained.
j represents other particles included in an influenced range, for example.
Furthermore, following recursion formulas are derived by discretizing the equations by the time.
Here, dt represents a time interval, and other symbols respectively have following meanings.
As represented in the expression (10), portions other than ρni/ρnj in the second term of the right side in the density of temporal development includes values at time n+½ and average values of values at times n and (n+1). Then, when the temporal change of ρni/ρnj. is small, this is a calculation method that has the second-order accuracy.
vijlij n+1/2 and pijlij,n+1/2 are intermediate values between the particles i and j, and are calculated by following procedure.
Firstly, the linear equations for the equations (1) to (4) are considered.
Here, by transforming the Riemann invariants by using ρ/ρs instead of ρ, following physical quantities are newly introduced.
Then, when putting equations in order by these physical quantities, following equations are obtained.
When considering only the first term of the right side of the equations (11-1) and (11-2), they have similar forms to the equations (0-12) and (0-13). Therefore, by considering only the first term of the right side to perform the temporal development as follows and adding the terms that compensate for the second and third terms of the right side later, the calculation is performed. A) More specifically, the variables q+ and q− are calculated as follows:
These are the aforementioned physical quantities for the particles i and j at time n. B) Moreover, the gradients of the variables q+ and q− are calculated as follows:
The symbols in the equations (16) to (19) are represented as follows:
The equation (21) represents that the gradients of the variables q+ and q− are calculated by using the spatial gradient of the reference or criterion density based on the relation with the reference or criterion densities of other particles. In other words, this portion is a difference with a case other than the interflow, which was explained in the column of the related art. C) As for the variables q+ and q−, the intermediate values between the particles i and j are calculated as follows:
The second term of the right side in each of the equations (23) and (24) is similar to the second term of the right side in the corresponding one of the equations (0-14) and (0-15), so it is understood that they are obtained by using the approach of the Riemann solver.
ρijn and ρs,ijn are intermediate values of the density and reference or criterion density between the particles i and j, and they are represented as follows:
ρijn=√{square root over (ρinρjn)}
ρs,ijn=√{square root over (ρs,inρs,jn)}
The third and fourth terms of the right side in each of the equations (23) and (24) are obtained by the differential approximation of the second and third terms of the right side in the corresponding one of the equations (11-1) and (11-2). There is no problem even if “0” is set to Dρs/Dt|i and Dρs/Dt|j in the third term of the right side in the equations (23) and (24). Moreover, the spatial differential of the reference or criterion density is represented as follows, and is obtained by the calculation method of the standard SPH method.
D) The intermediate values for the velocity and pressure are calculated by the equations (27) and (28) by using the calculated intermediate values qijn+1/2,+ and qijn+1/2,−, and they are substituted into the equations (9) and (10).
A specific processing and an apparatus for performing the specific processing based on the aforementioned approach will be explained.
Data concerning an initial position, initial velocity, initial density, reference or criterion density, time interval dt and external force that is pressed to the particle (e.g. gravity) is stored in the initial condition data storage unit 110.
The processing unit 120 uses data stored in the initial condition data storage unit 110 to calculate, for each time step and each particle, data concerning the velocity, density, position and the like, and stores the calculated data into the processing result storage unit 140. The data during the processing is stored in the data storage unit 130.
The output unit 150 outputs data stored in the processing result storage unit 140 to the output apparatus 200 (e.g. printer, display apparatus, or apparatus such as other computers connected to this information processing apparatus 100 via a network).
Next, processing contents of the information processing apparatus 100 will be explained by using
Firstly, the processing unit 120 reads out the initial condition data stored in the initial condition data storage unit 110 (
Then, the processing unit 120 identifies one unprocessed particle i among particles for which the initial condition data is set (step S5).
After that, the processing unit 120 updates the position of the particle i by dt/2 (step S7). Specifically, the following calculation is performed. xi1 is included in the initial condition data.
Moreover, the processing unit 120 initializes the acceleration of the particle i and a temporal change term of the density (step S9). Specifically, the following setting is performed.
Furthermore, the processing unit 120 calculates an external force that is pressed to the particle i (step S11). Specifically, a following calculation is performed. The external force fni is included in the initial condition data.
a
i
n
=a
i
n
+f
i
n
Furthermore, the processing unit 120 extracts other particles j, which are included in an influence range of the particle i (step S13). Then, the processing shifts to a processing in
Shifting to the explanation of the processing in
The processing unit 120 performs a processing for calculating an intermediate value of a physical quantity q (
The processing unit 120 calculates the physical quantities q−i and q+j from the density, reference or criterion density and velocities of the particles i and j according to the equations (13) and (14) (step S35).
Moreover, the processing unit 120 calculates the gradient of the physical quantity q from the gradient of the density, reference or criterion density and velocities of the particles i and j according to the equations (17) and (18) (step S37).
Furthermore, the processing 120 calculates the time-space intermediate values qijn+1/2,+ and qijn+1/2,− of the physical quantity q according to the equations (23) and (24) (step S39).
The calculation results obtained by the processing in
Returning to the explanation of the processing in
The calculation of the time-space intermediate value pijn+1/2 for the pressure is performed prior to the calculation of the time-space intermediate value for the velocity. This is because the velocity vin+1 is used for the calculation of the time-space intermediate value for the velocity.
Returning to the explanation of the processing in
After that, the processing unit 120 determines whether or not there is an unprocessed particle j among the particles extracted at the step S13 (step S21). When there is an unprocessed particle j, the processing returns to the step S15. On the other hand, when there is no unprocessed particle j, the processing unit 120 updates the velocity of the particle i from the acceleration of the particle i (step S23). The calculation at this step is represented as follows:
v
i
n+1
=v
i
n
+dta
i
n
Then, the processing unit 120 sets “unprocessed” to the particles j extracted at the step S13 (step S25). The similar processing to the processing of the step S13 may be executed. The processing shifts to a processing in
Shifting to the explanation of the processing in
The processing unit 120 performs the processing for calculating the intermediate value of the physical quantity q (step S63). This processing is the same as the processing in
Then, the processing unit 120 uses the time-space intermediate values of the physical quantity q to calculate the time-space intermediate value vijlij,n+1/2 for the velocity according to the equation (27) (step S65). After the calculation of the equation (27), the following calculation is performed.
v
ij
l
,n+1/2
=v
ij
n+1/2
·l
ij
Returning to the explanation of the processing in
Then, the processing unit 120 determines whether or not there is an unprocessed particle j among the particles extracted at the step S13 (step S47). When there is an unprocessed particle j, the processing returns to the step S41. On the other hand, when there is no unprocessed particle j, the processing unit 120 updates the density of the particle i from the term of the density of the particle i according to a following equation (step S49).
Furthermore, the processing unit 120 updates the position of the particle i by dt/2 by using the velocity vn+1i at the time n+1, which was calculated at the step S23 (step S51). The calculation is performed by the following equation.
Then, the processing unit 120 determines whether or not there is an unprocessed particle i (step S53). When there is an unprocessed particle i, the processing returns to the step S5 in
Then, the processing unit 120 determines whether or not the time n+1 is an end time (step S57). When the time n+1 is not the end time, the processing unit 120 sets n=n+1 (step S59), and sets “unprocessed” to all of the particles i (step S61). Then, the processing returns to the step S5 in
By performing the aforementioned processing, the high precision of the calculation by the Riemann solver that is used in the particle method can be realized.
Although the embodiment of this invention was explained above, this invention is not limited to this embodiment. For example, the functional block configuration illustrated in
As for the processing flow, as long as the processing results do not change, the turns of the steps may be exchanged or plural steps may be executed in parallel.
Furthermore, the information processing apparatus 100 may not be one computer, but may be made by plural computers. Furthermore, the information processing apparatus 100 may be implemented by a client-server type system or may be implemented by a stand-alone type system.
In addition, the aforementioned information processing apparatus 100 is a computer device as illustrated in
The aforementioned embodiment is outlined as follows:
A numerical calculation method relating to the embodiment includes: (A) performing a first processing for each second particle of second particles that are identified from a positional relationship with a first particle among a plurality of first particles, wherein the plurality of first particles relate to a first fluid that has a first reference density, and a plurality of second particles relate to a second fluid that has a second reference density, and the first processing comprises: (a1) first calculating a first physical quantity obtained by using, in a Riemann invariant, a ratio of a first density of the first particle to the first reference density, instead of the first density; (a2) second calculating a second physical quantity obtained by using, in the Riemann invariant, a ratio of a second density of the second particle to the second reference density, instead of the second density; (a3) third calculating a gradient of the first physical quantity and a gradient of the second physical quantity; (a4) fourth calculating a time-space intermediate value for the first and second physical quantities between the first particle and the second particle, by using the first physical quantity, the second physical quantity, the gradient of the first physical quantity and the gradient of the second physical quantity; (a5) fifth calculating a time-space intermediate value for pressure between the first particle and the second particle, by using the time-space intermediate value for the first and the second physical quantities; and (a6) sixth calculating a time-space intermediate value for a velocity between the first particle and the second particle, by using the time-space intermediate value for the first and second physical quantities; (B) first updating a velocity of the first particle by using the calculated time-space intermediate value for the pressure; and (C) second updating the first density of the first particle based on the calculated time-space intermediate value for the velocity.
Thus, by transforming the Riemann invariants and defining new physical quantities, the high-precision calculation by the Riemann solver can be realized.
Moreover, the aforementioned third calculating may include: calculating the gradient of the first physical quantity by using a spatial gradient of the first reference density; and calculating the gradient of the second physical quantity by using a spatial gradient of the second reference density. By transforming the Riemann invariant by using the ratio of the density of the particle to the reference density, the gradient of the Riemann invariant is transformed in a form that the spatial gradient of the first reference (or criterion) density is used.
Furthermore, the aforementioned first updating may include: (b1) updating an acceleration of the first particle from the calculated time-space intermediate value for the pressure; and (b2) updating the velocity of the first particle by using the calculated acceleration of the first particle. The acceleration is initially set by an external force such as gravity, however, the influence from the second particle is superimposed to further update the acceleration and velocity.
Moreover, the aforementioned second updating may include: (c1) calculating temporal change of the first density of the first particle by using the velocity of the first particle and the calculated time-space intermediate value for the velocity; and (c2) updating the first density of the first particle by using the temporal change of the first density of the first particle.
For example, after the time-space intermediate value for the pressure for the second particle that is identified from the positional relationship with the first particle is obtained in the first processing and the velocity of the first particle is updated, the temporal change of the first density of the first particle may be calculated. Thus, the accuracy of the calculation is enhanced.
Incidentally, it is possible to create a program causing a computer to execute the aforementioned processing, and such a program is stored in a computer readable storage medium or storage device such as a flexible disk, CD-ROM, DVD-ROM, magneto-optic disk, a semiconductor memory, and hard disk. In addition, the intermediate processing result is temporarily stored in a storage device such as a main memory or the like.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present inventions have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2013-122330 | Jun 2013 | JP | national |