Télécharger cli223.eso

Retour à la liste

Numérotation des lignes :

cli223
  1. C CLI223 SOURCE OF166741 24/12/13 21:15:33 12097
  2. SUBROUTINE CLI223(NSP,MELEMF,MELEMC,MELECB,MELEFC,MELRES,INORM,
  3. & ICHPVO,ICHPSU,LRECP,LRECV,
  4. & IROC,IVITC,IPC,IYC,ICHLIM,ILIINC,ILIINP,IJAC,IJACO)
  5. C************************************************************************
  6. C
  7. C PROJET : CASTEM 2000
  8. C
  9. C NOM : CLI223
  10. C
  11. C DESCRIPTION : Subroutine appellée par CLIM22
  12. C Jacobian de residu pres de limit
  13. C OPTION: 'INRI' 2D
  14. C
  15. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI)
  16. C
  17. C AUTEUR : S.Kudriakov, DEN/DM2S/SFME/LTMF
  18. C
  19. C************************************************************************
  20. C
  21. C APPELES (Calcul) :
  22. C
  23. C************************************************************************
  24. C
  25. C HISTORIQUE (Anomalies et modifications éventuelles)
  26. C
  27. C HISTORIQUE :
  28. C
  29. C************************************************************************
  30. C
  31. IMPLICIT INTEGER(I-N)
  32. INTEGER MELEMF,MELEMC,MELECB,INORM,ICHPVO,ICHPSU, IROC,IVITC,IPC
  33. & ,IGAMC,ICHLIM,ICEL,NFAC,IFAC,MELRES,IJACO
  34. & ,NGF,NGC,NLF,NLC,NLCB
  35. & ,ILIINC,ILIINP,IJAC,II,JJ,K
  36. & ,MP, NBEL, NBME, NBSOUS, NKID, NKMT, NMATRI, NP, NRIGE
  37. & ,NSP,I, IYC,J, LRECP,LRECV,KV
  38. REAL*8 VOLU,SURF,RC,PC,UXC,UYC,GAMC,CNX,CNY,CTX,CTY
  39. & ,RF,PF,UXF,UYF
  40. & ,UNC,UNF,UTF,SF,ASONC,ASONF,ASON
  41. & ,USGM1,G1,G3,ASON2,S,UT,UN,RHO,P,UX,UY
  42. & ,DUNDG1,DASDG1,DRHDG1,DPDG1,DUXDG1,DUYDG1
  43. & ,DFRDG1,DFMXG1,DFMYG1,DFEDG1
  44. & ,DG1DR,DG1DP,DG1DUX,DG1DUY,COEF,DACDG
  45. & ,BR1,BOT,TOP,GAMF
  46. c & ,EPS,CACCA,CACC1,CEL
  47.  
  48. CHARACTER*(8) TYPE
  49.  
  50. -INC PPARAM
  51. -INC CCOPTIO
  52. -INC SMLMOTS
  53. -INC SMELEME
  54. POINTEUR MELEFC.MELEME
  55. -INC SMLENTI
  56. POINTEUR MLEMC.MLENTI, MLEMCB.MLENTI,MLEMF.MLENTI
  57. -INC SMCHPOI
  58. POINTEUR MPNORM.MPOVAL, MPVOL.MPOVAL, MPSURF.MPOVAL, MPRC.MPOVAL,
  59. & MPVC.MPOVAL, MPPC.MPOVAL, MPLIM.MPOVAL, MPYC.MPOVAL
  60. POINTEUR CELL.IZAFM
  61. C-------------------------------------------------------
  62. -INC SMLREEL
  63. POINTEUR MLRECP.MLREEL, MLRECV.MLREEL
  64. C-------------------------------------------------------
  65. C********* Les Jacobians ******************************
  66. C-------------------------------------------------------
  67. SEGMENT JACEL
  68. REAL*8 JAC(3+NSP,3+NSP)
  69. ENDSEGMENT
  70. POINTEUR JTL.JACEL, WL.JACEL, JTT.JACEL
  71. C-------------------------------------------------------------
  72. C******* Les fractionines massiques **************************
  73. C-------------------------------------------------------------
  74. SEGMENT FRAMAS
  75. REAL*8 YET(NSP)
  76. ENDSEGMENT
  77. POINTEUR YC.FRAMAS, YF.FRAMAS
  78. C-------------------------------------------------------
  79. C********** Les CP's and CV's ***********************
  80. C-------------------------------------------------------
  81. SEGMENT GCONST
  82. REAL*8 GC(NSP)
  83. ENDSEGMENT
  84. POINTEUR CP.GCONST, CV.GCONST
  85. C-------------------------------------------------------------
  86. C********** Segments for the vectors ***********************
  87. C-------------------------------------------------------------
  88. SEGMENT VECEL
  89. REAL*8 VV(NSP)
  90. ENDSEGMENT
  91. POINTEUR DYDG1.VECEL, DFRYG1.VECEL,
  92. & DG1DY.VECEL, DGDYC.VECEL
  93. C----------------------------------------------------
  94. SEGINI JTL
  95. SEGINI JTT
  96. SEGINI WL
  97. C----------------------------------------------------
  98. C**** KRIPAD pour la correspondance global/local
  99. C----------------------------------------------------
  100. CALL KRIPAD(MELEMC,MLEMC)
  101. CALL KRIPAD(MELECB,MLEMCB)
  102. CALL KRIPAD(MELEMF,MLEMF)
  103. C----------------------------------------------------
  104. C**** CHPOINTs de la table DOMAINE
  105. C----------------------------------------------------
  106. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  107. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  108. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  109. C----------------------------------------------------
  110. C**** CHPOINTs des variables
  111. C----------------------------------------------------
  112. CALL LICHT(IROC,MPRC,TYPE,ICEL)
  113. CALL LICHT(IVITC,MPVC,TYPE,ICEL)
  114. CALL LICHT(IPC,MPPC,TYPE,ICEL)
  115. CALL LICHT(IYC,MPYC,TYPE,ICEL)
  116. CALL LICHT(ICHLIM,MPLIM,TYPE,ICEL)
  117. C--------------------------------------------------------
  118. C**** Boucle sur le face pour le calcul des invariants de
  119. C Riemann et du flux
  120. C--------------------------------------------------------
  121. SEGACT MELEFC
  122. NFAC=MELEFC.NUM(/2)
  123. C---------------------------------
  124. C**** Objet MATRIK
  125. C---------------------------------
  126. NRIGE = 7
  127. NMATRI = 1
  128. NKID = 9
  129. NKMT = 7
  130. C---------------------------------
  131. SEGINI MATRIK
  132. IJACO = MATRIK
  133. MATRIK.IRIGEL(1,1) = MELRES
  134. MATRIK.IRIGEL(2,1) = MELRES
  135. C---------------------------------
  136. C**** Matrice non symetrique
  137. C---------------------------------
  138. MATRIK.IRIGEL(7,1) = 2
  139. C---------------------------------
  140. NBME = (3+NSP)*(3+NSP)
  141. NBSOUS = 1
  142. SEGINI IMATRI
  143. IF(IJAC.EQ.1)THEN
  144. MLMOTS=ILIINC
  145. ELSEIF(IJAC.EQ.2)THEN
  146. MLMOTS=ILIINP
  147. ENDIF
  148. SEGACT MLMOTS
  149. MATRIK.IRIGEL(4,1) = IMATRI
  150. C-------------------------------------------
  151. DO 1 J=1,(NSP+3)
  152. KV=(J-1)*(3+NSP)
  153. IMATRI.LISPRI(KV+1) = MLMOTS.MOTS(1)
  154. IMATRI.LISPRI(KV+2) = MLMOTS.MOTS(2)
  155. IMATRI.LISPRI(KV+3) = MLMOTS.MOTS(3)
  156. IMATRI.LISPRI(KV+4) = MLMOTS.MOTS(4)
  157. DO 2 I=1,(NSP-1)
  158. IMATRI.LISPRI(KV+4+I) = MLMOTS.MOTS(4+I)
  159. 2 CONTINUE
  160. 1 CONTINUE
  161. C-----------------------------------------------
  162. SEGDES MLMOTS
  163. MLMOTS=ILIINC
  164. SEGACT MLMOTS
  165. C-----------------------------------------------
  166. DO 3 J=1,(NSP+3)
  167. KV=(J-1)*(3+NSP)
  168. IMATRI.LISDUA(KV+1) = MLMOTS.MOTS(j)
  169. IMATRI.LISDUA(KV+2) = MLMOTS.MOTS(j)
  170. IMATRI.LISDUA(KV+3) = MLMOTS.MOTS(j)
  171. IMATRI.LISDUA(KV+4) = MLMOTS.MOTS(j)
  172. DO 4 I=1,(NSP-1)
  173. IMATRI.LISDUA(KV+4+I) = MLMOTS.MOTS(j)
  174. 4 CONTINUE
  175. 3 CONTINUE
  176. C-----------------------------------------------
  177. C-----------------------------------------------
  178. SEGDES MLMOTS
  179. NBEL = NFAC
  180. NBSOUS = 1
  181. NP = 1
  182. MP = 1
  183. C-----------------------------------------------------------
  184. C-----------------------------------------------------------
  185. DO 5 I=1,NBME
  186. SEGINI CELL
  187. IMATRI.LIZAFM(1,I) = CELL
  188. 5 CONTINUE
  189. C---------------------------------
  190. C---------------------------------
  191. C---------------------------------
  192. C**** Fin definition MATRIK
  193. C---------------------------------
  194. DO IFAC=1,NFAC,1
  195. NGF=MELEFC.NUM(1,IFAC)
  196. NGC=MELEFC.NUM(2,IFAC)
  197. NLF=MLEMF.LECT(NGF)
  198. NLC=MLEMC.LECT(NGC)
  199. NLCB=MLEMCB.LECT(NGF)
  200. VOLU=MPVOL.VPOCHA(NLC,1)
  201. SURF=MPSURF.VPOCHA(NLF,1)
  202. C In CASTEM les normales sont sortantes
  203. CNX=-1*MPNORM.VPOCHA(NLF,1)
  204. CNY=-1*MPNORM.VPOCHA(NLF,2)
  205. CTX=-1.0D0*CNY
  206. CTY=CNX
  207. C----------------------------------------------
  208. SEGINI CP, CV
  209. MLRECP = LRECP
  210. MLRECV = LRECV
  211. SEGACT MLRECP, MLRECV
  212. DO 10 I=1,(NSP-1)
  213. CP.GC(I)=MLRECP.PROG(I)
  214. CV.GC(I)=MLRECV.PROG(I)
  215. 10 CONTINUE
  216. CP.GC(NSP)=MLRECP.PROG(NSP)
  217. CV.GC(NSP)=MLRECV.PROG(NSP)
  218. C---------------------------------
  219. C Variables au centre
  220. C---------------------------------
  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. SEGINI YC
  226. SEGACT MPYC
  227. DO 100 I=1,(NSP-1)
  228. YC.YET(I)=MPYC.VPOCHA(NLC,I)
  229. 100 CONTINUE
  230. C---------------------------------
  231. C Variables à la face
  232. C---------------------------------
  233. RF=MPLIM.VPOCHA(NLCB,1)
  234. UXF=MPLIM.VPOCHA(NLCB,2)
  235. UYF=MPLIM.VPOCHA(NLCB,3)
  236. PF=MPLIM.VPOCHA(NLCB,IDIM+2)
  237. SEGINI YF
  238. SEGACT MPLIM
  239. DO 101 I=1,(NSP-1)
  240. YF.YET(I)=MPLIM.VPOCHA(NLCB,IDIM+2+I)
  241. 101 CONTINUE
  242. c-------------------------------------------------------------
  243. c Computing GAMMA at the cell-center
  244. c-------------------------------------------------------------
  245. top=0.0D0
  246. bot=0.0D0
  247. do 102 i=1,(nsp-1)
  248. top=top+yc.yet(i)*(cp.gc(i)-cp.gc(nsp))
  249. bot=bot+yc.yet(i)*(cv.gc(i)-cv.gc(nsp))
  250. 102 continue
  251. top=cp.gc(nsp)+top
  252. bot=cv.gc(nsp)+bot
  253. GAMC=top/bot
  254. C-------------------------------------------------------------
  255. SEGINI DGDYC
  256. do 41 i=1,(nsp-1)
  257. dgdyc.vv(i)=(cp.gc(i)-cp.gc(nsp)-
  258. & GAMC*(cv.gc(i)-cv.gc(nsp)))/bot
  259. 41 continue
  260. c-------------------------------------------------------------
  261. c Computing GAMMA at the face-center
  262. c-------------------------------------------------------------
  263. top=0.0D0
  264. bot=0.0D0
  265. do 103 i=1,(nsp-1)
  266. top=top+yf.yet(i)*(cp.gc(i)-cp.gc(nsp))
  267. bot=bot+yf.yet(i)*(cv.gc(i)-cv.gc(nsp))
  268. 103 continue
  269. top=cp.gc(nsp)+top
  270. bot=cv.gc(nsp)+bot
  271. GAMF=top/bot
  272. C--------------------------------------------------------------
  273. C******* On calcule UN, UT ASON, S
  274. C--------------------------------------------------------------
  275. UNC=(UXC*CNX)+(UYC*CNY)
  276. UNF=(UXF*CNX)+(UYF*CNY)
  277. UTF=(UXF*CTX)+(UYF*CTY)
  278. C---------------------------------
  279. ASONC=(GAMC*PC/RC)**0.5D0
  280. ASONF=(GAMF*PF/RF)**0.5D0
  281. C---------------------------------
  282. SF=PF/(RF**GAMF)
  283. C------------------------------------------------
  284. C******* Densite, vitesse, pression sur le bord
  285. C------------------------------------------------
  286. G1=UNC-(2.0D0*ASONC)/(GAMC-1.0D0)
  287. G3=UNF+(2.0D0*ASONF)/(GAMF-1.0D0)
  288. UN=0.5D0*(G1+G3)
  289. ASON=(0.5D0*(G3-G1))
  290. ASON=ASON*(GAMF-1.0D0)/2.0D0
  291. ASON2=ASON*ASON
  292. S=SF
  293. UT=UTF
  294. RHO=ASON2/(GAMF*S)
  295. RHO=RHO**(1.0D0/(GAMF-1.0D0))
  296. P=RHO*ASON2/GAMF
  297. UX=(UN*CNX)+(UT*CTX)
  298. UY=(UN*CNY)+(UT*CTY)
  299. C------------------------------
  300. C******* Derivatives
  301. C------------------------------
  302. SEGINI DYDG1
  303. DUNDG1=0.5D0
  304. DASDG1=-0.5D0*(GAMF-1.0D0)/2.0D0
  305. DRHDG1=GAMF*S
  306. DRHDG1=1.0D0/DRHDG1
  307. DRHDG1=DRHDG1**(1.0D0/(GAMF-1.0D0))
  308. DRHDG1=DRHDG1*2.0D0/(GAMF-1.0D0)
  309. DRHDG1=DRHDG1*(ASON**((3.0D0-GAMF)/(GAMF-1.0D0)))
  310. DRHDG1=DRHDG1*DASDG1
  311. DPDG1=((ASON2/GAMF)*DRHDG1)+(((2*ASON*RHO)/GAMF)*DASDG1)
  312. DO 104 I=1,(NSP-1)
  313. DYDG1.VV(I) = 0.0D0
  314. 104 CONTINUE
  315. CC------------------------------------------------------
  316. CC******* Test
  317. CC------------------------------------------------------
  318. c USGM1 = 1.0D0/(GAMF-1.0D0)
  319. c DFEDG1=(DUNDG1*GAMF*USGM1*P) + (UN*GAMF*USGM1*DPDG1) +
  320. cc & (0.5D0*DRHDG1*UN*((UN*UN)+(UT*UT))) +
  321. c & (0.5D0*RHO*DUNDG1*((UN*UN)+(UT*UT))) +
  322. c & (RHO*UN*UN*DUNDG1)
  323. c CACCA=UN*GAMF*USGM1*P + 0.5D0*RHO*UN*(UN*UN+UT*UT)
  324. cc---------------
  325. c DFRYG1.VV(1) = (DRHDG1*UN*YF.YET(1))+
  326. c & (RHO*DUNDG1*YF.YET(1))+(RHO*UN*DYDG1.VV(1))
  327. c CACC1 =RHO*UN*YF.YET(1)
  328. cc---------------
  329. c EPS=1.0D-8
  330. c G1=G1*(1+EPS)
  331. c CEL=UN
  332. c UN=0.5D0*(G1+G3)
  333. c write(*,*) DUNDG1, ((UN - CEL)/(EPS*G1))
  334. c CEL=ASON
  335. c ASON=(0.5D0*(G3-G1))
  336. c ASON=ASON*(GAMM-1.0D0)/2.0D0
  337. c write(*,*) DASDG1, ((ASON - CEL)/(EPS*G1))
  338. c ASON2=ASON*ASON
  339. c S=SF
  340. c UT=UTF
  341. c CEL=RHO
  342. c RHO=ASON2/(GAMF*S)
  343. c RHO=RHO**(1.0D0/(GAMF-1.0D0))
  344. c write(*,*) DRHDG1, ((RHO - CEL)/(EPS*G1))
  345. c CEL=P
  346. c P=RHO*ASON2/GAMF
  347. c write(*,*) DPDG1, ((P - CEL)/(EPS*G1))
  348. c CEL=CACCA
  349. c CACCA=UN*GAMF*USGM1*P + 0.5D0*RHO*UN*(UN*UN+UT*UT)
  350. c write(*,*) DFEDG1, ((CACCA - CEL)/(EPS*G1))
  351. c CEL=CACC1
  352. c CACCA =RHO*UN*YF.YET(1)
  353. c write(*,*) DFRYG1.VV(1), ((CACCA - CEL)/(EPS*G1))
  354. CC
  355. CC************************************************************
  356. CC
  357. DUXDG1=DUNDG1*CNX
  358. DUYDG1=DUNDG1*CNY
  359. C--------------------------------------------------------------
  360. C ------- Be carefull here for outlet BC !!!!!!!!!!!!!!!!!!!!
  361. C--------------------------------------------------------------
  362. SEGINI DFRYG1
  363. USGM1 = 1.0D0/(GAMF-1.0D0)
  364. DFRDG1=(DRHDG1*UN)+(RHO*DUNDG1)
  365. DFMXG1=(DRHDG1*UN*UX)+(RHO*DUNDG1*UX)+
  366. & (RHO*UN*DUXDG1)+(DPDG1*CNX)
  367. DFMYG1=(DRHDG1*UN*UY)+(RHO*DUNDG1*UY)+
  368. & (RHO*UN*DUYDG1)+(DPDG1*CNY)
  369. DFEDG1=(DUNDG1*GAMF*USGM1*P) + (UN*GAMF*USGM1*DPDG1) +
  370. & (0.5D0*DRHDG1*UN*((UN*UN)+(UT*UT))) +
  371. & (0.5D0*RHO*DUNDG1*((UN*UN)+(UT*UT))) +
  372. & (RHO*UN*UN*DUNDG1)
  373. DO 105 I=1,(NSP-1)
  374. DFRYG1.VV(I) = (DRHDG1*UN*YF.YET(I))+
  375. & (RHO*DUNDG1*YF.YET(I))+(RHO*UN*DYDG1.VV(I))
  376. 105 CONTINUE
  377. C-----------------------------------------------------
  378. C******* Jacobian with respect to primitive variables
  379. C-----------------------------------------------------
  380. SEGINI DG1DY
  381. USGM1 = 1.0D0/(GAMC-1.0D0)
  382. DG1DR=USGM1*ASONC/RC
  383. DG1DP=-1.0D0*USGM1*ASONC/PC
  384. DG1DUX=CNX
  385. DG1DUY=CNY
  386. DACDG=0.5D0*ASONC/GAMC
  387. DO 106 I=1,(NSP-1)
  388. DG1DY.VV(I)=2.0D0*USGM1*(ASONC*USGM1-DACDG)*
  389. & dgdyc.vv(i)
  390. 106 CONTINUE
  391. C----------------------------------------
  392. COEF=SURF/VOLU
  393. C----------------------------------------
  394. JTL.JAC(1,1) = DFRDG1*DG1DR*COEF
  395. JTL.JAC(1,2) = DFRDG1*DG1DUX*COEF
  396. JTL.JAC(1,3) = DFRDG1*DG1DUY*COEF
  397. JTL.JAC(1,4) = DFRDG1*DG1DP*COEF
  398. DO 107 I=1,(NSP-1)
  399. JTL.JAC(1,4+I) = DFRDG1*DG1DY.VV(I)*COEF
  400. 107 CONTINUE
  401. c CACCA = G1
  402. c top=0.0D0
  403. c bot=0.0D0
  404. c yc.yet(1) = yc.yet(1)+EPS
  405. c do 1023 i=1,(nsp-1)
  406. c top=top+yc.yet(i)*(cp.gc(i)-cp.gc(nsp))
  407. c bot=bot+yc.yet(i)*(cv.gc(i)-cv.gc(nsp))
  408. c 1023 continue
  409. c top=cp.gc(nsp)+top
  410. c bot=cv.gc(nsp)+bot
  411. c GAMC=top/bot
  412. c ASONC=(GAMC*PC/RC)**(0.5D0)
  413. c GAMM = 0.5D0*(GAMC+GAMF)
  414. c G1=UNC-(2.0D0*ASONC)/(GAMC-1.0D0)
  415. c G3=UNF+(2.0D0*ASONF)/(GAMF-1.0D0)
  416. c UN=0.5D0*(G1+G3)
  417. c ASON=(0.5D0*(G3-G1))
  418. c ASON=ASON*(GAMM-1.0D0)/2.0D0
  419. c ASON2=ASON*ASON
  420. c S=SF
  421. c UT=UTF
  422. c RHO=ASON2/(GAMF*S)
  423. c RHO=RHO**(1.0D0/(GAMF-1.0D0))
  424. c CEL=CACCA
  425. c CACCA=G1
  426. C----------------------------------------
  427. JTL.JAC(2,1) = DFMXG1*DG1DR*COEF
  428. JTL.JAC(2,2) = DFMXG1*DG1DUX*COEF
  429. JTL.JAC(2,3) = DFMXG1*DG1DUY*COEF
  430. JTL.JAC(2,4) = DFMXG1*DG1DP*COEF
  431. DO 108 I=1,(NSP-1)
  432. JTL.JAC(2,4+I) = DFMXG1*DG1DY.VV(I)*COEF
  433. 108 CONTINUE
  434. C----------------------------------------
  435. JTL.JAC(3,1) = DFMYG1*DG1DR*COEF
  436. JTL.JAC(3,2) = DFMYG1*DG1DUX*COEF
  437. JTL.JAC(3,3) = DFMYG1*DG1DUY*COEF
  438. JTL.JAC(3,4) = DFMYG1*DG1DP*COEF
  439. DO 109 I=1,(NSP-1)
  440. JTL.JAC(3,4+I) = DFMYG1*DG1DY.VV(I)*COEF
  441. 109 CONTINUE
  442. C----------------------------------------
  443. JTL.JAC(4,1) = DFEDG1*DG1DR*COEF
  444. JTL.JAC(4,2) = DFEDG1*DG1DUX*COEF
  445. JTL.JAC(4,3) = DFEDG1*DG1DUY*COEF
  446. JTL.JAC(4,4) = DFEDG1*DG1DP*COEF
  447. DO 110 I=1,(NSP-1)
  448. JTL.JAC(4,4+I) = DFEDG1*DG1DY.VV(I)*COEF
  449. 110 CONTINUE
  450. C----------------------------------------
  451. DO 111 I=1,(NSP-1)
  452. JTL.JAC(4+I,1) = DFRYG1.VV(I)*DG1DR*COEF
  453. JTL.JAC(4+I,2) = DFRYG1.VV(I)*DG1DUX*COEF
  454. JTL.JAC(4+I,3) = DFRYG1.VV(I)*DG1DUY*COEF
  455. JTL.JAC(4+I,4) = DFRYG1.VV(I)*DG1DP*COEF
  456. DO 112 J=1,(NSP-1)
  457. JTL.JAC(4+I,4+J) = DFRYG1.VV(I)*DG1DY.VV(J)*COEF
  458. 112 CONTINUE
  459. 111 CONTINUE
  460. C---------------------------------------------------------
  461. c matrix wl(i,j) represents the derivative of the i-component
  462. c of the vector of primitive variables of the left state with
  463. c respect to the j-component of the vector of the conservative
  464. c variables of the left state.
  465. c
  466. c Here: (rho, ux, uy, p, Y_1,...,Y_(nsp-1)) -
  467. c vector of primitive variables;
  468. c (rho, rho ux, rho uy, rho e, rho Y_1,..., rho Y_(nsp-1)) -
  469. c vector of conservative variables.
  470. c-------------------------------------------------------------
  471. wl.jac(1,1)=1.0d0
  472. wl.jac(1,2)=0.0d0
  473. wl.jac(1,3)=0.0d0
  474. wl.jac(1,4)=0.0d0
  475. do 83 i=1,(nsp-1)
  476. wl.jac(1,4+i)=0.0d0
  477. 83 continue
  478. c------------------------------
  479. wl.jac(2,1)=-UXC/RC
  480. wl.jac(2,2)=1.0d0/RC
  481. wl.jac(2,3)=0.0d0
  482. wl.jac(2,4)=0.0d0
  483. do 84 i=1,(nsp-1)
  484. wl.jac(2,4+i)=0.0d0
  485. 84 continue
  486. c------------------------------
  487. wl.jac(3,1)=-UYC/RC
  488. wl.jac(3,2)=0.0d0
  489. wl.jac(3,3)=1.0d0/RC
  490. wl.jac(3,4)=0.0d0
  491. do 85 i=1,(nsp-1)
  492. wl.jac(3,4+i)=0.0d0
  493. 85 continue
  494. c------------------------------
  495. br1=0.0d0
  496. do 86 i=1,(nsp-1)
  497. br1=br1+dgdyc.vv(i)*yc.yet(i)
  498. 86 continue
  499. br1=br1*PC/(RC*(GAMC-1.0D0))
  500. wl.jac(4,1)=(GAMC-1.0D0)*(UXC*UXC+UYC*UYC)/2.0d0-br1
  501. wl.jac(4,2)=-UXC*(GAMC-1.0D0)
  502. wl.jac(4,3)=-UYC*(GAMC-1.0D0)
  503. wl.jac(4,4)=(GAMC-1.0D0)
  504. do 87 i=1,(nsp-1)
  505. wl.jac(4,4+i)=dgdyc.vv(i)*PC/(RC*(GAMC-1.0D0))
  506. 87 continue
  507. c------------------------------
  508. do 88 i=1,(nsp-1)
  509. do 89 j=1,4
  510. wl.jac(4+i,j)=0.0d0
  511. if(j.eq.1) wl.jac(4+i,j)=-yc.yet(i)/RC
  512. 89 continue
  513. c------------
  514. do 890 j=5,(4+nsp-1)
  515. wl.jac(4+i,j)=0.0d0
  516. if(4+i.eq.j) then
  517. wl.jac(4+i,j)=1.0d0/RC
  518. endif
  519. 890 continue
  520. 88 continue
  521. c------------------------------------------------
  522. C------------------------------------------------
  523. do 114 i=1,(3+nsp)
  524. do 115 j=1,(3+nsp)
  525. jtt.jac(i,j)=0.0d0
  526. do 116 k=1,(3+nsp)
  527. jtt.jac(i,j)=jtt.jac(i,j)+jtl.jac(i,k)*wl.jac(k,j)
  528. 116 continue
  529. 115 continue
  530. 114 continue
  531. C----------------------------------------------------------------
  532. C******* Jacobian with respect to conservative variables
  533. C----------------------------------------------------------------
  534. IF(IJAC.EQ.1)THEN
  535. DO 9 II = 1,(3+NSP)
  536. DO 15 JJ = 1,(3+NSP)
  537. KV = (II-1)*(3+NSP)
  538. C----------------------------------
  539. CELL = IMATRI.LIZAFM(1,KV+JJ)
  540. CELL.AM(IFAC,1,1) = JTT.JAC(II,JJ)
  541. 15 CONTINUE
  542. 9 CONTINUE
  543. ELSEIF(IJAC.EQ.2)THEN
  544. DO 20 II = 1,(3+NSP)
  545. DO 25 JJ = 1,(3+NSP)
  546. KV = (II-1)*(3+NSP)
  547. C----------------------------------
  548. CELL = IMATRI.LIZAFM(1,KV+JJ)
  549. CELL.AM(IFAC,1,1) = JTL.JAC(II,JJ)
  550. 25 CONTINUE
  551. 20 CONTINUE
  552. ENDIF
  553. c--------------------------------------------------
  554. ENDDO
  555. C
  556. SEGDES MELEFC
  557. C
  558. SEGSUP MLEMC
  559. SEGSUP MLEMCB
  560. SEGSUP MLEMF
  561. C
  562. SEGDES MPNORM
  563. SEGDES MPVOL
  564. SEGDES MPSURF
  565. SEGDES MPRC
  566. SEGDES MPPC
  567. SEGDES MPVC
  568. SEGDES MPYC
  569. SEGDES MPLIM
  570. SEGDES YC
  571. SEGDES YF
  572. SEGDES CP
  573. SEGDES CV
  574. SEGDES JTL
  575. SEGDES JTT
  576. SEGDES WL
  577. SEGDES DYDG1, DFRYG1,
  578. & DG1DY, DGDYC
  579. SEGDES MATRIK
  580. DO 80 II=1,NBME
  581. CELL = IMATRI.LIZAFM(1,II)
  582. SEGDES CELL
  583. 80 CONTINUE
  584. SEGDES IMATRI
  585. C---------------------------------------------
  586. 9999 CONTINUE
  587. RETURN
  588. END
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  

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