Télécharger kon171.eso

Retour à la liste

Numérotation des lignes :

  1. C KON171 SOURCE PV 16/11/17 21:59:51 9180
  2. SUBROUTINE KON171(ICEN,IDIAMI,IRN,IUN,IPN,IGAMN,ILINC,IUPRI1,
  3. $ IUPRI2,IMAT)
  4. C
  5. C************************************************************************
  6. C
  7. C PROJET : CASTEM 2000
  8. C
  9. C NOM : KON171
  10. C
  11. C DESCRIPTION : Voir KON17
  12. C Calcul de la matrice de preconditionnement
  13. C \Gamma pour les variables conservatives
  14. C
  15. C Cas deux dimensions, gaz "calorically perfect"
  16. C
  17. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI)
  18. C
  19. C AUTEUR : A. BECCANTINI, DM2S/SFME/LTMF
  20. C S. V. KUDRIAKOV, DM2S/SFME/LTMF
  21. C
  22. C************************************************************************
  23. C
  24. C
  25. C APPELES (Outils
  26. C CASTEM) :
  27. C
  28. C APPELES (Calcul) :
  29. C
  30. C************************************************************************
  31. C
  32. C ENTREES
  33. C
  34. C ILINC : liste des inconnues (pointeur d'un objet de type LISTMOTS)
  35. C
  36. C 1) Pointeurs de MELEME de la table DOMAINE
  37. C
  38. C ICEN : MELEME 'CENTRE' du SPG des CENTRES
  39. C
  40. C IDIAMI : CHPOINT CENTRE contenant le diametre de la cellule ;
  41. C
  42. C 2) Pointeurs des CHPOINT
  43. C
  44. C IRN : CHPOINT CENTRE contenant la masse volumique ;
  45. C
  46. C IUN : CHPOINT CENTRE contenant la vitesse ;
  47. C
  48. C IPN : CHPOINT CENTRE contenant la pression ;
  49. C
  50. C IGAMN : CHPOINT CENTRE contenant le gamma ;
  51. C
  52. C IUPRI1 : CHPOINT CENTRE contenant la vitesse de "cut-off" ;
  53. C
  54. C IUPRI2 : CHPOINT CENTRE contenant la vitesse de "cut-off" ;
  55. C
  56. C SORTIES
  57. C
  58. C IMAT : pointeur de la MATRIK du \Gamma
  59. C
  60. C************************************************************************
  61. C
  62. C HISTORIQUE (Anomalies et modifications éventuelles)
  63. C
  64. C HISTORIQUE :
  65. C
  66. C************************************************************************
  67. C
  68. C
  69. C N.B.: On suppose qu'on a déjà controllé RO, P > 0
  70. C GAMMA \in (1,3)
  71. C Si non il faut le faire!!!
  72. C
  73. C************************************************************************
  74. C
  75. C
  76. C**** Variables de COOPTIO
  77. C
  78. C INTEGER IPLLB, IERPER, IERMAX, IERR, INTERR
  79. C & ,IOTER, IOLEC, IOIMP, IOCAR, IOACQ
  80. C & ,IOPER, IOSGB, IOGRA, IOSAU, IORES
  81. C & ,IECHO, IIMPI, IOSPI
  82. C & ,IDIM
  83. C & ,MCOORD
  84. C & ,IFOMOD, NIFOUR, IFOUR, NSDPGE, IONIVE
  85. C & ,NGMAXY, IZROSF, ISOTYP, IOSCR,LTEXLU
  86. C & ,NORINC,NORVAL,NORIND,NORVAD
  87. C & ,NUCROU, IPSAUV, IFICLE, IPREFI
  88. C
  89. IMPLICIT INTEGER(I-N)
  90. INTEGER IGEOMC, IDIAMI
  91. & ,ILINC ,IRN ,IUN ,IPN ,IGAMN, IMAT
  92. & ,NBELEM, ICEN, IUPRI1, IUPRI2
  93. & ,MP,NBEL,NBME,NBSOUS,NKID,NKMT,NMATRI,NP,NRIGE
  94. C
  95. REAL*8 WVECT(4), GAM, GMT(4,4), VPRI, VPRI2, DIAM
  96. CHARACTER*8 TYPE
  97. C
  98. C**** LES INCLUDES
  99. C
  100. -INC CCOPTIO
  101. -INC SMCHPOI
  102. -INC SMELEME
  103. -INC SMLMOTS
  104. -INC SMLENTI
  105. POINTEUR MPRN.MPOVAL, MPUN.MPOVAL, MPPN.MPOVAL, MPGAMN.MPOVAL,
  106. & MPUPR1.MPOVAL,MPUPR2.MPOVAL,MDIAMI.MPOVAL
  107. POINTEUR MELEMC.MELEME
  108. POINTEUR RR.IZAFM, RUX.IZAFM, RUY.IZAFM, RRET.IZAFM,
  109. & UXR.IZAFM, UXUX.IZAFM, UXUY.IZAFM, UXRET.IZAFM,
  110. & UYR.IZAFM, UYUX.IZAFM, UYUY.IZAFM, UYRET.IZAFM,
  111. & RETR.IZAFM, RETUX.IZAFM, RETUY.IZAFM, RETRET.IZAFM
  112. POINTEUR MLMINC.MLMOTS
  113. C
  114. MELEMC=ICEN
  115. SEGACT MELEMC
  116. NBELEM =MELEMC.NUM(/2)
  117. SEGDES MELEMC
  118. C
  119. CALL LICHT(IRN,MPRN,TYPE,IGEOMC)
  120. CALL LICHT(IPN,MPPN,TYPE,IGEOMC)
  121. CALL LICHT(IUN,MPUN,TYPE,IGEOMC)
  122. CALL LICHT(IGAMN,MPGAMN,TYPE,IGEOMC)
  123. CALL LICHT(IUPRI1,MPUPR1,TYPE,IGEOMC)
  124. CALL LICHT(IUPRI2,MPUPR2,TYPE,IGEOMC)
  125. CALL LICHT(IDIAMI,MDIAMI,TYPE,IGEOMC)
  126. C
  127. C SEGACT MPRN*MOD
  128. C SEGACT MPPN*MOD
  129. C SEGACT MPUN*MOD
  130. C SEGACT MPGAMN*MOD
  131. C
  132. C
  133. C**** Maillage des inconnues primales = Maillage des inconnues primales
  134. C = MELEMC
  135. C
  136. C
  137. NRIGE = 7
  138. NMATRI = 1
  139. NKID = 9
  140. NKMT = 7
  141. C
  142. SEGINI MATRIK
  143. IMAT = MATRIK
  144. MATRIK.IRIGEL(1,1) = MELEMC
  145. MATRIK.IRIGEL(2,1) = MELEMC
  146. C
  147. C**** Matrice non symetrique
  148. C
  149. MATRIK.IRIGEL(7,1) = 2
  150. C
  151. NBME = 16
  152. NBSOUS = 1
  153. SEGINI IMATRI
  154. MLMINC = ILINC
  155. SEGACT MLMINC
  156. MATRIK.IRIGEL(4,1) = IMATRI
  157. C
  158. IMATRI.LISPRI(1) = MLMINC.MOTS(1)
  159. IMATRI.LISPRI(2) = MLMINC.MOTS(2)
  160. IMATRI.LISPRI(3) = MLMINC.MOTS(3)
  161. IMATRI.LISPRI(4) = MLMINC.MOTS(4)
  162. IMATRI.LISPRI(5) = MLMINC.MOTS(1)
  163. IMATRI.LISPRI(6) = MLMINC.MOTS(2)
  164. IMATRI.LISPRI(7) = MLMINC.MOTS(3)
  165. IMATRI.LISPRI(8) = MLMINC.MOTS(4)
  166. IMATRI.LISPRI(9) = MLMINC.MOTS(1)
  167. IMATRI.LISPRI(10) = MLMINC.MOTS(2)
  168. IMATRI.LISPRI(11) = MLMINC.MOTS(3)
  169. IMATRI.LISPRI(12) = MLMINC.MOTS(4)
  170. IMATRI.LISPRI(13) = MLMINC.MOTS(1)
  171. IMATRI.LISPRI(14) = MLMINC.MOTS(2)
  172. IMATRI.LISPRI(15) = MLMINC.MOTS(3)
  173. IMATRI.LISPRI(16) = MLMINC.MOTS(4)
  174. C
  175. IMATRI.LISDUA(1) = MLMINC.MOTS(1)
  176. IMATRI.LISDUA(2) = MLMINC.MOTS(1)
  177. IMATRI.LISDUA(3) = MLMINC.MOTS(1)
  178. IMATRI.LISDUA(4) = MLMINC.MOTS(1)
  179. IMATRI.LISDUA(5) = MLMINC.MOTS(2)
  180. IMATRI.LISDUA(6) = MLMINC.MOTS(2)
  181. IMATRI.LISDUA(7) = MLMINC.MOTS(2)
  182. IMATRI.LISDUA(8) = MLMINC.MOTS(2)
  183. IMATRI.LISDUA(9) = MLMINC.MOTS(3)
  184. IMATRI.LISDUA(10) = MLMINC.MOTS(3)
  185. IMATRI.LISDUA(11) = MLMINC.MOTS(3)
  186. IMATRI.LISDUA(12) = MLMINC.MOTS(3)
  187. IMATRI.LISDUA(13) = MLMINC.MOTS(4)
  188. IMATRI.LISDUA(14) = MLMINC.MOTS(4)
  189. IMATRI.LISDUA(15) = MLMINC.MOTS(4)
  190. IMATRI.LISDUA(16) = MLMINC.MOTS(4)
  191. C
  192. NBEL = NBELEM
  193. NBSOUS = 1
  194. NP = 1
  195. MP = 1
  196. SEGINI RR , RUX , RUY , RRET ,
  197. & UXR , UXUX , UXUY , UXRET ,
  198. & UYR , UYUX , UYUY , UYRET ,
  199. & RETR , RETUX , RETUY , RETRET
  200. C
  201. C**** Duale = IMATRI.LISDUA(1) = 'RN'
  202. C Primale = IMATRI.LISPRI(1) = 'RN'
  203. C -> IMATRI.LIZAFM(1,1) = RR
  204. C
  205. C Duale = IMATRI.LISDUA(2) = 'RN'
  206. C Primale = IMATRI.LISPRI(1) = 'UXN'
  207. C -> IMATRI.LIZAFM(1,2) = RUX
  208. C ...
  209. C
  210. IMATRI.LIZAFM(1,1) = RR
  211. IMATRI.LIZAFM(1,2) = RUX
  212. IMATRI.LIZAFM(1,3) = RUY
  213. IMATRI.LIZAFM(1,4) = RRET
  214. IMATRI.LIZAFM(1,5) = UXR
  215. IMATRI.LIZAFM(1,6) = UXUX
  216. IMATRI.LIZAFM(1,7) = UXUY
  217. IMATRI.LIZAFM(1,8) = UXRET
  218. IMATRI.LIZAFM(1,9) = UYR
  219. IMATRI.LIZAFM(1,10) = UYUX
  220. IMATRI.LIZAFM(1,11) = UYUY
  221. IMATRI.LIZAFM(1,12) = UYRET
  222. IMATRI.LIZAFM(1,13) = RETR
  223. IMATRI.LIZAFM(1,14) = RETUX
  224. IMATRI.LIZAFM(1,15) = RETUY
  225. IMATRI.LIZAFM(1,16) = RETRET
  226. C
  227. DO ICEN = 1, NBELEM, 1
  228. C
  229. WVECT(1)= MPRN.VPOCHA(ICEN,1)
  230. WVECT(4)=MPPN.VPOCHA(ICEN,1)
  231. WVECT(2)=MPUN.VPOCHA(ICEN,1)
  232. WVECT(3)=MPUN.VPOCHA(ICEN,2)
  233. GAM = MPGAMN.VPOCHA(ICEN,1)
  234. DIAM = MDIAMI.VPOCHA(ICEN,1)
  235. C
  236. C******* Le calcul
  237. C
  238. VPRI= MPUPR1.VPOCHA(ICEN,1)
  239. VPRI2= MPUPR2.VPOCHA(ICEN,1)
  240. VPRI=MAX(VPRI,VPRI2)
  241. CALL GMAT2D(GMT,WVECT,GAM,VPRI,DIAM)
  242. C
  243. C********AB.AM(IFAC,IPRIM,IDUAL)
  244. C A = nom de l'inconnu duale (Ro,rUX,rUY,RET)
  245. C B = nom de l'inconnu primale (Ro,rUX,rUY,RET)
  246. C IPRIM = 1
  247. C IDUAL = 1
  248. C i.e.
  249. C A_IDUAL = AB.AM(IFAC,IPRIM,IDUAL) * B_IPRIM + ...
  250. C
  251. C
  252. C N.B. GMT parcoru à l'inverse par rapport au stokage
  253. C en Fortran
  254. C
  255. C******* Dual RN
  256. C
  257. RR.AM(ICEN,1,1) = GMT(1,1)
  258. RUX.AM(ICEN,1,1) = GMT(1,2)
  259. RUY.AM(ICEN,1,1) = GMT(1,3)
  260. RRET.AM(ICEN,1,1) = GMT(1,4)
  261. C
  262. C******* Dual RUXN
  263. C
  264. UXR.AM(ICEN,1,1) = GMT(2,1)
  265. UXUX.AM(ICEN,1,1) = GMT(2,2)
  266. UXUY.AM(ICEN,1,1) = GMT(2,3)
  267. UXRET.AM(ICEN,1,1) = GMT(2,4)
  268. C
  269. C******* Dual RUYN
  270. C
  271. UYR.AM(ICEN,1,1) = GMT(3,1)
  272. UYUX.AM(ICEN,1,1) = GMT(3,2)
  273. UYUY.AM(ICEN,1,1) = GMT(3,3)
  274. UYRET.AM(ICEN,1,1) = GMT(3,4)
  275. C
  276. C********Dual RETN
  277. C
  278. RETR.AM(ICEN,1,1) = GMT(4,1)
  279. RETUX.AM(ICEN,1,1) = GMT(4,2)
  280. RETUY.AM(ICEN,1,1) = GMT(4,3)
  281. RETRET.AM(ICEN,1,1) = GMT(4,4)
  282. C
  283. ENDDO
  284. C
  285. SEGDES MELEMC
  286. C
  287. SEGDES MPRN
  288. SEGDES MPPN
  289. SEGDES MPUN
  290. SEGDES MPGAMN
  291. SEGDES MPUPR1
  292. SEGDES MPUPR2
  293. SEGDES MDIAMI
  294. C
  295. SEGDES MATRIK
  296. SEGDES IMATRI
  297. C
  298. SEGDES RR , RUX , RUY , RRET ,
  299. & UXR , UXUX , UXUY , UXRET ,
  300. & UYR , UYUX , UYUY , UYRET ,
  301. & RETR , RETUX , RETUY , RETRET
  302. C
  303. SEGDES MLMINC
  304. C<'l)>
  305. 9999 CONTINUE
  306. RETURN
  307. END
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales