Express drag force/acceleration/velocity as function of time

In summary, the drag force acting on an object moving through a fluid can be expressed as a function of time by considering the object's velocity and the characteristics of the fluid. The drag force typically increases with the square of the velocity, leading to a deceleration that can be described by Newton's second law. As time progresses, the object's velocity decreases due to this drag force, and the relationship can be modeled using differential equations that account for the varying velocity over time as the object experiences resistance. This results in a dynamic interplay between drag force, acceleration, and velocity, allowing for the computation of these variables as functions of time.
  • #1
Massimo
10
6
TL;DR Summary
How can I express the drag force, acceleration, and velocity of an object moving through a fluid as a function of time?
Let's say an object with a mass of 400,000 kg, a drag coefficient of C, and a reference area of A m^2 moves horizontally with a thrust of X N through a fluid with a density of Z kg/m^3. The object is initially stationary. I'm trying to figure out how I can express the drag force, acceleration, and velocity of this object as a function of time (in seconds).

I'm not quite sure where to begin with this, but surely it's possible? I tried approaching this by plugging in constants in place of the variable to make this as easy as possible; 0.35 for C, 16 for A, 30,000 for X, and 1024 for Z, and trying to calculate the acceleration at 10 seconds. Even then, I can't seem to figure it out, as acceleration is net force/mass, but in order to get net force, I need the drag force which requires velocity, which in turn requires acceleration... Does anyone have any ideas?
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
What preliminary research on the web have you done about drag force? If the answer is "none", here is a good place to start and get oriented. It seems to me that for what you want to do, you will have to write a differnetial equation, solve it and then put in the initial conditions and numbers. Plugging in numbers from the start will not get you very far.

Your object is quite massive. Note that its shape also matters as far as the drag force is concerned.
 
  • Like
Likes Massimo
  • #3
kuruman said:
What preliminary research on the web have you done about drag force? If the answer is "none", here is a good place to start and get oriented. It seems to me that for what you want to do, you will have to write a differnetial equation, solve it and then put in the initial conditions and numbers. Plugging in numbers from the start will not get you very far.

Your object is quite massive. Note that its shape also matters as far as the drag force is concerned.
I've done a fair bit of research on drag force and drag coefficient the past month, although prior to that I had no knowledge/experience at all in hydrodynamics, and I still know relatively little; I'm still researching online and learning a lot, although much of the math is beyond me as a precalc student.

As for the size of my object, it's a submarine model of mine, albeit a relatively small one with a length of 40.5 meters. I used its CAD model to get the reference area for the drag force/drag coefficient equations and derived the drag coefficient itself from several CFD simulations at a frontal orientation, although reference area will obviously change with orientation, and drag coefficient will vary with that and the Reynolds number. My long term goal is to make a submarine simulator with the most realistic physics possible, and this is one of many very small steps.

I guess I should start looking into differential equations, as I'm unfamiliar with them; is there any place in particular you recommend I should start?
 
  • #4
Massimo said:
I guess I should start looking into differential equations, as I'm unfamiliar with them; is there any place in particular you recommend I should start?
If you are a precalc student, looking into differential equations will be a frustrating experience. It will be like looking at a story written in a language you don't know. It would be unrealistic to expect that you can learn how to solve differential equations on your own if you have not studied calculus.

Let me ask you this. Is it just a formula of the velocity as a a function of time that you need for your simulation? If so, this is a problem that has been solved many times over and can be found on the web. Do some research for the formula when the drag force is written as $$F_D=\frac{1}{2}\rho~ C_D~v^2$$ and report back with what you found. I can you give you the formula right now, but I think you need to see for yourself and understand the complexity of your undertaking first.
 
  • Like
Likes hutchphd, Vanadium 50, russ_watters and 1 other person
  • #5
There is an analytical solution to the question, but if you are in pre-calc you won't see it until post calculus courses. What you are going to want to do is a numerical integration of the differential equation you wish to solve. Or research and find the analytical solution as @kuruman suggest. I was thinking since you are looking for a simulation, the simple formula of a numerical integration may even be easier to write in a programming language.
 
  • Like
Likes Massimo
  • #6
erobz said:
There is an analytical solution to the question, but if you are in pre-calc you won't see it until post calculus courses. What you are going to want to do is a numerical integration of the differential equation you wish to solve. Or research and find the analytical solution as @kuruman suggest. I was thinking since you are looking for a simulation, the simple formula of a numerical integration may even be easier to write in a programming language.
I was actually been looking into the Runge-Kutta method just now, and I managed to get a very math-savvy AI to write a python script to plot these values for me according to the RK 4th order method; it's a good start, but I'll continue to look into it.
 
  • Like
Likes PeroK
  • #7
kuruman said:
If you are a precalc student, looking into differential equations will be a frustrating experience. It will be like looking at a story written in a language you don't know. It would be unrealistic to expect that you can learn how to solve differential equations on your own if you have not studied calculus.

Let me ask you this. Is it just a formula of the velocity as a a function of time that you need for your simulation? If so, this is a problem that has been solved many times over and can be found on the web. Do some research for the formula when the drag force is written as $$F_D=\frac{1}{2}\rho~ C_D~v^2$$ and report back with what you found. I can you give you the formula right now, but I think you need to see for yourself and understand the complexity of your undertaking first.
I'm aware of the formula for drag force, but what I'm looking for is a formula that can calculate drag force, acceleration, and velocity at any given time while taking into account the effects of the other variables and a changing drag coefficient, fluid density, etc..
 
  • #8
Massimo said:
but what I'm looking for is a formula that can calculate drag force, acceleration, and velocity at any given time while taking into account the effects of the other variables and a changing drag coefficient, fluid density, etc..
Yes, you've said this. However, as @kuruman said
kuruman said:
It seems to me that for what you want to do, you will have to write a differnetial equation
and
kuruman said:
If you are a precalc student, looking into differential equations will be a frustrating experience. It will be like looking at a story written in a language you don't know.

You are looking for an algebra equation that does this. It does not exist. You may find one that works in special cases or approximations, but what you are asking for doesn't exist.

Clarifying your question might conceivably help, but repeating it, not so much.
 
  • #9
Vanadium 50 said:
Yes, you've said this. However, as @kuruman said

and


You are looking for an algebra equation that does this. It does not exist. You may find one that works in special cases or approximations, but what you are asking for doesn't exist.

Clarifying your question might conceivably help, but repeating it, not so much.
I wasn't aware that "formula" necessarily meant an algebra equation, I thought it encompassed differential equations too which is my mistake; to clarify, I am indeed looking for a differential equation, and a solution/method for this particular differential equation. Based on my little research, I believe it would be an ordinary differential equation (only one independent variable: time) and an initial value problem (there is an initial condition), thus requiring either a Runge-Kutta or Euler method to solve, but please correct me if I'm wrong. If I happen to be correct, which should I use?
 
  • Like
Likes PeroK
  • #10
Massimo said:
I'm aware of the formula for drag force, but what I'm looking for is a formula that can calculate drag force, acceleration, and velocity at any given time while taking into account the effects of the other variables and a changing drag coefficient, fluid density, etc..
In how many dimensions do you plan on applying the governing equation? The Runge-Kutta is just a numerical solution technique to solve a non-specific DE. You need to develop the ODE you plan on solving.
 
  • #11
Massimo said:
I am indeed looking for a differential equation,
You're going to get something horrific like (but not exactly) this:

{\displaystyle \left({\frac {\partial }{\partial t}}+\mathbf {u} \cdot \nabla -\nu \,\nabla ^{2}\right)\mathbf {u} =-{\frac {1}{\rho }}\nabla p+\mathbf {f} .}

How exactly does this help you if you are a pre-calculus?
 
  • Like
Likes berkeman
  • #12
erobz said:
There is an analytical solution to the question, but if you are in pre-calc you won't see it until post calculus courses. What you are going to want to do is a numerical integration of the differential equation you wish to solve. Or research and find the analytical solution as @kuruman suggest. I was thinking since you are looking for a simulation, the simple formula of a numerical integration may even be easier to write in a programming language.
Ok, with some help I actually came up with a python script to run a RK 4th order method for the drag force, acceleration, velocity, and distance traveled over time for good measure. It also plots the four variables accordingly (requiring matplolib). The results definitely seem sensible at the very least, but maybe a 6th order method would be more accurate?

Python:
import math
import matplotlib.pyplot as plt

# Object properties
mass = 393000  # kg
drag_coeff = 0.35
ref_area = 16.2088  # m^2
thrust = 30000  # N

# Fluid properties
fluid_density = 1024  # kg/m^3

# Initial conditions
t0 = 0  # Initial time (s)
v0 = 0  # Initial velocity (m/s)
x0 = 0  # Initial position (m)

# Time step
dt = 0.01  # Time step (s)

# Simulation time
t_max = 250  # Maximum simulation time (s)

def drag_force(v):
    return 0.5 * fluid_density * drag_coeff * ref_area * v ** 2

def acceleration(v):
    return (thrust - drag_force(v)) / mass

def rk4_step(t, v, x):
    k1v = dt * acceleration(v)
    k1x = dt * v
    k2v = dt * acceleration(v + 0.5 * k1v)
    k2x = dt * (v + 0.5 * k1v)
    k3v = dt * acceleration(v + 0.5 * k2v)
    k3x = dt * (v + 0.5 * k2v)
    k4v = dt * acceleration(v + k3v)
    k4x = dt * (v + k3v)
    v_new = v + (k1v + 2 * k2v + 2 * k3v + k4v) / 6
    x_new = x + (k1x + 2 * k2x + 2 * k3x + k4x) / 6
    return v_new, x_new

# Simulation loop
t = t0
v = v0
x = x0
time = [t]
velocity = [v]
accel = [acceleration(v)]
drag = [drag_force(v)]
distance = [x]

while t < t_max:
    a = acceleration(v)
    d = drag_force(v)
    v, x = rk4_step(t, v, x)
    t += dt
    time.append(t)
    velocity.append(v)
    accel.append(a)
    drag.append(d)
    distance.append(x)

# Plotting
plt.figure(figsize=(12, 8))
plt.subplot(4, 1, 1)
plt.plot(time, velocity)
plt.title("Velocity vs Time")
plt.xlabel("Time (s)")
plt.ylabel("Velocity (m/s)")

plt.subplot(4, 1, 2)
plt.plot(time, accel)
plt.title("Acceleration vs Time")
plt.xlabel("Time (s)")
plt.ylabel("Acceleration (m/s^2)")

plt.subplot(4, 1, 3)
plt.plot(time, drag)
plt.title("Drag Force vs Time")
plt.xlabel("Time (s)")
plt.ylabel("Drag Force (N)")

plt.subplot(4, 1, 4)
plt.plot(time, distance)
plt.title("Distance Traveled vs Time")
plt.xlabel("Time (s)")
plt.ylabel("Distance (m)")

plt.tight_layout()
plt.show()
 
  • Like
Likes PeroK
  • #13
Massimo said:
Ok, with some help I actually came up with a python script to run a RK 4th order method for the drag force, acceleration, velocity, and distance traveled over time for good measure. It also plots the four variables accordingly (requiring matplolib). The results definitely seem sensible at the very least, but maybe a 6th order method would be more accurate?
Thats ok for 1 dimensional motion (motion in straight line with constant coefficients). You are going to enter another level of difficulty if you start moving in 2D (or 3D). I think it very quicky moves into the realm of "unsolved physics problems". But if you are just trying to fake someone out in a video game...maybe it will act believably...
 
Last edited:
  • Like
Likes Massimo
  • #14
erobz said:
Thats ok for 1 dimensional motion (motion in straight line with constant coefficients). You are going to enter another level of difficulty if you start moving in 2D (or 3D). I think it very quicky moves into the realm of "unsolved physics problems". But if you are just trying to fake someone out in a video game...maybe it will act believably...
Indeed, but I do want to work toward a 3D solution, albeit very slowly and carefully. I think this is a good start. I will look more into RK methods, and continue exploring differential equations :smile: Thanks for everyone's help!
 
  • Like
Likes PeroK
  • #15
Massimo said:
Indeed, but I do want to work toward a 3D solution, albeit very slowly and carefully. I think this is a good start. I will look more into RK methods, and continue exploring differential equations :smile: Thanks for everyone's help!
Note a possible complication for moving into 3D. The equation of motion you use is not valid in more than 1 D motion. The actual equation is (I believe more like):

$$ \vec{\mathbf{T}} +m\vec{\mathbf{g}} + \vec{\mathbf{F_b}} -\frac{1}{2}\rho C_D A_{\text{proj.}} v \vec{\mathbf{v}} = m \vec{\mathbf{\dot v}} $$

That entangles all the component specific equations of motion because ##v## is the magnitude of the velocity ##v = \sqrt{ v_x^2 + v_y^2 + v_z^2}##

Best of Luck.
 
  • Like
Likes Massimo

FAQ: Express drag force/acceleration/velocity as function of time

What is drag force?

Drag force is the resistance experienced by an object moving through a fluid, such as air or water. It acts in the opposite direction to the object's motion and is influenced by factors such as the object's speed, shape, and the density of the fluid. The drag force can be mathematically expressed using the drag equation: F_d = (1/2) * C_d * ρ * A * v^2, where F_d is the drag force, C_d is the drag coefficient, ρ is the fluid density, A is the cross-sectional area, and v is the velocity of the object.

How does drag force affect acceleration?

Drag force affects acceleration by opposing the motion of an object. According to Newton's second law, the net force acting on an object determines its acceleration. When drag force is present, the net force is reduced, which results in decreased acceleration. The relationship can be expressed as: F_net = ma = F_applied - F_d, where F_net is the net force, m is the mass, a is acceleration, F_applied is the applied force, and F_d is the drag force. As velocity increases, drag force increases, leading to a reduction in acceleration.

How can velocity be expressed as a function of time under drag?

Velocity as a function of time under the influence of drag can be described using differential equations. For an object moving with drag force, the equation can be expressed as: m * dv/dt = F_applied - F_d, where dv/dt is the acceleration. By substituting the drag force equation into this, one can derive a first-order differential equation that can be solved to find velocity as a function of time. The solution typically results in an exponential decay model, where velocity approaches a terminal velocity as time progresses.

What is terminal velocity?

Terminal velocity is the constant speed an object reaches when the drag force acting on it equals the gravitational force pulling it downward. At this point, the net force is zero, and the object no longer accelerates. Terminal velocity can be calculated by setting the drag force equal to the weight of the object: F_d = mg, leading to the equation: v_t = sqrt((2mg)/(C_d * ρ * A)), where v_t is the terminal velocity, m is mass, g is acceleration due to gravity, C_d is the drag coefficient, ρ is fluid density, and A is the cross-sectional area.

How does time affect drag force and motion?

Time affects drag force and motion through the changing velocity of the object. As an object accelerates, its velocity increases, which in turn increases the drag force acting on it. This relationship creates a dynamic system where the object's acceleration

Back
Top