Télécharger kon181.eso

Retour à la liste

Numérotation des lignes :

kon181
  1. C KON181 SOURCE OF166741 24/12/13 21:16:17 12097
  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. IMPLICIT INTEGER(I-N)
  62. INTEGER IRN, IVN, IPN, IGAMN, IJACO, IGEOM, ICEN
  63. & , MP, NP, NBEL, NBME, NBSOUS, IUPRI, IUPRI2
  64. & , NRIGE, NMATRI, NKID, NKMT, IDIAM
  65. C
  66. REAL*8 RHO,UX, UY, GAMMA, PN, ARS, UR, THETA, H, MM, EPSIL, QQ
  67. & ,AR, UPRI, UPRI2, DIAM, LAMBDA, MREF, MREF2, MACH, MACH2
  68. & ,DTAUM1
  69. PARAMETER(EPSIL=1.0D0)
  70. CHARACTER*8 TYPE
  71. C
  72. C**** LES INCLUDES
  73. C
  74.  
  75. -INC PPARAM
  76. -INC CCOPTIO
  77. -INC SMCHPOI
  78. -INC SMELEME
  79. -INC SMLMOTS
  80. -INC SMLENTI
  81. POINTEUR MPVN.MPOVAL, MPRN.MPOVAL, MPPN.MPOVAL,
  82. & MPGAM.MPOVAL, MPUPRI.MPOVAL, MPUPR2.MPOVAL, MDIAMI.MPOVAL
  83. POINTEUR MELEMC.MELEME
  84. POINTEUR RR.IZAFM, RUX.IZAFM, RUY.IZAFM, RP.IZAFM,
  85. & RUXR.IZAFM, RUXUX.IZAFM, RUXUY.IZAFM, RUXP.IZAFM,
  86. & RUYR.IZAFM, RUYUX.IZAFM, RUYUY.IZAFM, RUYP.IZAFM,
  87. & RETR.IZAFM, RETUX.IZAFM, RETUY.IZAFM, RETP.IZAFM
  88. POINTEUR MLMPRI.MLMOTS, MLMCON.MLMOTS
  89. C
  90. CALL LICHT(IVN,MPVN,TYPE,IGEOM)
  91. CALL LICHT(IRN,MPRN,TYPE,IGEOM)
  92. CALL LICHT(IPN,MPPN,TYPE,IGEOM)
  93. CALL LICHT(IGAMN,MPGAM,TYPE,IGEOM)
  94. CALL LICHT(IUPRI,MPUPRI,TYPE, IGEOM)
  95. CALL LICHT(IUPRI2,MPUPR2,TYPE, IGEOM)
  96. CALL LICHT(IDIAM,MDIAMI,TYPE,IGEOM)
  97. C
  98. C SEGACT MPVN*MOD
  99. C SEGACT MPPN*MOD
  100. C SEGACT MPRN*MOD
  101. C
  102. C**** Maillage des inconnues primales = Maillage des inconnues primales
  103. C = MELEMC
  104. C
  105. C
  106. NRIGE = 7
  107. NMATRI = 1
  108. NKID = 9
  109. NKMT = 7
  110. C
  111. SEGINI MATRIK
  112. IJACO = MATRIK
  113. MATRIK.IRIGEL(1,1) = MELEMC
  114. MATRIK.IRIGEL(2,1) = MELEMC
  115. C
  116. C**** Matrice non symetrique
  117. C
  118. MATRIK.IRIGEL(7,1) = 2
  119. C
  120. NBME = 16
  121. NBSOUS = 1
  122. SEGINI IMATRI
  123. MATRIK.IRIGEL(4,1) = IMATRI
  124. C
  125. SEGACT MLMPRI
  126. IMATRI.LISPRI(1) = MLMPRI.MOTS(1)
  127. IMATRI.LISPRI(2) = MLMPRI.MOTS(2)
  128. IMATRI.LISPRI(3) = MLMPRI.MOTS(3)
  129. IMATRI.LISPRI(4) = MLMPRI.MOTS(4)
  130. IMATRI.LISPRI(5) = MLMPRI.MOTS(1)
  131. IMATRI.LISPRI(6) = MLMPRI.MOTS(2)
  132. IMATRI.LISPRI(7) = MLMPRI.MOTS(3)
  133. IMATRI.LISPRI(8) = MLMPRI.MOTS(4)
  134. IMATRI.LISPRI(9) = MLMPRI.MOTS(1)
  135. IMATRI.LISPRI(10) = MLMPRI.MOTS(2)
  136. IMATRI.LISPRI(11) = MLMPRI.MOTS(3)
  137. IMATRI.LISPRI(12) = MLMPRI.MOTS(4)
  138. IMATRI.LISPRI(13) = MLMPRI.MOTS(1)
  139. IMATRI.LISPRI(14) = MLMPRI.MOTS(2)
  140. IMATRI.LISPRI(15) = MLMPRI.MOTS(3)
  141. IMATRI.LISPRI(16) = MLMPRI.MOTS(4)
  142. SEGDES MLMPRI
  143. C
  144. SEGACT MLMCON
  145. IMATRI.LISDUA(1) = MLMCON.MOTS(1)
  146. IMATRI.LISDUA(2) = MLMCON.MOTS(1)
  147. IMATRI.LISDUA(3) = MLMCON.MOTS(1)
  148. IMATRI.LISDUA(4) = MLMCON.MOTS(1)
  149. IMATRI.LISDUA(5) = MLMCON.MOTS(2)
  150. IMATRI.LISDUA(6) = MLMCON.MOTS(2)
  151. IMATRI.LISDUA(7) = MLMCON.MOTS(2)
  152. IMATRI.LISDUA(8) = MLMCON.MOTS(2)
  153. IMATRI.LISDUA(9) = MLMCON.MOTS(3)
  154. IMATRI.LISDUA(10) = MLMCON.MOTS(3)
  155. IMATRI.LISDUA(11) = MLMCON.MOTS(3)
  156. IMATRI.LISDUA(12) = MLMCON.MOTS(3)
  157. IMATRI.LISDUA(13) = MLMCON.MOTS(4)
  158. IMATRI.LISDUA(14) = MLMCON.MOTS(4)
  159. IMATRI.LISDUA(15) = MLMCON.MOTS(4)
  160. IMATRI.LISDUA(16) = MLMCON.MOTS(4)
  161. SEGDES MLMCON
  162. C
  163. SEGACT MELEMC
  164. NBEL = MELEMC.NUM(/2)
  165. SEGDES MELEMC
  166. NBSOUS = 1
  167. NP = 1
  168. MP = 1
  169. SEGINI RR , RUX , RUY , RP ,
  170. & RUXR , RUXUX , RUXUY , RUXP ,
  171. & RUYR , RUYUX , RUYUY , RUYP ,
  172. & RETR , RETUX , RETUY , RETP
  173. C
  174. C**** Duale = IMATRI.LISDUA(1) = 'RN'
  175. C Primale = IMATRI.LISPRI(4) = 'P'
  176. C -> IMATRI.LIZAFM(1,4) = RP
  177. C
  178. IMATRI.LIZAFM(1,1) = RR
  179. IMATRI.LIZAFM(1,2) = RUX
  180. IMATRI.LIZAFM(1,3) = RUY
  181. IMATRI.LIZAFM(1,4) = RP
  182. IMATRI.LIZAFM(1,5) = RUXR
  183. IMATRI.LIZAFM(1,6) = RUXUX
  184. IMATRI.LIZAFM(1,7) = RUXUY
  185. IMATRI.LIZAFM(1,8) = RUXP
  186. IMATRI.LIZAFM(1,9) = RUYR
  187. IMATRI.LIZAFM(1,10) = RUYUX
  188. IMATRI.LIZAFM(1,11) = RUYUY
  189. IMATRI.LIZAFM(1,12) = RUYP
  190. IMATRI.LIZAFM(1,13) = RETR
  191. IMATRI.LIZAFM(1,14) = RETUX
  192. IMATRI.LIZAFM(1,15) = RETUY
  193. IMATRI.LIZAFM(1,16) = RETP
  194. C
  195. DO ICEN = 1, NBEL, 1
  196. RHO=MPRN.VPOCHA(ICEN,1)
  197. UX=MPVN.VPOCHA(ICEN,1)
  198. UY=MPVN.VPOCHA(ICEN,2)
  199. PN=MPPN.VPOCHA(ICEN,1)
  200. GAMMA=MPGAM.VPOCHA(ICEN,1)
  201. ARS=GAMMA*PN/RHO
  202. AR=ARS**0.5D0
  203. QQ=((UX*UX)+(UY*UY))**0.5D0
  204. UPRI=MPUPRI.VPOCHA(ICEN,1)
  205. UPRI2=MPUPR2.VPOCHA(ICEN,1)
  206. UPRI=MAX(UPRI,UPRI2)
  207. DIAM = MDIAMI.VPOCHA(ICEN,1)
  208. IF(QQ .LT. (EPSIL*UPRI)) THEN
  209. UR = EPSIL*UPRI
  210. ELSE
  211. UR = QQ
  212. ENDIF
  213. IF(UR .GT. AR)THEN
  214. UR=AR
  215. ENDIF
  216. THETA=1.0D0/UR/UR+(GAMMA-1.0D0)/ARS
  217. H=0.5D0*((UX*UX)+(UY*UY))+ARS/(GAMMA-1.0D0)
  218. MM=THETA-GAMMA/ARS
  219. C----- We compute u+a------------
  220. MREF=UR/AR
  221. MREF2=MREF*MREF
  222. MACH=QQ/AR
  223. MACH2=MACH*MACH
  224. LAMBDA=(1.0D0-MREF2)**2
  225. LAMBDA=(LAMBDA*MACH2)+(4.0D0*MREF2)
  226. LAMBDA=SQRT(LAMBDA)*AR
  227. LAMBDA=((1.0D0+MREF2)*QQ)+LAMBDA
  228. LAMBDA=LAMBDA*0.5D0
  229. DTAUM1=LAMBDA/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,UX,UY,P)
  234. C
  235. C******* Dual RN
  236. C
  237. RR.AM(ICEN,1,1) = 1.0D0*DTAUM1
  238. RUX.AM(ICEN,1,1) = 0.0D0
  239. RUY.AM(ICEN,1,1) = 0.0D0
  240. RP.AM(ICEN,1,1) = MM*DTAUM1
  241. C
  242. C******* Dual RUXN
  243. C
  244. RUXR.AM(ICEN,1,1) = UX*DTAUM1
  245. RUXUX.AM(ICEN,1,1) = RHO*DTAUM1
  246. RUXUY.AM(ICEN,1,1) = 0.0D0
  247. RUXP.AM(ICEN,1,1) = UX*MM*DTAUM1
  248. C
  249. C******* Dual RUYN
  250. C
  251. RUYR.AM(ICEN,1,1) = UY*DTAUM1
  252. RUYUX.AM(ICEN,1,1) = 0.0D0
  253. RUYUY.AM(ICEN,1,1) = RHO*DTAUM1
  254. RUYP.AM(ICEN,1,1) = UY*MM*DTAUM1
  255. C
  256. C********Dual RETN
  257. C
  258. RETR.AM(ICEN,1,1) = 0.5D0*((UX*UX)+(UY*UY))*DTAUM1
  259. RETUX.AM(ICEN,1,1) = RHO*UX*DTAUM1
  260. RETUY.AM(ICEN,1,1) = RHO*UY*DTAUM1
  261. RETP.AM(ICEN,1,1) = (1.0D0/(GAMMA - 1.0D0)+H*MM)*DTAUM1
  262. C
  263. ENDDO
  264. C
  265. SEGDES MPVN
  266. SEGDES MPRN
  267. SEGDES MPGAM
  268. SEGDES MPPN
  269. SEGDES MPUPRI
  270. SEGDES MPUPR2
  271. SEGDES MDIAMI
  272. C
  273. SEGDES MATRIK
  274. SEGDES IMATRI
  275. C
  276. SEGDES RR , RUX , RUY , RP ,
  277. & RUXR , RUXUX , RUXUY , RUXP ,
  278. & RUYR , RUYUX , RUYUY , RUYP ,
  279. & RETR , RETUX , RETUY , RETP
  280. C
  281. RETURN
  282. END
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  

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