1 | PROGRAM mprofils
2 | IMPLICIT NONE
3 |
4 | REAL*8 tmax,tmin,tiu,tfu,demix
5 | real*8 n
6 | INTEGER i
7 | REAL tl,dtl,tu,dtu
8 | real*8 r, dr, x,x1,x2,rmin,rmax
9 | real*8 temp,cte
10 | real*8 a, b
11 | dimension r(0:200),x(0:200),temp(0:200)
12 | PRINT *,'Rayon min(paroi)'
13 | READ *,rmin
14 | PRINT *,'Rayon max(paroi)? '
15 | READ *,rmax
16 | PRINT *,'nombre de volume PAIR ? '
17 | READ *,n
18 | r(0) = rmin
19 | r(n+1) = rmax
20 | r(n) = rmax
21 | demix=(rmax-rmin)/2.d+0
22 | demix = demix + rmin
23 | !dimension de chaque volume
24 | dr = (rmax-rmin)/n
25 | do i=1,n
26 | !rayon ext de chaque volume
27 | r(i)=r(0)+i*dr
28 | enddo
29 | open(50,file='rayons.in', status='unknown')
30 | do i=0,n+1
31 | write(50,*) r(i)
32 | enddo
33 | close(50)
34 | print *, 'FIN RAYON'
35 | !_________________________________________________________
36 | !recherche des n+1 valeurs ou j'ai les donnees
37 | ! pour les paroirs c'est inchange r(0), r(n+1)
38 | x(0)=r(0)
39 | x(n+1)=r(n+1)
40 | ! pour les rayons: bord ext des mailles prendre centre de maille
41 | do i=1,n
42 | x(i)= (r(i)+r(i-1))/2.d+0
43 | enddo
44 | !__________________________________________________________
45 | print *,'profil pointe temp N+2'
46 | PRINT *,'T min? '
47 | READ *,tmin
48 | print *,'ou x1:'
49 | read *,x1
50 | PRINT *,'T max? '
51 | READ *,tmax
52 | print *,'ou x2:'
53 | read *,x2
54 | !profils en pointe
55 | a=(tmax-tmin)/(x2-x1)
56 | b=tmin
57 | temp(0)=tmin
58 | temp(n+1)=tmin
59 | do i=1,n/2
60 | temp(i) = a*x(i)+b
61 | enddo
62 | b=tmin+(a*x2*2)
63 | do i=n/2+1,n
64 | temp(i) = -a*x(i)+b
65 | enddo
66 |
67 | OPEN(10,file='temperat.in',status='unknown')
68 | DO i=0,n+1
69 | write(10,*) temp(i)
70 | ENDDO
71 | CLOSE(10)
72 | !_____________________________________________________________________
73 | !profil parabol
74 | !! y=Ax(x-1)+B
75 | print *,'profil pointe h2o N'
76 | PRINT *,'h2o min? '
77 | READ *,tmin
78 | print *,'ou x1:'
79 | read *,x1
80 | PRINT *,'h2o max? '
81 | READ *,tmax
82 | print *,'ou x2:'
83 | read *,x2
84 | !profils en pointe
85 | a=(tmax-tmin)/(x2-x1)
86 | b=tmin
87 | temp(0)=tmin
88 | temp(n+1)=tmin
89 | do i=1,n/2
90 | temp(i) = a*x(i)+b
91 | enddo
92 | b=tmin+(a*x2*2)
93 | do i=n/2+1,n
94 | temp(i) = -a*x(i)+b
95 | enddo
96 |
97 | OPEN(10,file='fmh2o.in',status='unknown')
98 | DO i=1,n
99 | write(10,*) temp(i)
100 | ENDDO
101 | CLOSE(10)
102 |
103 | !______________________________________________________________________
104 |
105 | !profil constant
106 | PRINT *,'cte fmco? '
107 | read (*,*) cte
108 |
109 | OPEN(10,file='fmco.in',status='unknown')
110 | DO i=1,n
111 | write(10,*) cte
112 | ENDDO
113 | CLOSE(10)
114 | !________________________________________________________________________
115 | !profil constant
116 | !PRINT *,'cte fmco? '
117 | !read (*,*) cte
118 | OPEN(10,file='n_tirage.in',status='unknown')
119 | DO i=0,n+1
120 | write(10,*) 10000
121 | ENDDO
122 | CLOSE(10)
123 |
124 | END