Calculating change in velocity with resistance

In summary, the doctor is trying to model heart physiology and is having trouble with a specific equation. He has two cases, either the speed will start below the terminal speed and increase or it will start above terminal speed and slow down. The terminal speed is where the acceleration is zero.
  • #1
kennethgilpin
10
0
Hi everyone,

I'm a doctor who is fair at maths - haven't done physics for a while. I'm trying to model some heart physiology which I can describe as a mechanics problem:

I have a particle, mass m, with a constant force acting on it, f.

It also has resistance R, where the resistance is equal to the velocity of the particle squared times a constant k:
R = kv2

my equation of motion is:

m.dv/dt = F = f - kv2

I want to find the velocity after a given time. The are formula on the internet which describe a solution to this problem (mostly in the context of a falling body accelerating to wind resistance):

http://keisan.casio.com/has10/SpecE...sistance (velocity and distance)/default.xml"

However they all assume that starting velocity is zero. I need a solution for any starting velocity. so:

t0 = time 0.
v0 = velocity at time 0.
f = constant force on particle
m = mass
R = resistance = kv2 as above, where k = constant, v = velocity

what would be the velocity at time t?

I know this is difficult. I'm not sure if this is really a maths problem.

kenneth
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
In short, you have two cases: either the speed will start below the terminal speed and increase or it will start above terminal speed and slow down. The terminal speed is where the acceleration is zero,

(1) [tex]v_t = \sqrt{f/k}[/tex]

so for [itex]v_0 < v_t[/itex] the solution for v is

(2) [tex]v = v_t \tanh(\frac{k v_t}{m} t + \textrm{arctanh}( \frac{v_0}{v_t} ) )[/tex]

where [itex]\tanh[/itex] and [itex]\textrm{arctanh}[/itex] are hyperbolic tangent and its inverse, and for [itex]v_0 > v_t[/itex] it is

(3) [tex]v = v_t \coth(\frac{k v_t}{m} t + \textrm{arccoth}( \frac{v_0}{v_t} ) )[/tex]

where [itex]\coth[/itex] and [itex]\textrm{arccoth}[/itex] are hyperbolic cotangent and its inverse.
 
Last edited:
  • #3
By the way, the distance traveled will in both cases end up being expressed by

(4) [tex] s= s_0 + \frac{m}{k}\log\left[\frac{v_0}{v_t}\sinh(\lambda t)+\cosh(\lambda t)\right][/tex]

where I've introduced the constant

(5) [tex]\lambda = \frac{k v_t}{m} = \frac{\sqrt{fk}}{m} [/tex].
 
  • #4
thank you for your quick reply. The function seems to work well in with a few test examples I've just put in.

the problem is for my use is with deceleration due to a change in direction of the force, f.

if I have a positive velocity, v0, but a negative force, f, then function (2) does not provide a v less than then velocity v0.

clearly if the terminal speed is related to the root of the force then it cannot be negative. If I use the absolute force and multiple the terminal speed by the direction of the force, i.e.

vt = |f|/f * [tex]\sqrt{}|f|/k [/tex]

then the terminal speed has the same sign as the force direction, which makes sense. However, when this number is put into function (2) the subsequent value, v is still greater than v0.

any ideas?

k.
 
  • #5
Ok, I assumed f was positive. If f is negative, you would normally write the differential equation as

(6) [tex] m\dot{v} = -f - k v^2 [/tex]

with f positive. This equation has the solution

(7) [tex] v = v_t \tan(\arctan(v_0/v_t)-\lambda t) [/tex]

for initial speed [itex]v_0[/itex] and the time in the range [itex] 0 \le t \le t_1 [/itex], where

(8) [tex] t_1 = \arctan(v_0/v_t)/\lambda [/tex]

is the time until the particle has reached zero speed. After that time the movement of the particle is governed by (2) with initial speed zero. The position for (7) in the same time range is

(9) [tex] s = s_0 + \frac{m}{k}\log\left[\frac{v_0}{v_t}\sin(\lambda t)+cos(\lambda t)\right] [/tex]
 
  • #6
thank you all of the formula work wonderfully.

You haven't defined v in the case of f being negative, and also v0 > vt. I assumed it might be:

[tex]
v = v_t \cot(\cot^{-1}(v_0/v_t)-\lambda t)
[/tex]

(can't find the Latex for arccot!)

but this doesn't work out, and when I graph the solution the gradient is positive (i.e. the solution, v, is larger than v0). Could you help me out for the last time?

increasingly gratefully,

kenneth
 
  • #7
kennethgilpin said:
You haven't defined v in the case of f being negative, and also v0 > vt.

I didn't explain it properly. For a negative force (i.e. here a force that oppose the initial direction of speed), you can use (7) no matter what the initial speed is. However, (7) can only be used until the speed reaches zero (which it does after the time shown in (8)) since for negative speeds the fixed minus in front of the drag force will make drag force act in same direction as the speed, which is not physical.

So, when the speed reach zero using (7), you will have to switch to using (2) (which handles the case where speed and force point in same direction for low initial speeds) with initial speed zero and you will now have to consider the speed calculated from (2) as being in the opposite direction as it was when using (7).

For example, let's say your particle moves so that positive speed is to the right and with the force pointing left. You use (7) until v = 0 and then use (2) with v0 = 0 and where you now consider positive speeds pointing left (and the force still pointing left). If you are interested in the distance traveled too you will also have to carry over the distance from (9) as initial distance in (4) when switching equations and, like with the speed, consider the distance to now increase in the other direction.

I hope its a bit more clear now otherwise just ask.
 
Last edited:
  • #8
Filip thank you a thousand times for your help with this problem.

I just wanted to tie this thread off in case someone else comes here looking for a solution. You can see that I've used some of the formula above but haven't written in the need to decelerate (or accelerate) the particle to zero when changing direction. I think this is because I'm using these formulae in a loop in a computer program which considers small intervals of time. Filip Larson might want to comment on the code. This snippet is in an ECMA script language:

Code:
var dt:Number = 0.005; //seconds per interval, so 200 intervals = 1sec
var i:int=0;
var f:Number = 10;  //force
var v:Number = 0;   //velocity - starting from stationary here
var k:Number = 0.1; //constant
var m:Number = 5;   //mass

//determine terminal velocity
var Vterm:Number = Math.pow(Math.abs(f/k),0.5);

//introduced constant
var gam:Number = Math.pow(Math.abs(f * k),0.5) / m;

for (i; i < 600; i++)	{
//i.e. 600 / 0.005 = 3 secs

//is velocity above terminal speed?
if (Math.abs(v) < Math.abs(Vterm))	{
   if (dP > 0)	{	//accelerating
	v= Vterm * advMath.tanh(gam * dt + advMath.atanh(v/Vterm));
   }
   else	{	//decelerating
	v= Vterm * Math.tan(Math.atan(v/Vterm) - gam * dt);
   }						
}
else	{  //is velocity below terminal speed
   if (dP > 0)	{	//accelerating
	v= Vterm * advMath.coth(gam * dt + advMath.acoth(v/Vterm));
   }
   else	{	//decelerating
	var newVel:Number = Vterm * advMath.cot(advMath.acot(v/Vterm) - gam * dt);
	v +=  v - newVel;
        //this is clearly a fudge
   }
}	



}

where advMath.coth etc. are custom functions for the hyperbolic cotangents etc. See wikipedia for the formulae.

hope this helps someone. I'm a big fan of this forum

kenneth
 
  • #9
kennethgilpin said:
I just wanted to tie this thread off in case someone else comes here looking for a solution. You can see that I've used some of the formula above but haven't written in the need to decelerate (or accelerate) the particle to zero when changing direction. I think this is because I'm using these formulae in a loop in a computer program which considers small intervals of time. Filip Larson might want to comment on the code.

This snippet is in an ECMA script language:

Code:
var dt:Number = 0.005; //seconds per interval, so 200 intervals = 1sec
var i:int=0;
var f:Number = 10;  //force
var v:Number = 0;   //velocity - starting from stationary here
var k:Number = 0.1; //constant
var m:Number = 5;   //mass

//determine terminal velocity
var Vterm:Number = Math.pow(Math.abs(f/k),0.5);

//introduced constant
var gam:Number = Math.pow(Math.abs(f * k),0.5) / m;

for (i; i < 600; i++)	{
//i.e. 600 / 0.005 = 3 secs

//is velocity above terminal speed?
if (Math.abs(v) < Math.abs(Vterm))	{
   if (dP > 0)	{	//accelerating
	v= Vterm * advMath.tanh(gam * dt + advMath.atanh(v/Vterm));
   }
   else	{	//decelerating
	v= Vterm * Math.tan(Math.atan(v/Vterm) - gam * dt);
   }						
}
else	{  //is velocity below terminal speed
   if (dP > 0)	{	//accelerating
	v= Vterm * advMath.coth(gam * dt + advMath.acoth(v/Vterm));
   }
   else	{	//decelerating
	var newVel:Number = Vterm * advMath.cot(advMath.acot(v/Vterm) - gam * dt);
	v +=  v - newVel;
        //this is clearly a fudge
   }
}	
}

where advMath.coth etc. are custom functions for the hyperbolic cotangents etc. See wikipedia for the formulae.

Some quick comments:

  • If you want to tabulate the speed of a particle, you should probably calculate each speed value from the original solution using total time. In the code above, the analytical solutions are used to advance the speed from the speed at time t to the speed at time t+dt and then this speed is used as the initial speed for the next time step. Doing that will make the solution "drift" due to truncation and rounding error in the calculations. A numerically more stable technique is to calulate t = t0+i*dt and v = vsolution(t), using the appropriate solution depending on conditions.
  • The particle can be in four different regimes based on its initial speed and direction relative to the force. Classifying the regimes based on what type of function used for the speed solution we have that regime 1 corresponds to the tan solution, regime 2 to the tanh solution, regime 3 to the terminal speed solution, and regime 4 to the coth solution. A particle in regime 2, 3 and 4 will always stay the same regime, while a particle in regime 1 will eventually migrate to regime 2.
  • It is probably easier to keep the force always positive and use the sign of the speed to indicate if it is opposite the force or not, for instance using negative speed when the particle is moving opposite the force.

If I modify your code to incorporate the above points, I get the following UNTESTED code:

Code:
// parameters
var dt:Number = 0.005; //seconds per interval, so 200 intervals = 1sec
var f:Number = 10;  //force - always positive
var v0:Number = 0;  //initial speed  - positive when same direction as f
var k:Number = 0.1; //constant - always positive
var m:Number = 5;   //mass - always positive
var t0:Number = 0;  // initial time
// state variables
var v:Number = v0;  //speed - positive when same direction as f
var t:Number = 0;   // time
var i:int=0;        // step number

//determine terminal velocity
var vt:Number = Math.pow(f/k, 0.5);

//introduced constant
var gam:Number = Math.pow(f*k, 0.5) / m;

//time parameter used in the four regimes
var tz:Number = t0;
if (v0 < 0) {   // regime 1 - speed opposing force
  tz = Math.atan(-v0/vt)/gam;
} else if (v0 < vt) { // regime 2 - speed non-negative and below vt
  tz = advMath.atanh(v0/vt)/gam;
} else if (v0 == vt) { // regime 3 - speed equal vt
  // nothing special
} else { // regime 4 - speed above vt
  tz = advMath.acoth(v0/vt)/gam;
}

for (i; i < 600; i++) { //i.e. 600 / 0.005 = 3 secs
  t = t0 + i*dt;
  if (v0 < 0) { // regime 1
    if (t < tz) { // still in regime 1?
      v = -vt * Math.tan(gam * (tz-t));
    } else { // swith to regime 2 solution
      v0 = 0; t0 = tz; tz = 0; 
      t = t0 + i*dt;
    }
  }
  if (v0 >= 0) {
    if (v0 < vt) { // regime 2
      v = vt * advMath.tanh(gam * (t+tz));
    } else if (v0 == vt) { // regime 3
      v = vt;
    } else { // regime 4
      v = vt * advMath.coth(gam * (t+tz));
    }
  }
  // print or use t and v here 
}
 
Last edited:
  • #10
thank you for your reply. I've been using a mixture of your code and mine and it's been working well. I think that there is another regime and i wanted your opinion/help for it:

where, speed is above vt _and_ speed opposes the force.

once again you would still need a 'tz' time parameter for when/if the speed changes direction.

kenneth
 
  • #11
There should be no need for more regimes. The tan solution (regime 1) is valid for all speeds in opposite direction of the force. The terminal velocity does not have direct physical meaning as a terminal velocity in this regime since the terminal is relevant only for regime 2, 3 and 4. The time parameter tz in regime 1 signifies the time it takes for the particle to change speed from -v0 to 0 and is theoretically valid for arbitrarily negative speeds.
 
  • #12
I now notice that the code I included in #9 is wrong regarding switching from regime 1 to 2. It should be

Code:
    ...
    } else { // switch to regime 2 solution
      v0 = 0; tz = -tz; 
    }
    ...
With this change t0 is always zero and could be left out.
 

1. What is the equation for calculating change in velocity with resistance?

The equation for calculating change in velocity with resistance is Δv = Fnet/m - R/m*t, where Δv is the change in velocity, Fnet is the net force, m is the mass of the object, R is the resistance force, and t is the time.

2. How does resistance affect the change in velocity of an object?

Resistance is a force that acts in the opposite direction of an object's motion. This force can slow down or stop the object's motion, resulting in a decrease in velocity.

3. What factors can contribute to resistance?

Some factors that can contribute to resistance include the shape and size of the object, the surface it is moving on, and the medium it is moving through (such as air or water). Other factors include the object's speed and the presence of any external forces.

4. How can we decrease resistance and increase the change in velocity?

To decrease resistance and increase the change in velocity, we can reduce the object's surface area, make it more streamlined, or decrease the density of the medium it is moving through. We can also apply a greater force in the direction of motion to overcome the resistance force.

5. Can we completely eliminate resistance when calculating change in velocity?

No, it is impossible to completely eliminate resistance when calculating change in velocity. Even in a vacuum, there is still some resistance present due to the friction between the object and the surface it is moving on. However, we can minimize the effects of resistance by reducing its factors as much as possible.

Similar threads

  • Classical Physics
Replies
15
Views
499
Replies
14
Views
1K
Replies
7
Views
2K
  • Introductory Physics Homework Help
Replies
8
Views
1K
  • Differential Equations
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
9
Views
2K
  • Introductory Physics Homework Help
Replies
11
Views
1K
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
731
  • Introductory Physics Homework Help
Replies
4
Views
1K
Back
Top