mprofils_pointe_mieux.f [SRC] [CPP] [JOB] [SCAN]
src



   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-1),(dr/i) ,r(i)
  36 |       enddo
  37 |       do i=1,bout
  38 |          r(i)= r(i)*((rmax-eps)/2)/delta
  39 |          !print *, i, r(i) 
  40 |       enddo
  41 |       !read *
  42 |       ! maille du centre
  43 |       r(bout+1)=r(bout)+eps
  44 |       rcentre = r(bout+1)
  45 |       print *, 'centre: ', bout+1, r(bout+1)
  46 |       !le reste à droite
  47 |       r(bout+1)= 0.d+0
  48 |       dr = 1.d+0
  49 |       delta = 0.d+0 
  50 |       do i=bout+2,n
  51 |          compteur=(n+1)-i
  52 |          r(i)= r(i-1) + (dr/compteur) 
  53 |          delta = delta + (dr/compteur)
  54 |          !!!!!!!!!print *, i, r(i),(dr/compteur), r(i-1)
  55 |       enddo
  56 |       do i=bout+2,n
  57 |          r(i)= r(i)*((rmax-eps)/2)/delta + rcentre
  58 |          !print *, i, r(i)
  59 |       enddo
  60 |       !read *
  61 |       r(bout+1) = rcentre
  62 |       open(50,file='rayons.in', status='unknown')
  63 |       do i=0,n+1
  64 |          write(50,*) r(i)
  65 |       enddo
  66 |       close(50)
  67 |       print *, 'n/2:  ',n/2
  68 |       print *, 'FIN RAYON'
  69 | !_________________________________________________________
  70 |       !recherche des n+1 valeurs ou j'ai les donnees
  71 |       ! pour les paroirs c'est inchange r(0), r(n+1)
  72 |       x(0)=r(0)
  73 |       x(n+1)=r(n+1)
  74 |       ! pour les rayons: bord ext des mailles prendre centre de maille
  75 |       do i=1,n
  76 |          x(i)= (r(i)+r(i-1))/2.d+0
  77 |       enddo
  78 | !__________________________________________________________      
  79 |       print *,'profil pointe temp N+2'
  80 |       PRINT *,'T min? '
  81 |       READ *,tmin
  82 |       print *,'ou x1:'
  83 |       read *,x1
  84 |       PRINT *,'T max? '
  85 |       READ *,tmax
  86 |       print *,'ou x2:'
  87 |       read *,x2
  88 |       !profils en pointe
  89 |       a=(tmax-tmin)/(x2-x1)
  90 |       b=tmin
  91 |       temp(0)=tmin
  92 |       temp(n+1)=tmin
  93 |       do i=1,n/2
  94 |          temp(i) = a*x(i)+b
  95 |       enddo
  96 |       b=tmin+(a*x2*2)
  97 |       do i=n/2+1,n
  98 |          temp(i) = -a*x(i)+b
  99 |       enddo
 100 | 
 101 |       OPEN(10,file='temperat.in',status='unknown')
 102 |       DO i=0,n+1
 103 |          write(10,*) temp(i)
 104 |       ENDDO
 105 |       CLOSE(10)
 106 | !_____________________________________________________________________
 107 |       !profil parabol
 108 |       !! y=Ax(x-1)+B
 109 |       print *,'profil pointe h2o N'
 110 |       PRINT *,'h2o min? '
 111 |       READ *,tmin
 112 |       print *,'ou x1:'
 113 |       read *,x1
 114 |       PRINT *,'h2o max? '
 115 |       READ *,tmax
 116 |       print *,'ou x2:'
 117 |       read *,x2
 118 |       !profils en pointe
 119 |       a=(tmax-tmin)/(x2-x1)
 120 |       b=tmin
 121 |       temp(0)=tmin
 122 |       temp(n+1)=tmin
 123 |       do i=1,n/2
 124 |          temp(i) = a*x(i)+b
 125 |       enddo
 126 |       b=tmin+(a*x2*2)
 127 |       do i=n/2+1,n
 128 |          temp(i) = -a*x(i)+b
 129 |       enddo
 130 | 
 131 |       OPEN(10,file='fmh2o.in',status='unknown')
 132 |       DO i=1,n
 133 |          write(10,*) temp(i)
 134 |       ENDDO
 135 |       CLOSE(10)
 136 | 
 137 | !______________________________________________________________________
 138 | 
 139 |       !profil constant
 140 |       PRINT *,'cte fmco? '
 141 |       read (*,*) cte
 142 | 
 143 |       OPEN(10,file='fmco.in',status='unknown')
 144 |       DO i=1,n
 145 |          write(10,*) cte
 146 |       ENDDO
 147 |       CLOSE(10)
 148 | !________________________________________________________________________
 149 |       !profil constant
 150 |       !PRINT *,'cte fmco? '
 151 |       !read (*,*) cte
 152 |       OPEN(10,file='n_tirage.in',status='unknown')
 153 |       DO i=0,n+1
 154 |          write(10,*) 10000
 155 |       ENDDO
 156 |       CLOSE(10)
 157 | 
 158 |       END