Processing math: 100%

P26

Two-Way Coupling

✅ 水和水中的物体相互作用,物体可以是刚体、弹性体能各种类型的物体。

The coupling between a solid and a liquid should be two-way, i.e., liquid->solid and solid->liquid.

✅ 水 → 物体:浮力。物体 → 水,会把这个水柱的水排出去,此处只讲 “物体 → 水” 部分

P27

关键问题

The coupling between solid and water should be two-way, i.e., water>solid and solid- >water.

The key question is how to expel water out of the gray cell regions???

P28

Virtual Height

✅ 在要排的水柱上面增加一个虚拟的高度,然后正常模拟,关键是求出要加多少虚拟高度,能正好达到排出那么多水的效果。

The idea is to set up a virtual height vi, so that real_newi=iei.

iei=i+β(ioldi)+α(vi+1+i+1+i12vi2i)=newi+α(vi+12vi)

real_newi=iei:下图左边格子的理想高度。

i+1ei+1=i+1+β(i+1oldi+1)+α(i+2+vi+i2vi+12i+1)=newi+1+α(vi2vi+1)

✅ 公式2对应右边格子。

P29

Poisson’s Equation

The outcome is Poisson’s equation, with vi and vi+1 being unknowns.

2vivi+1=1α(newii+ei)=bi

vi+2vi+1=1α(newi+1i+1+ei+1)=bi+1

✅ 通过公式化简提取出其中的线性关系。

P30

The outcome is Poisson’s equation, with vi and vi+1 being unknowns.

✅ 由于木块位置会变,需要解的vi也要改变。 为了让公式统一方便计算,把图左矩阵乘法写成右边形式。公式结果不变,只是工程实现上的简化。

P31

Algorithm with Coupling

γ 的作用:本算法显式积分,不稳定、γ 会让水波小很多。

P32

Rigid Body Update

We estimate the floating force by the actual water expelled in every column.

fi=ρgx(inewi)

Or in 3D,

fi,j=ρgA(i,jnewi,j)

✅ 阿基米得定律:物体受到的浮力 = 排出去的水的重力
✅ 同时要考虑旋转和力矩。但目前旋转的效果不太好,可以考虑改进为隐式积分。
✅ 流体对方块的效果。


本文出自CaterpillarStudyGroup,转载请注明出处。

https://caterpillarstudygroup.github.io/GAMES103_mdbook/