Μαθηματικό μοντέλο μελέτης σε PC: Numerov Algorithm
-
Upload
nikos-zacharioudakis -
Category
Documents
-
view
228 -
download
0
Transcript of Μαθηματικό μοντέλο μελέτης σε PC: Numerov Algorithm
-
8/7/2019 PC: Numerov Algorithm
1/7
: : 2980: 01.12.2005
PC:
: Numerov Algorithm
-
8/7/2019 PC: Numerov Algorithm
2/7
::
m , :
2
2 2
34 3
d yy x
dx x =
( )xy :
i. ( )xy
: ( )7
151 =y ( )
7
101 =y .
ii.
Numerov Algorithm /. ;
//::
Fortran, Numerov Algorithm., compilation , :
Numerov Algorithm,
expdata.out ( )yx, , Gnuplot ( )xfy = .
::
Numerov Algorithm:
-
8/7/2019 PC: Numerov Algorithm
3/7
Fortran
c234567program ergastiriaki_anafora_8implicit nonereal x(0:1000),y(0:1000),f,u,g,k,d,h,h2integer i,nprint*, ""
print*, "Doste ta x(initial), y(initial)."read*, x(0),y(0)print*, ""print*, "Doste to y'(",x(0),")."read*, dprint*, ""print*, "Doste ton arithmo ton zevgon timon (x,y) pou epithymeite.
&"read*, nprint*, ""print*, "Doste to vima, me to opoio thelete na prokypsoun oi diado
&xikes times tis metavlitis x."read*, hy(1)=y(0)+d*hprint*, ""
print*, "Me vasei ta dedomena pou eisagate, ta zevgi timon (x,y),&exoun os eksis:"print*, ""call Numerov_Algorithm(h,n,x,y)print*, ""end
subroutine Numerov_Algorithm(h,n,x,y)implicit nonereal x(0:1000),y(0:1000),f,u,g,k,h,h2integer i,nh2=h**2/12.0do i=0,n-1x(i) x(0)+i*h
-
8/7/2019 PC: Numerov Algorithm
4/7
function f(u)implicit nonereal f,uf=-3./(4.*u**2)returnend
function g(k)implicit none
real g,kg=3.*k/4.returnend
i
2 22 3
2 2 2
3 3 34 3
4 4
d y d y y x x y xdx x dx
= =
, oy :
04
32
2
2 = ydx
ydx
ro xy = :
( ) ( )
( ) ( )2
21
2
4
3
411
04
30
4
310
4
310
4
3
2
2,1
222
2
2
2
=
=
==
==
r
rrrrxxxrrxxdx
xdx rrrr
r
, oy :
-
8/7/2019 PC: Numerov Algorithm
5/7
7
1
4
3
4
210
4
3
4
360
4
3
4
36
4
3
4
3
64
3
4
3
4
3
4
3
3
33233
2
32
23
2
2
2
====
===
aa
aaaax
xaxaxxxaxdx
axd
xxydx
yd
x
, py :
( ) 37
1xxy
p
=
:
( ) ( ) ( )xyxyxy po +=
( )xy :
( ) 321
22
3
17
1 xxcxcxy ++=
, :
( )7
151 =y
( ) 2715
711 2121 =+=++= ccccy
( )7
101 =y
22
3
2
2
1
1
32
1
2
2
3
1
32
1
22
3
1
7
3
2
1
2
3
7
17
1
xxcxcdx
dx
dx
dx
cdx
dx
cdx
xxcxcd
dx
dy
+=++=
++
=
12
1
2
3
7
10
7
3
2
1
2
3
7
102121 ==+= cccc
d
dy
-
8/7/2019 PC: Numerov Algorithm
6/7
ii
.
-
8/7/2019 PC: Numerov Algorithm
7/7
2.1
2.2
2.3
2.4
2.5
2.6
2.7
0.95 1 1.05 1.1 1.15 1.2 1.25 1.3
y(x)
x
"expdata.out"x**(3./2.)+x**(-1./2.)+x**3/7.