Particle System (Gravity, Buoyancy and Drag),

Click For Summary
SUMMARY

This discussion focuses on the implementation of a Particle System that incorporates gravity, buoyancy, and drag forces. The user, Nic, successfully calculates the combined gravitational and buoyant forces using the equation Fgravbuoy = (Mp - Mf) * g. However, the challenge arises when integrating the drag force, defined by Fdrag = CAp(v²)/2, which varies with the particle's velocity. The key issue is that the drag force is calculated at discrete time intervals (1/60th of a second), leading to discrepancies in particle positioning when the update frequency changes. Suggestions include using numerical integration techniques, such as the Runge-Kutta method, to achieve more accurate results.

PREREQUISITES
  • Understanding of basic physics concepts, including forces and motion.
  • Familiarity with particle systems in computer graphics or simulations.
  • Knowledge of numerical integration methods, specifically the Runge-Kutta method.
  • Proficiency in programming, particularly in a language suitable for simulations (e.g., C++, Python).
NEXT STEPS
  • Research the Runge-Kutta method for numerical integration in physics simulations.
  • Explore advanced drag force calculations and their impact on particle motion.
  • Learn about terminal velocity and its implications in fluid dynamics.
  • Investigate how to implement time-stepping methods in particle systems for smoother updates.
USEFUL FOR

This discussion is beneficial for game developers, simulation engineers, and physics enthusiasts who are working on particle systems and require a deeper understanding of fluid dynamics and force integration.

teknix1
Messages
2
Reaction score
0
Hi,

First of all, thanks for taking the time to read my post.

I have started writing my own Particle System and I'm having trouble calculating where a particle would end up over a period of time.

I have decided to use 3 foces, gravity, buoyancy and drag. I also decided to skip friction, viscosity and what else... The first two I have merged into a simple equation:

Fgravbuoy = (Mp - Mf) * g

Mp is Mass of particle (kg)
Mf is Mass of fuild displaced by particle (kg)
g is acceleration of gravity (m/s²)

Now this works quite well on its own. The problems start showing when I implement the drag force:

Fdrag = CAp(v²)/2

C is drag coefficient
A is reference area (m²)
p is density of fluid my particle is going through (kg/m^3)
v is the velocity of the object relative to the fluid (m/s)

Fdrag being always opposite of velocity.

Given all this my problem is as follows, my program is updating the particle at every 1/60th of a second, now I can go through all my calculations and update the position of my particle on the screen. But the drag equation is dependent on the velocity of my particle at a specific point in time. In other words; this particle will create this much drag at this time when going at this speed. It is not calculating the amount of accumulated drag during the 1/60th of a second period. It is only giving me the current drag AT every 1/60th of a second.

So if I run my program updating the screen at every 1/120th of a second, the particle is not ending up in the same location on the screen.

Now I have no idea what the correct thing to do here is. Does anybody have a clue?

I get the impression I need to do an integral or derivative of my drag equation and use that.
I can't remember how to do this, it's been 12 years since I touched this.

Please let me know if you have noticed any errors in my post.

Thanks a lot!
Nic
 
Physics news on Phys.org
teknix1 said:
Hi,

First of all, thanks for taking the time to read my post.

I have started writing my own Particle System and I'm having trouble calculating where a particle would end up over a period of time.

I have decided to use 3 foces, gravity, buoyancy and drag. I also decided to skip friction, viscosity and what else... The first two I have merged into a simple equation:

Fgravbuoy = (Mp - Mf) * g

Mp is Mass of particle (kg)
Mf is Mass of fuild displaced by particle (kg)
g is acceleration of gravity (m/s²)

Now this works quite well on its own. The problems start showing when I implement the drag force:

Fdrag = CAp(v²)/2

C is drag coefficient
A is reference area (m²)
p is density of fluid my particle is going through (kg/m^3)
v is the velocity of the object relative to the fluid (m/s)

Fdrag being always opposite of velocity.

Given all this my problem is as follows, my program is updating the particle at every 1/60th of a second, now I can go through all my calculations and update the position of my particle on the screen. But the drag equation is dependent on the velocity of my particle at a specific point in time. In other words; this particle will create this much drag at this time when going at this speed. It is not calculating the amount of accumulated drag during the 1/60th of a second period. It is only giving me the current drag AT every 1/60th of a second.

So if I run my program updating the screen at every 1/120th of a second, the particle is not ending up in the same location on the screen.

Now I have no idea what the correct thing to do here is. Does anybody have a clue?

I get the impression I need to do an integral or derivative of my drag equation and use that.
I can't remember how to do this, it's been 12 years since I touched this.

Please let me know if you have noticed any errors in my post.

Thanks a lot!
Nic

I think you're right in suspecting the need for integration of the force. However I don't get what you're doing with the drag so I don't see exactly how to apply it. And there are numerical methods that may be better and more to the point of what you're doing. Does the drag slow down a coasting particle or does it resist the motion of a propelled one? Assuming it slows a free particle, F=dp/dt, so integrating F over t will give you a change in momentum. Simply multiplying F times dt (eg, 1/60) will provide a first order approximation. You will have to resort to fancier techniques to get accuracy. Sorry but the details escape me at this time, prolly someone else will have them.
 
Drag

Thanks rdx,

Quote: "Does the drag slow down a coasting particle or does it resist the motion of a propelled one?"

I'm not exactly sure how to differentiate the two things you've suggested. But basically "drag" is a force opposing movement of an object through a fluid.

The reason for wanting to implement this is imagine a particle falling from the sky and into a lake. There will be very little resistance (drag) on the object going through air but once it hits the water, going through it will be slowed down considerably (depending on the object). Imagine when you're at the swimming pool trying to move your arms underwater, the opposing force is drag.

Another reason to implement this is that my particle will have a terminal velocity. If not, it would accelerate infinitely due to gravity.

Not to mix this up with buoyancy. Buyoyancy is basically the apparent weight ob an object submerged in a fluid. In my little example, air in the first place and water in the second.

Hope this clears out a few things.

If anybody could explain a bit the "F=dp/dt" equation and how to integrate it, this would be very appreciated.

Thanks
Nic
 
Not clear enough?

Okay, F=dp/dt means that force is the change in momentum per unit time. What you seem to be asking is how to factor drag into your equations and I am suggesting that you use this relation. If you are not familiar with the notation, p is momentum = mass x velocity of the object. the force changes the momentum, which means (assuming mass is constant) that it changes the speed. remember that F=ma=Fdrag = CAp(v²)/2=dp/dt. Now I am assuming that you are saying that at t<sub>1</sub> the particle is moving at v<sub>1</sub> so you use the velocity to compute the drag. Then you use the drag to compute the new velocity, That brings you to t<sub>2</sub>. Am I on the right track? Anyway, the reason I dropped in today was to suggest you look at the Runge-kutta method for doing this numerical integration. It is usually how such problems are done. I hope this helps.
 
Hi;
I don't seem to perfectly understand what you are trying to do but I think this may help u.

Fd = mg-FB ; where FB is Buoyancy force, and Fd is drag force, m = mass of particle

But Fd = CD×ρ/2×V2×A

CD = drag coefficient
ρ = density of fluid
A = area of particle
V = velocity

which means
mg-FB = CD×ρ/2×V^2×A

I hope this helps
 
Last edited:

Similar threads

  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 28 ·
Replies
28
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
6K
  • · Replies 25 ·
Replies
25
Views
4K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 11 ·
Replies
11
Views
4K