doyubkim / fluid-engine-dev

Fluid simulation engine for computer graphics applications

Home Page:https://fluidenginedevelopment.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect formula for collider boundary conditions (Equation 3.18 in the book)

zx-82 opened this issue · comments

commented

Equation 3.18 takes the relative fluid-collider velocity for boundary projection.
This does not seem correct. Consider the simple case of of verctical wall (normal_collider=(1,0)
uv_collider = (0,1) and uv_liquid_boundary=(0,0). Relative velocity then is uv_rel = (0,-1) and the forumla in the book projects this to the wall which gives
boundary_constrained = (0,-1)
This does not seem physically plausible, because the uncontrained velocity was (0,0) and is "suddeny accelerated" to (0,-1).
So I think we must take the liquid velocity and replace its boundary-normal component by the boundar-normal-component of the collider.
(Using relative velocity is important in other contexts such as friction forces, but should not be taken here IMO)

P.S.: It would be really useful to always give some source from the literature for such kind of formula, as Prof. Bridsen does in his book about fluid simulation development)

Projecting this
The formula in the book would project the relative velocity , i.e. .-1 which

While relative velocity is necessary for drag forces,