identify time and position when reach terminal velocity

6 ビュー (過去 30 日間)
nguyễn gia bảo
nguyễn gia bảo 2020 年 10 月 17 日
コメント済み: nguyễn gia bảo 2020 年 10 月 17 日
hi, i have this code:
F = 4000.0; % force
m = 1300.0; % mass
A = 3.0; % frontal area, [m^2]
Cd = 0.6; % drag coefficient, [-]
rho = 1.23; %air density
v0 = 5; %velocity at t = x = 0
vTerm = sqrt(2*F/(Cd*rho*A)); %terminal velocity
dxdt = @(t,x)(sqrt((2.*F)./(Cd.*rho.*A))); % V(t) = diff( X(t) ,t )
tspan =[0 100]; %
x0 = 0;
opts = odeset('RelTol',1e-8,'AbsTol',1e-8);
[t,x] = ode45(dxdt, tspan, x0,opts);
first i need to set the relative tolerance to 1e-8 by using odeset before using ode45 to solve for x and t, which i'm unfamiliar with so can i get some comment on what i did whether its right or not ??, if not, any suggestion would be appreciated, thanks.
secondly, i now need to find t and x at which the velocity reach 99% of vTerm and i got no where trying to solve it. i think one of the problem could be that my function was wrong since i dont think its return the v0=5 as in the question, but i cant seem to find another function for it. Can i please have some help, thank you

採用された回答

Walter Roberson
Walter Roberson 2020 年 10 月 17 日
編集済み: Walter Roberson 2020 年 10 月 17 日
The odeset looks fine for setting the tolerances.
Your code should not be using any formula for terminal velocity given forces, and it should certainly not be integrating that formula. (Notice the formula does not even involve t or x.)
Instead, your code should be using an expression for dV -- given the current time and boundary conditions, how would you calculate the change in velocity ? Downward force due to gravity minus upward force due to friction based upon the current velocity. Now run that ode getting out time and velocity. The terminal velocity is the last output velocity from the ode. Now locate the position inside the velocity vector where the velocity vector first reaches at least 99% of that final velocity, and use that location to index the time vector.
Since you are asked to get out velocity and position, the implication is that you need to be using an ode with two parameters, with formulas for dP and dV and getting out P and V.
  3 件のコメント
Walter Roberson
Walter Roberson 2020 年 10 月 17 日
Okay, well that doesn't matter so much. In a fall, you would be using acceleration to calculate force using F=m*a but in this case you are given F -- if you have reason to, you can calculate a = F/m
You have a force in one direction that is trying to produce an acceleration, but friction is a force in the other direction, and that force is proporational to the surface area and the square of the velocity. Take the difference between the two forces to determine the net force, divide by mass to get the acceleration, and the derivative of the velocity is equal to that acceleration.
nguyễn gia bảo
nguyễn gia bảo 2020 年 10 月 17 日
thanks for your help

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by