root / TrouNoir / trou_noir.f @ 308
Historique | Voir | Annoter | Télécharger (15,45 ko)
1 |
PROGRAM MODELISATION_NUMERIQUE |
---|---|
2 |
|
3 |
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
4 |
c c |
5 |
c MODELISATION NUMERIQUE D'UN DISQUE D'ACCRETION AUTOUR D'UN TROU NOIR : c |
6 |
c c |
7 |
c APPARENCE & SPECTRE c |
8 |
c c |
9 |
c Programme realise par : Herve AUSSEL c |
10 |
c Emmanuel QUEMENER c |
11 |
c c |
12 |
c Dans le cadre de l'unite de modelisation numerique du DEA c |
13 |
c d'Astrophysique & Techniques Spatiales (Paris 7 & 11) c |
14 |
c c |
15 |
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
16 |
|
17 |
IMPLICIT NONE |
18 |
REAL*8 pi |
19 |
PARAMETER (pi=3.141592654) |
20 |
|
21 |
c |
22 |
c PARAMETRES PHYSIQUES DU SYSTEME DISQUE, TROU-NOIR, OBSERVATEUR |
23 |
c |
24 |
|
25 |
REAL*8 m ! masse reduite du trou noir |
26 |
REAL*8 rs,ri,re ! rayons de Schwarzschild,interieur et exterieur |
27 |
REAL*8 tho ! angle normale-disque & direction-observateur |
28 |
REAL*8 ro ! distance entre l'observateur et le trou noir |
29 |
REAL*8 q ! parametre de spectre |
30 |
REAL*4 bss ! borne superieure du spectre |
31 |
|
32 |
c |
33 |
c PARAMETRES DE LA PLAQUE PHOTOGRAPHIQUE |
34 |
c |
35 |
|
36 |
INTEGER*4 dim ! dimension de la plaque photographique (en pixels) |
37 |
PARAMETER (dim=1024) |
38 |
REAL*4 stp ! pas d'iteration en pixels sur la plaque |
39 |
INTEGER*4 nmx ! nombre total d'iterations |
40 |
REAL*8 d ! distance exploree du centre de la plaque |
41 |
REAL*8 bmx ! parametre d'impact maximal |
42 |
|
43 |
c |
44 |
c PARAMETRES INITIAUX D' INTEGRATION |
45 |
c |
46 |
|
47 |
REAL*8 db ! avancement du parametre d'impact |
48 |
REAL*8 b ! parametre d'impact du photon |
49 |
REAL*8 h ! avancement angulaire initial |
50 |
|
51 |
c |
52 |
c PARAMETRES D'INTEGRATION DU SYSTEME DIFFERENTIEL |
53 |
c |
54 |
|
55 |
REAL*8 up,vp,pp ! parametres du SED , precedents |
56 |
REAL*8 us,vs,ps ! parametres du SED , suivants |
57 |
|
58 |
c |
59 |
c RESULTATS DE L'INTEGRATION DE L'EQUATION DIFFERENTIELLE |
60 |
c |
61 |
|
62 |
REAL*8 rp(2048) ! vecteur polaire |
63 |
INTEGER*4 nh ! nombre d'avancements angulaires |
64 |
|
65 |
c |
66 |
c RESULTATS DE LA SIMULATION |
67 |
c |
68 |
|
69 |
REAL*4 zp(dim,dim) ! image en decalage spectral |
70 |
REAL*4 fp(dim,dim) ! image en flux |
71 |
|
72 |
c |
73 |
c AUTRES VARIABLES... |
74 |
c |
75 |
|
76 |
INTEGER*4 pc ! pourcentage du balayage realise |
77 |
REAL*8 phi ! angle de la plaque photographique |
78 |
REAL*8 thi ! angle trou noir-observateur & direction emission |
79 |
REAL*8 thx ! angle thi maximal |
80 |
REAL*8 phd ! angle donnant l'intersection des plans |
81 |
REAL*8 php ! angle d'intersection intermediaire |
82 |
REAL*8 nr ! indice d'intersection reel du vecteur |
83 |
INTEGER*4 ni ! indice d'intersection entier du vecteur |
84 |
INTEGER*4 ii ! indice de 1' image (primaire, secondaire, ...) |
85 |
REAL*8 r ! rayon moyen d'impact sur le disque |
86 |
INTEGER*4 nbr ! nombre de bandes de rapport de frequence |
87 |
INTEGER*4 i,imx,j,n |
88 |
LOGICAL tst |
89 |
REAL*8 atanp ! fonction arctangente : resultat entre 0 et 2*pi |
90 |
LOGICAL raie ! variable interactive de type de spectre |
91 |
LOGICAL dist ! variable interactive de distance |
92 |
|
93 |
REAL*4 t_start,t_stop |
94 |
c |
95 |
c TYPE DE SPECTRE |
96 |
c |
97 |
|
98 |
c raie=.TRUE. ! TRUE -> raie infiniment fine |
99 |
raie=.FALSE. ! FALSE -> corps noir |
100 |
|
101 |
c |
102 |
c TYPE DE DISTANCE |
103 |
c |
104 |
|
105 |
c dist=.TRUE. ! TRUE -> distance infinie |
106 |
dist=.FALSE. ! FALSE -> distance finie |
107 |
|
108 |
c |
109 |
c INITIALISATION DES TABLEAUX |
110 |
c |
111 |
|
112 |
DO i=1,dim |
113 |
DO j=1,dim |
114 |
zp(i,j)=0. |
115 |
fp(i,j)=0. |
116 |
END DO |
117 |
END DO |
118 |
|
119 |
c |
120 |
c DEFINITION DES PARAMETRES PHYSIQUES |
121 |
c |
122 |
|
123 |
m=1. |
124 |
rs=2.*m |
125 |
ri=3.*rs |
126 |
re=12. |
127 |
ro=100. |
128 |
tho=pi/180.*80. |
129 |
IF (raie .EQV. .TRUE.) THEN |
130 |
q=-2 |
131 |
ELSE |
132 |
q=-3/4 |
133 |
ENDIF |
134 |
|
135 |
c |
136 |
c DEFINITION DES PARAMETRES NUMERIQUES |
137 |
c |
138 |
|
139 |
nmx=dim |
140 |
stp=dim/(2.*nmx) |
141 |
bmx=1.25*re |
142 |
b=0. |
143 |
thx=asin(bmx/ro) |
144 |
pc=0 |
145 |
nbr=256 |
146 |
IF (raie .EQV. .TRUE.) THEN |
147 |
bss=2. |
148 |
ELSE |
149 |
bss=1.e19 |
150 |
ENDIF |
151 |
|
152 |
c |
153 |
c BOUCLE PRINCIPALE DE LA SIMULATION |
154 |
c |
155 |
|
156 |
CALL TIMER(t_start) |
157 |
|
158 |
DO n=1,nmx |
159 |
|
160 |
c |
161 |
c Affectation des conditions initiales de la resolution Runge-Kutta |
162 |
c ( Premier etage d'imbrication -> n ) |
163 |
c |
164 |
h=4*pi/2048. |
165 |
d=stp*n |
166 |
IF (dist .EQV. .TRUE.) THEN |
167 |
db=bmx/nmx |
168 |
b=db*n |
169 |
up=0. |
170 |
vp=1. |
171 |
ELSE |
172 |
thi=thx/nmx*n |
173 |
db=ro*DSIN(thi)-b |
174 |
b=ro*DSIN(thi) |
175 |
up=DSIN(thi) |
176 |
vp=DCOS(thi) |
177 |
ENDIF |
178 |
pp=0. |
179 |
nh=1 |
180 |
CALL rungekutta(ps,us,vs,pp,up,vp,h,m,b) |
181 |
rp(nh)=ABS(b/us) |
182 |
|
183 |
c |
184 |
c Resolution de l'equation differentielle pour un parametre b donne |
185 |
c Les resultats sont stockes dans le vecteur polaire rp(n) |
186 |
c ( Deuxieme etage d'imbrication -> n & nh ) |
187 |
c |
188 |
|
189 |
DO WHILE ((rp(nh).GE.rs).AND.(rp(nh).LE.rp(1))) |
190 |
nh=nh+1 |
191 |
pp=ps |
192 |
up=us |
193 |
vp=vs |
194 |
CALL rungekutta(ps,us,vs,pp,up,vp,h,m,b) |
195 |
rp(nh)=b/us |
196 |
END DO |
197 |
|
198 |
c |
199 |
c Mise a zero de tous les termes non redefinis du vecteur polaire |
200 |
c ( Deuxieme etage d'imbrication -> n & 1 ) |
201 |
c |
202 |
|
203 |
DO i=nh+1,2048 |
204 |
rp(i)=0. |
205 |
END DO |
206 |
|
207 |
c |
208 |
c Determination des points de la trajectoire coupant le plan du disque |
209 |
c par echantillonnage de 1' angle phi sur un cercle, a pas radial constant |
210 |
c ( Deuxieme etage d'imbrication -> n & 1 ) |
211 |
c |
212 |
|
213 |
imx=INT(8*d) |
214 |
DO i=0,imx |
215 |
phi=2*pi/imx*i |
216 |
|
217 |
c Calcul de l'angle "brut" d'intersection dans la base polaire |
218 |
|
219 |
phd=atanp(DCOS(phi)*DSIN(tho),DCOS(tho)) |
220 |
phd=phd-INT(phd/pi)*pi |
221 |
ii=0 |
222 |
tst=.FALSE. |
223 |
|
224 |
c |
225 |
c Boucle tant que - que l'image tertiaire n'a pas ete teste |
226 |
c - le rayon n'est pas dans le domaine du disque |
227 |
c ( Troisieme etage d'imbrication -> n , 1 , (ii, tst) , r ) |
228 |
c |
229 |
|
230 |
DO WHILE((ii.LE.2).AND.(tst.EQV..FALSE.)) |
231 |
|
232 |
c Calcul de l'angle d'intersection pour chacune des images |
233 |
|
234 |
php=phd+ii*pi |
235 |
nr=php/h |
236 |
ni=INT(nr) |
237 |
|
238 |
c Interpolation lineaire de la distance photon-trou noir |
239 |
|
240 |
IF (ni.LT.nh) THEN |
241 |
r=(rp(ni+1)-rp(ni))*(nr-ni*1.)+rp(ni) |
242 |
ELSE |
243 |
r=rp(ni) |
244 |
ENDIF |
245 |
|
246 |
|
247 |
c |
248 |
c Test d'impact sur le disque |
249 |
c ( Quatrieme etage d'imbrication -> n , i , (ii,tst) , r ) |
250 |
c |
251 |
|
252 |
IF ((r.LE.re).AND.(r.GE.ri)) then |
253 |
tst=.TRUE. |
254 |
|
255 |
c S'il y a impact calcul - du rapport de frequence |
256 |
c - du spectre de photons et de flux |
257 |
|
258 |
CALL impact(raie,d,phi,dim,r,b,tho,m,zp,fp, |
259 |
& q,db,h,nbr,bss) |
260 |
|
261 |
END IF |
262 |
|
263 |
ii=ii+1 |
264 |
END DO |
265 |
END DO |
266 |
END DO |
267 |
|
268 |
|
269 |
CALL TIMER(t_stop) |
270 |
|
271 |
WRITE (*,*) 'Elapsed time = ', t_stop - t_start |
272 |
|
273 |
c Appel de la routine d'affichage |
274 |
|
275 |
CALL affichage(zp,fp,dim,nbr,bss,bmx,m,ri,re,tho,pi) |
276 |
|
277 |
WRITE(*,*) |
278 |
WRITE(*,*) 'C''est TERMINE ! ' |
279 |
WRITE(*,*) |
280 |
|
281 |
STOP |
282 |
END PROGRAM |
283 |
|
284 |
c |
285 |
c Cette fonction permet de trouver un arctangente entre 0 et 2*pi |
286 |
c |
287 |
|
288 |
REAL*8 function atanp(x,y) |
289 |
REAL*8 x,y,pi,eps |
290 |
pi=3.141592654 |
291 |
eps=1.e-20 |
292 |
IF (ABS(x).LE.eps) then |
293 |
IF (ABS(y).EQ.Y) then |
294 |
atanp=pi/2. |
295 |
ELSE |
296 |
atanp=3.*pi/2. |
297 |
END IF |
298 |
ELSE |
299 |
IF (ABS(x).EQ.x) then |
300 |
IF (ABS(y).EQ.Y) then |
301 |
atanp=DATAN(y/x) |
302 |
ELSE |
303 |
atanp=DATAN(y/x)+2.*pi |
304 |
END IF |
305 |
ELSE |
306 |
atanp=DATAN(y/x)+pi |
307 |
END IF |
308 |
END IF |
309 |
RETURN |
310 |
END |
311 |
|
312 |
c |
313 |
c |
314 |
c |
315 |
SUBROUTINE timer(ytime) |
316 |
REAL*4 ytime |
317 |
INTEGER*4 clk_max,clk_rate,clk_read |
318 |
|
319 |
CALL SYSTEM_CLOCK(clk_read,clk_rate,clk_max) |
320 |
|
321 |
ytime=FLOAT(clk_read)/FLOAT(clk_rate) |
322 |
|
323 |
RETURN |
324 |
END |
325 |
c |
326 |
c Premiere fonction du systeme -> ( d(u)/d(phi)=f(phi,u,v) ) |
327 |
c |
328 |
|
329 |
REAL*8 function f(v) |
330 |
REAL*8 v |
331 |
f=v |
332 |
RETURN |
333 |
END |
334 |
|
335 |
c |
336 |
c Deuxieme fonction du systeme -> ( d(v)/d(phi)=g(phi,u,v) ) |
337 |
c |
338 |
|
339 |
REAL*8 function g(u,m,b) |
340 |
REAL*8 u, m, b |
341 |
g=3.*m/b*u**2-u |
342 |
RETURN |
343 |
END |
344 |
|
345 |
c |
346 |
c Routine de d'intergration par la methode de Runge-Kutta |
347 |
c |
348 |
|
349 |
SUBROUTINE rungekutta(ps,us,vs,pp,up,vp,h,m,b) |
350 |
REAL*8 ps,us,vs,pp,up,vp,h,m,b |
351 |
CALL calcul(us,vs,up,vp,h,m,b) |
352 |
ps=pp+h |
353 |
RETURN |
354 |
END |
355 |
|
356 |
SUBROUTINE calcul(us,vs,up,vp,h,m,b) |
357 |
REAL*8 us,vs,up,vp,h,m,b |
358 |
REAL*8 c(4),d(4),f,g |
359 |
c(1)=h*f(vp) |
360 |
c(2)=h* f(vp+c(1)/2.) |
361 |
c(3)=h*f(vp+c(2)/2.) |
362 |
c(4)=h*f(vp+c(3)) |
363 |
d(1)=h*g(up,m,b) |
364 |
d(2)=h*g(up+d(1)/2.,m,b) |
365 |
d(3)=h*g(up+d(2)/2.,m,b) |
366 |
d(4)=h*g(up+d(3),m,b) |
367 |
us=up+(c(1)+2.*c(2)+2.*c(3)+c(4))/6. |
368 |
vs=vp+(d(1)+2.*d(2)+2.*d(3)+d(4))/6. |
369 |
RETURN |
370 |
END |
371 |
|
372 |
c |
373 |
c En cas d'impact, cette procedure : |
374 |
c - etablit la position du pixel consisdere sur les images |
375 |
c - appelle la routine de calcul de decalage spectral |
376 |
c - appelle la routine de calcul du flux et du spectre |
377 |
c - affecte a chacun des pixels sa valeur calculee |
378 |
c |
379 |
|
380 |
SUBROUTINE impact(raie,d,phi,dim,r,b,tho,m,zp,fp, |
381 |
& q,db,h,nbr,bss) |
382 |
REAL*8 d,phi,r,b,tho,m,db,h,q |
383 |
INTEGER*4 dim |
384 |
REAL*4 zp(dim,dim),fp(dim,dim),bss |
385 |
REAL*4 xe,ye |
386 |
INTEGER*4 xi,yi |
387 |
REAL*8 flx,rf |
388 |
LOGICAL raie |
389 |
xe=d*DSIN(phi) |
390 |
ye=-d*DCOS(phi) |
391 |
|
392 |
c Calcul des coordonnees (x,y) du pixel sur chacune des images |
393 |
|
394 |
xi=INT(xe)+INT(dim/2.) |
395 |
yi=INT(ye)+INT(dim/2.) |
396 |
|
397 |
c Appel de la routine de decalage spectral |
398 |
|
399 |
CALL decalage_spectral(rf,r,b,phi,tho,m) |
400 |
|
401 |
c Appel de la routine de calcul de flux et de modification de spectre |
402 |
c pour le cas d'une raie infiniment fine ou un corps noir |
403 |
|
404 |
IF (raie .EQV. .TRUE.) THEN |
405 |
CALL spectre(rf,q,b,db,h,r,m,bss,flx) |
406 |
ELSE |
407 |
CALL spectre_bb(rf,b,db,h,r,m,nbr,bss,flx) |
408 |
END IF |
409 |
|
410 |
c Affectation sur chacune des images du decalage spectral et du flux |
411 |
|
412 |
IF(zp(xi,yi).EQ.0.) zp(xi,yi)=1./rf |
413 |
IF(fp(xi,yi).EQ.0.) fp(xi,yi)=flx |
414 |
|
415 |
RETURN |
416 |
END |
417 |
|
418 |
c Calcul du rapport entre la frequence recue et la frequence emise |
419 |
|
420 |
SUBROUTINE decalage_spectral(rf,r,b,phi,tho,m) |
421 |
REAL*8 rf,r,b,phi,tho,m |
422 |
rf=sqrt(1-3*m/r)/(1+sqrt(m/r**3)*b*sin(tho)*sin(phi)) |
423 |
RETURN |
424 |
END |
425 |
|
426 |
c Calcul du flux puis du spectre pour une raie infiniment fine |
427 |
|
428 |
SUBROUTINE spectre(rf,q,b,db,h,r,m,bss,flx) |
429 |
REAL*8 rf,b,db,h,r,m,flx,q |
430 |
REAL*4 bss |
431 |
flx=(r/m)**q*rf**4*b*db*h |
432 |
RETURN |
433 |
END |
434 |
|
435 |
c Calcul du flux puis du spectre pour un corps noir |
436 |
|
437 |
SUBROUTINE spectre_bb(rf,b,db,h,r,m,nbr,bss,flx) |
438 |
REAL*8 nu_rec,nu_em,qu,v |
439 |
REAL*8 rf,b,db,h,r,m,flx,temp,temp_em,flux_int |
440 |
REAL*8 m_point |
441 |
REAL*4 bss |
442 |
INTEGER*4 nbr |
443 |
INTEGER*4 fi,posfreq |
444 |
REAL*8, PARAMETER :: planck=6.62e-34 ! definition des constantes |
445 |
REAL*8, PARAMETER :: c=3.e8 |
446 |
REAL*8, PARAMETER :: k=1.38e-23 |
447 |
|
448 |
c |
449 |
c Definition des parametres pour le calcul de la temperature d'emission |
450 |
c puis calcul |
451 |
c |
452 |
|
453 |
temp=3.e7 |
454 |
m_point=1. |
455 |
|
456 |
c v -> C du rapport |
457 |
|
458 |
v=1.-3./r |
459 |
|
460 |
c qu -> Q du rapport |
461 |
|
462 |
qu=((1-3./r)**-0.5)*(r**-0.5)*(r**0.5-6.**0.5+ |
463 |
& (3.**0.5/2.)*log((r**0.5+3.**0.5)/(r**0.5-3**0.5)*0.1715728752)) |
464 |
qu=abs(qu) |
465 |
temp_em=temp*m**0.5 |
466 |
temp_em=temp_em*m_point**0.25 |
467 |
temp_em=temp_em*r**(-0.75) |
468 |
temp_em=temp_em*v**(-0.125) |
469 |
temp_em=temp_em*qu**0.25 |
470 |
|
471 |
c |
472 |
c initialisation des compteurs de flux |
473 |
c flux int : flux recu pour le pixel dans la tranque posfreq |
474 |
c flx : flux "bolometrique", integre de 0. a bss |
475 |
c |
476 |
|
477 |
flux_int=0. |
478 |
flx=0. |
479 |
|
480 |
c |
481 |
c Balayage en frequence du spectre |
482 |
c |
483 |
|
484 |
DO fi=1,nbr |
485 |
nu_em=bss*fi/nbr !frequence d' emission |
486 |
nu_rec=nu_em*rf !frequence de reception |
487 |
posfreq=INT(nu_rec*FLOAT(nbr)/bss) !case ou se trouve nu rec |
488 |
|
489 |
c |
490 |
c test pour savoir si la frequence de reception est bien dans le |
491 |
c domaine du spectre calcule |
492 |
c |
493 |
|
494 |
if ((posfreq.GE.1).AND.(posfreq.LE.nbr)) THEN |
495 |
|
496 |
c Loi du corps noir |
497 |
|
498 |
flux_int=2.*nu_em**3/c**2*planck/ |
499 |
& (exp(planck*nu_em/(k*temp_em))-1.) |
500 |
|
501 |
c Integration sur le pixel |
502 |
|
503 |
flux_int=flux_int*rf**3*b*db*h |
504 |
|
505 |
c Integration bolometrique |
506 |
|
507 |
flx=flx+flux_int |
508 |
ENDIF |
509 |
END DO |
510 |
|
511 |
RETURN |
512 |
END |
513 |
|
514 |
c |
515 |
c AFFICHAGE DES RESULTATS : 6 fenetres de sortie |
516 |
c |
517 |
c - Image en decalage spectral |
518 |
c - Image en flux |
519 |
c - Dessin de parametres physiques interessants |
520 |
c - Dessin des limites du disque a l'infini |
521 |
c - Dessin du spectre en flux |
522 |
c - Dessin du spectre en nombre de photons |
523 |
c |
524 |
|
525 |
SUBROUTINE affichage(zp,fp,dim,nbr,bss,bmx,m,ri,re,tho,pi) |
526 |
INTEGER*4 dim |
527 |
REAL*4 zp(dim,dim),fp(dim,dim),bss |
528 |
REAL*8 bmx,m,ri,re,tho,pi |
529 |
INTEGER*4 np,i,j |
530 |
REAL*8 fm,nm |
531 |
REAL*4 fmx,zmx,x(1024),y(1024),tr(6),c(20),bmp |
532 |
LOGICAL tg |
533 |
LOGICAL ps |
534 |
|
535 |
tg=.TRUE. ! TRUE : affichage en tons de gris |
536 |
c ! FALSE : affichage en contours |
537 |
|
538 |
ps=.TRUE. ! TRUE : affichage postscript |
539 |
c ! FALSE : affichage fenetre Xwindow |
540 |
|
541 |
|
542 |
c |
543 |
c TRANSFORMATION DE L'IMAGE DES FLUX : FLUX -> FLUX RELATIFS |
544 |
c |
545 |
|
546 |
c |
547 |
c DETERMINATION DU DECALAGE SPECTRAL MAXIMUM ET DU FLUX MAXIMUM |
548 |
c |
549 |
|
550 |
fmx=0. |
551 |
zmx=0. |
552 |
DO i=1,dim |
553 |
DO j=1,dim |
554 |
IF (fmx.LT.fp(i,j)) fmx=fp(i,j) |
555 |
IF (zmx.LT.zp(i,j)) zmx=zp(i,j) |
556 |
END DO |
557 |
END DO |
558 |
|
559 |
write(*,*) 'Flux max :',fmx |
560 |
write(*,*) 'Z max :',zmx |
561 |
|
562 |
|
563 |
DATA tr/0.,1.,0.,0.,0.,1./ |
564 |
|
565 |
c |
566 |
c AFFICHAGE DE L'IMAGE DES DECALAGES SPECTRAUX |
567 |
c |
568 |
|
569 |
if (ps .EQV. .TRUE.) THEN |
570 |
CALL PGBEGIN (0,'z.ps/ps',1,1) |
571 |
ELSE |
572 |
CALL PGBEGIN (0,'/xwindow',1,1) |
573 |
END IF |
574 |
CALL PGENV (1.,dim/1.,1.,dim/1.,1,-1) |
575 |
CALL PGLABEL('Image des decalages spectraux','', |
576 |
&'DISQUE D''ACCRETION AUTOUR D''UN TROU NOIR') |
577 |
IF (tg .EQV. .TRUE.) THEN |
578 |
DO i=0,25 |
579 |
DO j=0,25 |
580 |
zp(i+25,j+25)=1. |
581 |
END DO |
582 |
END DO |
583 |
CALL PGGRAY(zp,dim,dim,2,dim-1,2,dim-1,zmx,0.,tr) |
584 |
ELSE |
585 |
DO i=1,20 |
586 |
c(i)=0.2*(i-1) |
587 |
END DO |
588 |
CALL PGCONS(zp,dim,dim,1,dim,1,dim,c,20,tr) |
589 |
END IF |
590 |
CALL PGEND |
591 |
|
592 |
c |
593 |
c AFFICHAGE DE L'IMAGE DES FLUX |
594 |
c |
595 |
|
596 |
if (ps .EQV. .TRUE.) THEN |
597 |
CALL PGBEGIN (0,'flux.ps/ps',1,1) |
598 |
ELSE |
599 |
CALL PGBEGIN (0,'/xwindow',1,1) |
600 |
END IF |
601 |
CALL PGENV(1.,dim/1.,1.,dim/1.,1,-1) |
602 |
CALL PGLABEL(' Image des flux','', |
603 |
&'DISQUE D''ACCRETION AUTOUR D''UN TROU NOIR') |
604 |
if (tg) THEN |
605 |
DO i=0,25 |
606 |
DO j=0,25 |
607 |
fp(i+25,j+25)=1. |
608 |
END DO |
609 |
END DO |
610 |
CALL PGGRAY(fp,dim,dim,2,dim-1,2,dim-1,fmx,0.,tr) |
611 |
ELSE |
612 |
DO i=1,8 |
613 |
c(i)=0.0625*2.**(i-1) |
614 |
END DO |
615 |
CALL PGCONS(fp,dim,dim,1,dim,1,dim,c,8,tr) |
616 |
END IF |
617 |
CALL PGEND |
618 |
|
619 |
END |
620 |
c compilation : |
621 |
c gfortran --std=gnu -o trou_noir_Fortran trou_noir.f -lpgplot |
622 |
c SORTIE GRAPHIQUE : -> Envoi sur l'ecran : /xwindow |
623 |
c ( dans PGBEGIN ) -> Envoi en format postscript : nom image.ps/ps |
624 |
|
625 |
|
626 |
|
627 |
|
628 |
|