POV-Ray : Newsgroups : povray.advanced-users : Wind question Server Time
1 Nov 2024 19:16:43 EDT (-0400)
  Wind question (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Rune
Subject: Wind question
Date: 3 Mar 2001 20:45:13
Message: <3aa19e29$1@news.povray.org>
I have implemented wind in my particle system, but I'm not sure it's working
correctly.

When I have just gravity the particles accelerate downwards. When I add wind
from the side, the particles move downwards and to the side, accelerating,
but in a straight line. When I use less drag, they move less to the side and
when I use more drag they move more to the side. But always in a straight
line. I'm can't figure out if it's supposed to behave that way or not? How
should the particles move when wind is used?

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 28)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Tony[B]
Subject: Re: Wind question
Date: 3 Mar 2001 21:12:07
Message: <3aa1a477@news.povray.org>
You need to factor in air resistance, I think... or maybe you have, you
mention "drag". My physics book has a whole chapter about this...


Post a reply to this message

From: Margus Ramst
Subject: Re: Wind question
Date: 3 Mar 2001 21:18:51
Message: <3AA1A701.6D47BAD2@peak.edu.ee>
Rune wrote:
> 
> When I have just gravity the particles accelerate downwards. When I add wind
> from the side, the particles move downwards and to the side, accelerating,
> but in a straight line. When I use less drag, they move less to the side and
> when I use more drag they move more to the side. But always in a straight
> line. I'm can't figure out if it's supposed to behave that way or not? How
> should the particles move when wind is used?
> 

Hm, well I'm far from a physics expert, but this is how I see it:
If you have two linear, directional forces, both constant, you should have
constant acceleration in both directions. So AFAICS this means the trajectory
would be linear.
However, if I'm not mistaken, the faster an object moves in the direction of the
wind, the less it accelerates, until acceleration stops when the object's
velocity reaches wind velocity.
Also, gravitaional acceleration will not be constant, it will be reduced by air
resistance until acceleration stops when air resistance equals gravitational
pull.
The trajectory should still be linear if the reduction in acceleration
(derivative of the acceleration curve) is equal in both directions. Otherwise,
it would only become linear once terminal velocity is achieved in both
directions.

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg
Home page http://www.hot.ee/margusrt


Post a reply to this message

From: Rune
Subject: Re: Wind question
Date: 3 Mar 2001 22:54:14
Message: <3aa1bc66@news.povray.org>
"Margus Ramst" wrote:
> Hm, well I'm far from a physics expert, but this is how I
> see it:
> If you have two linear, directional forces, both constant,
> you should have constant acceleration in both directions.

I believe that too.

> So AFAICS this means the trajectory would be linear.

Yes.

> However, if I'm not mistaken, the faster an object moves
> in the direction of the wind, the less it accelerates,
> until acceleration stops when the object's velocity
> reaches wind velocity.

Correct.

> Also, gravitaional acceleration will not be constant, it
> will be reduced by air resistance until acceleration
> stops when air resistance equals gravitational pull.

I know that in my implementation the air resistance does slow down the
gravitational acceleration. But I don't know if it does it correctly.

> The trajectory should still be linear if the reduction
> in acceleration (derivative of the acceleration curve)
> is equal in both directions.

At this point I can't figure it out any more.

> Otherwise, it would only become linear once terminal
> velocity is achieved in both directions.

I figured myself that movement should be linear once terminal velocity was
reached, but I can't find out if it should be before...

Anybody know it?

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 28)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Rune
Subject: Re: Wind question
Date: 3 Mar 2001 22:54:16
Message: <3aa1bc68@news.povray.org>
"Tony[B]" wrote:
> You need to factor in air resistance, I think... or maybe
> you have, you mention "drag".

I do have air resistance. (Wind has no effect at all when air resistance is
set to 0.) However, I don't know if the air resistance works quite right.

> My physics book has a whole chapter about this...

Does it have any curves that show the movement before terminal velocity is
reached? :)

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 28)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Sigmund Kyrre Aas
Subject: Re: Wind question
Date: 4 Mar 2001 08:05:45
Message: <ls84atol0ukvs4kb7v2roe43d2c0on4ooc@4ax.com>
On Sun, 4 Mar 2001 02:42:20 +0100, "Rune" <run### [at] inamecom>
wrote:
>line. I'm can't figure out if it's supposed to behave that way or not? How
>should the particles move when wind is used?

The drag coefficient is highly speed dependent. A side wind on a
falling sphere will initially give a large wind force, then decrease
as the sphere accelerates to steady state.

Below I've included a drag coefficient function based on experimental
data. I don't have the time to convert it to pov syntax, but you
probably know what to do. (CD is the output, so when this is written
as a macro just type CD at the end.) Input is the Reynold's number. If
hydrodynamic mass and buoyancy is neglected, the following
differential equation is obtained:
dV/dt=-g*y-C*Vr*abs(Vr)*CD
where 
V is speed <vx,vy,vz>
y=<0,1,0>
C=0.75*rho/d
rho=rho_air/rho_sphere
Vr=V_sphere-V_air
abs(V)=vlength(V)
CD=CDkule(Re)=CDkule(abs(Vr)*d/nu)
d is sphere diameter and nu is kinematic viscosity i.e 1.5e-5 for air
when everything is in si units. 

The differential equation can be solved within pov using Euler, or
even better, Heun's method. If you're not familiar with numerical
integration maybe someone else here can help you. I don't have the
time at the moment.

sig

Short explanation of the syntax below:
array=[43 23 13 4]; // defines an array (or row matrix actually)
array(3) // gives 13


%======================== CDkule ==========================
% Computes the drag-coefficient of a sphere as a function
% of the Reynolds nunber Re. Curve fitted after fig. A-56
% in "Fluid Mechanics & Hydraulics", Schaum's Solved Problems
%=============================================================


%-----------------------
function val = qparab(y,x) 
val = y(1)+x*(y(2)+(y(3)+ y(4)*x)*x);


function CD = CDkule(Re)
a2=[0.658 34.87 -14.05 4.22];
a3=[2.41 -17.08 43.72 -30.41];
a4=[11.932 -8.472 2.031 -0.1584];
a5=[14.93 -7.332 1.1905 -0.06335];
if (Re<=0.0)
   CD = 0.0;
   return
end
if (Re> 8.0e6) 
   CD=0.2;
   return
end
x0 = log(Re)/log(10.0);
if (Re> 0.0 & Re<=0.5)
   CD=24.0/Re;
   return
end
if (Re> 0.5 & Re<=100.0)
    CD=qparab(a2,1.0/Re);
    return
end
if (Re> 100.0 & Re<=1.0e4)
    CD=qparab(a3,1.0/x0);
    return
end
if (Re> 1.0e4 & Re<=3.35e5)
    CD=qparab(a4,x0);
    return
end
if (Re> 3.35e5 & Re <=5.0e5)
    x1 = log(Re/4.5e5)/log(10.0);
    CD=91.08*x1^4 + 0.0764;
    return
end
if (Re> 5.0e5 & Re<=8.0e6)
    CD=qparab(a5,x0);
    return
end


-- 
ICQ 74734588


Post a reply to this message

From: Duncan Gray
Subject: Re: Wind question
Date: 4 Mar 2001 12:19:22
Message: <3aa2791a@news.povray.org>
Rune wrote:
> I have implemented wind in my particle system, but I'm not sure it's
working
> correctly. <SNIP>

Sounds like your wind might be directly accelarating the particles (via the
drag factor). Should this effect be divided by a factor of the mass of the
particle to reflect it being a force rather than an accellaration ?

As the drag is related to the area (i.e. radius^2) and mass is related to
the volume (radius^3), you should be able to get away with dividing the wind
effect by some factor of the blob size.

Maybe not entirely accurate, but I think it would tend to make the tiny
water droplets get blown further off course than the larger (heavier)
droplets. I guess it should work in reverse also, for a particle stream shot
at say 45 degrees from horizontal, with no wind, the lighter particles will
tend towards the wind direction(i.e. none) more than the heavier particles.
i.e. the heavier particles will travel further.

I'm not sure, but I think this is the effect I would expect to see.

--
Duncan Gray
(warning: may contain traces of nut)


Post a reply to this message

From: Tony[B]
Subject: Re: Wind question
Date: 4 Mar 2001 19:14:16
Message: <3aa2da58@news.povray.org>
Uh, I dunno I haven't really looked into that chapter... I just know it's
there... <goes to check> OK. It talks specifically about "Projectile Motion
with Air Resistance".

Here's the pseudocode they propose:

1) Identify the mass (m), area (A) of the silhouette of the object (as seen
from the front), drag coefficient (C), and density (p) of the air. D =
(p*C*A)/2

2) Choose the time interval DeltaT, and the initial values of x, y, Vx, Vy,
and T. You may want to express velocity as magnitude and direction.

3) Choose a maximum number of intervals N or the maximum time
(T_max=N*DeltaT).

4) Loop steps 5-9 while n < N or T < Tmax

5) Calculate acceleration components: ax = -(D/m)*V*Vx     ay
= -g-(D/m)*V*Vy

6) Plot x, y, Vx, Vy, ax, and ay.

7) Calculate new velocity components:  Vx + DeltaVx = Vx + ax*DeltaT
Vy + DeltaVy = Vy + ay*DeltaT

8) Calculate new coordinates: x + Deltax = x + Vx*DeltaT + ax*(DeltaT^2)/2
y + Deltay = y + Vy*DeltaT + ay*(DeltaT^2)/2

9) Increment the time by DeltaT.

10) Stop.



That should be it. At least, that's all the book has to say about that.
Sorry I couldn't be more helpful.


Post a reply to this message

From: Chris Huff
Subject: Re: Wind question
Date: 5 Mar 2001 07:47:33
Message: <chrishuff-FD52A5.07442605032001@news.povray.org>
In article <3aa19e29$1@news.povray.org>, "Rune" 
<run### [at] inamecom> wrote:

> When I have just gravity the particles accelerate downwards. When I 
> add wind from the side, the particles move downwards and to the side, 
> accelerating, but in a straight line. When I use less drag, they move 
> less to the side and when I use more drag they move more to the side. 
> But always in a straight line. I'm can't figure out if it's supposed 
> to behave that way or not? 
> How should the particles move when wind is used?

In my particle system, I consider particles as infinitely small points, 
with a constant wind resistance (not related to velocity). While it 
doesn't simulate any physical case, it seems to work well for the 
purposes of the particle_system object.
I first figure out the velocity of the surrounding air *relative to the 
velocity of the particle*, by subtracting the velocity of the particle 
from that of the wind. I then multiply by the drag, which is a simple 
number specified by the user, and add the result to the other forces.
If the wind is slower than the particle, air resistance will cause the 
particle to slow down toward the wind speed. Otherwise, it will speed up 
to match...in other words, it always tends toward the wind velocity, 
even if that is < 0, 0, 0>, so it is really just a simulation of air 
drag.
Again, this doesn't match any physical effect, but it's "close enough" 
for graphics and probably a lot faster than computing the actual drag, 
which you would probably have to compute first for a range of speeds, 
and put into an array or spline to look up later, in order to get a 
reasonable speed. Actually, using a spline instead of a plain float 
value might not be a bad idea...

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Wind question
Date: 5 Mar 2001 09:38:16
Message: <3AA3A372.2675EB5F@my-dejanews.com>
Rune wrote:

>  How should the particles move when wind is used?

I gave you a suggestion earlier.


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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