Télécharger cli162.eso

Retour à la liste

Numérotation des lignes :

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

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