How do I integrate acceleration function to get velocity?

조회 수: 7 (최근 30일)
Noor Abdulrahman
Noor Abdulrahman 2018년 2월 4일
답변: Alok Nimrani 2018년 2월 16일
Hello everyone,
I'm trying to solve the following question using matlab.
A particle is fired vertically downwards with a velocity of 30 m/s in a fluid. Due to the resistance of the fluid, the particle experiences a deceleration equal to: a=-0.7v^3
if I want to obtain the velocity function I know I must integrate it using int(fun) but I'm not sure how to use it or how to set conditions.
I appreciate the help.

답변 (1개)

Alok Nimrani
Alok Nimrani 2018년 2월 16일
Hi Noor Abdulrahman,
Using the particle deceleration, a = dv/dt = -0.7(v^3), we have:
- dv/(0.7*v^3) = dt
Now, the initial velocity of the particle is 30 m/s i.e. v0 = 30 for t = 0. Assuming the velocity to be 'v' m/s at time instant 't', you can integrate:
  • left hand side of the above equation over the range 30 to 'v', and
  • right hand side of the equation over the range 0 to 't'
Please have a look at the following code for better understanding:
>> syms v t; % creating symbolic variables v and t
>> eqn = int(-1/(0.7*v^3), v, 30, v) == int(1, t, 0, t); % 'eqn' represents the equation obtained after integrating both sides
>> solve(eqn, v) % solving the above equation with respect to variable v
In this code, the ‘int(expr, var, lower, upper)’ function arguments are:
• Expression to integrate,
• Variable over which to integrate,
• Lower and upper limits of the integral
Hope this helps you.
Thanks

카테고리

Help CenterFile Exchange에서 Fluid Dynamics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by