POV-Ray : Newsgroups : povray.advanced-users : Air resistance : Re: Air resistance Server Time
29 Jul 2024 06:17:41 EDT (-0400)
  Re: Air resistance  
From: David Wallace
Date: 1 Oct 2002 14:06:04
Message: <3d99e40c@news.povray.org>
I actually modeled air resistance in my TearPool IRTC entry:

    #local spd = vlength(vVel[cShot]); // Speed, m/s
    #local dir = vnormalize(vVel[cShot]); // Direction
    #local rdFlat = 1+pow(spd,0.25)*.2; // Drag stretching factor
    #local Cd = 1.3/rdFlat/rdFlat; // Drag coefficient
    #local sMass = 4/3*pi*rd*rd*rd*rhos; // Mass, kg
    #local sCross = pi*rd*rd/rdFlat; // Cross section, m^2

    #local sAcc = ag - dir*0.5*Cd*rhoa*sCross*spd*spd/sMass;
    #local vo = vVel[cShot];
    #declare vVel[cShot] = vVel[cShot] + deltat*sAcc;
    #declare vPos[cShot] = vPos[cShot] + deltat*(vo+vVel[cShot])/2;

This is the part of the lava creation section which calculates air
resistance.  Basically drag is a force calculated as follows:

    F = 0.5*m*v^2*A/V*Cd, directed against the velocity

The rdFlat variable in my setup was an attempt to take the viscous drag of
the molten lava into account by stretching the particle.

"Andrew Coppin" <orp### [at] btinternetcom> wrote in message
news:3d99a872@news.povray.org...
> I now have a working Chaos Pendulum - yay!
>
> But I was wondering... how would I go about modelling air resistance? All
I
> want is to have a system which doesn't go into a fixed oscilation that
lasts
> forever; I want air resistance to damp it down.
>
> Let's say I have a vector V which represents the particle's velocity. I
> could do something like
>   #declare V = 0.9*V;
> Or perhaps I could try
>   #declare V = pow(V, 0.9);
> (if that would actually work - POV-Ray's syntax won't allow it, but you
get
> the gist. Something like "pow(vlength(V), 0.9) * vnormalize(V)" would
work -
> or even "pow(vlength(V), -0.1) * V".)
>
> The question is, does air resistence slow something down more at high
speed?
> Or is it roughly constant? (I know this depends on the shape of the
object -
> we're talking about a smallish sphere here.) Clearly a high-speed object
> will encounter more drag. But it will also have more momentum. So which is
> it? Multiply V by a constant 0 < k < 1? Or raise it to the power of a
> similar constant? I'm not really interested in making this
super-realistic,
> I'd just like some opinions.
>
> Thanks.
> Andrew.
>
>
>


Post a reply to this message

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