Télécharger cli143.eso

Retour à la liste

Numérotation des lignes :

cli143
  1. C CLI143 SOURCE CB215821 20/11/25 13:20:07 10792
  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. C
  48. C**** Variables de COOPTIO
  49. C
  50. C INTEGER IPLLB, IERPER, IERMAX, IERR, INTERR
  51. C & ,IOTER, IOLEC, IOIMP, IOCAR, IOACQ
  52. C & ,IOPER, IOSGB, IOGRA, IOSAU, IORES
  53. C & ,IECHO, IIMPI, IOSPI
  54. C & ,IDIM, IFICLE, IPREFI
  55. C & ,MCOORD
  56. C & ,IFOMOD, NIFOUR, IFOUR, NSDPGE, IONIVE
  57. C & ,NGMAXY, IZROSF, ISOTYP, IOSCR,LTEXLU
  58. C & ,NORINC,NORVAL,NORIND,NORVAD
  59. C & ,NUCROU, IPSAUV
  60. C
  61. INTEGER MELEMF,MELEMC,MELECB,INORM,ICHPVO,ICHPSU, IROC,IVITC,IPC
  62. & ,IGAMC,ICEL,NFAC,IFAC,MELRES,IJACO
  63. & ,NGF,NGC,NLF,NLC
  64. & ,ILIINC,ILIINP,IJAC
  65. & ,MP, NBEL, NBME, NBSOUS, NKID, NKMT, NMATRI, NP, NRIGE
  66. REAL*8 VOLU,SURF,RC,PC,UXC,UYC,UZC,GAMC,CNX,CNY,CNZ
  67. & ,UNC
  68. & ,GM1,USGM1,COEF,ECIN,HIN
  69. & ,DRORO,DROUX,DROUY,DROP
  70. & ,DUXRO,DUXUX,DUXUY,DUXP
  71. & ,DUYRO,DUYUX,DUYUY,DUYP
  72. & ,DPRO,DPUX,DPUY,DPP
  73. & ,DROUZ,DUXUZ,DUYUZ,DPUZ
  74. & ,DUZRO,DUZUX,DUZUY,DUZUZ,DUZP
  75. & ,COEF1,COEF2,COEF3,COEF4
  76. CHARACTER*(8) TYPE
  77. C
  78. C
  79. C**** KRIPAD pour la correspondance global/local
  80. C
  81. CALL KRIPAD(MELEMC,MLEMC)
  82. C SEGINI MLEMC
  83. CALL KRIPAD(MELECB,MLEMCB)
  84. C SEGINI MLEMCB
  85. CALL KRIPAD(MELEMF,MLEMF)
  86. C SEGINI MLEMF
  87. C
  88. C**** CHPOINTs de la table DOMAINE
  89. C
  90. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  91. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  92. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  93. C
  94. C**** LICHT active les MPOVALs en *MOD
  95. C
  96. C SEGACT MPNORM*MOD
  97. C SEGACT MPOVSU*MOD
  98. C SEGACT MPOVOL*MOD
  99. C
  100. C
  101. C**** CHPOINTs des variables
  102. C
  103. CALL LICHT(IROC,MPRC,TYPE,ICEL)
  104. CALL LICHT(IVITC,MPVC,TYPE,ICEL)
  105. CALL LICHT(IPC,MPPC,TYPE,ICEL)
  106. CALL LICHT(IGAMC,MPGAMC,TYPE,ICEL)
  107. C
  108. C SEGACT *MOD
  109. C SEGACT *MOD
  110. C SEGACT *MOD
  111. C SEGACT *MOD
  112. C SEGACT *MOD
  113. C
  114. C
  115. C**** Boucle sur le face pour le calcul des invariants de
  116. C Riemann et du flux
  117. C
  118. SEGACT MELEFC
  119. NFAC=MELEFC.NUM(/2)
  120. C
  121. C**** Objet MATRIK
  122. C
  123. NRIGE = 7
  124. NMATRI = 1
  125. NKID = 9
  126. NKMT = 7
  127. C
  128. SEGINI MATRIK
  129. IJACO = MATRIK
  130. MATRIK.IRIGEL(1,1) = MELRES
  131. MATRIK.IRIGEL(2,1) = MELRES
  132. C
  133. C**** Matrice non symetrique
  134. C
  135. MATRIK.IRIGEL(7,1) = 2
  136. C
  137. NBME = 25
  138. NBSOUS = 1
  139. SEGINI IMATRI
  140. IF(IJAC.EQ.1)THEN
  141. MLMOTS=ILIINC
  142. ELSEIF(IJAC.EQ.2)THEN
  143. MLMOTS=ILIINP
  144. ENDIF
  145. SEGACT MLMOTS
  146. MATRIK.IRIGEL(4,1) = IMATRI
  147. C
  148. IMATRI.LISPRI(1) = MLMOTS.MOTS(1)
  149. IMATRI.LISPRI(2) = MLMOTS.MOTS(2)
  150. IMATRI.LISPRI(3) = MLMOTS.MOTS(3)
  151. IMATRI.LISPRI(4) = MLMOTS.MOTS(4)
  152. IMATRI.LISPRI(5) = MLMOTS.MOTS(5)
  153. C
  154. IMATRI.LISPRI(6) = MLMOTS.MOTS(1)
  155. IMATRI.LISPRI(7) = MLMOTS.MOTS(2)
  156. IMATRI.LISPRI(8) = MLMOTS.MOTS(3)
  157. IMATRI.LISPRI(9) = MLMOTS.MOTS(4)
  158. IMATRI.LISPRI(10) = MLMOTS.MOTS(5)
  159. C
  160. IMATRI.LISPRI(11) = MLMOTS.MOTS(1)
  161. IMATRI.LISPRI(12) = MLMOTS.MOTS(2)
  162. IMATRI.LISPRI(13) = MLMOTS.MOTS(3)
  163. IMATRI.LISPRI(14) = MLMOTS.MOTS(4)
  164. IMATRI.LISPRI(15) = MLMOTS.MOTS(5)
  165. C
  166. IMATRI.LISPRI(16) = MLMOTS.MOTS(1)
  167. IMATRI.LISPRI(17) = MLMOTS.MOTS(2)
  168. IMATRI.LISPRI(18) = MLMOTS.MOTS(3)
  169. IMATRI.LISPRI(19) = MLMOTS.MOTS(4)
  170. IMATRI.LISPRI(20) = MLMOTS.MOTS(5)
  171. C
  172. IMATRI.LISPRI(21) = MLMOTS.MOTS(1)
  173. IMATRI.LISPRI(22) = MLMOTS.MOTS(2)
  174. IMATRI.LISPRI(23) = MLMOTS.MOTS(3)
  175. IMATRI.LISPRI(24) = MLMOTS.MOTS(4)
  176. IMATRI.LISPRI(25) = MLMOTS.MOTS(5)
  177. C
  178. SEGDES MLMOTS
  179. MLMOTS=ILIINC
  180. SEGACT MLMOTS
  181. C
  182. C
  183. IMATRI.LISDUA(1) = MLMOTS.MOTS(1)
  184. IMATRI.LISDUA(2) = MLMOTS.MOTS(1)
  185. IMATRI.LISDUA(3) = MLMOTS.MOTS(1)
  186. IMATRI.LISDUA(4) = MLMOTS.MOTS(1)
  187. IMATRI.LISDUA(5) = MLMOTS.MOTS(1)
  188. C
  189. IMATRI.LISDUA(6) = MLMOTS.MOTS(2)
  190. IMATRI.LISDUA(7) = MLMOTS.MOTS(2)
  191. IMATRI.LISDUA(8) = MLMOTS.MOTS(2)
  192. IMATRI.LISDUA(9) = MLMOTS.MOTS(2)
  193. IMATRI.LISDUA(10) = MLMOTS.MOTS(2)
  194. C
  195. IMATRI.LISDUA(11) = MLMOTS.MOTS(3)
  196. IMATRI.LISDUA(12) = MLMOTS.MOTS(3)
  197. IMATRI.LISDUA(13) = MLMOTS.MOTS(3)
  198. IMATRI.LISDUA(14) = MLMOTS.MOTS(3)
  199. IMATRI.LISDUA(15) = MLMOTS.MOTS(3)
  200. C
  201. IMATRI.LISDUA(16) = MLMOTS.MOTS(4)
  202. IMATRI.LISDUA(17) = MLMOTS.MOTS(4)
  203. IMATRI.LISDUA(18) = MLMOTS.MOTS(4)
  204. IMATRI.LISDUA(19) = MLMOTS.MOTS(4)
  205. IMATRI.LISDUA(20) = MLMOTS.MOTS(4)
  206. C
  207. IMATRI.LISDUA(21) = MLMOTS.MOTS(5)
  208. IMATRI.LISDUA(22) = MLMOTS.MOTS(5)
  209. IMATRI.LISDUA(23) = MLMOTS.MOTS(5)
  210. IMATRI.LISDUA(24) = MLMOTS.MOTS(5)
  211. IMATRI.LISDUA(25) = MLMOTS.MOTS(5)
  212. C
  213. SEGDES MLMOTS
  214. NBEL = NFAC
  215. NBSOUS = 1
  216. NP = 1
  217. MP = 1
  218. SEGINI RR , RUX , RUY , RUZ ,RRET ,
  219. & UXR , UXUX , UXUY , UXUZ ,UXRET ,
  220. & UYR , UYUX , UYUY , UYUZ , UYRET ,
  221. & UZR , UZUX , UZUY , UZUZ , UZRET ,
  222. & RETR , RETUX , RETUY, RETUZ , RETRET
  223. C
  224. C**** Duale = IMATRI.LISDUA(1) = 'RN'
  225. C Primale = IMATRI.LISPRI(1) = 'RN'
  226. C -> IMATRI.LIZAFM(1,1) = RR
  227. C
  228. IMATRI.LIZAFM(1,1) = RR
  229. IMATRI.LIZAFM(1,2) = RUX
  230. IMATRI.LIZAFM(1,3) = RUY
  231. IMATRI.LIZAFM(1,4) = RUZ
  232. IMATRI.LIZAFM(1,5) = RRET
  233. C
  234. IMATRI.LIZAFM(1,6) = UXR
  235. IMATRI.LIZAFM(1,7) = UXUX
  236. IMATRI.LIZAFM(1,8) = UXUY
  237. IMATRI.LIZAFM(1,9) = UXUZ
  238. IMATRI.LIZAFM(1,10) = UXRET
  239. C
  240. IMATRI.LIZAFM(1,11) = UYR
  241. IMATRI.LIZAFM(1,12) = UYUX
  242. IMATRI.LIZAFM(1,13) = UYUY
  243. IMATRI.LIZAFM(1,14) = UYUZ
  244. IMATRI.LIZAFM(1,15) = UYRET
  245. C
  246. IMATRI.LIZAFM(1,16) = UZR
  247. IMATRI.LIZAFM(1,17) = UZUX
  248. IMATRI.LIZAFM(1,18) = UZUY
  249. IMATRI.LIZAFM(1,19) = UZUZ
  250. IMATRI.LIZAFM(1,20) = UZRET
  251. C
  252. IMATRI.LIZAFM(1,21) = RETR
  253. IMATRI.LIZAFM(1,22) = RETUX
  254. IMATRI.LIZAFM(1,23) = RETUY
  255. IMATRI.LIZAFM(1,24) = RETUZ
  256. IMATRI.LIZAFM(1,25) = RETRET
  257. C
  258. SEGDES MATRIK
  259. SEGDES IMATRI
  260. C
  261. C**** Fin definition MATRIK
  262. C
  263. DO IFAC=1,NFAC,1
  264. NGF=MELEFC.NUM(1,IFAC)
  265. NGC=MELEFC.NUM(2,IFAC)
  266. NLF=MLEMF.LECT(NGF)
  267. NLC=MLEMC.LECT(NGC)
  268. VOLU=MPVOL.VPOCHA(NLC,1)
  269. SURF=MPSURF.VPOCHA(NLF,1)
  270. C In CASTEM les normales sont sortantes
  271. CNX=MPNORM.VPOCHA(NLF,1)
  272. CNY=MPNORM.VPOCHA(NLF,2)
  273. CNZ=MPNORM.VPOCHA(NLF,3)
  274. C Variables au centre
  275. RC=MPRC.VPOCHA(NLC,1)
  276. PC=MPPC.VPOCHA(NLC,1)
  277. UXC=MPVC.VPOCHA(NLC,1)
  278. UYC=MPVC.VPOCHA(NLC,2)
  279. UZC=MPVC.VPOCHA(NLC,3)
  280. GAMC=MPGAMC.VPOCHA(NLC,1)
  281. GM1=GAMC-1.0D0
  282. USGM1=1.0D0/GM1
  283. C
  284. C******* On calcule UN, UT
  285. C
  286. UNC=(UXC*CNX)+(UYC*CNY+(UZC*CNZ))
  287. C
  288. C******* Densite, vitesse, pression sur le bord
  289. C
  290. COEF=-1*SURF/VOLU
  291. C
  292. DRORO=UNC*COEF
  293. DROUX=(RC*CNX)*COEF
  294. DROUY=(RC*CNY)*COEF
  295. DROUZ=(RC*CNZ)*COEF
  296. DROP=0.0D0
  297. C
  298. DUXRO=(UNC*UXC)*COEF
  299. DUXUX=((RC*CNX*UXC)+(RC*UNC))*COEF
  300. DUXUY=((RC*CNY*UXC))*COEF
  301. DUXUZ=((RC*CNZ*UXC))*COEF
  302. DUXP=CNX*COEF
  303. C
  304. DUYRO=(UNC*UYC)*COEF
  305. DUYUX=((RC*CNX*UYC))*COEF
  306. DUYUY=((RC*CNY*UYC)+(RC*UNC))*COEF
  307. DUYUZ=((RC*CNZ*UYC))*COEF
  308. DUYP=CNY*COEF
  309. C
  310. DUZRO=(UNC*UZC)*COEF
  311. DUZUX=((RC*CNX*UZC))*COEF
  312. DUZUY=((RC*CNY*UZC))*COEF
  313. DUZUZ=((RC*CNZ*UZC)+(RC*UNC))*COEF
  314. DUZP=CNZ*COEF
  315. C
  316. ECIN=0.5D0*((UXC*UXC)+(UYC*UYC)+(UZC*UZC))
  317. HIN=GAMC*USGM1*PC
  318. DPRO=(UNC*ECIN)*COEF
  319. DPUX=((CNX*HIN)+(RC*CNX*ECIN)+(RC*UNC*UXC))*COEF
  320. DPUY=((CNY*HIN)+(RC*CNY*ECIN)+(RC*UNC*UYC))*COEF
  321. DPUZ=((CNZ*HIN)+(RC*CNZ*ECIN)+(RC*UNC*UZC))*COEF
  322. DPP=(UNC*GAMC*USGM1)*COEF
  323. CC
  324. CC******* Jacobian with respect to conservative variables
  325. CC
  326. IF(IJAC.EQ.1)THEN
  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.  
  398. ENDIF
  399. ENDDO
  400. C
  401. SEGDES MELEFC
  402. C
  403. SEGSUP MLEMC
  404. SEGSUP MLEMCB
  405. SEGSUP MLEMF
  406. C
  407. SEGDES MPNORM
  408. SEGDES MPVOL
  409. SEGDES MPSURF
  410. SEGDES MPRC
  411. SEGDES MPPC
  412. SEGDES MPVC
  413. SEGDES MPGAMC
  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.  

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