CN106021828A - Fluid simulation method based on grid-boltzmann model - Google Patents
Fluid simulation method based on grid-boltzmann model Download PDFInfo
- Publication number
- CN106021828A CN106021828A CN201610554629.XA CN201610554629A CN106021828A CN 106021828 A CN106021828 A CN 106021828A CN 201610554629 A CN201610554629 A CN 201610554629A CN 106021828 A CN106021828 A CN 106021828A
- Authority
- CN
- China
- Prior art keywords
- fluid
- particle
- function
- velocity
- simulation method
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/36—Circuit design at the analogue level
- G06F30/367—Design verification, e.g. using simulation, simulation program with integrated circuit emphasis [SPICE], direct methods or relaxation methods
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a fluid simulation method based on a grid-boltzmann model. The simulation method comprises the following steps: gridding an image of a porous medium, expressing a grid point (x, y) with fi (x, y, t) and taking a kinematic velocity as the particle distribution corresponding to ci particle; judging if the moving direction ci of the particle is oriented to the boundary of fixed wall, ordering the particle distribution fi (x, y, t) to execute reverse function or collision function of the grid-boltzmann model, and then acquiring the fluid density p' (x, y) and fluid speed u' (x, y) according to the particle distribution fi (x, y, t) after evolution; finishing till meeting the evolution ending condition. According to the fluid simulation method provided by the invention, the image of the porous medium is gridded and the fluid in the grid is dispersed as the moving particles, so that the fluid density and speed can be acquired according to the particle distribution fi (x, y, t) and the simulation running efficiency can be increased.
Description
Technical field
The invention belongs to hydrodynamics and computer high-performance computing sector, more particularly, to one based on grid-glass
The fluid simulation method of the graceful model of Wurz.
Background technology
Rock and soil are all natural porous media, and its pore diameter is about between 1 μm~500 μm.Porous media
The problem of modelling of middle fluid flowing is widely present in the fields such as oil exploitation, environmental conservation, biochip and Chemical Engineering, example
As, during oil exploitation, pressure influence permeability and the recovery ratio of oil reservoir, the shadow of research pressure-driven fluid flow
Recovery method can be played directive function by sound.Therefore, numerical method and computer technology is utilized to be simulated solving above-mentioned neck
The practical problem in territory has highly important meaning.
In actual applications, owing to the structure of porous media is complicated, BORDER PROCESSING difficulty, simultaneously user to extensive,
Efficient and Fast simulation requirement improves constantly, and this makes to simulate fluid flowing in porous media and faces significant challenge.Patent literary composition
Offer CN 103776739A and disclose the prediction side of a kind of Robertson-Si Difu fluid free-boundary problem in porous media
Method.But the method needs to relate to the minimum pore radius of porous media, maximum pore radius and capillary tube in the calculation
Multiple parameter such as straight length so that calculation procedure is relatively complicated;Secondly, the method is only capable of mould starting pressure, it is impossible to prediction
The speed of fluid and the follow-up impact of flowing of pressure versus flow body, it was predicted that limited in one's ability.
Summary of the invention
For disadvantages described above or the Improvement requirement of prior art, the invention provides a kind of based on grid-Boltzmann mould
The fluid simulation method of type, its object is to by by porous media is image gridding, and by the fluid discretization in grid
For motion particle, thus according to particle be distributed fi(x, y t) obtain fluid density and speed, improve the operational efficiency of simulation.
It is an aspect of this invention to provide that provide the analogy method of a kind of fluid, comprise the following steps:
S1. (x y), and obtains described simulation to obtain simulation lattice I after the image to porous media carries out gridding process
Grid I (x, y) the corresponding fluid viscosity ν of nondimensionalization, fluid density ρ (x, y, t), fluid velocity u (x, y, t) and Gu Bi
Border;Wherein, x, y represent respectively simulation lattice I (x, y) abscissa of upper mesh point and vertical coordinate, x is 1~Nx, y be 1~
Ny;
S2. make moment t=0, utilize grid-Boltzmann model to set up the divergent density function of fluid, discrete velocity letter
Number and equilibrium distribution function;Described divergent density function isDescribed
Discrete velocity function isDescribed equilibrium state divides
Cloth function isfi(x, y, t) table
Show that (x, y) place, movement velocity is c to mesh pointiThe particle corresponding to particle distribution, i represent particle rapidity direction numbering;Represent particle distribution fi(x, y, equilibrium state t), ωiFor weight coefficient;
S3. particle rapidity c is judgediThe direction of motion whether towards Gu Bi border, be then by the reverse letter of grid-Boltzmann model
Number, makes speed ciCorresponding particle distribution fi(x, y, t) at moment t+ δtValue be the distribution of reverse with i particle, otherwise perform grid-glass
The collision function of the graceful model of Wurz
Wherein, time stepδxFor the length of side of mesh point, csFor the velocity of sound, θiRevolve counterclockwise along the positive direction of x-axis for direction i
The angle turned, slack time
S4. by the divergent density function after developing and discrete velocity function, it is thus achieved that moment t+ δtTime stream
Body density ρ ' (x, y) and fluid velocity u ' (x, y);Divergent density function after described evolution isDiscrete velocity function after evolution is
S5. judging whether to meet evolution termination condition, be, simulation terminates, and otherwise makes moment t=t+ δt, return step
S3。
Preferably, in described step S1, the fluid viscosity of nondimensionalization Kinematic viscosity system for fluid
Number, L0For the characteristic length of fluid, u0For the characteristic velocity of fluid, and u0=L0/ 1 second;
After described step S5, also include, it is thus achieved that the actual speed of fluid
As it is further preferred that the characteristic length of described fluidOr For simulation lattice I (x, y)
Overall width,For simulation lattice I (x, total height y).
Preferably, in described step S1, the image of porous media is carried out the method for gridding process particularly as follows: will be many
The image of hole medium is converted into the gray level image of gridding, gray level image described in binaryzation, and removes noise, it is thus achieved that described simulation
Grid I (x, y).
As it is further preferred that the method for described binaryzation is Two-peak method, Otsu method, Bernsen method or cycle threshold
Method.
As it is further preferred that the method for described removal noise is connection domain method.
Preferably, in described step S2, during i=0, ci=(0,0);During i=1~8, θiBe respectively 0, pi/2, π, 3 pi/2s,
π/4,3 π/4,5 π/4 and 7 π/4, corresponding particle distribution fi(x, y, t) in particle in time step δtDistance c of interior motioni
δtFor from mesh point I, (x, y) to the distance of another mesh point in its eight neighborhood;
In described step S3, described reverse function is: fi(x, y, t)=fi+2(x, y, t), i=1,2,5 or 6;fi(x,
Y, t)=fI-2(x, y, t), i=3,4,7 or 8.
As it is further preferred that in described step S2, weight coefficient ωiMeet:
Preferably, the described evolution termination condition in described step S5 is: moment t whether >=incremental time T, or fluid
Speed u ' (whether x y) meetsErr is speed convergence condition.
As it is further preferred that the described incremental time T in described step S5 is 10000 δt~1000000 δt。
As it is further preferred that described speed convergence condition err in described step S5 is 0~0.1.
Preferably, after described step S5, also include fluid velocity u ' (x, y) visualization.
The method have the advantages that
1, image gridding by by porous media of the present invention, using the region at porous media place as Gu Bi border,
Achieve the setting for the complicated calculations operating mode in porous media;
2, the present invention is by discrete for the fluid in the grid particle turning to motion so that interparticle collision and particle are with solid
The effect on wall border can parallel processing, thus improve simulation computational efficiency and calculate speed;
3, can run due to the calculating of the particle of mesh points different in the present invention, the present invention may utilize OpenACC etc. simultaneously
Method carries out parallel optimization, is suitable to perform in multiple accelerator platform parallelization.
Accompanying drawing explanation
Fig. 1 is the direction of motion schematic diagram that the present invention forms the particle of fluid;
Fig. 2 is that the present invention forms the Particles Moving of fluid towards Gu Bi border reverse schematic diagram;
Fig. 3 is the schematic diagram that the present invention forms that the particle of fluid moves to neighbor mesh points;
Fig. 4 is the embodiment of the present invention 1 flow chart;
Fig. 5 is the porous media image schematic diagram in the embodiment of the present invention 1 after binaryzation;
Fig. 6 is pressure boundary and the Gu Bi border schematic diagram of the embodiment of the present invention 1;
Fig. 7 is that the embodiment of the present invention 1 fluid velocity visualizes schematic diagram;
Fig. 8 is to utilize OpenACC technology that the embodiment of the present invention 1 is carried out the flow chart of hardware optimization;
Fig. 9 is that in different platform, the operation embodiment of the present invention 1 iterative steps is the time-consuming cartogram of calculating when 10000 times.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, right
The present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, and
It is not used in the restriction present invention.If additionally, technical characteristic involved in each embodiment of invention described below
The conflict of not constituting each other just can be mutually combined.
The invention provides a kind of fluid simulation method, comprise the following steps;
S11. set up plane right-angle coordinate, and the image lattice of porous media a size of is turned to the gray scale of Nx × Ny
Image, gray level image described in binaryzation, and remove the noise on gray level image by methods such as connected domains, it is thus achieved that described simulation lattice
(x, y), wherein, x, y represent that (x, y) goes up abscissa and the vertical coordinate of mesh point to I, and x is 1~Nx, and y is 1~Ny to I respectively;Described
The method of binaryzation is Two-peak method, Otsu method, Bernsen method or cycle threshold method;
S12. with corresponding described simulation lattice I, (x, the matrix of binaryzation y) is distinguished the region at fluid place and is situated between with porous
The region at matter place, generally can represent the region at porous media place with numerical value 1, and numerical value 0 represents the region at fluid place;
S13. according to simulation lattice I (x, y), the size of the image of porous mediaThe actual density of fluid
The kinematic viscosity coefficient of fluidAnd pressure boundary, it is thus achieved that the fluid viscosity ν of nondimensionalization, fluid velocity u (x, y,
T), fluid density ρ (x, y, t) and Gu Bi border;
Wherein, the kinematic viscosity coefficient of fluid is relevant with the character of fluid and temperature, and the kinesiology of usual crude oil glues
Property coefficient ν is at 2m2/ s~300m2Between/s, such as, No. 50 oil kinematic viscosity coefficient when 20 DEG C is about 50m2/s;
The fluid viscosity of nondimensionalizationL0For the characteristic length of fluid, u0For the characteristic velocity of fluid, generally makeOru0=L0/ 1 second, fluid velocity was usually 0, even u (x, y, t)=(0,0);
Fluid density ρ (x, y, t) and then heel pressure border, Gu Bi border and simulation lattice I (x, y) in porous be situated between
Two pairs of borders in simulation lattice in actual applications, are generally respectively set to pressure boundary and Gu Bi border by qualitative correlation;Example
As, during oil exploitation, in petroleum pipeline fluid apply upward pressure P ' time, then porous media place region,
Left margin and right margin are Gu Bi border;
Fluid in petroleum pipeline under the situation of not stressing, a usually atmospheric pressure P of its actual pressure0Add upper fluid certainly
The pressure gh, g of body represents that acceleration of gravity, h represent the degree of depth of fluid, and the pressure under stress is P0+gh+P’;?
During oil exploitation, it is assumed that the pressure suffered by a pressure boundary is pout, the pressure suffered by another pressure boundary is pin,
The fluid density that assume that a wherein pressure boundary is 1;Again due to nondimensionalization fluid pressure p (x, y, t) and fluid
(x, y t) meet p (x, y, t)=ρ (x, y, t) × c to density ps 2, csRepresent the velocity of sound, then the density of another pressure boundary is pin/
pout;Such as, during oil exploitation, in petroleum pipeline fluid apply upward pressure P ' time, ρ (x, 1, t) ≡ 1, ρ (x,
Ny,t)≡pin/pout;
S2. make moment t=0, utilize grid-Boltzmann model to set up the divergent density function of fluid, discrete velocity letter
Number and equilibrium distribution function;Described divergent density function isDescribed
Discrete velocity function isDescribed equilibrium state divides
Cloth function isfi(x, y, t) table
Show that (x, y) place, movement velocity is c to mesh point IiThe particle corresponding to particle distribution, i represent particle rapidity direction numbering;Represent particle distribution fi(x, y, equilibrium state t), ωiFor weight coefficient;
For example, it is possible to represent the direction of 8 kinds of Particles Movings with 0~8, as shown in Figure 1;As i=0, ci=(0,0);Work as i
When=1~8, particle distribution fi(x, y, t) the direction c of corresponding Particles MovingiIt is respectively the positive direction along x-axis to rotate counterclockwise
Angle, θi, it is respectively 0, pi/2, π, 3 pi/2s, π/4,3 π/4,5 π/4 and 7 π/4, is present in particle distribution fi(x, y, t) in
Particle is in time step δtDistance c of interior motioniδtFor from mesh point I (x, y) to another mesh point in its eight neighborhood away from
From;Time stepδxFor the length of side of mesh point, csFor the velocity of sound, ωiFor weight coefficient;Therefore discrete velocity meetsWeight coefficient ωiMeet:
S3. particle rapidity c is judgediThe direction of motion whether towards Gu Bi border, be, make correspondence particle distribution fi(x,
Y, t) at moment t+ δtValue is reverse particle distribution, otherwise performs the collision function of grid-Boltzmann model
Slack time
Understand for the technical scheme that i in above-mentioned steps S2 is 0~8, if now particle rapidity ciDirection of motion i towards
During Gu Bi border, as shown in Figure 2;
fi(x, y, t)=fi+2(x, y, t) i=1,2,5,6;fi(x, y, t)=fI-2(x, y, t) i=3,4,7,8;
Otherwise, particle distribution f it is present ini(x, y, t) in particle can be in time step δtInterior one mesh point of motion away from
From, as it is shown on figure 3, the mesh point f of correspondence direction 1,2,3,5,6i(x, y, t) from center O respectively along the side shown in A, B, C, D, E
To moving to adjacent mesh point;
S4. according to the divergent density function after developing and discrete velocity function
Obtain moment t+ δtTime fluid density ρ ' (x, y) and fluid velocity u ' (x, y);
S5. whether judge moment t >=incremental time T, or fluid velocity u ' (whether x y) meetsErr is speed convergence condition, is, simulation terminates, and otherwise makes moment t=t+
δt, return step S3;
Generally incremental time T is 10000 δt~1000000 δt, described speed convergence condition err is 0~0.1, and it specifically takes
(x, size and computational accuracy y) are relevant, and the size of analog image is the biggest, and computational accuracy is the highest, then institute with analog image I for value
The time that need to calculate is the longest, and therefore incremental time T is the biggest, and speed convergence condition err is the least.
The most finally can be by fluid velocity u ' (x, y) visualization, or the actual speed by acquisition fluid To make to observe more intuitively or further process.
Embodiment 1
The analogy method of the present embodiment 1 fluid based on grid-Boltzmann model specifically includes following steps, such as Fig. 4
Shown in:
S1. gather the image of porous media, the image of the porous media of the size of (=10m × 5m) is saved as Nx ×
The picture file of Ny pixel;Wherein, Nx and Ny is respectively the number of pixels (Nx=in the present embodiment of horizontal direction and vertical direction
400, Ny=200);Picture file utilizes Two-peak method determine, and the threshold value of binaryzation is 127, and carries out noise reduction process, it is thus achieved that
(x, y) as it is shown in figure 5, solid portion during wherein black region represents porous media, white portion represents fluid to analog image I
Region;With the matrix of binaryzation to should analog image;Entry of a matrix element only includes 0 and 1, for representing the calculating of porous media
Operating mode, wherein, 1 represents the region at porous media place, and numerical value 0 represents the region at fluid place;
S2. according to practical problem, zoning, initial condition, boundary condition, physical parameter etc. are determined, and according to matrix,
Zoning is carried out stress and strain model;
The size of zoning is generally identical with the size Nx × Ny of the picture file in step S1, and concrete needs are according to many
The size of the image of hole medium, the parallel processing speeds of computer and the computational accuracy of requirement are arranged;
Boundary condition in the present embodiment includes pressure boundary and Gu Bi border, except porous media place region with
Outward, the most also selecting up-and-down boundary is Gu Bi border, and left margin is entrance boundary, corresponding pressure pin=36.67,
Right margin is outlet border, corresponding pressure pout=33.33;
Physical parameter in the present embodiment includes the actual density of fluidThe kinesiology of fluid
Viscosity coefficientThe actual speed of fluidCharacteristic length Characteristic density ρ0
=1 × 103kg/m3, characteristic velocity u0=L0/ 1 second=10m/s;
According to formulaObtain this enforcement
The initial condition of example, including: the fluid viscosity ν of nondimensionalization, fluid velocity u (x, y, t)=0, fluid density ρ (x, y, t)=1
(x=2~(Nx-1)) and boundary condition ρ (1, y, t) ≡ 1, ρ (1, Nx, t) ≡ 1.1;csFor the velocity of sound in fluid, need full
The following condition of foot, umax/cs< < 1, wherein umaxIt is the maximum of the fluid velocity estimated, takes c in the present embodiments=5.77;
S2. moment t=0 is made,X=2
~(Nx-1);Wherein, fi(x, y t) represent that (x, y) place, movement velocity is c to mesh point IiThe particle corresponding to particle distribution,
I represents the direction numbering of particle rapidity;As i=0, ci=(0,0);As i=1~8, particle rapidity ciDirection be respectively
Positive direction along x-axis rotates 0, pi/2, π, 3 pi/2s, π/4,3 π/4,5 π/4 and 7 π/4 counterclockwise, and particle is in time step δtIn
Distance c of motioniδtFor from mesh point I, (x, y) to the distance of another mesh point in its eight neighborhood;Time step
δxFor the length of side of mesh point, (δ in the present embodimentx=2.5 × 10-3, δt=2.5 × 10-4);In Practical Calculation, also can be according to
Stress and strain model, storage allocation, for storing maroscopic quantity and the distribution function of each mesh point, and according to physical parameter, to calculating
Maroscopic quantity and equilibrium distribution function in region initialize;
S3. equilibrium distribution function is made
Wherein, ωiFor
Weight coefficient;And according to entry of a matrix element value corresponding to mesh point, it is judged that particle rapidity ciThe direction of motion whether towards Gu Bi limit
Boundary;It is to make the particle distribution f of correspondencei(x, y, t) value is reverse particle distribution, otherwise performs collision function
Slack timeWeight coefficient ωiMeet: ω0=4/9, ω5=ω6=ω7=ω8=1/9, ω1=ω1=
ω1=ωi=1/36;During Practical Calculation, the collision in a time step can be performed on each mesh point
Function, and the Gu Bi border at boundary net point and pressure boundary, exercise boundary processes;
S4. according to equation group
Obtain moment t+ δtTime, fluid density ρ on each mesh point ' (x, y) and fluid velocity u ' (x, y);
S5. whether judge moment t >=incremental time T, or fluid velocity u ' (whether x y) meetsErr, for calculating error, is, simulation terminates, and otherwise makes t=t+ δt, return
Step S3;In the present embodiment, err=0.000001, incremental time T=M_max × δ are takent, M_max is the iterations upper limit,
M_max=1000000 in the present embodiment, is that simulation terminates, and otherwise returns step S3;In the present embodiment, have passed through
Iteration evolution (the i.e. t=630000 δ of 630000 stepst=157, corresponding actual time is 157s) after reached intended calculating
Error;
S6. use the poster processing soft to output fluid velocity u ' (x, y) utilizes line of vector integration method to visualize,
As it is shown in fig. 7, wherein the black lines with arrow represents the flow field that fluid flows, according to formula
Also the actual speed of fluid can be obtained
The present embodiment can be compiled as LB (serial grid-Boltzmann algorithm) code, and utilizes OpenACC technology at CPU+
In GPU platform, serial LB code is carried out parallel optimization, analyze can be parallel in serial LB code code segment, and according to analysis
As a result, for can be parallel code segment add OpenACC line identifier, analyze the data transmission bottle neck on CPU+GPU platform, and root
According to analysis result, add OpenACC data transmission mark, as shown in Figure 8.
Such as, matrix can be read at CPU end, carry out stress and strain model and perform the initialization of flow field parameter and model parameter
Journey, by the bump flow process of particle distribution function, flow field maroscopic quantity statistic processes, BORDER PROCESSING in Lattice Boltzmann Method
Process, error control procedure etc. are computationally intensive and the intensive part called utilizes OpenACC Parallelizing Techniques to transform so that it is
Can perform in multiple accelerator platform parallelization, different accelerator platforms runs when, only need to use same set of generation
Code is it is achieved that thus considerably reduce multi-platform development and maintenance cost.
The bump flow process of distribution function in step s3, fluid density ρ in step S4 ' (x, y) with fluid speed
(difference calculation process runs in step S5 may utilize OpenACC technology on accelerator end parallelization ground to degree u ' for x, statistic processes y)
Performing, each calculation procedure can be distributed a GPU thread and carry out operation independent, thus be improve the arithmetic speed of simulation.
Meanwhile, for the visualization problem in step S6, in order to solve the data transmission between CPU internal memory and GPU video memory
Problem, the data transmission to CPU+GPU platform is optimized: in the beginning of code, utilizes OpenACC to state and applies for aobvious
Deposit space, only when output data file perform once from GPU video memory to the data transmission procedure of CPU internal memory.So can show
Write the data transmission period reduced between CPU internal memory and GPU video memory, improve computational efficiency.Meanwhile, this optimization does not interferes with generation
Code parallelization on multi thread CPU platform runs.
The arithmetic speed test result of the present embodiment is as follows:
Test platform and the test parameter of the present embodiment are as shown in table 1.Test platform includes multi thread CPU and accelerates platform
Accelerating platform with CPU+GPU, operation program includes fluid in the Lattice Boltzmann Method porous media based on C++ of serial
Fluid-flow analogy in the Lattice Boltzmann Method porous media based on OpenACC that flow simulating program is multi-platform with support
Program.The parameter that in test process, two programs are used when calculating is identical.
Table 1 test platform and test parameter
In fig .9, give the calculating that the program of the present embodiment runs on CPU time-consuming, give also utilization simultaneously
The Lattice Boltzmann program of OpenACC parallel optimization accelerates operation on platform and CPU+GPU acceleration platform in multi thread CPU
Calculate time-consuming.The calculating be given in figure is time-consumingly the average result of 10 tests, to ensure the stability of test result.Permissible
Finding out, the calculating using the OpenACC concurrent program of four thread CPU acceleration platforms is time-consumingly 241.54 seconds, and calculating is time-consumingly
The 48.78% of serial program, and using the calculating of the OpenACC concurrent program of CPU+GPU acceleration platform is time-consumingly 22.95 seconds,
Calculate the 4.63% of time-consuming only serial program.
Enforcement step and test result according to the present invention are it can be seen that present invention utilizes grid-Boltzmann model
Convection cell is simulated, thus improves operational efficiency.The method may utilize OpenACC technology to bump flow mistake therein
Journey, BORDER PROCESSING process, statistics maroscopic quantity process and calculating error control conditioning process carry out parallelization transformation, thus are applicable to
Multi thread CPU accelerates platform and CPU+GPU accelerates platform, further increases the computational efficiency of fluid flow problem, the most also
Make a program can be simultaneously run in different acceleration on platform, thus significantly reduce the exploitation of multi-platform concurrent program
And maintenance cost.
As it will be easily appreciated by one skilled in the art that and the foregoing is only presently preferred embodiments of the present invention, not in order to
Limit the present invention, all any amendment, equivalent and improvement etc. made within the spirit and principles in the present invention, all should comprise
Within protection scope of the present invention.
Claims (9)
1. a fluid simulation method, it is characterised in that comprise the following steps:
S1. (x y), and obtains described simulation lattice I to obtain simulation lattice I after the image to porous media carries out gridding process
(x, y) the corresponding fluid viscosity ν of nondimensionalization, fluid density ρ (x, y, t), fluid velocity u (x, y, t) and Gu Bi border;
Wherein, x, y represent that (x, y) goes up abscissa and the vertical coordinate of mesh point to simulation lattice I, and x is 1~Nx, and y is 1~Ny respectively;
S2. make moment t=0, utilize grid-Boltzmann model set up the divergent density function of fluid, discrete velocity function with
And equilibrium distribution function;Described divergent density function isDescribed discrete
Velocity function isDescribed equilibrium distribution letter
Number is(x, y t) represent fi
(x, y) place, movement velocity is c to mesh pointiThe particle corresponding to particle distribution, i represent particle rapidity direction numbering;Represent particle distribution fi(x, y, equilibrium state t), ωiFor weight coefficient;
S3. particle rapidity c is judgediThe direction of motion whether towards Gu Bi border, be then by the reverse function of grid-Boltzmann model,
Make speed ciCorresponding particle distribution fi(x, y, t) at moment t+ δtValue be the distribution of reverse with i particle, otherwise perform grid-Bohr
The collision function of the most graceful model
Wherein, time stepδxFor the length of side of mesh point, csFor the velocity of sound, θiRotate counterclockwise along the positive direction of x-axis for direction i
Angle, slack time
S4. by the divergent density function after developing and discrete velocity function, it is thus achieved that moment t+ δtTime fluid density ρ ' (x, y) and stream
Body speed u ' (x, y);Divergent density function after described evolution is
Discrete velocity function after evolution is
S5. judging whether to meet evolution termination condition, be, simulation terminates, and otherwise makes moment t=t+ δt, return step S3.
2. mould fluid simulation method as claimed in claim 1, it is characterised in that in described step S1, the stream of nondimensionalization
Body viscosity For the kinematic viscosity coefficient of fluid, L0For the characteristic length of fluid, u0For the characteristic velocity of fluid, and
u0=L0/ 1 second;
After described step S5, also include, it is thus achieved that the actual speed of fluid
3. fluid simulation method as claimed in claim 2, it is characterised in that the characteristic length of described fluidOr For simulation lattice I (x, overall width y),For simulation lattice I (x, total height y).
4. fluid simulation method as claimed in claim 1, it is characterised in that the figure in described step S1, to porous media
As carrying out the method for gridding process particularly as follows: the image of porous media to be converted into the gray level image of gridding, binaryzation institute
State gray level image, and remove noise, it is thus achieved that and described simulation lattice I (x, y).
5. fluid simulation method as claimed in claim 1, it is characterised in that in described step S2, during i=0, ci=(0,
0);During i=1~8, θiIt is respectively 0, pi/2, π, 3 pi/2s, π/4,3 π/4,5 π/4 and 7 π/4, corresponding particle distribution fi(x,y,t)
In particle in time step δtDistance c of interior motioniδtFor from mesh point I, (x, y) to another mesh point in its eight neighborhood
Distance;
In described step S3, described reverse function is: fi(x, y, t)=fi+2(x, y, t), i=1,2,5 or 6;fi(x,y,t)
=fI-2(x, y, t), i=3,4,7 or 8.
6. fluid simulation method as claimed in claim 5, it is characterised in that in described step S2, weight coefficient ωiMeet:
ω0=4/9, ω1=ω2=ω3=ω4=1/9, ω5=ω6=ω7=ω8=1/36.
7. fluid simulation method as claimed in claim 1, it is characterised in that the described evolution in described step S5
Termination condition is: moment t whether >=incremental time T, or fluid velocity u ' (whether x y) meetsErr is speed convergence condition.
8. fluid simulation method as claimed in claim 7, it is characterised in that the described incremental time T in described step S5 is
10000δt~1000000 δt。
9. fluid simulation method as claimed in claim 7, it is characterised in that the described speed convergence condition in described step S5
Err is 0~0.1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610554629.XA CN106021828B (en) | 2016-07-15 | 2016-07-15 | A kind of reservoir fluid analogy method based on Lattice Boltzmann model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610554629.XA CN106021828B (en) | 2016-07-15 | 2016-07-15 | A kind of reservoir fluid analogy method based on Lattice Boltzmann model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106021828A true CN106021828A (en) | 2016-10-12 |
CN106021828B CN106021828B (en) | 2017-09-08 |
Family
ID=57118931
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610554629.XA Expired - Fee Related CN106021828B (en) | 2016-07-15 | 2016-07-15 | A kind of reservoir fluid analogy method based on Lattice Boltzmann model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106021828B (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106709191A (en) * | 2016-12-29 | 2017-05-24 | 中国石油大学(北京) | Numerical simulation method and apparatus for seismic wave field |
CN108267390A (en) * | 2016-12-30 | 2018-07-10 | 中国石油天然气股份有限公司 | A kind of gas permeability of reservoir containing nanoaperture determines method |
CN108345964A (en) * | 2018-02-10 | 2018-07-31 | 北京师范大学 | A kind of water quality prediction method and system based on water quality model |
CN108455733A (en) * | 2018-01-22 | 2018-08-28 | 太原理工大学 | A kind of biological film model construction method of film biological sewage processing |
CN111368487A (en) * | 2020-03-17 | 2020-07-03 | 广西师范大学 | Flow field processing method for simulating periodic movement of particles based on lattice Boltzmann model |
CN111858066A (en) * | 2020-07-30 | 2020-10-30 | 中国空气动力研究与发展中心超高速空气动力研究所 | CPU + GPU heterogeneous parallel optimization method in pneumatic theory unified algorithm |
CN112613243A (en) * | 2020-12-16 | 2021-04-06 | 中国科学院深圳先进技术研究院 | Method and device for fluid mechanics simulation and computer readable storage medium |
CN112666059A (en) * | 2020-12-14 | 2021-04-16 | 中国石油大学(华东) | Method for determining gas-water relative permeability of porous medium in gas hydrate decomposition process |
CN113125325A (en) * | 2021-04-26 | 2021-07-16 | 东北石油大学 | Coal rock fracture characteristic characterization and permeability simulation method |
CN113268901A (en) * | 2021-04-12 | 2021-08-17 | 东南大学 | Grid Boltzmann-based micro-flow simulation method for dynamic pressure gas bearing gap |
CN114139335A (en) * | 2021-09-30 | 2022-03-04 | 中国科学院地质与地球物理研究所 | Viscous sound wave simulation method based on single relaxation time lattice Boltzmann model |
CN115795989A (en) * | 2023-01-28 | 2023-03-14 | 安世亚太科技股份有限公司 | Fluid motion simulation method, simulation terminal, electronic device, and medium |
CN115952753A (en) * | 2023-03-14 | 2023-04-11 | 中国测绘科学研究院 | CA and LBM combined debris flow simulation method, system and equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102945295A (en) * | 2012-10-15 | 2013-02-27 | 浪潮(北京)电子信息产业有限公司 | Parallel acceleration method and system of lattice Boltzmann method |
CN105278346A (en) * | 2015-11-06 | 2016-01-27 | 北京航空航天大学 | Thermal fluid simulation method based on discrete lattice Boltzmann dual-distribution model |
-
2016
- 2016-07-15 CN CN201610554629.XA patent/CN106021828B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102945295A (en) * | 2012-10-15 | 2013-02-27 | 浪潮(北京)电子信息产业有限公司 | Parallel acceleration method and system of lattice Boltzmann method |
CN105278346A (en) * | 2015-11-06 | 2016-01-27 | 北京航空航天大学 | Thermal fluid simulation method based on discrete lattice Boltzmann dual-distribution model |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106709191A (en) * | 2016-12-29 | 2017-05-24 | 中国石油大学(北京) | Numerical simulation method and apparatus for seismic wave field |
CN108267390A (en) * | 2016-12-30 | 2018-07-10 | 中国石油天然气股份有限公司 | A kind of gas permeability of reservoir containing nanoaperture determines method |
CN108267390B (en) * | 2016-12-30 | 2020-07-10 | 中国石油天然气股份有限公司 | Method for determining gas permeability of reservoir containing nanopores |
CN108455733A (en) * | 2018-01-22 | 2018-08-28 | 太原理工大学 | A kind of biological film model construction method of film biological sewage processing |
CN108345964B (en) * | 2018-02-10 | 2021-09-21 | 北京师范大学 | Water quality prediction method and system based on water quality model |
CN108345964A (en) * | 2018-02-10 | 2018-07-31 | 北京师范大学 | A kind of water quality prediction method and system based on water quality model |
CN111368487A (en) * | 2020-03-17 | 2020-07-03 | 广西师范大学 | Flow field processing method for simulating periodic movement of particles based on lattice Boltzmann model |
CN111368487B (en) * | 2020-03-17 | 2023-07-18 | 广西师范大学 | Flow field processing method for simulating periodic movement of particles based on lattice Boltzmann model |
CN111858066A (en) * | 2020-07-30 | 2020-10-30 | 中国空气动力研究与发展中心超高速空气动力研究所 | CPU + GPU heterogeneous parallel optimization method in pneumatic theory unified algorithm |
CN111858066B (en) * | 2020-07-30 | 2022-07-15 | 中国空气动力研究与发展中心超高速空气动力研究所 | CPU + GPU heterogeneous parallel optimization method in pneumatic theory unified algorithm |
CN112666059A (en) * | 2020-12-14 | 2021-04-16 | 中国石油大学(华东) | Method for determining gas-water relative permeability of porous medium in gas hydrate decomposition process |
CN112613243A (en) * | 2020-12-16 | 2021-04-06 | 中国科学院深圳先进技术研究院 | Method and device for fluid mechanics simulation and computer readable storage medium |
CN112613243B (en) * | 2020-12-16 | 2023-10-20 | 中国科学院深圳先进技术研究院 | Method, device and computer readable storage medium for hydrodynamic simulation |
CN113268901A (en) * | 2021-04-12 | 2021-08-17 | 东南大学 | Grid Boltzmann-based micro-flow simulation method for dynamic pressure gas bearing gap |
CN113268901B (en) * | 2021-04-12 | 2023-12-22 | 东南大学 | Lattice Boltzmann dynamic pressure gas bearing gap micro-flow simulation method |
CN113125325A (en) * | 2021-04-26 | 2021-07-16 | 东北石油大学 | Coal rock fracture characteristic characterization and permeability simulation method |
CN114139335A (en) * | 2021-09-30 | 2022-03-04 | 中国科学院地质与地球物理研究所 | Viscous sound wave simulation method based on single relaxation time lattice Boltzmann model |
CN115795989A (en) * | 2023-01-28 | 2023-03-14 | 安世亚太科技股份有限公司 | Fluid motion simulation method, simulation terminal, electronic device, and medium |
CN115952753A (en) * | 2023-03-14 | 2023-04-11 | 中国测绘科学研究院 | CA and LBM combined debris flow simulation method, system and equipment |
Also Published As
Publication number | Publication date |
---|---|
CN106021828B (en) | 2017-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106021828A (en) | Fluid simulation method based on grid-boltzmann model | |
Wang et al. | Predicting urban heat island circulation using CFD | |
Larour et al. | Continental scale, high order, high spatial resolution, ice sheet modeling using the Ice Sheet System Model (ISSM) | |
CN104268943A (en) | Fluid simulation method based on Eulerian-Lagrangian coupling method | |
Anderl et al. | Free surface lattice Boltzmann with enhanced bubble model | |
CN109033664B (en) | CFD-based building wind environment assessment method considering building flow-through effect | |
Madalozzo et al. | Numerical simulation of pollutant dispersion in street canyons: geometric and thermal effects | |
CN103035021B (en) | The hydrodynamics framework of animation effect | |
Hu et al. | Unstructured mesh adaptivity for urban flooding modelling | |
CN106339568A (en) | Numerical weather prediction method based on mixed ambient field | |
CN101727653A (en) | Graphics processing unit based discrete simulation computation method of multicomponent system | |
CN103235854A (en) | Contact judgment method of spherical particles and triangular meshes in discrete element simulation | |
CN102831275B (en) | A kind of emulation mode of 3D fluid and system | |
CN104318598A (en) | Implement method and system for three-dimensional fluid-solid one-way coupling | |
CN107025332B (en) | Visualization method for microscopic water diffusion process on fabric surface based on SPH | |
Zhang et al. | A GPU-accelerated implicit meshless method for compressible flows | |
WO2017150626A1 (en) | Particle simulation device, particle simulation method, and particle simulation program | |
Meakin | Adaptive spatial partitioning and refinement for overset structured grids | |
Wang et al. | An GPU-accelerated particle tracking method for Eulerian–Lagrangian simulations using hardware ray tracing cores | |
Ize et al. | Grid creation strategies for efficient ray tracing | |
Ma et al. | A parallel meshless dynamic cloud method on graphic processing units for unsteady compressible flows past moving boundaries | |
Smirnov et al. | LES of bubble dynamics in wake flows | |
CN104318601A (en) | Human motion simulation method under fluid environment | |
Hansen et al. | A parallel algorithm for nonequilibrium molecular dynamics simulation of shear flow on distributed memory machines | |
CN108427605B (en) | Acceleration method for realizing streamline simulation based on particle tracking algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170908 Termination date: 20190715 |
|
CF01 | Termination of patent right due to non-payment of annual fee |