1 | PROGRAM mprofils
2 | IMPLICIT NONE
3 |
4 | REAL*8 tmax,tmin,tiu,tfu,demix
5 | real*8 n
6 | INTEGER i, bout,compteur
7 | REAL tl,dtl,tu,dtu
8 | real*8 r, dr, x,x1,x2,rmin,rmax,rcentre
9 | real*8 temp,cte,tmp1
10 | real*8 a, b,eps,delta
11 | dimension r(0:200),x(0:200),temp(0:200),tmp1(0:200)
12 |
13 |
14 | do i=19,11,-1
15 | print *, i
16 | enddo
17 | print *, 'lire epaisseur centre ?'
18 | read *, eps
19 | PRINT *,'Rayon min(paroi)'
20 | READ *,rmin
21 | PRINT *,'Rayon max(paroi)? '
22 | READ *,rmax
23 | PRINT *,'nombre de volume PAIR ? '
24 | READ *,n
25 | r(0) = rmin
26 | r(n+1) = rmax
27 | r(n) = rmax
28 | bout = (n-1)/2
29 | !premiere partie à gauche mailla variable
30 | dr = 1.d+0
31 | delta = 0.d+0
32 | do i=1,bout
33 | r(i)= r(i-1) + (dr/i)
34 | delta = delta + (dr/i)
35 | !!!!!!!!!!!print *, i, r(i) ,(dr/i), r(i-1)
36 | enddo
37 | read *
38 | do i=1,bout
39 | r(i)= r(i)*((rmax-eps)/2)/delta
40 | print *, i, r(i)
41 | enddo
42 | read *
43 | ! maille du centre
44 | r(bout+1)=r(bout)+eps
45 | rcentre = r(bout+1)
46 | print *, 'centre: ',r(bout+1)
47 | !le reste à droite
48 | dr = 1.d+0
49 | delta = 0.d+0
50 | compteur = 1
51 | do i=n,bout+1,-1
52 | r(i-1)= r(i) - (dr/compteur)
53 | delta = delta + (dr/compteur)
54 | !!!!!!!!!print *, i, r(i),(dr/compteur), r(i-1)
55 | compteur = compteur +1
56 | enddo
57 | read *
58 | do i=bout+2,n
59 | r(i)= r(i)*((rmax-eps)/2)/delta
60 | r(i) = r(i)
61 | !!!!!!!!!!print *, i, r(i), r(bout+2), r(i)-r(bout+2)
62 | enddo
63 | do i=bout+2,n
64 | tmp1(i) = r(i)- r(bout+2)
65 | !print *, i, tmp1,r(i)
66 | enddo
67 | do i=bout+2,n
68 | r(i) = tmp1(i) + rcentre !!!!!0.505 !!!!<<<-è---ICI
69 | !tmp1(i) = r(i)- r(bout+2)
70 | !!!r(i) = tmp1
71 | !r(i) = r(i) !!!!- r(bout+2)
72 | print *, i, r(i)
73 | enddo
74 |
75 | read *
76 | open(50,file='rayons.in', status='unknown')
77 | do i=0,n+1
78 | write(50,*) r(i)
79 | enddo
80 | close(50)
81 | print *, 'n/2: ',n/2
82 | print *, 'FIN RAYON'
83 | !_________________________________________________________
84 | !recherche des n+1 valeurs ou j'ai les donnees
85 | ! pour les paroirs c'est inchange r(0), r(n+1)
86 | x(0)=r(0)
87 | x(n+1)=r(n+1)
88 | ! pour les rayons: bord ext des mailles prendre centre de maille
89 | do i=1,n
90 | x(i)= (r(i)+r(i-1))/2.d+0
91 | enddo
92 | !__________________________________________________________
93 | print *,'profil pointe temp N+2'
94 | PRINT *,'T min? '
95 | READ *,tmin
96 | print *,'ou x1:'
97 | read *,x1
98 | PRINT *,'T max? '
99 | READ *,tmax
100 | print *,'ou x2:'
101 | read *,x2
102 | !profils en pointe
103 | a=(tmax-tmin)/(x2-x1)
104 | b=tmin
105 | temp(0)=tmin
106 | temp(n+1)=tmin
107 | do i=1,n/2
108 | temp(i) = a*x(i)+b
109 | enddo
110 | b=tmin+(a*x2*2)
111 | do i=n/2+1,n
112 | temp(i) = -a*x(i)+b
113 | enddo
114 |
115 | OPEN(10,file='temperat.in',status='unknown')
116 | DO i=0,n+1
117 | write(10,*) temp(i)
118 | ENDDO
119 | CLOSE(10)
120 | !_____________________________________________________________________
121 | !profil parabol
122 | !! y=Ax(x-1)+B
123 | print *,'profil pointe h2o N'
124 | PRINT *,'h2o min? '
125 | READ *,tmin
126 | print *,'ou x1:'
127 | read *,x1
128 | PRINT *,'h2o max? '
129 | READ *,tmax
130 | print *,'ou x2:'
131 | read *,x2
132 | !profils en pointe
133 | a=(tmax-tmin)/(x2-x1)
134 | b=tmin
135 | temp(0)=tmin
136 | temp(n+1)=tmin
137 | do i=1,n/2
138 | temp(i) = a*x(i)+b
139 | enddo
140 | b=tmin+(a*x2*2)
141 | do i=n/2+1,n
142 | temp(i) = -a*x(i)+b
143 | enddo
144 |
145 | OPEN(10,file='fmh2o.in',status='unknown')
146 | DO i=1,n
147 | write(10,*) temp(i)
148 | ENDDO
149 | CLOSE(10)
150 |
151 | !______________________________________________________________________
152 |
153 | !profil constant
154 | PRINT *,'cte fmco? '
155 | read (*,*) cte
156 |
157 | OPEN(10,file='fmco.in',status='unknown')
158 | DO i=1,n
159 | write(10,*) cte
160 | ENDDO
161 | CLOSE(10)
162 | !________________________________________________________________________
163 | !profil constant
164 | !PRINT *,'cte fmco? '
165 | !read (*,*) cte
166 | OPEN(10,file='n_tirage.in',status='unknown')
167 | DO i=0,n+1
168 | write(10,*) 10000
169 | ENDDO
170 | CLOSE(10)
171 |
172 | END
z.f could be called by: