Télécharger kon171.eso

Retour à la liste

Numérotation des lignes :

kon171
  1. C KON171 SOURCE OF166741 24/12/13 21:16:15 12097
  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. IMPLICIT INTEGER(I-N)
  76. INTEGER IGEOMC, IDIAMI
  77. & ,ILINC ,IRN ,IUN ,IPN ,IGAMN, IMAT
  78. & ,NBELEM, ICEN, IUPRI1, IUPRI2
  79. & ,MP,NBEL,NBME,NBSOUS,NKID,NKMT,NMATRI,NP,NRIGE
  80. C
  81. REAL*8 WVECT(4), GAM, GMT(4,4), VPRI, VPRI2, DIAM
  82. CHARACTER*8 TYPE
  83. C
  84. C**** LES INCLUDES
  85. C
  86.  
  87. -INC PPARAM
  88. -INC CCOPTIO
  89. -INC SMCHPOI
  90. -INC SMELEME
  91. -INC SMLMOTS
  92. -INC SMLENTI
  93. POINTEUR MPRN.MPOVAL, MPUN.MPOVAL, MPPN.MPOVAL, MPGAMN.MPOVAL,
  94. & MPUPR1.MPOVAL,MPUPR2.MPOVAL,MDIAMI.MPOVAL
  95. POINTEUR MELEMC.MELEME
  96. POINTEUR RR.IZAFM, RUX.IZAFM, RUY.IZAFM, RRET.IZAFM,
  97. & UXR.IZAFM, UXUX.IZAFM, UXUY.IZAFM, UXRET.IZAFM,
  98. & UYR.IZAFM, UYUX.IZAFM, UYUY.IZAFM, UYRET.IZAFM,
  99. & RETR.IZAFM, RETUX.IZAFM, RETUY.IZAFM, RETRET.IZAFM
  100. POINTEUR MLMINC.MLMOTS
  101. C
  102. MELEMC=ICEN
  103. SEGACT MELEMC
  104. NBELEM =MELEMC.NUM(/2)
  105. SEGDES MELEMC
  106. C
  107. CALL LICHT(IRN,MPRN,TYPE,IGEOMC)
  108. CALL LICHT(IPN,MPPN,TYPE,IGEOMC)
  109. CALL LICHT(IUN,MPUN,TYPE,IGEOMC)
  110. CALL LICHT(IGAMN,MPGAMN,TYPE,IGEOMC)
  111. CALL LICHT(IUPRI1,MPUPR1,TYPE,IGEOMC)
  112. CALL LICHT(IUPRI2,MPUPR2,TYPE,IGEOMC)
  113. CALL LICHT(IDIAMI,MDIAMI,TYPE,IGEOMC)
  114. C
  115. C SEGACT MPRN*MOD
  116. C SEGACT MPPN*MOD
  117. C SEGACT MPUN*MOD
  118. C SEGACT MPGAMN*MOD
  119. C
  120. C
  121. C**** Maillage des inconnues primales = Maillage des inconnues primales
  122. C = MELEMC
  123. C
  124. C
  125. NRIGE = 7
  126. NMATRI = 1
  127. NKID = 9
  128. NKMT = 7
  129. C
  130. SEGINI MATRIK
  131. IMAT = MATRIK
  132. MATRIK.IRIGEL(1,1) = MELEMC
  133. MATRIK.IRIGEL(2,1) = MELEMC
  134. C
  135. C**** Matrice non symetrique
  136. C
  137. MATRIK.IRIGEL(7,1) = 2
  138. C
  139. NBME = 16
  140. NBSOUS = 1
  141. SEGINI IMATRI
  142. MLMINC = ILINC
  143. SEGACT MLMINC
  144. MATRIK.IRIGEL(4,1) = IMATRI
  145. C
  146. IMATRI.LISPRI(1) = MLMINC.MOTS(1)
  147. IMATRI.LISPRI(2) = MLMINC.MOTS(2)
  148. IMATRI.LISPRI(3) = MLMINC.MOTS(3)
  149. IMATRI.LISPRI(4) = MLMINC.MOTS(4)
  150. IMATRI.LISPRI(5) = MLMINC.MOTS(1)
  151. IMATRI.LISPRI(6) = MLMINC.MOTS(2)
  152. IMATRI.LISPRI(7) = MLMINC.MOTS(3)
  153. IMATRI.LISPRI(8) = MLMINC.MOTS(4)
  154. IMATRI.LISPRI(9) = MLMINC.MOTS(1)
  155. IMATRI.LISPRI(10) = MLMINC.MOTS(2)
  156. IMATRI.LISPRI(11) = MLMINC.MOTS(3)
  157. IMATRI.LISPRI(12) = MLMINC.MOTS(4)
  158. IMATRI.LISPRI(13) = MLMINC.MOTS(1)
  159. IMATRI.LISPRI(14) = MLMINC.MOTS(2)
  160. IMATRI.LISPRI(15) = MLMINC.MOTS(3)
  161. IMATRI.LISPRI(16) = MLMINC.MOTS(4)
  162. C
  163. IMATRI.LISDUA(1) = MLMINC.MOTS(1)
  164. IMATRI.LISDUA(2) = MLMINC.MOTS(1)
  165. IMATRI.LISDUA(3) = MLMINC.MOTS(1)
  166. IMATRI.LISDUA(4) = MLMINC.MOTS(1)
  167. IMATRI.LISDUA(5) = MLMINC.MOTS(2)
  168. IMATRI.LISDUA(6) = MLMINC.MOTS(2)
  169. IMATRI.LISDUA(7) = MLMINC.MOTS(2)
  170. IMATRI.LISDUA(8) = MLMINC.MOTS(2)
  171. IMATRI.LISDUA(9) = MLMINC.MOTS(3)
  172. IMATRI.LISDUA(10) = MLMINC.MOTS(3)
  173. IMATRI.LISDUA(11) = MLMINC.MOTS(3)
  174. IMATRI.LISDUA(12) = MLMINC.MOTS(3)
  175. IMATRI.LISDUA(13) = MLMINC.MOTS(4)
  176. IMATRI.LISDUA(14) = MLMINC.MOTS(4)
  177. IMATRI.LISDUA(15) = MLMINC.MOTS(4)
  178. IMATRI.LISDUA(16) = MLMINC.MOTS(4)
  179. C
  180. NBEL = NBELEM
  181. NBSOUS = 1
  182. NP = 1
  183. MP = 1
  184. SEGINI RR , RUX , RUY , RRET ,
  185. & UXR , UXUX , UXUY , UXRET ,
  186. & UYR , UYUX , UYUY , UYRET ,
  187. & RETR , RETUX , RETUY , RETRET
  188. C
  189. C**** Duale = IMATRI.LISDUA(1) = 'RN'
  190. C Primale = IMATRI.LISPRI(1) = 'RN'
  191. C -> IMATRI.LIZAFM(1,1) = RR
  192. C
  193. C Duale = IMATRI.LISDUA(2) = 'RN'
  194. C Primale = IMATRI.LISPRI(1) = 'UXN'
  195. C -> IMATRI.LIZAFM(1,2) = RUX
  196. C ...
  197. C
  198. IMATRI.LIZAFM(1,1) = RR
  199. IMATRI.LIZAFM(1,2) = RUX
  200. IMATRI.LIZAFM(1,3) = RUY
  201. IMATRI.LIZAFM(1,4) = RRET
  202. IMATRI.LIZAFM(1,5) = UXR
  203. IMATRI.LIZAFM(1,6) = UXUX
  204. IMATRI.LIZAFM(1,7) = UXUY
  205. IMATRI.LIZAFM(1,8) = UXRET
  206. IMATRI.LIZAFM(1,9) = UYR
  207. IMATRI.LIZAFM(1,10) = UYUX
  208. IMATRI.LIZAFM(1,11) = UYUY
  209. IMATRI.LIZAFM(1,12) = UYRET
  210. IMATRI.LIZAFM(1,13) = RETR
  211. IMATRI.LIZAFM(1,14) = RETUX
  212. IMATRI.LIZAFM(1,15) = RETUY
  213. IMATRI.LIZAFM(1,16) = RETRET
  214. C
  215. DO ICEN = 1, NBELEM, 1
  216. C
  217. WVECT(1)= MPRN.VPOCHA(ICEN,1)
  218. WVECT(4)=MPPN.VPOCHA(ICEN,1)
  219. WVECT(2)=MPUN.VPOCHA(ICEN,1)
  220. WVECT(3)=MPUN.VPOCHA(ICEN,2)
  221. GAM = MPGAMN.VPOCHA(ICEN,1)
  222. DIAM = MDIAMI.VPOCHA(ICEN,1)
  223. C
  224. C******* Le calcul
  225. C
  226. VPRI= MPUPR1.VPOCHA(ICEN,1)
  227. VPRI2= MPUPR2.VPOCHA(ICEN,1)
  228. VPRI=MAX(VPRI,VPRI2)
  229. CALL GMAT2D(GMT,WVECT,GAM,VPRI,DIAM)
  230. C
  231. C********AB.AM(IFAC,IPRIM,IDUAL)
  232. C A = nom de l'inconnu duale (Ro,rUX,rUY,RET)
  233. C B = nom de l'inconnu primale (Ro,rUX,rUY,RET)
  234. C IPRIM = 1
  235. C IDUAL = 1
  236. C i.e.
  237. C A_IDUAL = AB.AM(IFAC,IPRIM,IDUAL) * B_IPRIM + ...
  238. C
  239. C
  240. C N.B. GMT parcoru à l'inverse par rapport au stokage
  241. C en Fortran
  242. C
  243. C******* Dual RN
  244. C
  245. RR.AM(ICEN,1,1) = GMT(1,1)
  246. RUX.AM(ICEN,1,1) = GMT(1,2)
  247. RUY.AM(ICEN,1,1) = GMT(1,3)
  248. RRET.AM(ICEN,1,1) = GMT(1,4)
  249. C
  250. C******* Dual RUXN
  251. C
  252. UXR.AM(ICEN,1,1) = GMT(2,1)
  253. UXUX.AM(ICEN,1,1) = GMT(2,2)
  254. UXUY.AM(ICEN,1,1) = GMT(2,3)
  255. UXRET.AM(ICEN,1,1) = GMT(2,4)
  256. C
  257. C******* Dual RUYN
  258. C
  259. UYR.AM(ICEN,1,1) = GMT(3,1)
  260. UYUX.AM(ICEN,1,1) = GMT(3,2)
  261. UYUY.AM(ICEN,1,1) = GMT(3,3)
  262. UYRET.AM(ICEN,1,1) = GMT(3,4)
  263. C
  264. C********Dual RETN
  265. C
  266. RETR.AM(ICEN,1,1) = GMT(4,1)
  267. RETUX.AM(ICEN,1,1) = GMT(4,2)
  268. RETUY.AM(ICEN,1,1) = GMT(4,3)
  269. RETRET.AM(ICEN,1,1) = GMT(4,4)
  270. C
  271. ENDDO
  272. C
  273. SEGDES MELEMC
  274. C
  275. SEGDES MPRN
  276. SEGDES MPPN
  277. SEGDES MPUN
  278. SEGDES MPGAMN
  279. SEGDES MPUPR1
  280. SEGDES MPUPR2
  281. SEGDES MDIAMI
  282. C
  283. SEGDES MATRIK
  284. SEGDES IMATRI
  285. C
  286. SEGDES RR , RUX , RUY , RRET ,
  287. & UXR , UXUX , UXUY , UXRET ,
  288. & UYR , UYUX , UYUY , UYRET ,
  289. & RETR , RETUX , RETUY , RETRET
  290. C
  291. SEGDES MLMINC
  292. C
  293. 9999 CONTINUE
  294. RETURN
  295. END
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  

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