|
 |
Cousin Ricky <ric### [at] yahoo com> wrote:
> The issue is a section of code that "adjusts" the column positions, and
> ultimately derives from parameters eFluidX, eFluidZ, and fRadius.
> Common sense would suggest that this is an attempt to deal with a
> non-vertical container, but that is not what this code section does. In
> fact, I cannot figure out what the heck Mr. Robertson is trying to do here.
Since you have a vertical cylinder, then the x and z parameters are there to
keep wandering bubbles inside the cylindrical container.
It looks like he just didn't do a very good job of making the correction.
I'd try collision testing of the spheres with the wall of the cylinder before
the calculations of the next round happen, along with storing the direction of
motion of each bubble from the previous step, and a flag. If a collision will
take place, set the flag, make the bubble move toward the central axis for a
certain number of steps before releasing it from that corrective direction by
turning off the flag.
> Version 4.0.1 suppresses that adjustment, forcing the bubbles to stay
> within their container. Unfortunately, the Champagne flute must remain
> upright for the bubble columns to be positioned in any quasi-realistic
> manner.
When I get back into "bounding cylinder" mode, I'll try to ponder bounding a
tilted champagne flute.
However, perhaps you should just use trace() to determine the starting position
of the bubble, and then when it collides with the side of the tilted flute, make
it rise along the edge until it's y-value equals the liquid's surface.
>
> As for the bubble expansion rate, I am not an expert on fluid dynamics,
> and clearly neither is Mr. Robertson. Version 4.0 adds a global
> parameter to control the expansion rate of the bubbles. Between that
> parameter and varying the height of the bubble container, one should be
> able to find a combination that resembles real life carbonation.
The size of a bubble is related to the pressure exerted on it.
Fluid pressure is dependent solely on the height of the column of liquid.
So you should start with a bubble of some initial size, and then adjust the
VOLUME of the bubble in a linear fashion as it rises.
P1V1 = P2V2
- BW
Post a reply to this message
|
 |