Télécharger cli173.eso

Retour à la liste

Numérotation des lignes :

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

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