CN109741428B - Three-order high-precision convection interpolation algorithm suitable for two-dimensional fluid simulation - Google Patents
Three-order high-precision convection interpolation algorithm suitable for two-dimensional fluid simulation Download PDFInfo
- Publication number
- CN109741428B CN109741428B CN201910035897.4A CN201910035897A CN109741428B CN 109741428 B CN109741428 B CN 109741428B CN 201910035897 A CN201910035897 A CN 201910035897A CN 109741428 B CN109741428 B CN 109741428B
- Authority
- CN
- China
- Prior art keywords
- point
- precision
- grid
- order
- dimensional
- 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.)
- Active
Links
Images
Landscapes
- Complex Calculations (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a three-order high-precision convection interpolation algorithm suitable for two-dimensional fluid simulation. Based on a constrained interpolation profile method, when the convection term of a two-dimensional fluid motion control equation is solved and calculated by using a semi-Lagrange method, a high-precision interpolation method is invented aiming at the calculation of physical quantity at a backspacing point, and the convection precision is improved. In addition, in order to reduce memory consumption, only the value of the physical field and the first derivative thereof are stored as calculation variables, and the high-order derivative is calculated approximately based on the derived Taylor expansion under the premise of ensuring that the calculation precision is not damaged. The invention can keep the third-order high precision on the premise of less time and memory consumption and has the characteristic of tight template. Compared with the existing method, the method has obvious improvement on the aspects of visual quality, speed, memory consumption and the like, and can effectively improve the convection accuracy and speed of fluid simulation. Besides fluid simulation, the invention can be used in other fields requiring high interpolation precision, such as image/video super-resolution and the like.
Description
Technical Field
The invention relates to the technical field of computer animation, in particular to a three-order high-precision convection interpolation algorithm suitable for two-dimensional fluid simulation, which can effectively reduce convection numerical dissipation, reduce memory overhead and enhance the sense of reality of fluid animation.
Background
In the fields of computer graphics and virtual reality, physical-based computer animation technology is always the research focus of researchers, and physical-based fluid dynamic simulation technology is a hot problem. Fluid simulation techniques are also widely used in many fields, and the development of engineering fields such as aerospace, aviation, navigation and the like is not independent of the support of fluid techniques.
In fluid simulation, the numerical dissipation increases the viscosity of the fluid, making it more viscous than expected, and smears detail such that visual quality is compromised. Among factors causing numerical dissipation, accuracy of convection has a great influence on visual quality of fluid simulation, and related scholars make various attempts to develop an accurate convection solver. Among them, the high-order interpolation format is widely applied to the field of Computational Fluid Dynamics (CFD), including intrinsic non-oscillation (ENO), weighted ENO (weno), etc., however, the amount of computation is too large to be applied to the field of graphics, and these interpolation algorithms are performed on a wide template, and are not suitable for simulation on a non-uniform grid. The Linear method (Linear), the forward and backward error compensation correction method (BFECC), the MacCormack method and other convection methods are widely used in graphics, but the calculation accuracy is limited, and the highest accuracy can only reach second-order accuracy.
The Constrained Interpolation Profile (CIP) method only constructs an interpolation function in a single grid unit, has a tight template characteristic and has third-order precision, but expanding the CIP to solve a high-dimensional convection equation is a difficult task and needs a large amount of computing time and memory consumption. In addition, the multi-dimensional convection solvers based on CIP in the prior art, such as monotonic CIP (mcip), non-split CIP (uscip), etc., can only partially solve these problems, some at the cost of losing numerical accuracy or causing instability. How to develop an efficient and high-precision high-dimensional CIP scheme is significant for improving the computational efficiency and precision of the convection method, but is still a challenging problem.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a three-order high-precision convection interpolation algorithm suitable for two-dimensional fluid simulation, which comprises the following steps: two-dimensional Taylor Expansion based Constrained Interpolation Profile (2d Taylor Expansion based Constrained Interpolation Profile, 2 dTECIP). When the existing CIP-based method is applied to high dimension, the problems of high calculation overhead, large memory occupation, low precision or instability and the like generally exist. The method only takes the physical quantity and the first derivative thereof as unknown variables, and the high-order derivative is not saved as variables, so that a large amount of memory overhead can be reduced. Secondly, the high-order derivative is calculated according to the requirement by using local Taylor expansion, the calculation speed is high, the third-order precision is kept, and abundant fluid details can be effectively kept. Finally, the method does not destroy the tight template property of the original CIP method, and is also suitable for non-uniform grids except for regular grids.
The technical scheme of the invention is as follows: the invention discloses a three-order high-precision convection interpolation algorithm suitable for two-dimensional fluid simulation, which is mainly used for improving the precision of solving a convection item in a fluid motion control equation. When the convection term of the fluid motion control equation is solved by using a semi-Lagrange method, high-precision interpolation is adopted for calculation of physical quantity at a backspacing point, numerical value dissipation is reduced, and meanwhile, in order to reduce memory consumption, only the value of a physical field and the first derivative thereof are stored as calculation variables.
For a two-dimensional convection equation, let φ be a convection physical quantity, 3 variables are stored at each grid point i, i.e. the physical quantity and its first-order partial derivative: phi is ai、And the corresponding value at the backspacing point is obtained by high-precision interpolation. The method comprises the following steps:
s1), setting the side length of a grid unit as h, setting the four grid points as A, B, C, D, setting all sides of the grid unit to be parallel to the coordinate axis of the two-dimensional space, setting the distance between the side AB and the side CD to be parallel to the X axis and the distance between the side AB and the side CD to be h along the positive direction of the Y axis, and setting the distance between the side AD and the side BC to be parallel to the Y axis and the distance between the side AD and the side BC to be h along the positive direction of the X axis. Setting points E and G as projection points of the point P on the sides AB and AD respectively;
s2), calculating second-order partial derivatives of phi at the point A, the point B and the point DThe value of (c). The specific calculation is as follows:
based on the following third order precision taylor expansion,
let Δ x be Δ y be h, calculate the second order partial derivative at grid point aThe values, one can obtain:
similarly, let Δ x be-h and Δ y be h, calculate the second-order partial derivative at grid point BThe values, one can obtain:
similarly, let Δ x be h and Δ y be-h, calculate the second-order partial derivative at grid point DThe values, one can obtain:
s3), by phi at grid points a and B based on one-dimensional CIP interpolation algorithmA、φB、Calculate phi of point EE、Passing through points A and BCalculating point E
By phi at grid points A and DA、φD、Calculate phi at point GG、Through grid points A and DCalculating at point G
Where ξ and η are the lengths of AE and AG, respectively.
Further, based on the one-dimensional CIP interpolation algorithm, pass phi at the grid points a and B in step S3)A、φB、 Calculate phi at point EE、The concrete formula is as follows:
φE=C3(xE-xA)3+C2(xE-xA)2+C1(xE-xA)+C0;
wherein, C0=φA,xEDenotes the abscissa, x, of point EAAnd (4) representing the abscissa of the point A, and h is the side length of a grid unit.
Further, based on the one-dimensional CIP interpolation algorithm, through A and B in step S3)Calculating at point EThe concrete formula is as follows:
xEdenotes the abscissa, x, of point EAAnd (4) representing the abscissa of the point A, and h is the side length of a grid unit.
Further, based on the one-dimensional CIP interpolation algorithm, pass phi at the grid points a and D in step S3)A、φD、 Calculate phi at point GG、The concrete formula is as follows:
φG=C3(yG-yA)3+C2(yG-yA)2+C1(yG-yA)+C0;
wherein, C0=φA,yGDenotes the ordinate, y, of the G pointAAnd (4) representing the ordinate of the point A, and h is the side length of the grid unit.
Further, in step S3), based on the one-dimensional CIP interpolation algorithm, the grid points a and D are passed Calculating at point GThe specific formula is as follows:
yGdenotes the ordinate, y, of the G pointAAnd (4) representing the ordinate of the point A, and h is the side length of the grid unit.
The invention has the beneficial effects that:
the invention can keep the third-order high precision on the premise of less time and memory consumption and has the characteristic of tight template. Compared with the existing method, the method has obvious improvement on the aspects of visual quality, speed, memory consumption and the like, and can effectively improve the convection accuracy and speed of fluid simulation. Furthermore, the present invention can be used in other fields requiring high interpolation accuracy, such as image/video super-resolution, etc., besides fluid simulation.
Drawings
FIG. 1 is a schematic illustration of interpolation for two-dimensional fluid simulation according to the present invention;
FIG. 2 is a flow chart of the calculation of the method of the present invention applied to a fluid simulation;
fig. 3 is a comparison of rendering graphs of two-dimensional fluid simulation results, in which (a), (b), (c), (d), and (e) are rendering graphs of fluid simulation results of a Linear and BFECC algorithm, an MCIP and USCIP algorithm, and the method (2dTECIP) of the present invention, respectively, using low-order precision.
Detailed Description
The following further describes embodiments of the present invention with reference to the accompanying drawings:
the invention provides a three-order high-precision convection interpolation algorithm suitable for two-dimensional fluid simulation, which is mainly used for improving the precision of calculating and solving convection terms in a fluid motion control equation so as to improve the precision of fluid simulation. When the convection term of the fluid motion control equation is solved by using a semi-Lagrange method, high-precision interpolation is adopted for calculation of physical quantity at a backspacing point, numerical value dissipation is reduced, and meanwhile, in order to reduce memory consumption, only the value of a physical field and a first derivative thereof are stored as calculation variables, and a high-order derivative is calculated approximately based on a derived Taylor expansion on the premise of ensuring that calculation precision is not damaged.
For a two-dimensional convection equation, let φ be a convection physical quantity, 3 variables are stored at each grid point i, i.e. the physical quantity and its first-order partial derivative: phi is ai、And the corresponding value at the backspacing point is obtained by high-precision interpolation. The method comprises the following steps:
s1), for the taylor expansion:
when the value of Δ x is 0,
when the value of y is equal to 0,
by combining the above 5 equations and neglecting the remainder of the third order or more, the following taylor expansion equation of the third order precision is obtained:
after finishing, obtaining:
s2), as shown in fig. 1, for the two-dimensional space grid cell where the back-off point P is located, let the side length of the grid cell be h, and the point E, G be the projection points of P on the sides AB and AD, respectively. Value phi of P point positionP、The corresponding values of the four grid points A, B, C, D of the grid cell are obtained through the invented high-precision interpolation;
s3), calculating second-order partial derivatives of phi at the point A, the point B and the point DThe value of (c) is specifically calculated as follows:
based on the taylor expansion equation obtained in step S1), let Δ x be Δ y be h, the second-order partial derivative at grid point a is calculatedThe values, one can obtain:
similarly, let Δ x be-h and Δ y be h, calculate the second-order partial derivative at grid point BThe values, one can obtain:
similarly, let Δ x be h and Δ y be-h, calculate the second-order partial derivative at grid point DThe values, one can obtain:
s4), by phi at grid points a and B based on one-dimensional CIP interpolation algorithmA、φB、Calculate phi at point EE、The calculation formula is as follows:
φE=C3(xE-xA)3+C2(xE-xA)2+C1(xE-xA)+C0;
wherein, C0=φA,xEDenotes the abscissa, x, of point EAAnd (4) representing the abscissa of the point A, and h is the side length of a grid unit.
xEis the abscissa of point E, xAThe abscissa of the point A is, and h is the side length of the grid unit.
φG=C3(yG-yA)3+C2(yG-yA)2+C1(yG-yA)+C0;
wherein, C0=φA,yGDenotes the ordinate, y, of the G pointAAnd (4) representing the ordinate of the point A, and h is the side length of the grid unit.
Passing through grid pointsAt A and DCalculating point GThe specific calculation formula is as follows:
yGdenotes the ordinate, y, of the G pointAAnd (4) representing the ordinate of the point A, and h is the side length of the grid unit.
based on the taylor expansion equation obtained in step S1),
rearranging the above three formulas to obtain the following formula to calculate phi at the point P,
referring to fig. 2, the flow chart of the fluid simulation is shown, and the convection interpolation method provided by the present invention is mainly used for calculating the convection term of the fluid simulation. Fig. 3 is a comparison of rendering graphs of two-dimensional fluid simulation results, fig. 3(e) is a rendering graph of results of the method (2dTECIP) of the present invention for two-dimensional fluid simulation, fig. 3(a), fig. 3(b), fig. 3(c), and fig. 3(d) are rendering graphs of fluid simulation results of Linear and BFECC algorithms, MCIP and USCIP algorithms, respectively, using low-order precision, and it can be seen from the graphs that the simulation effect of three methods based on CIP is better than that of Linear and BFECC algorithms with low-order precision. Due to the defects of the MCIP and USCIP methods, the method achieves better effect in two-dimensional fluid simulation than the MCIP and USCIP methods, and the simulated smoke is richer in detail.
The foregoing embodiments and description have been presented only to illustrate the principles and preferred embodiments of the invention, and various changes and modifications may be made therein without departing from the spirit and scope of the invention as hereinafter claimed.
Claims (5)
1. A three-order high-precision convection interpolation algorithm suitable for two-dimensional fluid simulation is characterized in that: when the convection term of the fluid motion control equation is solved by using a semi-Lagrange method, high-precision interpolation is adopted for calculation of physical quantity at a backspacing point, numerical value dissipation is reduced, and meanwhile, in order to reduce memory consumption, only the value of a physical field and the first derivative thereof are stored as calculation variables, and the high-order derivative is approximately calculated based on a derived Taylor expansion formula on the premise of ensuring that the calculation precision is not damaged;
for a two-dimensional convection equation, let φ be a convection physical quantity, 3 variables are stored at each grid point i, i.e. the physical quantity and its first-order partial derivative: phi is ai、The corresponding value on the backspacing point is obtained through high-precision interpolation; the method comprises the following steps:
s1), setting the side length of a grid unit as h, setting the four grid points as A, B, C, D, wherein the side length of the grid unit is h, all sides of the grid unit are parallel to the coordinate axis of a two-dimensional space, the side AB and the side CD are parallel to the X axis, the distance between the side AB and the side CD along the positive direction of the Y axis is h, and the side AD and the side BC are parallel to the Y axis, and the distance between the side AD and the side BC along the positive direction of the X axis is h; setting points E and G as projection points of the point P on the sides AB and AD respectively;
s2), calculating second-order partial derivatives of phi at the point A, the point B and the point DThe value of (c) is specifically calculated as follows:
based on the following third order precision taylor expansion,
let Δ x be Δ y be h, calculate the second order partial derivative at grid point aThe values, one can obtain:
similarly, let Δ x be-h and Δ y be h, calculate the second-order partial derivative at grid point BThe value of (c) can be given as:
similarly, let Δ x be h and Δ y be-h, calculate the second-order partial derivative at grid point DThe value of (c) can be given as:
s3), based on one-dimensional Constrained Interpolation Profile (CIP) interpolation algorithm, through phi at grid points A and BA、φB、 Calculate phi of point EE、Passing through grid points A and BCalculating point E
By phi at grid points A and DA、φD、Calculate phi at point GG、Through grid points A and DCalculating at point G
Where ξ and η are the lengths of AE and AG, respectively.
2. The three-order high-precision convective interpolation algorithm suitable for two-dimensional fluid simulation according to claim 1, wherein: step S3), based on the one-dimensional CIP interpolation algorithm, pass phi at the grid points a and BA、φB、Calculate phi at point EE、The concrete formula is as follows:
φE=C3(xE-xA)3+C2(xE-xA)2+C1(xE-xA)+C0;
3. The three-order high-precision convection current plug suitable for two-dimensional fluid simulation of claim 1Value algorithm, characterized by: step S3), based on the one-dimensional CIP interpolation algorithm, passing through the grid points a and BCalculating at point EThe concrete formula is as follows:
4. The three-order high-precision convective interpolation algorithm suitable for two-dimensional fluid simulation according to claim 1, wherein: step S3), based on the one-dimensional CIP interpolation algorithm, pass phi at the grid points a and DA、φD、Calculate phi at point GG、The concrete formula is as follows:
φG=C3(yG-yA)3+C2(yG-yA)2+C1(yG-yA)+C0;
5. The three-order high-precision convective interpolation algorithm suitable for two-dimensional fluid simulation according to claim 1, wherein: step S3), based on the one-dimensional CIP interpolation algorithm, pass through the grid points a and DCalculating point GThe specific formula is as follows:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910035897.4A CN109741428B (en) | 2019-01-15 | 2019-01-15 | Three-order high-precision convection interpolation algorithm suitable for two-dimensional fluid simulation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910035897.4A CN109741428B (en) | 2019-01-15 | 2019-01-15 | Three-order high-precision convection interpolation algorithm suitable for two-dimensional fluid simulation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109741428A CN109741428A (en) | 2019-05-10 |
CN109741428B true CN109741428B (en) | 2022-03-15 |
Family
ID=66364852
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910035897.4A Active CN109741428B (en) | 2019-01-15 | 2019-01-15 | Three-order high-precision convection interpolation algorithm suitable for two-dimensional fluid simulation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109741428B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114969029A (en) * | 2022-04-22 | 2022-08-30 | 南京航空航天大学 | Taylor expansion-based multi-dimensional interpolation scheme and inter-dimensional point value taking method thereof |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6266071B1 (en) * | 1998-11-20 | 2001-07-24 | Silicon Graphics, Inc. | Method of producing fluid-like animations using a rapid and stable solver for the Navier-Stokes equations |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090040220A1 (en) * | 2007-02-05 | 2009-02-12 | Jonathan Gibbs | Hybrid volume rendering in computer implemented animation |
US8099265B2 (en) * | 2007-12-31 | 2012-01-17 | Exocortex Technologies, Inc. | Fast characterization of fluid dynamics |
US9984489B2 (en) * | 2011-07-27 | 2018-05-29 | Dreamworks Animation L.L.C. | Fluid dynamics framework for animated special effects |
-
2019
- 2019-01-15 CN CN201910035897.4A patent/CN109741428B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6266071B1 (en) * | 1998-11-20 | 2001-07-24 | Silicon Graphics, Inc. | Method of producing fluid-like animations using a rapid and stable solver for the Navier-Stokes equations |
Non-Patent Citations (3)
Title |
---|
多步高阶隐式泰勒级数法暂态稳定计算;徐英等;《电力系统保护与控制》;20111201(第23期);第11-15页 * |
泰勒展开图像插值的一个改进算法;詹毅等;《重庆文理学院学报(社会科学版)》;20160910(第05期);第8-11页 * |
高阶CIP数值方法及其在相关物理问题中的应用;傅德月等;《计算物理》;20110325(第02期);第259-266页 * |
Also Published As
Publication number | Publication date |
---|---|
CN109741428A (en) | 2019-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8289327B1 (en) | Multi-stage fire simulation | |
Rendall et al. | Efficient mesh motion using radial basis functions with data reduction algorithms | |
Leonard et al. | The NIRVANA scheme applied to one‐dimensional advection | |
Gofuku et al. | Point-tangent/point-normal B-spline curve interpolation by geometric algorithms | |
CN112862972A (en) | Surface structure grid generation method | |
CN108932392B (en) | Transient temperature calculation method based on improved triple reciprocity boundary element method | |
Pini et al. | Consistent look-up table interpolation method for real-gas flow simulations | |
CN109741428B (en) | Three-order high-precision convection interpolation algorithm suitable for two-dimensional fluid simulation | |
CN116541995B (en) | Full-geometric space parameterized deformation method and system for multistage compressor | |
Ren et al. | Fast SPH simulation for gaseous fluids | |
CN110781632A (en) | SPH fluid simulation method based on smoothing length | |
CN109801348B (en) | Three-order high-precision convection interpolation algorithm suitable for three-dimensional fluid simulation | |
Larsson et al. | A scheme for more efficient usage of CALPHAD data in simulations | |
Dębski | Real-time interpolation of streaming data | |
Qamar et al. | Steady supersonic flow-field predictions using proper orthogonal decomposition technique | |
CN114510775A (en) | Complex model three-dimensional space curved grid division method | |
CN104572575A (en) | Generation method of super-deformation dynamic grids | |
Peng et al. | A Novel Approach for NURBS Interpolation with Minimal Feed Rate Fluctuation Based on Improved Adams‐Moulton Method | |
Hou | Various remeshing arrangements for two-dimensional finite element crack closure analysis | |
Rozenberg et al. | Fluid structure interaction problems in turbomachinery using rbf interpolation and greedy algorithm | |
CN114925627A (en) | Helicopter flow field numerical simulation system and method based on graphic processor | |
Fuchs et al. | Interactive Isogeometric Volume Visualization with Pixel-Accurate Geometry | |
KR101110342B1 (en) | System and method for shape controllable fluid simulation | |
CN110941906A (en) | Triple reciprocity method conversion method for unknown variable domain integration in boundary integral equation | |
Zhu et al. | Animating turbulent fluid with a robust and efficient high‐order advection method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |