Stam fluid solver learning notes

Source: Internet
Author: User

The main problem of fluid computing is to solve the NS equation, and how to solve it is the length of each family. Alias's Daniel stam proposed a stable fluid solution approach at the end of the last century. After 10 years, let's look at it ......

 

The fluid calculation process is considered as an integral process, but points become unstable when they are not careful. There are many reasons, for example, the step size is greater than the stable step size of a method, we have not considered conservation of mass and conservation of energy, and so on.

 

Stam uses an implicit Point Method to Solve the Problem of stable points. In the past, it was a direct explicit point (plus DT), and now it is the time to go back to DT, take the T-dT time, but this requires an additional linear equations. Since this linear system is sparse, the Gaussian-Seidel iteration method can be used to solve this system (satisfactory performance ).

 

Well, the stable integral method has been solved. Now we can see conservation of mass. Generally, it is integrated based on several items of the NS equation (for example, vertical flow, diffusion, and external force), which is not conservation of mass. If the State conforming to conservation of mass is visualized into all point sets in a plane, the result of each point can take a point (state) out of this plane, that is, the condition of conservation of mass is damaged. Then, we need to perform a projection action at the end of the integral, and project the State to this plane, which is also a prerequisite for mass conservation. The projection action may be less scientific, but at least meets the "stable" requirement. The projection is based on the Helmholtz-Hodge decomposition method. This method points out that any vector field (the velocity field we accumulate) can be uniquely decomposed into a converged vector field (that is, no divergence) and a scalar gradient field.
W = u + DEL (q) ==> u = W-del (q)
(DEL is del operator, vector differential operator, and is a mark, which is used together with a vector for differentiation)
Then we only need to take the converged vector field as the velocity field, and this operation is the projection. For this Q, we need to solve another linear system,
Del (w) = del ^ 2 (q)
This is a Poisson equation, and some numerical methods can solve it. After Q is obtained, the final projection operation is also obtained, and the entire solution process is completed.

 

The following is the result of the experiment on the PS3. The two-dimensional CPU-updated texture has not yet released the screenshot function ......

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.