Particle System (Gravity, Buoyancy and Drag),

In summary, the conversation discusses the implementation of a drag force in a particle system, which is causing issues with calculating the particle's position over time. The formula for calculating the drag force is provided, and the need for integration of the force is discussed. The purpose of implementing drag is to simulate the resistance of an object moving through a fluid, and to prevent the particle from accelerating infinitely due to gravity.
  • #1
teknix1
2
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 dependant 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
  • #2
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 dependant 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.
 
  • #3
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
 
  • #4
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.
 
  • #5
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:

1. What is a particle system and how does it work?

A particle system is a computer graphics technique used to simulate the behavior and movement of a large number of small objects, called particles. These particles can represent anything from smoke, fire, water droplets, or even stars in a galaxy. The particles are governed by rules and properties such as gravity, buoyancy, and drag, which determine their movement and interactions with each other and the environment.

2. How does gravity affect particles in a particle system?

Gravity is a force that pulls objects towards the center of the Earth. In a particle system, gravity is used to simulate the effects of gravity on particles. The particles will be pulled downwards towards the ground, and their speed will increase as they fall. The strength of gravity can be adjusted to create different effects, such as a slow and gentle fall or a fast and heavy fall.

3. What is buoyancy in a particle system?

Buoyancy is the upward force exerted by a fluid on an object immersed in it. In a particle system, buoyancy is used to simulate the behavior of particles in a liquid or gas environment. Depending on their density and the density of the fluid, particles can either float or sink. This effect is commonly used to create realistic water or air simulations.

4. How does drag affect particles in a particle system?

Drag is a force that opposes the motion of an object through a fluid, such as air or water. In a particle system, drag is used to simulate the effects of air resistance or water resistance on particles. It can slow down the movement of particles, change their direction, and even cause them to cluster together. The strength of drag can be adjusted to create different effects and make the particle system more realistic.

5. What are some real-world applications of particle systems (gravity, buoyancy, and drag)?

Particle systems are commonly used in computer graphics, animation, and simulation for various purposes. Some real-world applications include special effects in movies and video games, weather and environmental simulations, fluid dynamics research, and even medical simulations for training and education. They are also used in engineering and product design to simulate the behavior of materials and test different scenarios before the physical prototype is created.

Similar threads

Replies
13
Views
664
Replies
10
Views
1K
  • Mechanics
Replies
11
Views
1K
  • Mechanics
Replies
11
Views
1K
Replies
7
Views
4K
Replies
9
Views
2K
Replies
2
Views
1K
Replies
18
Views
2K
  • Classical Physics
Replies
28
Views
599
Back
Top