Télécharger kon171.eso

Retour à la liste

Numérotation des lignes :

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

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