Smoothed-particle hydrodynamics
1. SPH Kernel常用的sph kernel函数如下式所示
W(r)=c \left\{\begin{matrix}
1-6(\frac{r}{h})^2 + 6(\frac{r}{h})^3 &(0 \le \frac{r}{h} < \frac{1}{2})\\
2(1-\frac{r}{h})^3 &(\frac{1}{2} \le \frac{r}{h} < 1) \\
0 &else
\end{matrix}\right.c为归一化系数,对于1d sph 有:
I_1 =\int _0^{\frac{h}{2}} 1 - \frac{6}{h^2}r^2 + \frac{6}{h^3} r^3 dr + \int_\frac{h}{2}^{h} 2(1-\frac{r}{h})^3 dr\\
= (r-\frac{2}{h^2} r^3 + \frac{3}{2h^3} r^4)|_{0}^{\frac{h}{2}} - h\frac{(1-\frac{r}{h})^4}{2}|^{h}_{\frac{h}{2}}\\
= \frac{h}{2} - \ ...
CS417 physics based animation笔记
本文为课程CS417 Physics based animation的课程笔记。本课程从欧拉拉格朗日方程以及数值算法出发,介绍了如何模拟弹簧质点系统,有限元,刚体模拟以及流体模拟(流体还没做,摆烂)。对于课程内的公式,本文在力所能及的范围内适当补充了推导过程。
1.Euler-Lagrange任何力学系统应满足的法则,给出广义坐标时能快速对系统受力分析。
两点之间直线最短:
对力学系统,定义广义坐标 ,广义速度 ,能量函数 ,动能函数 ,势能函数 ,有:
\begin{matrix}
L=T-V (1.1)
\\
S(q,\dot{q})=\int_{t_0}^{t_1} L(q,\dot{q})dt
\end{matrix} 当物体运动的起始点和结束点 给定时,泛函 取得最小时系统稳定。当 稳定时,其偏导数趋近于0:
S(q,\dot{q})=S(q + \delta q,\dot{q} + \delta \dot{q}) (1.2)
S(q + \delta q,\dot{q} + \delta \dot{q})
=\int_{t_0}^{t_1} L(q+\delta q, ...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment