Télécharger kon181.eso

Retour à la liste

Numérotation des lignes :

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

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