Télécharger cli143.eso

Retour à la liste

Numérotation des lignes :

cli143
  1. C CLI143 SOURCE OF166741 24/12/13 21:15:18 12097
  2. SUBROUTINE CLI143(MELEMF,MELEMC,MELECB,MELEFC,MELRES,INORM,ICHPVO,
  3. & ICHPSU,IROC,IVITC,IPC,IGAMC,ILIINC,ILIINP,IJAC,IJACO)
  4. C************************************************************************
  5. C
  6. C PROJET : CASTEM 2000
  7. C
  8. C NOM : CLI143
  9. C
  10. C DESCRIPTION : Subroutine appellée par CLIM11
  11. C
  12. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI)
  13. C
  14. C AUTEUR : A. BECCANTINI, DRN/DMT/SEMT/LTMF
  15. C
  16. C************************************************************************
  17. C
  18. C APPELES (Calcul) :
  19. C
  20. C************************************************************************
  21. C
  22. C HISTORIQUE (Anomalies et modifications éventuelles)
  23. C
  24. C HISTORIQUE :
  25. C
  26. C************************************************************************
  27. C
  28. IMPLICIT INTEGER(I-N)
  29.  
  30. -INC PPARAM
  31. -INC CCOPTIO
  32. -INC SMLMOTS
  33. -INC SMELEME
  34. POINTEUR MELEFC.MELEME
  35. -INC SMLENTI
  36. POINTEUR MLEMC.MLENTI, MLEMCB.MLENTI,MLEMF.MLENTI
  37. -INC SMCHPOI
  38. POINTEUR MPNORM.MPOVAL, MPVOL.MPOVAL, MPSURF.MPOVAL, MPRC.MPOVAL,
  39. & MPVC.MPOVAL, MPPC.MPOVAL, MPGAMC.MPOVAL
  40. POINTEUR RR.IZAFM, RUX.IZAFM, RUY.IZAFM, RRET.IZAFM,
  41. & UXR.IZAFM, UXUX.IZAFM, UXUY.IZAFM, UXRET.IZAFM,
  42. & UYR.IZAFM, UYUX.IZAFM, UYUY.IZAFM, UYRET.IZAFM,
  43. & RETR.IZAFM, RETUX.IZAFM, RETUY.IZAFM, RETRET.IZAFM,
  44. & RUZ.IZAFM, UXUZ.IZAFM, UYUZ.IZAFM, RETUZ.IZAFM,
  45. & UZR.IZAFM, UZUX.IZAFM, UZUY.IZAFM, UZRET.IZAFM,
  46. & UZUZ.IZAFM
  47.  
  48. INTEGER MELEMF,MELEMC,MELECB,INORM,ICHPVO,ICHPSU, IROC,IVITC,IPC
  49. & ,IGAMC,ICEL,NFAC,IFAC,MELRES,IJACO
  50. & ,NGF,NGC,NLF,NLC
  51. & ,ILIINC,ILIINP,IJAC
  52. & ,MP, NBEL, NBME, NBSOUS, NKID, NKMT, NMATRI, NP, NRIGE
  53. REAL*8 VOLU,SURF,RC,PC,UXC,UYC,UZC,GAMC,CNX,CNY,CNZ
  54. & ,UNC
  55. & ,GM1,USGM1,COEF,ECIN,HIN
  56. & ,DRORO,DROUX,DROUY,DROP
  57. & ,DUXRO,DUXUX,DUXUY,DUXP
  58. & ,DUYRO,DUYUX,DUYUY,DUYP
  59. & ,DPRO,DPUX,DPUY,DPP
  60. & ,DROUZ,DUXUZ,DUYUZ,DPUZ
  61. & ,DUZRO,DUZUX,DUZUY,DUZUZ,DUZP
  62. & ,COEF1,COEF2,COEF3,COEF4
  63. CHARACTER*(8) TYPE
  64. C
  65. C
  66. C**** KRIPAD pour la correspondance global/local
  67. C
  68. CALL KRIPAD(MELEMC,MLEMC)
  69. C SEGINI MLEMC
  70. CALL KRIPAD(MELECB,MLEMCB)
  71. C SEGINI MLEMCB
  72. CALL KRIPAD(MELEMF,MLEMF)
  73. C SEGINI MLEMF
  74. C
  75. C**** CHPOINTs de la table DOMAINE
  76. C
  77. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  78. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  79. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  80. C
  81. C**** LICHT active les MPOVALs en *MOD
  82. C
  83. C SEGACT MPNORM*MOD
  84. C SEGACT MPOVSU*MOD
  85. C SEGACT MPOVOL*MOD
  86. C
  87. C
  88. C**** CHPOINTs des variables
  89. C
  90. CALL LICHT(IROC,MPRC,TYPE,ICEL)
  91. CALL LICHT(IVITC,MPVC,TYPE,ICEL)
  92. CALL LICHT(IPC,MPPC,TYPE,ICEL)
  93. CALL LICHT(IGAMC,MPGAMC,TYPE,ICEL)
  94. C
  95. C SEGACT *MOD
  96. C SEGACT *MOD
  97. C SEGACT *MOD
  98. C SEGACT *MOD
  99. C SEGACT *MOD
  100. C
  101. C
  102. C**** Boucle sur le face pour le calcul des invariants de
  103. C Riemann et du flux
  104. C
  105. SEGACT MELEFC
  106. NFAC=MELEFC.NUM(/2)
  107. C
  108. C**** Objet MATRIK
  109. C
  110. NRIGE = 7
  111. NMATRI = 1
  112. NKID = 9
  113. NKMT = 7
  114. C
  115. SEGINI MATRIK
  116. IJACO = MATRIK
  117. MATRIK.IRIGEL(1,1) = MELRES
  118. MATRIK.IRIGEL(2,1) = MELRES
  119. C
  120. C**** Matrice non symetrique
  121. C
  122. MATRIK.IRIGEL(7,1) = 2
  123. C
  124. NBME = 25
  125. NBSOUS = 1
  126. SEGINI IMATRI
  127. IF(IJAC.EQ.1)THEN
  128. MLMOTS=ILIINC
  129. ELSEIF(IJAC.EQ.2)THEN
  130. MLMOTS=ILIINP
  131. ENDIF
  132. SEGACT MLMOTS
  133. MATRIK.IRIGEL(4,1) = IMATRI
  134. C
  135. IMATRI.LISPRI(1) = MLMOTS.MOTS(1)
  136. IMATRI.LISPRI(2) = MLMOTS.MOTS(2)
  137. IMATRI.LISPRI(3) = MLMOTS.MOTS(3)
  138. IMATRI.LISPRI(4) = MLMOTS.MOTS(4)
  139. IMATRI.LISPRI(5) = MLMOTS.MOTS(5)
  140. C
  141. IMATRI.LISPRI(6) = MLMOTS.MOTS(1)
  142. IMATRI.LISPRI(7) = MLMOTS.MOTS(2)
  143. IMATRI.LISPRI(8) = MLMOTS.MOTS(3)
  144. IMATRI.LISPRI(9) = MLMOTS.MOTS(4)
  145. IMATRI.LISPRI(10) = MLMOTS.MOTS(5)
  146. C
  147. IMATRI.LISPRI(11) = MLMOTS.MOTS(1)
  148. IMATRI.LISPRI(12) = MLMOTS.MOTS(2)
  149. IMATRI.LISPRI(13) = MLMOTS.MOTS(3)
  150. IMATRI.LISPRI(14) = MLMOTS.MOTS(4)
  151. IMATRI.LISPRI(15) = MLMOTS.MOTS(5)
  152. C
  153. IMATRI.LISPRI(16) = MLMOTS.MOTS(1)
  154. IMATRI.LISPRI(17) = MLMOTS.MOTS(2)
  155. IMATRI.LISPRI(18) = MLMOTS.MOTS(3)
  156. IMATRI.LISPRI(19) = MLMOTS.MOTS(4)
  157. IMATRI.LISPRI(20) = MLMOTS.MOTS(5)
  158. C
  159. IMATRI.LISPRI(21) = MLMOTS.MOTS(1)
  160. IMATRI.LISPRI(22) = MLMOTS.MOTS(2)
  161. IMATRI.LISPRI(23) = MLMOTS.MOTS(3)
  162. IMATRI.LISPRI(24) = MLMOTS.MOTS(4)
  163. IMATRI.LISPRI(25) = MLMOTS.MOTS(5)
  164. C
  165. SEGDES MLMOTS
  166. MLMOTS=ILIINC
  167. SEGACT MLMOTS
  168. C
  169. C
  170. IMATRI.LISDUA(1) = MLMOTS.MOTS(1)
  171. IMATRI.LISDUA(2) = MLMOTS.MOTS(1)
  172. IMATRI.LISDUA(3) = MLMOTS.MOTS(1)
  173. IMATRI.LISDUA(4) = MLMOTS.MOTS(1)
  174. IMATRI.LISDUA(5) = MLMOTS.MOTS(1)
  175. C
  176. IMATRI.LISDUA(6) = MLMOTS.MOTS(2)
  177. IMATRI.LISDUA(7) = MLMOTS.MOTS(2)
  178. IMATRI.LISDUA(8) = MLMOTS.MOTS(2)
  179. IMATRI.LISDUA(9) = MLMOTS.MOTS(2)
  180. IMATRI.LISDUA(10) = MLMOTS.MOTS(2)
  181. C
  182. IMATRI.LISDUA(11) = MLMOTS.MOTS(3)
  183. IMATRI.LISDUA(12) = MLMOTS.MOTS(3)
  184. IMATRI.LISDUA(13) = MLMOTS.MOTS(3)
  185. IMATRI.LISDUA(14) = MLMOTS.MOTS(3)
  186. IMATRI.LISDUA(15) = MLMOTS.MOTS(3)
  187. C
  188. IMATRI.LISDUA(16) = MLMOTS.MOTS(4)
  189. IMATRI.LISDUA(17) = MLMOTS.MOTS(4)
  190. IMATRI.LISDUA(18) = MLMOTS.MOTS(4)
  191. IMATRI.LISDUA(19) = MLMOTS.MOTS(4)
  192. IMATRI.LISDUA(20) = MLMOTS.MOTS(4)
  193. C
  194. IMATRI.LISDUA(21) = MLMOTS.MOTS(5)
  195. IMATRI.LISDUA(22) = MLMOTS.MOTS(5)
  196. IMATRI.LISDUA(23) = MLMOTS.MOTS(5)
  197. IMATRI.LISDUA(24) = MLMOTS.MOTS(5)
  198. IMATRI.LISDUA(25) = MLMOTS.MOTS(5)
  199. C
  200. SEGDES MLMOTS
  201. NBEL = NFAC
  202. NBSOUS = 1
  203. NP = 1
  204. MP = 1
  205. SEGINI RR , RUX , RUY , RUZ ,RRET ,
  206. & UXR , UXUX , UXUY , UXUZ ,UXRET ,
  207. & UYR , UYUX , UYUY , UYUZ , UYRET ,
  208. & UZR , UZUX , UZUY , UZUZ , UZRET ,
  209. & RETR , RETUX , RETUY, RETUZ , RETRET
  210. C
  211. C**** Duale = IMATRI.LISDUA(1) = 'RN'
  212. C Primale = IMATRI.LISPRI(1) = 'RN'
  213. C -> IMATRI.LIZAFM(1,1) = RR
  214. C
  215. IMATRI.LIZAFM(1,1) = RR
  216. IMATRI.LIZAFM(1,2) = RUX
  217. IMATRI.LIZAFM(1,3) = RUY
  218. IMATRI.LIZAFM(1,4) = RUZ
  219. IMATRI.LIZAFM(1,5) = RRET
  220. C
  221. IMATRI.LIZAFM(1,6) = UXR
  222. IMATRI.LIZAFM(1,7) = UXUX
  223. IMATRI.LIZAFM(1,8) = UXUY
  224. IMATRI.LIZAFM(1,9) = UXUZ
  225. IMATRI.LIZAFM(1,10) = UXRET
  226. C
  227. IMATRI.LIZAFM(1,11) = UYR
  228. IMATRI.LIZAFM(1,12) = UYUX
  229. IMATRI.LIZAFM(1,13) = UYUY
  230. IMATRI.LIZAFM(1,14) = UYUZ
  231. IMATRI.LIZAFM(1,15) = UYRET
  232. C
  233. IMATRI.LIZAFM(1,16) = UZR
  234. IMATRI.LIZAFM(1,17) = UZUX
  235. IMATRI.LIZAFM(1,18) = UZUY
  236. IMATRI.LIZAFM(1,19) = UZUZ
  237. IMATRI.LIZAFM(1,20) = UZRET
  238. C
  239. IMATRI.LIZAFM(1,21) = RETR
  240. IMATRI.LIZAFM(1,22) = RETUX
  241. IMATRI.LIZAFM(1,23) = RETUY
  242. IMATRI.LIZAFM(1,24) = RETUZ
  243. IMATRI.LIZAFM(1,25) = RETRET
  244. C
  245. SEGDES MATRIK
  246. SEGDES IMATRI
  247. C
  248. C**** Fin definition MATRIK
  249. C
  250. DO IFAC=1,NFAC,1
  251. NGF=MELEFC.NUM(1,IFAC)
  252. NGC=MELEFC.NUM(2,IFAC)
  253. NLF=MLEMF.LECT(NGF)
  254. NLC=MLEMC.LECT(NGC)
  255. VOLU=MPVOL.VPOCHA(NLC,1)
  256. SURF=MPSURF.VPOCHA(NLF,1)
  257. C In CASTEM les normales sont sortantes
  258. CNX=MPNORM.VPOCHA(NLF,1)
  259. CNY=MPNORM.VPOCHA(NLF,2)
  260. CNZ=MPNORM.VPOCHA(NLF,3)
  261. C Variables au centre
  262. RC=MPRC.VPOCHA(NLC,1)
  263. PC=MPPC.VPOCHA(NLC,1)
  264. UXC=MPVC.VPOCHA(NLC,1)
  265. UYC=MPVC.VPOCHA(NLC,2)
  266. UZC=MPVC.VPOCHA(NLC,3)
  267. GAMC=MPGAMC.VPOCHA(NLC,1)
  268. GM1=GAMC-1.0D0
  269. USGM1=1.0D0/GM1
  270. C
  271. C******* On calcule UN, UT
  272. C
  273. UNC=(UXC*CNX)+(UYC*CNY+(UZC*CNZ))
  274. C
  275. C******* Densite, vitesse, pression sur le bord
  276. C
  277. COEF=-1*SURF/VOLU
  278. C
  279. DRORO=UNC*COEF
  280. DROUX=(RC*CNX)*COEF
  281. DROUY=(RC*CNY)*COEF
  282. DROUZ=(RC*CNZ)*COEF
  283. DROP=0.0D0
  284. C
  285. DUXRO=(UNC*UXC)*COEF
  286. DUXUX=((RC*CNX*UXC)+(RC*UNC))*COEF
  287. DUXUY=((RC*CNY*UXC))*COEF
  288. DUXUZ=((RC*CNZ*UXC))*COEF
  289. DUXP=CNX*COEF
  290. C
  291. DUYRO=(UNC*UYC)*COEF
  292. DUYUX=((RC*CNX*UYC))*COEF
  293. DUYUY=((RC*CNY*UYC)+(RC*UNC))*COEF
  294. DUYUZ=((RC*CNZ*UYC))*COEF
  295. DUYP=CNY*COEF
  296. C
  297. DUZRO=(UNC*UZC)*COEF
  298. DUZUX=((RC*CNX*UZC))*COEF
  299. DUZUY=((RC*CNY*UZC))*COEF
  300. DUZUZ=((RC*CNZ*UZC)+(RC*UNC))*COEF
  301. DUZP=CNZ*COEF
  302. C
  303. ECIN=0.5D0*((UXC*UXC)+(UYC*UYC)+(UZC*UZC))
  304. HIN=GAMC*USGM1*PC
  305. DPRO=(UNC*ECIN)*COEF
  306. DPUX=((CNX*HIN)+(RC*CNX*ECIN)+(RC*UNC*UXC))*COEF
  307. DPUY=((CNY*HIN)+(RC*CNY*ECIN)+(RC*UNC*UYC))*COEF
  308. DPUZ=((CNZ*HIN)+(RC*CNZ*ECIN)+(RC*UNC*UZC))*COEF
  309. DPP=(UNC*GAMC*USGM1)*COEF
  310. CC
  311. CC******* Jacobian with respect to conservative variables
  312. CC
  313. IF(IJAC.EQ.1)THEN
  314. COEF1=-1.0D0*UXC/RC
  315. COEF2=-1.0D0*UYC/RC
  316. COEF3=-1.0D0*UZC/RC
  317. COEF4=0.5D0*GM1*((UXC*UXC)+(UYC*UYC)+(UZC*UZC))
  318. C
  319. RR.AM(IFAC,1,1)=DRORO+(DROUX*COEF1)+(DROUY*COEF2)+(DROUZ
  320. $ *COEF3)+(DROP*COEF4)
  321. RUX.AM(IFAC,1,1)=(DROUX/RC)-((UXC*GM1)*DROP)
  322. RUY.AM(IFAC,1,1)=(DROUY/RC)-((UYC*GM1)*DROP)
  323. RUZ.AM(IFAC,1,1)=(DROUZ/RC)-((UZC*GM1)*DROP)
  324. RRET.AM(IFAC,1,1)=GM1*DROP
  325. C
  326. UXR.AM(IFAC,1,1)=DUXRO+(DUXUX*COEF1)+(DUXUY*COEF2)+(DUXUZ
  327. $ *COEF3)+(DUXP*COEF4)
  328. UXUX.AM(IFAC,1,1)=(DUXUX/RC)-((UXC*GM1)*DUXP)
  329. UXUY.AM(IFAC,1,1)=(DUXUY/RC)-((UYC*GM1)*DUXP)
  330. UXUZ.AM(IFAC,1,1)=(DUXUZ/RC)-((UZC*GM1)*DUXP)
  331. UXRET.AM(IFAC,1,1)=GM1*DUXP
  332. C
  333. UYR.AM(IFAC,1,1)=DUYRO+(DUYUX*COEF1)+(DUYUY*COEF2)+(DUYUZ
  334. $ *COEF3)+(DUYP*COEF4)
  335. UYUX.AM(IFAC,1,1)=(DUYUX/RC)-((UXC*GM1)*DUYP)
  336. UYUY.AM(IFAC,1,1)=(DUYUY/RC)-((UYC*GM1)*DUYP)
  337. UYUZ.AM(IFAC,1,1)=(DUYUZ/RC)-((UZC*GM1)*DUYP)
  338. UYRET.AM(IFAC,1,1)=GM1*DUYP
  339. C
  340. UZR.AM(IFAC,1,1)=DUZRO+(DUZUX*COEF1)+(DUZUY*COEF2)+(DUZUZ
  341. $ *COEF3)+(DUZP*COEF4)
  342. UZUX.AM(IFAC,1,1)=(DUZUX/RC)-((UXC*GM1)*DUZP)
  343. UZUY.AM(IFAC,1,1)=(DUZUY/RC)-((UYC*GM1)*DUZP)
  344. UZUZ.AM(IFAC,1,1)=(DUZUZ/RC)-((UZC*GM1)*DUZP)
  345. UZRET.AM(IFAC,1,1)=GM1*DUZP
  346. C
  347. RETR.AM(IFAC,1,1)=DPRO+(DPUX*COEF1)+(DPUY*COEF2)+(DPUZ
  348. $ *COEF3)+(DPP*COEF4)
  349. RETUX.AM(IFAC,1,1)=(DPUX/RC)-((UXC*GM1)*DPP)
  350. RETUY.AM(IFAC,1,1)=(DPUY/RC)-((UYC*GM1)*DPP)
  351. RETUZ.AM(IFAC,1,1)=(DPUZ/RC)-((UZC*GM1)*DPP)
  352. RETRET.AM(IFAC,1,1)=GM1*DPP
  353. C
  354. ELSEIF(IJAC.EQ.2)THEN
  355. RR.AM(IFAC,1,1)=DRORO
  356. RUX.AM(IFAC,1,1)=DROUX
  357. RUY.AM(IFAC,1,1)=DROUY
  358. RUZ.AM(IFAC,1,1)=DROUZ
  359. RRET.AM(IFAC,1,1)=DROP
  360. C
  361. UXR.AM(IFAC,1,1)=DUXRO
  362. UXUX.AM(IFAC,1,1)=DUXUX
  363. UXUY.AM(IFAC,1,1)=DUXUY
  364. UXUZ.AM(IFAC,1,1)=DUXUZ
  365. UXRET.AM(IFAC,1,1)=DUXP
  366. C
  367. UYR.AM(IFAC,1,1)=DUYRO
  368. UYUX.AM(IFAC,1,1)=DUYUX
  369. UYUY.AM(IFAC,1,1)=DUYUY
  370. UYUZ.AM(IFAC,1,1)=DUYUZ
  371. UYRET.AM(IFAC,1,1)=DUYP
  372. C
  373. UZR.AM(IFAC,1,1)=DUZRO
  374. UZUX.AM(IFAC,1,1)=DUZUX
  375. UZUY.AM(IFAC,1,1)=DUZUY
  376. UZUZ.AM(IFAC,1,1)=DUZUZ
  377. UZRET.AM(IFAC,1,1)=DUZP
  378. C
  379. RETR.AM(IFAC,1,1)=DPRO
  380. RETUX.AM(IFAC,1,1)=DPUX
  381. RETUY.AM(IFAC,1,1)=DPUY
  382. RETUZ.AM(IFAC,1,1)=DPUZ
  383. RETRET.AM(IFAC,1,1)=DPP
  384.  
  385. ENDIF
  386. ENDDO
  387. C
  388. SEGDES MELEFC
  389. C
  390. SEGSUP MLEMC
  391. SEGSUP MLEMCB
  392. SEGSUP MLEMF
  393. C
  394. SEGDES MPNORM
  395. SEGDES MPVOL
  396. SEGDES MPSURF
  397. SEGDES MPRC
  398. SEGDES MPPC
  399. SEGDES MPVC
  400. SEGDES MPGAMC
  401. C
  402. SEGDES RR , RUX , RUY , RUZ ,RRET ,
  403. & UXR , UXUX , UXUY , UXUZ ,UXRET ,
  404. & UYR , UYUX , UYUY , UYUZ , UYRET ,
  405. & UZR , UZUX , UZUY , UZUZ , UZRET ,
  406. & RETR , RETUX , RETUY, RETUZ , RETRET
  407. C
  408. 9999 CONTINUE
  409. RETURN
  410. END
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  

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