Télécharger kon181.eso

Retour à la liste

Numérotation des lignes :

  1. C KON181 SOURCE PV 16/11/17 21:59:52 9180
  2. SUBROUTINE KON181(MELEMC,IDIAM,MLMCON,MLMPRI,IRN,IVN,IPN,IGAMN,
  3. & IUPRI,IUPRI2,IJACO)
  4. C
  5. C************************************************************************
  6. C
  7. C PROJET : CASTEM 2000
  8. C
  9. C NOM : KON181
  10. C
  11. C DESCRIPTION : Voir KON18
  12. C Cas deux dimensions, gaz "calorically perfect"
  13. C
  14. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI)
  15. C
  16. C AUTEUR : Chezarovich , DM2S/SFME/LTMF
  17. C S. Kudriakov, DM2S/SFME/LTMF
  18. C************************************************************************
  19. C
  20. C ENTREES
  21. C
  22. C MELEMC : SPG des CHPOINTs
  23. C
  24. C IDIAM : diametre de l'elt
  25. C
  26. C MLMPRI : liste des inconnues primitives (P,v,T)
  27. C
  28. C MLMCON : liste des inconnues conservatives (rho, rhov, rhoet)
  29. C
  30. C IRN : CHPOINT CENTRE contenant la densité
  31. C
  32. C IVN : CHPOINT CENTRE contenant la vitesse
  33. C
  34. C IVN : CHPOINT CENTRE contenant la pression
  35. C
  36. C IGAM : CHPOINT CENTRE contenant le gamma
  37. C
  38. C IUPRI : CHPOINT CENTRE contenant la vitesse "cut-off"
  39. C
  40. C IUPRI2 : CHPOINT CENTRE contenant la vitesse "cut-off"
  41. C
  42. C SORTIES
  43. C
  44. C IJACO : pointeur de la MATRIK jacobienne
  45. C
  46. C************************************************************************
  47. C
  48. C HISTORIQUE (Anomalies et modifications éventuelles)
  49. C
  50. C HISTORIQUE : crée le 29.05.02
  51. C
  52. C************************************************************************
  53. C
  54. C
  55. C N.B.: On suppose qu'on a déjà controllé RO, P > 0
  56. C GAMMA \in (1,3)
  57. C Si non il faut le faire!!!
  58. C
  59. C************************************************************************
  60. C
  61. C
  62. C**** Variables de COOPTIO
  63. C
  64. C INTEGER IPLLB, IERPER, IERMAX, IERR, INTERR
  65. C & ,IOTER, IOLEC, IOIMP, IOCAR, IOACQ
  66. C & ,IOPER, IOSGB, IOGRA, IOSAU, IORES
  67. C & ,IECHO, IIMPI, IOSPI
  68. C & ,IDIM
  69. C & ,MCOORD
  70. C & ,IFOMOD, NIFOUR, IFOUR, NSDPGE, IONIVE
  71. C & ,NGMAXY, IZROSF, ISOTYP, IOSCR,LTEXLU
  72. C & ,NORINC,NORVAL,NORIND,NORVAD
  73. C & ,NUCROU, IPSAUV, IFICLE, IPREFI
  74. C
  75. IMPLICIT INTEGER(I-N)
  76. INTEGER IRN, IVN, IPN, IGAMN, IJACO, IGEOM, ICEN
  77. & , MP, NP, NBEL, NBME, NBSOUS, IUPRI, IUPRI2
  78. & , NRIGE, NMATRI, NKID, NKMT, IDIAM
  79. C
  80. REAL*8 RHO,UX, UY, GAMMA, PN, ARS, UR, THETA, H, MM, EPSIL, QQ
  81. & ,AR, UPRI, UPRI2, DIAM, LAMBDA, MREF, MREF2, MACH, MACH2
  82. & ,DTAUM1
  83. PARAMETER(EPSIL=1.0D0)
  84. CHARACTER*8 TYPE
  85. C
  86. C**** LES INCLUDES
  87. C
  88. -INC CCOPTIO
  89. -INC SMCHPOI
  90. -INC SMELEME
  91. -INC SMLMOTS
  92. -INC SMLENTI
  93. POINTEUR MPVN.MPOVAL, MPRN.MPOVAL, MPPN.MPOVAL,
  94. & MPGAM.MPOVAL, MPUPRI.MPOVAL, MPUPR2.MPOVAL, MDIAMI.MPOVAL
  95. POINTEUR MELEMC.MELEME
  96. POINTEUR RR.IZAFM, RUX.IZAFM, RUY.IZAFM, RP.IZAFM,
  97. & RUXR.IZAFM, RUXUX.IZAFM, RUXUY.IZAFM, RUXP.IZAFM,
  98. & RUYR.IZAFM, RUYUX.IZAFM, RUYUY.IZAFM, RUYP.IZAFM,
  99. & RETR.IZAFM, RETUX.IZAFM, RETUY.IZAFM, RETP.IZAFM
  100. POINTEUR MLMPRI.MLMOTS, MLMCON.MLMOTS
  101. C
  102. CALL LICHT(IVN,MPVN,TYPE,IGEOM)
  103. CALL LICHT(IRN,MPRN,TYPE,IGEOM)
  104. CALL LICHT(IPN,MPPN,TYPE,IGEOM)
  105. CALL LICHT(IGAMN,MPGAM,TYPE,IGEOM)
  106. CALL LICHT(IUPRI,MPUPRI,TYPE, IGEOM)
  107. CALL LICHT(IUPRI2,MPUPR2,TYPE, IGEOM)
  108. CALL LICHT(IDIAM,MDIAMI,TYPE,IGEOM)
  109. C
  110. C SEGACT MPVN*MOD
  111. C SEGACT MPPN*MOD
  112. C SEGACT MPRN*MOD
  113. C
  114. C**** Maillage des inconnues primales = Maillage des inconnues primales
  115. C = MELEMC
  116. C
  117. C
  118. NRIGE = 7
  119. NMATRI = 1
  120. NKID = 9
  121. NKMT = 7
  122. C
  123. SEGINI MATRIK
  124. IJACO = MATRIK
  125. MATRIK.IRIGEL(1,1) = MELEMC
  126. MATRIK.IRIGEL(2,1) = MELEMC
  127. C
  128. C**** Matrice non symetrique
  129. C
  130. MATRIK.IRIGEL(7,1) = 2
  131. C
  132. NBME = 16
  133. NBSOUS = 1
  134. SEGINI IMATRI
  135. MATRIK.IRIGEL(4,1) = IMATRI
  136. C
  137. SEGACT MLMPRI
  138. IMATRI.LISPRI(1) = MLMPRI.MOTS(1)
  139. IMATRI.LISPRI(2) = MLMPRI.MOTS(2)
  140. IMATRI.LISPRI(3) = MLMPRI.MOTS(3)
  141. IMATRI.LISPRI(4) = MLMPRI.MOTS(4)
  142. IMATRI.LISPRI(5) = MLMPRI.MOTS(1)
  143. IMATRI.LISPRI(6) = MLMPRI.MOTS(2)
  144. IMATRI.LISPRI(7) = MLMPRI.MOTS(3)
  145. IMATRI.LISPRI(8) = MLMPRI.MOTS(4)
  146. IMATRI.LISPRI(9) = MLMPRI.MOTS(1)
  147. IMATRI.LISPRI(10) = MLMPRI.MOTS(2)
  148. IMATRI.LISPRI(11) = MLMPRI.MOTS(3)
  149. IMATRI.LISPRI(12) = MLMPRI.MOTS(4)
  150. IMATRI.LISPRI(13) = MLMPRI.MOTS(1)
  151. IMATRI.LISPRI(14) = MLMPRI.MOTS(2)
  152. IMATRI.LISPRI(15) = MLMPRI.MOTS(3)
  153. IMATRI.LISPRI(16) = MLMPRI.MOTS(4)
  154. SEGDES MLMPRI
  155. C
  156. SEGACT MLMCON
  157. IMATRI.LISDUA(1) = MLMCON.MOTS(1)
  158. IMATRI.LISDUA(2) = MLMCON.MOTS(1)
  159. IMATRI.LISDUA(3) = MLMCON.MOTS(1)
  160. IMATRI.LISDUA(4) = MLMCON.MOTS(1)
  161. IMATRI.LISDUA(5) = MLMCON.MOTS(2)
  162. IMATRI.LISDUA(6) = MLMCON.MOTS(2)
  163. IMATRI.LISDUA(7) = MLMCON.MOTS(2)
  164. IMATRI.LISDUA(8) = MLMCON.MOTS(2)
  165. IMATRI.LISDUA(9) = MLMCON.MOTS(3)
  166. IMATRI.LISDUA(10) = MLMCON.MOTS(3)
  167. IMATRI.LISDUA(11) = MLMCON.MOTS(3)
  168. IMATRI.LISDUA(12) = MLMCON.MOTS(3)
  169. IMATRI.LISDUA(13) = MLMCON.MOTS(4)
  170. IMATRI.LISDUA(14) = MLMCON.MOTS(4)
  171. IMATRI.LISDUA(15) = MLMCON.MOTS(4)
  172. IMATRI.LISDUA(16) = MLMCON.MOTS(4)
  173. SEGDES MLMCON
  174. C
  175. SEGACT MELEMC
  176. NBEL = MELEMC.NUM(/2)
  177. SEGDES MELEMC
  178. NBSOUS = 1
  179. NP = 1
  180. MP = 1
  181. SEGINI RR , RUX , RUY , RP ,
  182. & RUXR , RUXUX , RUXUY , RUXP ,
  183. & RUYR , RUYUX , RUYUY , RUYP ,
  184. & RETR , RETUX , RETUY , RETP
  185. C
  186. C**** Duale = IMATRI.LISDUA(1) = 'RN'
  187. C Primale = IMATRI.LISPRI(4) = 'P'
  188. C -> IMATRI.LIZAFM(1,4) = RP
  189. C
  190. IMATRI.LIZAFM(1,1) = RR
  191. IMATRI.LIZAFM(1,2) = RUX
  192. IMATRI.LIZAFM(1,3) = RUY
  193. IMATRI.LIZAFM(1,4) = RP
  194. IMATRI.LIZAFM(1,5) = RUXR
  195. IMATRI.LIZAFM(1,6) = RUXUX
  196. IMATRI.LIZAFM(1,7) = RUXUY
  197. IMATRI.LIZAFM(1,8) = RUXP
  198. IMATRI.LIZAFM(1,9) = RUYR
  199. IMATRI.LIZAFM(1,10) = RUYUX
  200. IMATRI.LIZAFM(1,11) = RUYUY
  201. IMATRI.LIZAFM(1,12) = RUYP
  202. IMATRI.LIZAFM(1,13) = RETR
  203. IMATRI.LIZAFM(1,14) = RETUX
  204. IMATRI.LIZAFM(1,15) = RETUY
  205. IMATRI.LIZAFM(1,16) = RETP
  206. C
  207. DO ICEN = 1, NBEL, 1
  208. RHO=MPRN.VPOCHA(ICEN,1)
  209. UX=MPVN.VPOCHA(ICEN,1)
  210. UY=MPVN.VPOCHA(ICEN,2)
  211. PN=MPPN.VPOCHA(ICEN,1)
  212. GAMMA=MPGAM.VPOCHA(ICEN,1)
  213. ARS=GAMMA*PN/RHO
  214. AR=ARS**0.5D0
  215. QQ=((UX*UX)+(UY*UY))**0.5D0
  216. UPRI=MPUPRI.VPOCHA(ICEN,1)
  217. UPRI2=MPUPR2.VPOCHA(ICEN,1)
  218. UPRI=MAX(UPRI,UPRI2)
  219. DIAM = MDIAMI.VPOCHA(ICEN,1)
  220. IF(QQ .LT. (EPSIL*UPRI)) THEN
  221. UR = EPSIL*UPRI
  222. ELSE
  223. UR = QQ
  224. ENDIF
  225. IF(UR .GT. AR)THEN
  226. UR=AR
  227. ENDIF
  228. THETA=1.0D0/UR/UR+(GAMMA-1.0D0)/ARS
  229. H=0.5D0*((UX*UX)+(UY*UY))+ARS/(GAMMA-1.0D0)
  230. MM=THETA-GAMMA/ARS
  231. C----- We compute u+a------------
  232. MREF=UR/AR
  233. MREF2=MREF*MREF
  234. MACH=QQ/AR
  235. MACH2=MACH*MACH
  236. LAMBDA=(1.0D0-MREF2)**2
  237. LAMBDA=(LAMBDA*MACH2)+(4.0D0*MREF2)
  238. LAMBDA=SQRT(LAMBDA)*AR
  239. LAMBDA=((1.0D0+MREF2)*QQ)+LAMBDA
  240. LAMBDA=LAMBDA*0.5D0
  241. DTAUM1=LAMBDA/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,UX,UY,P)
  246. C
  247. C******* Dual RN
  248. C
  249. RR.AM(ICEN,1,1) = 1.0D0*DTAUM1
  250. RUX.AM(ICEN,1,1) = 0.0D0
  251. RUY.AM(ICEN,1,1) = 0.0D0
  252. RP.AM(ICEN,1,1) = MM*DTAUM1
  253. C
  254. C******* Dual RUXN
  255. C
  256. RUXR.AM(ICEN,1,1) = UX*DTAUM1
  257. RUXUX.AM(ICEN,1,1) = RHO*DTAUM1
  258. RUXUY.AM(ICEN,1,1) = 0.0D0
  259. RUXP.AM(ICEN,1,1) = UX*MM*DTAUM1
  260. C
  261. C******* Dual RUYN
  262. C
  263. RUYR.AM(ICEN,1,1) = UY*DTAUM1
  264. RUYUX.AM(ICEN,1,1) = 0.0D0
  265. RUYUY.AM(ICEN,1,1) = RHO*DTAUM1
  266. RUYP.AM(ICEN,1,1) = UY*MM*DTAUM1
  267. C
  268. C********Dual RETN
  269. C
  270. RETR.AM(ICEN,1,1) = 0.5D0*((UX*UX)+(UY*UY))*DTAUM1
  271. RETUX.AM(ICEN,1,1) = RHO*UX*DTAUM1
  272. RETUY.AM(ICEN,1,1) = RHO*UY*DTAUM1
  273. RETP.AM(ICEN,1,1) = (1.0D0/(GAMMA - 1.0D0)+H*MM)*DTAUM1
  274. C
  275. ENDDO
  276. C
  277. SEGDES MPVN
  278. SEGDES MPRN
  279. SEGDES MPGAM
  280. SEGDES MPPN
  281. SEGDES MPUPRI
  282. SEGDES MPUPR2
  283. SEGDES MDIAMI
  284. C
  285. SEGDES MATRIK
  286. SEGDES IMATRI
  287. C
  288. SEGDES RR , RUX , RUY , RP ,
  289. & RUXR , RUXUX , RUXUY , RUXP ,
  290. & RUYR , RUYUX , RUYUY , RUYP ,
  291. & RETR , RETUX , RETUY , RETP
  292. C
  293. RETURN
  294. END
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  

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