Вы находитесь на странице: 1из 12

# ..

:
3121
.
:
.. .

2016

1. ,
( ).
.
. ,
.

2.

. .
3. .
4.
5.

6.1.4-2007
. , 2007,

:
,
, , :
, ,
, FD,

.
.

. ,
,
. ,
0. ,
, .

1.

2.

, :
;

2
=
; = 2

-:
cos() =

y-:
sin() =
:
2
=
2

: ,
:
:
:
2-
Matlab
- ode45.
, , .
2-
. ,
, ode45
.
Matlab.

:
2 = ( 2 + 2 )
= () =
= () =
,

:
() =

2 + 2

() =

2 + 2

:
=

2
2

( + 2 )
cos() =
2
2
2 + 2
=

2 + 2
2

y:
=

2
2

( + 2 )
sin() =
2
2
2 + 2
=

2 + 2
2

Matlab,
1-
, .
, , ode45 Matlab ,
, ,
, :
(variable1), (differential of variable1), (variable2), (differential of variable2).

(), ( ), (), ( )
Ode45 , , , .
:
1
2
3
4

=
=
=
=

:
1 = 2
2 = =

2 22 + 42
2

y :
3 = 4
4 = =

4 22 + 42
2

, ,
. = 0
:
= 0: 0 = 0; 0 = 0; 0 = 0 cos(0 ) ; 0 = 0 sin(0 )

0 0 .
; ,

. 0 0.

Matlab. :
, ,
-
.

, secondode.m,
1-
. ( )
, , ,
( ) ,
.
function [ p ] = secondode( t, indata )
%% simultaneous second order differentials for projectile
% motion with air resistance
% output vector z has the four differential outputs
% assumed units: metres, seconds, Newtons, kg, radians
global g % these are defined globally so they can be changed
% outside the function - means this function doesn't need editing
% for different projectiles
d0=1.26;
v=1.15e-4;
sig=0.1;
p = zeros(4,1);
p(1) = indata(2);
p(2) = -sig*(d0*(exp(-v*indata(3))))*sqrt(indata(2)^2 + indata(4)^2)*
indata(2);
p(3) = indata(4);
p(4) = -g-sig*(d0*(exp(-v*indata(3))))*sqrt(indata(2)^2 +
indata(4)^2)* indata(4);
end

## Projectile.m ode45 Matlab,

- .
ode45
secondode.m.

% Projectile.m
% assumed units: metres, seconds, Newtons, kg, radians
clear;clc
global C g
g=9.81; % m/s^2
V0=300; % m/s initial launch speed
beta0=30*pi/180; % initial launch angle in degrees converted to
m=6.58/1000; % mass of projectile, kg
d=0.0355; % diameter of spherical projectile, meters
Cd=0.5; % assumed
rho=1.2041; % density of air, kg/m^3
% How does this vary with ambient temperature and pressure?
A=pi*d^2/4; % silhouette area, m^2
C=Cd*A*rho/2/m; % the drag force constant
%% perform projectile calcs
tmax=5; % do calculations for 5 seconds of flight time
tspan = [0 tmax];
% initial conditions as [x0, vx0, y0, vy0]
IC = [0; V0*cos(beta0); 0; V0*sin(beta0)];
opt = odeset('events', @events);
[t, oput] = ode45(@secondode, tspan, IC, opt); % Runge-Kutta to solve
x= oput(:,1); % extract x-position from 1st column
vx= oput(:,2); % extract x-velocity from 2nd column
y= oput(:,3); % extract y-position from 3rd column
vy= oput(:,4); % extract y-velocity from 4th column
figure(1);clf;
plot(x,y); % plot to see the projectiles path
grid;

.
t t+dt,
d,
.
ds =.d , .

,
( ). ,
.

u=1/v2

u=w()z()

t=tan(/2)

2
t=0, v0 0

, v ,
( )

## Нижнее меню

### Получите наши бесплатные приложения

Авторское право © 2021 Scribd Inc.