Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make it publicly available after installation.
[graphlib.git] / chateaux / notes.txt
1 Données
2 -------
3
4 g       constante de gravitation
5 k       coefficient de frottement
6 dt      intervalle de temps de la simulation
7 wnd     vitesse du vent
8 x0, y0  position initiale    
9 v0      vitesse initiale
10 alpha   angle de tir
11
12 Variables
13 ---------
14
15 fx(t)   composante x de la force de frottement à l'instant t
16 fy(t)   composante y de la force de frottement à l'instant t
17
18 ax(t)   composante x de l'accélération à l'instant t
19 ay(t)   composante y de l'accélération à l'instant t
20
21 x(t)    composante x de la position à l'instant t
22 y(t)    composante y de la position à l'instant t
23
24 vx(t)   composante x de la vitesse à l'instant t
25 vy(t)   composante y de la vitesse à l'instant t
26
27 vrx(t)  composante x de la vitesse relative à l'instant t
28         = vx(t) - wnd
29 vry(t)  composante y de la vitesse relative à l'instant t
30         = vy(t)
31 |vr(t)| vitesse relative à l'instant t
32         = SQRT(vrx(t)^2 + vry(t)^2)
33
34 Initialisation
35 --------------
36
37 ax(0)   = 0
38 ay(0)   = 0
39
40 x(0)    = x0
41 y(0)    = y0
42
43 vx(0)   = v0 cos(alpha)
44 vy(0)   = v0 sin(alpha)
45
46 Mise à jour
47 -----------
48
49 |f(t)|  = -k |vr(t)| vr(t)
50 fx(t)   = -k |vr(t)| vrx(t)
51         = -k |vr(t)| (vx(t) - wnd)
52         = -k SQRT((vx(t) - wnd)^2 + vy(t)^2) (vx(t) - wnd)
53 fy(t)   = -k vr(t) vry(y)
54         = -k vr(t) vy(t)
55         = -k SQRT((vx(t) - wnd)^2 + vy(t)^2) vy(t)
56
57 ax(t)   = fx(t)
58         = -k SQRT((vx(t) - wnd)^2 + vy(t)^2) (vx(t) - wnd)
59 ay(t)   = fy(t) - g
60         = -k SQRT((vx(t) - wnd)^2 + vy(t)^2) vy(t) - g
61
62 x(t+1)  = x(t) + vx(t) dt
63 y(t+1)  = y(t) + vy(t) dt
64
65 vx(t+1) = vx(t) + ax(t) dt
66 vy(t+1) = vy(t) + ay(t) dt
67
68 Algorithme
69 ----------
70 Données
71         x0      x(t)
72         y0      y(t)
73         vx0     vx(t)
74         vy0     vy(t)
75
76 Résultats
77         x1      x(t+1)
78         y1      y(t+1)
79         vx1     vx(t+1)
80         vy1     vy(t+1)
81
82 Intermédiaires
83         vxr     vx(t) - wnd     
84         kvr     - k × vr(t)
85         ax      ax(t)
86         ay      ay(t)
87
88 Algorithme
89         vxr <- vx0 - wnd
90         kvr <- -k × SQRT(vxr × vxr + vy0 × vy0)
91         ax  <- kvr × vxr
92         ay  <- kvr × vy0 - g
93
94         x1  <- x0 + vx0 × dt
95         y1  <- y0 + vy0 × dt
96         vx1 <- vx0 + ax0 × dt
97         vy1 <- vy0 + ay0 × dt