POV-Ray : Newsgroups : povray.binaries.animations : Re: LSSM - Riverflow (MPG1, 910kb) : Re: LSSM - Riverflow (MPG1, 910kb) Server Time
19 Jul 2024 05:34:52 EDT (-0400)
  Re: LSSM - Riverflow (MPG1, 910kb)  
From: Chris Johnson
Date: 8 Jun 2003 20:41:44
Message: <3ee3d7c8$1@news.povray.org>
For more complex fluid flow simulations, Nick Foster and Ronald Fedkiw's
SIGGRAPH 2001 paper 'Practical Animation of Liquids'
(http://www.cis.upenn.edu/~fostern/pdfs/foster_siggraph01.pdf) is excellent,
if somewhat advanced for my own maths skills...

You mention that what you're looking for is more like Jos Stam's 'Stable
Fluids' paper. I've just had a go at modifying his algorithm to apply to
fluids with a height-field for the air/water boundry, such as the ones
you're simulating. Instead of treating the fluid as incompressibly as he
does, I am using a scalar 'height' field as well as a 2d vector velocity
field to describe the fluid as a 2D compressible one, with the density of
fluid at each point being represented by the height (i.e. depth) of water at
that point.

In my algorithm, first the both height and velocity fields are advected by
the velocity field as Stam describes in his paper
(http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/ns.pdf). The
next stages of the algorithm describe how the height and the velocity of the
fluid interact. Firstly, if the velocities of the fluid around a certain
point are such that more fluid is flowing towards that point than away from
it, the height of that point increases to accomodate the extra water.
Secondly, the velocity field is modified so that at places where there is a
'slope' in the height field, the water tends to run down the slope -
equivalent to very dense areas of a compressed fluid expanding outwards to
equalise the pressure.

This algorithm produces some interesting effects, such as realistic wakes
behind objects. There are still a few bugs to iron out: I suspect that my
algorithm could be improved, and the advection technique introduces
significant blurring due to antialiasing if small time steps are used.
Hopefully I'll get the time to render and post an animation soon to show
what I mean?

Has anyone else tried a "ground-up" approach to fluid flow in Pov-Ray (i.e.
looking at the physics first, then writing the code, rather than basing the
code on what looks best)? I'd be most interested to hear from anyone who
has.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.