其他分享
首页 > 其他分享> > 【Heskey带你玩模拟】流体基础

【Heskey带你玩模拟】流体基础

作者:互联网

首先,老规矩:

未经允许禁止转载(防止某些人乱转,转着转着就到蛮牛之类的地方去了)

B站:Heskey0


Eulerian-View

N-S:

\[\rho\frac{Dv}{Dt}=\rho g-\nabla p+\mu\nabla^2v \]

\[\nabla\cdot v=0 \]

operator splitting之后,分为

Finite difference

1. Advection

物理量的material derivative为0

\[\frac{Dq}{Dt}=\frac{\part q}{\part t}+v\cdot\nabla q=0 \]

在Lagrangian view下,粒子上的表现为:

\[q^{n+1}=q^n \]

在Eulerian View下

semi-Lagrangian :

2. Projection

上下左右分别做 Finite Difference

\[\rho\frac{Dv}{Dt}=-\nabla p \]

最终得到 :

\[-\frac{\Delta t}{\rho}\nabla\cdot\nabla p=-\nabla\cdot v^n \]

问题转化为:Poisson problem

Boundary conditions :

线性系统的解

Krylov-subspace solvers

很有效的linear system solvers,有很多变形,最常用的一种是conjugate gradients

Poisson equation的解

Hybrid Eulerian-Lagrangian Schemes (Lagrangian View + Eulerian View) :

fluid solver has two components(对于incompressible fluid solver来说):

1. Eulerian View :

2. Lagrangian View :

Hybrid Eulerian-Lagrangian

粒子作为一轮共鸣,网格作为二轮共鸣

  1. Particle to Grid
  2. Grid操作(projection)
  3. Grid to Particle
  4. Particle操作(Advection)

具体方法 :

PIC (Particle in cell)
  1. P2G, scatter velocity from particles to grid,传递时,使用kernel(靠近的点权重大)(常用Quadratic的B样条曲线)
  2. Grid normalization,归一化(除以权重的和,保证物理量守恒)
  3. pressure projection
  4. G2P gather velocity(自由度损耗,丢失信息)
APIC (Affine Particle in cell) : 推导及其复杂,实现非常简单
  1. P2G, 除了velocity还会转移局部的affine速度场

    grid_v = weight*(v + affine)
    
  2. 更新affine

PolyPIC(poly particle in cell)
MPM(Material Point Method)
MLS-MPM(Moving Least Squares MPM)

标签:frac,Particle,nabla,Heskey,流体,part,grid,rho,模拟
来源: https://www.cnblogs.com/Heskey0/p/16182848.html