Theorem. Let A
⊆ M |= T , T - weakly o-minimal theory, q-irrational 1-type over A. Then the
following conditions are equivalent:
1.
q is undefinable
2.
There exists A-definable formula H(x, y
¯) such that for any A-definable formula
θ(y¯) holds
[C(H(x, y
¯), θ(y
¯), q) \/ C(H(x, y
¯), ¬θ(y
¯), q)].
The model M is called dedekind complete if any its cut is rational. A n d
all types over Dedekind
complete models of T are definable.
As weakly o-minimal theory is the theory in which all of its subsets are union of finite numbers of
convex subsets, further we have to define the cases where there will be definability of 2-types. To
construct the definability of 2-type over the model M, every time we must take definable types and add
to that one by one in this case, i.e. M
∪ α , it is sufficient to take definable 1-types.
The type is called 2-type over A which is the subset of M if it is set of consistent formulas p(x
1,
x
2
) = p(x L(A) such that for every finite subset p
0
(x)
⊆ p(x) there are some elements b
1
,
b
2
∈ M with M |= p
0
(b
1,
b
2
).
Theory T is called 2-type definable if the definable 1-type over a definable 1-type is definable.
So, in order to find the definability of 2-types in weakly o-minimal theory.
1.
[1]. Shelah S. Stable theories // Israel Journal of Mathematics. — 1969. — Vol. 7. — P. 187–
202.]
435
2.
[2].Van den Dries L. Remarks on Tarski's problem concerning (R,+,*,exp) // Logic Colloquim '82
/ ed. G. Lolli, G. Longo, and A. Marcja. — Amsterdam: North-Holland, 1984. — P. 97–121.
3. [3]Pillay A., Steinhorn Ch. Definable sets in ordered structures.1 // Trans. Amer. Math. Soc. —
1986. — Vol. 295. — P. 565–592.
4. [4]Macpherson D., Marker D., Steinhorn Ch. Weakly o-minimal structures and real closed fields
// Transactions of The American Mathematical Society. — 2000. — Vol. 352. — P. 5435–5483.
5. Baizhanov B. Definability of 1-types in weakly o-minimal theories // Siberian Advances in
Mathematics. — 2006. — V. 16. №2. — P. 1–33.
УДК 003-009
MATHEMATICAL MODELING OF PENDULUM DYNAMICS USING NUMERICAL
METHODS
Karibayev Almat, Kumarbek Alma, Almatakyzy Uldan, Yelshibayev Magzhan
Scientific adviser : M.Sc. Senior Lecturer Baimenshina Gulnaz
Introduction
Ordinary di
fferential equations tend to arise whenever you need to model changing quantities that
depend on the amount of other quantities around it. For example, in chemistry, the time rate of change
of concentration (ddt) of a chemical solution often depends on the concetrations of other chemicals that
surround it. In biology, di
fferential equations are often used in population dynamics, to model the
evolution and/or extinction of a particular species (like people, animals, bacteria, or even viruses like
HIV) (eg, Volterra Equations). In finance, the stock market is often modeled via sets of coupled
di
fferential equations (e.g., Black-Scholes equation). In physics, dfq’s are everywhere – we’ve seen them
in Cosmology (e.g., Friedmann’s Equations, non-linear structure growth and perturbation theory),
Classical Dynamics (e.g., the orbits of planets, stars, and galaxies as specialized N-body problems,
hydrodynamics), and Radiative Transfer. Most di
fferential equations are too complicated to write down
a solution by hand (an ”analytical solution”), so one has to revert to numerics to find any kind of solution
at all!
Here, We focus on Ordinary Di
fferential Equations (where the functions we solve for depend on just
one variable, like time), and how a few simple commands in Matlab allows us to get numerical solutions
to even the most complicated looking equations. As an example We will consider the pendulum
dynamics equations.
Model
In this example I use a variety of approaches in order to solve the following, very simple, equation of
motion. It is based on Equation 3.9, with k and α =1.
??????
2
??????
????????????
2
= −??????
The first step is to take the second order ODE equation and split it into 2 first order ODE equations.
436
These are
????????????
????????????
= ??????
????????????
????????????
= −??????
Methods
We take 4 numerical methods approaches to solving the equation, illustrating the use of the Euler,
Euler Cromer, forth order Runge-Kutta [1] and finally the built in MATLAB® solver ODE23.
There are many variants of the Runge-Kutta method, but the most widely used one is the following.
Given:
??????
′
= ??????(??????, ??????)
??????(??????
??????
) = ??????
??????
We compute in turn
??????
1
= ℎ??????(??????
??????
, ??????
??????
)
??????
2
= ℎ??????(??????
??????
+
ℎ
2
,
??????
??????
+
??????
1
2
)
??????
3
= ℎ??????(??????
??????
+
ℎ
2
,
??????
??????
+
??????
2
2
)
??????
4
= ℎ??????(??????
??????
+ ℎ,
??????
??????
+ ??????
3
)
??????
??????+1
= ??????
??????
+
1
6
(??????
1
+ 2??????
2
+ 2??????
3
+ ??????
4
)
Euler calculation of motion of simple pendulum
437
Here we have figure, which shows function of the numerical solution of the equations of motion for a
simple pendulum using the Euler [2]method. In the code, we have pendulum length in metres which is
equal to 1, that shows oscillation, acceleration due to gravity is equal to 9,8, in the next step we need to
discretize time into 250 intervals and give time step in seconds, then we define omega, theta, time and
we have some initial displacement. Now that we have defined the initial values, we can determine each
next step and show it. Note that the oscillations grow with time and as we can see the Euler method
shows a lack of conservation of energy.
Euler_cromer calculation of motion of simple pendulum7
Here we have the same initial conditions. The difference is we use next step for determine theta. Note
that the oscillations NOT grow with time and as we can see the Euler-Cromer[1] method doesn’t show
a lack of conservation of energy.
Second order Runge Kutta method
438
Conclusion
As we can see the Euler method shows a lack of conservation of energy while the Runge-Kutta [1]
method
is
nicely
conserved.
The period of the oscillation versus the initial starting position of the pendulum looks roughly
parabolic. There seems to be a value which minimizes the period of the pendulum with the parameters
given in this assignment.
It was also concluded that while using the Euler rule to obtain the equations of motion was acceptable
for the simple pendulum, that this was not the case for the damped pendulum, for which the Runge-
Kutta method was far more accurate. Finally, the period doubling and chaotic behavior that occurs as
the amplitude of the driving force of a damped driven pendulum is increased, was observed through
phase portraits. For this kind of problem, the Runge-Kutta method is the more suitable. It has been
confirmed. It depends on the conditions of stability that we impose but we can say that this method is
efficient for most cases of pendulums
References:
1)
Chapra, Steven C. Applied numerical methods with MATLAB for engeneers and scientist
3
rd
.ed – 2012 ISBN 978-0-07-340110-2
2)
Attaway, Stormy. Matlabw: a practical introduction to programming and problem solving. 2
nd
ed.2011 ISBN 978-0-12-38381
УДК: 003-009
SIMULATION OF LORENZ MODEL BY USING NUMERICAL METHODS IN MATLAB
Les Miras, Izdauov Nurzhan
Suleyman Demirel University
Introduction
One day, Lorenz tried to recreate an interesting weather pattern, one he had seen previously, by re-
entering the values the computer had previously calculated and reported. However, when he ran the
program again, his results were different from the initial run. Lorenz suspected a bug; blown diode?
burned-out vacuum tube? power surge? cosmic rays? After checking the two plots, however, he realized
his "error"; on his previous computer printout, the one he had used to enter the initial conditions into the
439
computer for the second trial run, the figures were printed with three significant digits. In the program,
all values were calculated to six significant digits. Lorenz had assumed that the difference, only one part
in a thousand, would be inconsequential; however, due to the recursive nature of the equations, little
errors would first cause tiny errors, which would then affect the resulting next calculation a bit more,
which would affect the output of the next run even more. The final result of a long string of recursive
calculations would lead to a weather pattern totally different from the expected values.
The term "sensitive dependence on initial conditions" was coined to describe the phenomenon that
small changes in a recursive system can drastically change the results of running that system. A term
Lorenz coined to describe sensitive dependence on initial conditions is the "butterfly effect." This is
another thought experiment which is hardly testable: imagine that there exist two earths, so that an
incorporeal observer could compare events on one earth to another. Now imagine that both earths are
identical except for one fact; in one, a butterfly flaps its wings somewhere in South America, and in the
other, this butterfly remains still. One might think that such a small discrepancy between the two earths
would be inconsequential; after all, nobody was there, nobody could even notice the butterfly's wings
flapping, and air currents would be affected only minorly by such a miniscule event.
His description of the
butterfly effect
followed in 1969. He was awarded the
Kyoto Prize
for basic
sciences, in the field of earth and planetary sciences, in 1991, the
Buys Ballot Award
in 2004, and the
Tomassoni Award in 2008. In his later years, he lived in
Cambridge, Massachusetts
. He was an avid
outdoorsman, who enjoyed hiking, climbing, and cross-country skiing. He kept up with these pursuits
until very late in his life, and managed to continue most of his regular activities until only a few weeks
before his death. According to his daughter, Cheryl Lorenz, Lorenz had "finished a paper a week ago
with a colleague." On April 16, 2008, Lorenz died at his home in Cambridge at the age of 90, having
suffered from cancer.
Model
Edward Lorenz's first weather model exhibited chaotic behavior, but it involved a set of 12
nonlinear differential equations. Lorenz decided to look for complex behavior in an even simpler set of
equations, and was led to the phenomenon of rolling fluid convection. The physical model is simple:
place a gas in a solid rectangular box with a heat source on the bottom.
Lorenz simplified a few fluid dynamics equations (called the Navier-Stokes equations) and ended
up with a set of three nonlinear equations [1]:
dx/dt = P(y - x)
dy/dt = Rx - y - xz
dz/dt = xy - By
where P is the Prandtl number representing the ratio of the fluid viscosity to its thermal
conductivity, R represents the difference in temperature between the top and bottom of the system,
and B is the ratio of the width to height of the box used to hold the system. The values Lorenz used
are P = 10, R = 28, B = 8/3.
440
On the surface these three equations seem simple to solve. However, they represent an extremely
complicated dynamical system. If one plots the results in three dimensions the following figure, called
the Lorenz attractor, is obtained.
Projections of this attractor in the y-z and x-z two-dimensional planes are as follows:
Projection on the y-z plane
Projection on the x-z plane
The Lorenz attractor is an example of a strange attractor. Strange attractors are unique from other
phase-space attractors in that one does not know exactly where on the attractor the system will be. Two
points on the attractor that are near each other at one time will be arbitrarily far apart at later times. The
only restriction is that the state of system remain on the attractor. Strange attractors are also unique in
that they never close on themselves — the motion of the system never repeats (non-periodic). The
motion we are describing on these strange attractors is what we mean by chaotic behavior.
The Lorenz attractor was the first strange attractor, but there are many systems of equations that
give rise to chaotic dynamics. Examples of other strange attractors include the Rössler and Hénon
attractors.
The Lorenz equations also arise in simplified models for
lasers
,
dynamos
,
thermosyphons
, brushless
DC motors
,
electric circuits
,
chemical reactions
and
forward
osmosis
.
From a technical standpoint, the Lorenz system is
nonlinear
, three-dimensional
and
deterministic
. The Lorenz equations have been the subject of at least one book-length study.
Method
In
numerical analysis
, the Runge–Kutta methods [2] are an important family of implicit and
explicit iterative methods, which are used in
temporal discretization
for the approximation of solutions
of
ordinary differential equations
. These techniques were developed around 1900 by the German
mathematicians
C. Runge
and
M. W. Kutta
.
441
In
mathematics
and
computational science
, the Euler method [2] is a SN-order
numerical
procedure for solving
ordinary differential equations
(ODEs) with a given
initial value
. It is the most
basic
explicit method
for
numerical integration of ordinary differential equations
and is the simplest
Runge–Kutta method
. The Euler method is named after
Leonhard Euler
, who treated it in his book
Institutionum calculi integralis
.
Discussion and Results
Here is the code of how we solved this Lorenz Equations using Matlab. We will see, that there is
no difference between solving Lorenz Equations using Runge-Kutta or Euler’s method. Firstly, let us
see our Matlab code, where we solved Lorenz Equation by Runge-Kutta Method.
% Matlab code: Lorenz_RungeKutta
% To solve the chaotic Lorenz
equations using 4th order
Runge-Kutta
close
all
; clear
all
; clc
%Clears the command window
% Set Lorenz
parameters
a=10.0; b=8.0/3.0; c=28.0;
% Set initial condition, step length and number of steps
y1(1)=0; y2(1)=1.000; y3(1)=0.0;
h=0.01;
xM=40.0;
h2=h/2;
% Advance solution
t(1)=0;
x=t(1);
i=1;
while
x
i=i+1;
% Step from t(i-1) to t(i) using
% the provisional points yt1,yt2,yt3 inbetween
% 1. Compute f(t,y)
y1m = y1(i-1);
y2m = y2(i-1);
y3m = y3(i-1);
f01 = a*(y2m-y1m);
f02 = c*y1m - y2m - y1m*y3m;
f03 = -b*y3m + y1m*y2m;
% 2. Set provisional values yt1
yt11 = y1(i-1) + h2*f01;
yt12 = y2(i-1) + h2*f02;
yt13 = y3(i-1) + h2*f03;
% 3. Compute phase speed ft1 at provisional points
ft11 = a*(yt12-yt11);
ft12 = c*yt11 - yt12 - yt11*yt13;
ft13 = -b*yt13 + yt11*yt12;
442
% 4. Set provisional values yt
yt21 = y1(i-1) + h2*ft11;
yt22 = y2(i-1) + h2*ft12;
yt23 = y3(i-1) + h2*ft13;
% 5. Compute phase speed ft2 at provisional point
ft21 = a*(yt22-yt21);
ft22 = c*yt21 - yt22 - yt21*yt23;
ft23 = -b*yt23 + yt21*yt22;
% 6. Set provisional values yt3
yt31 = y1(i-1) + h*ft21;
yt32 = y2(i-1) + h*ft22;
yt33 = y3(i-1) + h*ft23;
% 7. Compute phase speed ft3 at provisional points
ft31 = a*(yt32-yt31);
ft32 = c*yt31 - yt32 - yt31*yt33;
ft33 = -b*yt33 + yt31*yt32;
% 8. Compute final phase speeds ff
ff1 = (1/6)*( f01 + 2*ft11 + 2*ft21 + ft31 );
ff2 = (1/6)*( f02 + 2*ft12 + 2*ft22 + ft32 );
ff3 = (1/6)*( f03 + 2*ft13 + 2*ft23 + ft33 );
% 9. Set new solution values
y1(i) = y1(i-1) + h*ff1;
y2(i) = y2(i-1) + h*ff2;
y3(i) = y3(i-1) + h*ff3;
% Update independent variable
t(i) = t(i-1) + h;
x = t(i-1);
end
% Plot results
plot(t,y1,
'r--'
);
plot(t,y1,
'k'
);
hold
on
;
plot(t,y2,
'r:'
);
plot(t,y3,
'b:'
);
xlabel(
't'
,
'fontsize'
,20);
ylabel(
'x(t)'
,
'fontsize'
,20);
print
-deps
lot1.eps
figure
plot3(y1,y2,y3);
xlabel(
'x'
); ylabel(
'y'
); zlabel(
'z'
)
print
-deps
lot2.eps
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Matlab code: Lorenz_Euler
%%% Euler calculation of Lorenz equations
clear; clc;
a=10;
b=8/3;
r=25;
443
sigma=10;
npoints =500000;
%Discretize time
dt = 0.0001;
% time step in seconds
x = zeros(npoints,1);
%init x, a vector of dimension npoints X 1,to being all zeros
y = zeros(npoints,1);
%init y, a vector of dimension npoints X 1,to being all zeros
z = zeros(npoints,1);
%init z, a vector of dimension npoints X 1,to being all zeros
time = zeros(npoints,1);
% this initializes the vector time to being all zeros
x(1)=1;
for
step = 1:npoints-1
% loop over the timesteps and solve the difference equations
x(step+1)=x(step)+sigma*(y(step)-x(step))*dt;
y(step+1)=y(step)+(-x(step)*z(step)+r*x(step)-y(step))*dt;
z(step+1)=z(step)+(x(step)*y(step)-b*z(step))*dt;
% Update time array
time(step+1) = time(step) + dt;
end
;
subplot (2,1,1);
plot(time,z,
'b'
);
xlabel(
'time'
);
ylabel(
'z'
);
subplot (2,1,2);
plot (x,z,
'g'
);
xlabel(
'x'
);
ylabel(
'z'
)
Our Results:
Runge Kutta Method
Euler Method
444
From this obtained results, we see that Lorenz Equation can be solved by both Runge-Kutta and
Euler’s Methods. And results are almost same, with some differences accuring while solved.
SUMMARY AND CONCLUSIONS
While the Lorenz system is historically important and useful as a paradigm of chaos in continuous-
time dissipative systems, it is by no means the simplest such example. Its double-lobe structure and
chaotic behavior can be replicated in a number of other elegant systems containing fewer terms, fewer
parameters, and a single nonlinearity. Lorenz would certainly have applauded these extensions of his
seminal work, but he rightly deserves the credit for opening the door to such explorations and heralding
the implications of chaos to the predictability of dynamical systems.
A model of the Lorenz attractor has been constructed using the Runge-Kutta method to solve the
Lorenz equations, a set of three coupled ordinary differential equations that describe chaotic flow in
atmospheric or hydrodynamic systems. The modelling proved to be successful and the Lorenz equation
parameters were varied to ascertain their effect on the behavior of the system. It was found that small
changes to these parameters could have huge effects on the dynamics of the system, either making it
more chaotic, or taming it such that the flow rate of the system tends to zero.
In the cases where the flow rate tended to zero, the parameters gave rise to an unstable system
where the dynamics could not be maintain for an extended period of time. Conversely, in the situations
where the flow became more chaotic, the system remained stable and the orbits of the attractor surface
were more pronounced. In respect to the numerical method employed, the Runge-Kutta method
performed well and produced an accurate, stable model in which to observe the Lorenz attractor.
Достарыңызбен бөлісу: |