Shooting Arrows - Nonlinear Spring Problem

  • Thread starter Thread starter TheBlenderer
  • Start date Start date
  • Tags Tags
    Nonlinear Spring
AI Thread Summary
The discussion revolves around solving a nonlinear spring problem related to the motion of an arrow shot from a bow. The key equation provided is F(x) = -k1x - k2xe^(cx^2), which describes the force acting on the arrow. The user successfully calculated the terminal velocity of the arrow using energy conservation principles, resulting in approximately 92.81 m/s. However, they faced challenges in deriving a velocity-time graph due to the nonlinear nature of the system, leading to the implementation of the Leapfrog integration method for numerical solutions. Ultimately, the user achieved a successful simulation, generating graphs for velocity, distance, and acceleration over time.
TheBlenderer
Messages
3
Reaction score
0
Hello awesome physics people!

Someone asked me for help on their first year physics homework, and I couldn't really solve it. This kept bugging me, because I should know how this works by now :P

Homework Statement



See attachment for the full problem statement. Basically, a bow is strung with an arrow, and what they want to know is, among other things, the graph for the velocity with respect to time.

Homework Equations



The given equation is F(x)=-k_1x-k_2xe^{cx^2}.

Other equations I've used:

E_{pot}=E_{kin}=1/2*mv^2
v_{terminal}=sqrt{(2*E_{pot})/m_{arrow}}

The Attempt at a Solution



I've come as far as the calculation of the terminal velocity of the arrow, however, after that I need to come up with an equation of velocity with respect to time, whilst I have only the acceleration with respect to distance from the equilibrium position of the bow. If it were linear I would be able to use a constant acceleration, but seeing as the acceleration is dependent on the distance from equilibrium, I don't really know what to do.

I've implemented my partial solution in MATLAB, here is my code:

Code:
%% First I let MATLAB calculate the initial x:

solve('-390*x-115*x*exp(2.3*x^2)=350','x');

% The outcome of this: xin=-0.62035062944153550757039658657226, or -0,620m

%% Now for the numerical stuff

k1=390;
k2=115;
c=2.3;
Fmax=350;

x=-0.620:0.01:0;    
% This is the x-vector, I initialized it from the initial x until x=0, when
% the arrow leaves the string. 

dt=0.01;        % This is the timestep
t=0:dt:5;       % Here I construct a vector t from 0 to 5 with steps of dt
m=34*10^-3;     % This is the mass of the arrow

% The following is the given formula:
F=-k1.*x-k2.*x.*exp(c.*x.^2);

% To get the energy stored up in the spring, we need only to integrate F
% over x:

Epot=trapz(F,x);            % This gives Epot = 146.4474 J

% As all of the potential energy will be transferred into kinetic energy of
% the arrow, according to Epot = Ekin = 1/2*mv^2, we can calculate the
% terminal velocity of the arrow:

vterm=sqrt((2*Epot)/m);      % This gives vterm = 92.8146 m/s

% Assuming all of the force gets transferred to the arrow, and because
% F=m*a, we can calculate the acceleration of the arrow as function of x
% simply by dividing by the mass of the arrow:

a=(-k1.*x-k2.*x.*exp(c.*x.^2))/m;

figure, plot(x,F,'g')
title('Force with respect to x')

I've included the plot as another attachment.

I guess my problem can be stated another way:

How do I parametrize from x to t?
Thanks in advance!
 

Attachments

  • problem.jpg
    problem.jpg
    55.6 KB · Views: 467
  • graph_force_x.png
    graph_force_x.png
    1.8 KB · Views: 553
Last edited:
Physics news on Phys.org
Your value shown for xin looks a bit suspicious. Verify your solution.

For the V vs T plot you're going to have to do a numerical integration of the trajectory. Use whatever algorithm you think appropriate, such as the Leapfrog method, or Euler's method, or Verlet, or even Runge-Kutta (probably overkill). Some web time will fill you in on those.

They all boil down to using the force at a given position to determine an acceleration to apply over the next small time interval. Use it to update the velocity and position, rinse, repeat.
 
Thanks for your reply gneill! I see, so there is no analytical method of converting distance into time when working with a nonlinear system?

My x_initial doesn't seem suspicious to me, loading a bow by pulling back 62 cm is plausible, right? The minus sign is explicable by the definition of the x-axis in the problem statement.

I'll try to implement this Frogleap integration method, thanks again!
 
TheBlenderer said:
Thanks for your reply gneill! I see, so there is no analytical method of converting distance into time when working with a nonlinear system?
It depends upon the functions involved. If you run into a transcendental function you're basically hosed :smile: In this case the x2 in the exponent of the exponential is a major stumbling block for a solution involving the normal basis set of functions that we're used to.

My x_initial doesn't seem suspicious to me, loading a bow by pulling back 62 cm is plausible, right? The minus sign is explicable by the definition of the x-axis in the problem statement.
I get a different value when I find the root of the function. In particular, I find x = -0.559 m.

I'll try to implement this Frogleap integration method, thanks again!
Sounds like a plan!
 
Yay, it worked!

I implemented the Leapfrog algorithm, and it worked! At first I got a sine wave (which isn't strange seeing as I basically modeled a spring), so I made the calculation stop as soon as x became positive. A bit of a hack solution, also because the rest of the vectors are zeros after that (that explains the sudden straight line in the graphs), but I didn't feel like polishing the code. I also used the erroneous value of -0.62 for x_initial, as it didn't really matter for this implementation (but thanks for checking anyways!)

Here's my code:

Code:
%% Now attempting a Leapfrog integration
dt=0.001;
t=0:dt:0.013;
x_in=-0.620;
x_t=zeros(1,length(t));
v_t=zeros(1,length(t));
a_t=zeros(1,length(t));
x_t(1)=x_in;
v_t(1)=0;
a_t(1)=(-k1.*x_in-k2.*x_in.*exp(c.*x_in.^2))/m;


i=2;
while x_t(i-1)<0
    
    x_t(i)=x_t(i-1)+v_t(i-1)*dt+0.5*a_t(i-1)*dt^2;
    a_t(i)=(-k1*x_t(i)-k2*x_t(i).*exp(c*x_t(i).^2))/m;
    v_t(i)=v_t(i-1)+0.5*(a_t(i-1)+a_t(i)).*dt;
    i=i+1;
end

hold all
subplot(2,2,1), plot(t,v_t,'b'), title('Velocity with respect to time')
subplot(2,2,2), plot(t,x_t,'r'), title('Distance with respect to time')
subplot(2,2,3), plot(t,a_t,'g'), title('Acceleration with respect to time')

And my graphs are attached. Cheers gneill :)
 

Attachments

  • graph_accelvelocdist.png
    graph_accelvelocdist.png
    3.4 KB · Views: 491
Thread 'Collision of a bullet on a rod-string system: query'
In this question, I have a question. I am NOT trying to solve it, but it is just a conceptual question. Consider the point on the rod, which connects the string and the rod. My question: just before and after the collision, is ANGULAR momentum CONSERVED about this point? Lets call the point which connects the string and rod as P. Why am I asking this? : it is clear from the scenario that the point of concern, which connects the string and the rod, moves in a circular path due to the string...
Thread 'A cylinder connected to a hanged mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...
Back
Top