Télécharger cli162.eso

Retour à la liste

Numérotation des lignes :

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

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