Télécharger cli223.eso

Retour à la liste

Numérotation des lignes :

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

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