Particle System (Gravity, Buoyancy and Drag),

AI Thread Summary
The discussion centers on the challenges of implementing a particle system that accurately simulates the effects of gravity, buoyancy, and drag. The user has successfully combined gravity and buoyancy into a single equation but struggles with calculating drag, which varies with the particle's velocity over time. The drag force is calculated at discrete intervals, leading to discrepancies in particle positioning when the update frequency changes. Suggestions include using numerical methods like the Runge-Kutta method for better accuracy and integrating the drag force over time to account for its cumulative effect. The conversation emphasizes the importance of correctly modeling these forces to achieve realistic particle motion.
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 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
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.
 
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:
The rope is tied into the person (the load of 200 pounds) and the rope goes up from the person to a fixed pulley and back down to his hands. He hauls the rope to suspend himself in the air. What is the mechanical advantage of the system? The person will indeed only have to lift half of his body weight (roughly 100 pounds) because he now lessened the load by that same amount. This APPEARS to be a 2:1 because he can hold himself with half the force, but my question is: is that mechanical...
Hello everyone, Consider the problem in which a car is told to travel at 30 km/h for L kilometers and then at 60 km/h for another L kilometers. Next, you are asked to determine the average speed. My question is: although we know that the average speed in this case is the harmonic mean of the two speeds, is it also possible to state that the average speed over this 2L-kilometer stretch can be obtained as a weighted average of the two speeds? Best regards, DaTario
Some physics textbook writer told me that Newton's first law applies only on bodies that feel no interactions at all. He said that if a body is on rest or moves in constant velocity, there is no external force acting on it. But I have heard another form of the law that says the net force acting on a body must be zero. This means there is interactions involved after all. So which one is correct?
Back
Top