Télécharger cli183.eso

Retour à la liste

Numérotation des lignes :

cli183
  1. C CLI183 SOURCE OF166741 24/12/13 21:15:28 12097
  2. SUBROUTINE CLI183(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 : CLI183
  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, MPLIM.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. INTEGER MELEMF,MELEMC,MELECB,INORM,ICHPVO,ICHPSU, IROC,IVITC,IPC
  49. & ,IGAMC,ICHLIM,ICEL,NFAC,IFAC,MELRES,IJACO
  50. & ,NGF,NGC,NLF,NLC,NLCB
  51. & ,ILIINC,ILIINP,IJAC
  52. & ,MP, NBEL, NBME, NBSOUS, NKID, NKMT, NMATRI, NP, NRIGE
  53. REAL*8 VOLU,SURF,GAMC,CNX,CNY,CNZ,GM1
  54. & ,RC,UXC,UYC,UZC,CC,UNC
  55. & ,PC,PSRF,RHOUF,P,RHO,UN,ACEL,BCEL,CCEL,PSTAR,UX,UY,UZ,ECIN
  56. & ,DADR,DADP,DBDR,DBDP,DBDUX,DBDUY,DBDUZ,DCDP
  57. & ,DPSDA,DPSDB,DPSDC,DPDR,DPDP,DPDUX,DPDUY,DPDUZ
  58. & ,DUXDP,DUYDP,DUZDP,DECINP,DF2DP,DF3DP,DF4DP,DF5DP
  59. & ,DRORO,DROUX,DROUY,DROP
  60. & ,DUXRO,DUXUX,DUXUY,DUXP
  61. & ,DUYRO,DUYUX,DUYUY,DUYP
  62. & ,DPRO,DPUX,DPUY,DPP
  63. & ,COEF1,COEF2,COEF3,COEF,COEF4
  64. & ,DROUZ,DUXUZ,DUYUZ,DPUZ
  65. & ,DUZRO,DUZUX,DUZUY,DUZUZ,DUZP
  66. C & ,YCAC,YCAC2,YCAC3,YCAC4,XCAC,F1,F2,F3,F4,F5,USGM1
  67. CHARACTER*(8) TYPE
  68. C
  69. C
  70. C**** KRIPAD pour la correspondance global/local
  71. C
  72. CALL KRIPAD(MELEMC,MLEMC)
  73. C SEGINI MLEMC
  74. CALL KRIPAD(MELECB,MLEMCB)
  75. C SEGINI MLEMCB
  76. CALL KRIPAD(MELEMF,MLEMF)
  77. C SEGINI MLEMF
  78. C
  79. C**** CHPOINTs de la table DOMAINE
  80. C
  81. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  82. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  83. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  84. C
  85. C**** LICHT active les MPOVALs en *MOD
  86. C
  87. C SEGACT MPNORM*MOD
  88. C SEGACT MPOVSU*MOD
  89. C SEGACT MPOVOL*MOD
  90. C
  91. C
  92. C**** CHPOINTs des variables
  93. C
  94. CALL LICHT(IROC,MPRC,TYPE,ICEL)
  95. CALL LICHT(IVITC,MPVC,TYPE,ICEL)
  96. CALL LICHT(IPC,MPPC,TYPE,ICEL)
  97. CALL LICHT(IGAMC,MPGAMC,TYPE,ICEL)
  98. CALL LICHT(ICHLIM,MPLIM,TYPE,ICEL)
  99. C
  100. C SEGACT *MOD
  101. C SEGACT *MOD
  102. C SEGACT *MOD
  103. C SEGACT *MOD
  104. C SEGACT *MOD
  105. C
  106. C
  107. C**** Boucle sur le face pour le calcul des invariants de
  108. C Riemann et du flux
  109. C
  110. SEGACT MELEFC
  111. NFAC=MELEFC.NUM(/2)
  112. C
  113. C**** Objet MATRIK
  114. C
  115. NRIGE = 7
  116. NMATRI = 1
  117. NKID = 9
  118. NKMT = 7
  119. C
  120. SEGINI MATRIK
  121. IJACO = MATRIK
  122. MATRIK.IRIGEL(1,1) = MELRES
  123. MATRIK.IRIGEL(2,1) = MELRES
  124. C
  125. C**** Matrice non symetrique
  126. C
  127. MATRIK.IRIGEL(7,1) = 2
  128. C
  129. NBME = 25
  130. NBSOUS = 1
  131. SEGINI IMATRI
  132. IF(IJAC.EQ.1)THEN
  133. MLMOTS=ILIINC
  134. ELSEIF(IJAC.EQ.2)THEN
  135. MLMOTS=ILIINP
  136. ENDIF
  137. SEGACT MLMOTS
  138. MATRIK.IRIGEL(4,1) = IMATRI
  139. C
  140. IMATRI.LISPRI(1) = MLMOTS.MOTS(1)
  141. IMATRI.LISPRI(2) = MLMOTS.MOTS(2)
  142. IMATRI.LISPRI(3) = MLMOTS.MOTS(3)
  143. IMATRI.LISPRI(4) = MLMOTS.MOTS(4)
  144. IMATRI.LISPRI(5) = MLMOTS.MOTS(5)
  145. C
  146. IMATRI.LISPRI(6) = MLMOTS.MOTS(1)
  147. IMATRI.LISPRI(7) = MLMOTS.MOTS(2)
  148. IMATRI.LISPRI(8) = MLMOTS.MOTS(3)
  149. IMATRI.LISPRI(9) = MLMOTS.MOTS(4)
  150. IMATRI.LISPRI(10) = MLMOTS.MOTS(5)
  151. C
  152. IMATRI.LISPRI(11) = MLMOTS.MOTS(1)
  153. IMATRI.LISPRI(12) = MLMOTS.MOTS(2)
  154. IMATRI.LISPRI(13) = MLMOTS.MOTS(3)
  155. IMATRI.LISPRI(14) = MLMOTS.MOTS(4)
  156. IMATRI.LISPRI(15) = MLMOTS.MOTS(5)
  157. C
  158. IMATRI.LISPRI(16) = MLMOTS.MOTS(1)
  159. IMATRI.LISPRI(17) = MLMOTS.MOTS(2)
  160. IMATRI.LISPRI(18) = MLMOTS.MOTS(3)
  161. IMATRI.LISPRI(19) = MLMOTS.MOTS(4)
  162. IMATRI.LISPRI(20) = MLMOTS.MOTS(5)
  163. C
  164. IMATRI.LISPRI(21) = MLMOTS.MOTS(1)
  165. IMATRI.LISPRI(22) = MLMOTS.MOTS(2)
  166. IMATRI.LISPRI(23) = MLMOTS.MOTS(3)
  167. IMATRI.LISPRI(24) = MLMOTS.MOTS(4)
  168. IMATRI.LISPRI(25) = MLMOTS.MOTS(5)
  169. C
  170. SEGDES MLMOTS
  171. MLMOTS=ILIINC
  172. SEGACT MLMOTS
  173. C
  174. C
  175. IMATRI.LISDUA(1) = MLMOTS.MOTS(1)
  176. IMATRI.LISDUA(2) = MLMOTS.MOTS(1)
  177. IMATRI.LISDUA(3) = MLMOTS.MOTS(1)
  178. IMATRI.LISDUA(4) = MLMOTS.MOTS(1)
  179. IMATRI.LISDUA(5) = MLMOTS.MOTS(1)
  180. C
  181. IMATRI.LISDUA(6) = MLMOTS.MOTS(2)
  182. IMATRI.LISDUA(7) = MLMOTS.MOTS(2)
  183. IMATRI.LISDUA(8) = MLMOTS.MOTS(2)
  184. IMATRI.LISDUA(9) = MLMOTS.MOTS(2)
  185. IMATRI.LISDUA(10) = MLMOTS.MOTS(2)
  186. C
  187. IMATRI.LISDUA(11) = MLMOTS.MOTS(3)
  188. IMATRI.LISDUA(12) = MLMOTS.MOTS(3)
  189. IMATRI.LISDUA(13) = MLMOTS.MOTS(3)
  190. IMATRI.LISDUA(14) = MLMOTS.MOTS(3)
  191. IMATRI.LISDUA(15) = MLMOTS.MOTS(3)
  192. C
  193. IMATRI.LISDUA(16) = MLMOTS.MOTS(4)
  194. IMATRI.LISDUA(17) = MLMOTS.MOTS(4)
  195. IMATRI.LISDUA(18) = MLMOTS.MOTS(4)
  196. IMATRI.LISDUA(19) = MLMOTS.MOTS(4)
  197. IMATRI.LISDUA(20) = MLMOTS.MOTS(4)
  198. C
  199. IMATRI.LISDUA(21) = MLMOTS.MOTS(5)
  200. IMATRI.LISDUA(22) = MLMOTS.MOTS(5)
  201. IMATRI.LISDUA(23) = MLMOTS.MOTS(5)
  202. IMATRI.LISDUA(24) = MLMOTS.MOTS(5)
  203. IMATRI.LISDUA(25) = MLMOTS.MOTS(5)
  204. C
  205. SEGDES MLMOTS
  206. NBEL = NFAC
  207. NBSOUS = 1
  208. NP = 1
  209. MP = 1
  210. SEGINI RR , RUX , RUY , RUZ ,RRET ,
  211. & UXR , UXUX , UXUY , UXUZ ,UXRET ,
  212. & UYR , UYUX , UYUY , UYUZ , UYRET ,
  213. & UZR , UZUX , UZUY , UZUZ , UZRET ,
  214. & RETR , RETUX , RETUY, RETUZ , RETRET
  215. C
  216. C**** Duale = IMATRI.LISDUA(1) = 'RN'
  217. C Primale = IMATRI.LISPRI(1) = 'RN'
  218. C -> IMATRI.LIZAFM(1,1) = RR
  219. C
  220. IMATRI.LIZAFM(1,1) = RR
  221. IMATRI.LIZAFM(1,2) = RUX
  222. IMATRI.LIZAFM(1,3) = RUY
  223. IMATRI.LIZAFM(1,4) = RUZ
  224. IMATRI.LIZAFM(1,5) = RRET
  225. C
  226. IMATRI.LIZAFM(1,6) = UXR
  227. IMATRI.LIZAFM(1,7) = UXUX
  228. IMATRI.LIZAFM(1,8) = UXUY
  229. IMATRI.LIZAFM(1,9) = UXUZ
  230. IMATRI.LIZAFM(1,10) = UXRET
  231. C
  232. IMATRI.LIZAFM(1,11) = UYR
  233. IMATRI.LIZAFM(1,12) = UYUX
  234. IMATRI.LIZAFM(1,13) = UYUY
  235. IMATRI.LIZAFM(1,14) = UYUZ
  236. IMATRI.LIZAFM(1,15) = UYRET
  237. C
  238. IMATRI.LIZAFM(1,16) = UZR
  239. IMATRI.LIZAFM(1,17) = UZUX
  240. IMATRI.LIZAFM(1,18) = UZUY
  241. IMATRI.LIZAFM(1,19) = UZUZ
  242. IMATRI.LIZAFM(1,20) = UZRET
  243. C
  244. IMATRI.LIZAFM(1,21) = RETR
  245. IMATRI.LIZAFM(1,22) = RETUX
  246. IMATRI.LIZAFM(1,23) = RETUY
  247. IMATRI.LIZAFM(1,24) = RETUZ
  248. IMATRI.LIZAFM(1,25) = RETRET
  249. C
  250. SEGDES MATRIK
  251. SEGDES IMATRI
  252. C
  253. C**** Fin definition MATRIK
  254. C
  255. DO IFAC=1,NFAC,1
  256. NGF=MELEFC.NUM(1,IFAC)
  257. NGC=MELEFC.NUM(2,IFAC)
  258. NLF=MLEMF.LECT(NGF)
  259. NLC=MLEMC.LECT(NGC)
  260. NLCB=MLEMCB.LECT(NGF)
  261. VOLU=MPVOL.VPOCHA(NLC,1)
  262. SURF=MPSURF.VPOCHA(NLF,1)
  263. C In CASTEM les normales sont sortantes
  264. CNX=-1*MPNORM.VPOCHA(NLF,1)
  265. CNY=-1*MPNORM.VPOCHA(NLF,2)
  266. CNZ=-1*MPNORM.VPOCHA(NLF,3)
  267. C Variables au centre
  268. RC=MPRC.VPOCHA(NLC,1)
  269. PC=MPPC.VPOCHA(NLC,1)
  270. UXC=MPVC.VPOCHA(NLC,1)
  271. UYC=MPVC.VPOCHA(NLC,2)
  272. UZC=MPVC.VPOCHA(NLC,3)
  273. GAMC=MPGAMC.VPOCHA(NLC,1)
  274. UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ)
  275. CC=GAMC*PC/RC
  276. CC=CC**0.5D0
  277. GM1=GAMC-1.0D0
  278. C Variables à la face
  279. RHOUF=MPLIM.VPOCHA(NLCB,1)
  280. PSRF=MPLIM.VPOCHA(NLCB,2)
  281. C
  282. C******* Variables à l'interface
  283. C
  284. ACEL=CC/GAMC
  285. BCEL=ACEL - UNC
  286. CCEL=(RHOUF / PC) * PSRF
  287. PSTAR=BCEL+(((BCEL*BCEL) + (4*ACEL*CCEL))**0.5D0)
  288. PSTAR=PSTAR/(2*ACEL)
  289. P=PSTAR*PC
  290. RHO=P/PSRF
  291. UN=RHOUF/RHO
  292. UX=UN*CNX
  293. UY=UN*CNY
  294. UZ=UN*CNZ
  295. ECIN=0.5D0*((UX*UX)+(UY*UY)+(UZ*UZ))
  296. C
  297. C******* Derivatives of ACEL, BCEL, CCEL with respect to the
  298. C variables at centers
  299. C
  300. DADR = -0.5D0*CC/(RC*GAMC)
  301. DADP = 0.5D0*CC/(PC*GAMC)
  302. DBDR = DADR
  303. DBDP = DADP
  304. DBDUX = -1*CNX
  305. DBDUY = -1*CNY
  306. DBDUZ = -1*CNZ
  307. DCDP = -1*CCEL/PC
  308. C
  309. C******* Derivatives of PSTAR with respect to ACEL,BCEL,CCEL
  310. C
  311. DPSDA = -1*(PSTAR*PSTAR)/((2*ACEL*PSTAR)-BCEL)
  312. DPSDB = PSTAR/((2*ACEL*PSTAR)-BCEL)
  313. DPSDC = 1/((2*ACEL*PSTAR)-BCEL)
  314. C
  315. C******* Derivatives of PC*PSTAR with respect to RC,PC,UXC,UYC
  316. C
  317. DPDR=(DPSDA*DADR)+(DPSDB*DBDR)
  318. DPDR=DPDR*PC
  319. DPDP=(DPSDA*DADP)+(DPSDB*DBDP)+(DPSDC*DCDP)
  320. DPDP=(DPDP*PC)+PSTAR
  321. DPDUX=(DPSDB*DBDUX)*PC
  322. DPDUY=(DPSDB*DBDUY)*PC
  323. DPDUZ=(DPSDB*DBDUZ)*PC
  324. CC
  325. CC******* Test 1
  326. CC
  327. CC We check dpdp
  328. CC
  329. C YCAC=P
  330. C XCAC=PC
  331. C PC=PC*(1+1.0D-4)
  332. C CC=GAMC*PC/RC
  333. C CC=CC**0.5D0
  334. CC
  335. C ACEL=CC/GAMC
  336. C BCEL=ACEL - UNC
  337. C CCEL=(RHOUF / PC) * PSRF
  338. C PSTAR=BCEL+(((BCEL*BCEL) + (4*ACEL*CCEL))**0.5D0)
  339. C PSTAR=PSTAR/(2*ACEL)
  340. C P=PSTAR*PC
  341. C write(*,*) ((P - YCAC)/(PC - XCAC)), DPDP
  342. CC
  343. CC We check dpdr
  344. CC
  345. C YCAC=P
  346. C XCAC=RC
  347. C RC=RC*(1+1.0D-4)
  348. C CC=GAMC*PC/RC
  349. C CC=CC**0.5D0
  350. CC
  351. C ACEL=CC/GAMC
  352. C BCEL=ACEL - UNC
  353. C CCEL=(RHOUF / PC) * PSRF
  354. C PSTAR=BCEL+(((BCEL*BCEL) + (4*ACEL*CCEL))**0.5D0)
  355. C PSTAR=PSTAR/(2*ACEL)
  356. C P=PSTAR*PC
  357. C write(*,*) ((P - YCAC)/(RC - XCAC)), DPDR
  358. CC
  359. CC We check dpdux
  360. CC
  361. C YCAC=P
  362. C XCAC=UXC
  363. C UXC=UXC*(1+1.0D-4)
  364. C UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ)
  365. C CC=GAMC*PC/RC
  366. C CC=CC**0.5D0
  367. CC
  368. C ACEL=CC/GAMC
  369. C BCEL=ACEL - UNC
  370. C CCEL=(RHOUF / PC) * PSRF
  371. C PSTAR=BCEL+(((BCEL*BCEL) + (4*ACEL*CCEL))**0.5D0)
  372. C PSTAR=PSTAR/(2*ACEL)
  373. C P=PSTAR*PC
  374. C write(*,*) ((P - YCAC)/(UXC - XCAC)), DPDUX
  375. CC
  376. CC We check dpduy
  377. CC
  378. C YCAC=P
  379. C XCAC=UYC
  380. C UYC=UYC*(1+1.0D-4)
  381. C UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ)
  382. C CC=GAMC*PC/RC
  383. C CC=CC**0.5D0
  384. CC
  385. C ACEL=CC/GAMC
  386. C BCEL=ACEL - UNC
  387. C CCEL=(RHOUF / PC) * PSRF
  388. C PSTAR=BCEL+(((BCEL*BCEL) + (4*ACEL*CCEL))**0.5D0)
  389. C PSTAR=PSTAR/(2*ACEL)
  390. C P=PSTAR*PC
  391. C write(*,*) ((P - YCAC)/(UYC - XCAC)), DPDUY
  392. CC
  393. CC We check dpduz
  394. CC
  395. C YCAC=P
  396. C XCAC=UZC
  397. C UZC=UZC*(1+1.0D-4)
  398. C UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ)
  399. C CC=GAMC*PC/RC
  400. C CC=CC**0.5D0
  401. CC
  402. C ACEL=CC/GAMC
  403. C BCEL=ACEL - UNC
  404. C CCEL=(RHOUF / PC) * PSRF
  405. C PSTAR=BCEL+(((BCEL*BCEL) + (4*ACEL*CCEL))**0.5D0)
  406. C PSTAR=PSTAR/(2*ACEL)
  407. C P=PSTAR*PC
  408. C write(*,*) ((P - YCAC)/(UZC - XCAC)), DPDUZ
  409. CC
  410. CC
  411. CC******* Fin test 1
  412. C
  413. C
  414. C******* The interfacial state is thus given by
  415. C RHOUF,PSRF,P and UT (UT=0), UT2 (UT2=0)
  416. C Let us now compute the derivative of the residuum with
  417. C respect to P.
  418. C The residuum is given by
  419. C
  420. C F1=RHOUF*SURF/VOLU
  421. C F2=(RHOUF*UX+P*CNX)*SURF/VOLU
  422. C F3=(RHOUF*UY+P*CNY)*SURF/VOLU
  423. C F4=(RHOUF*UZ+P*CNZ)*SURF/VOLU
  424. C F5=(RHOUF*((GAMC*USGM1*PSRF)+ECIN))*SURF/VOLU
  425. C
  426. C In these expression: UX, UY, P and ECIN depends on P
  427. C
  428. COEF=SURF/VOLU
  429. DUXDP=-1*UX/P
  430. DUYDP=-1*UY/P
  431. DUZDP=-1*UZ/P
  432. DECINP=-2*ECIN/P
  433. DF2DP=((RHOUF*DUXDP)+CNX)*COEF
  434. DF3DP=((RHOUF*DUYDP)+CNY)*COEF
  435. DF4DP=((RHOUF*DUZDP)+CNZ)*COEF
  436. DF5DP=(RHOUF*DECINP)*COEF
  437. CC
  438. CC******* Test 2
  439. CC
  440. CC We check DF2P
  441. CC
  442. C USGM1=1/GM1
  443. C F2=(RHOUF*UX+P*CNX)*COEF
  444. C F3=(RHOUF*UY+P*CNY)*COEF
  445. C F4=(RHOUF*UZ+P*CNZ)*COEF
  446. C F5=(RHOUF*((GAMC*USGM1*PSRF)+ECIN))*COEF
  447. CC
  448. C YCAC=F2
  449. C YCAC2=F3
  450. C YCAC3=F4
  451. C YCAC4=F5
  452. C XCAC=P
  453. C P=P*(1+1.0D-4)
  454. C RHO=P/PSRF
  455. C UN=RHOUF/RHO
  456. C UX=UN*CNX
  457. C UY=UN*CNY
  458. C UZ=UN*CNZ
  459. C ECIN=0.5D0*((UX*UX)+(UY*UY)+(UZ*UZ))
  460. C
  461. C F2=(RHOUF*UX+P*CNX)*COEF
  462. C F3=(RHOUF*UY+P*CNY)*COEF
  463. C F4=(RHOUF*UZ+P*CNZ)*COEF
  464. C F5=(RHOUF*((GAMC*USGM1*PSRF)+ECIN))*COEF
  465. C write(*,*) ((F2 -YCAC)/(P-XCAC)),DF2DP
  466. C write(*,*) ((F3 -YCAC2)/(P-XCAC)),DF3DP
  467. C write(*,*) ((F4 -YCAC3)/(P-XCAC)),DF4DP
  468. C write(*,*) ((F5 -YCAC4)/(P-XCAC)),DF5DP
  469. C
  470. C******* Fin test 2
  471. C
  472. C
  473. C******* Jacobian with respect to primitive variables
  474. C
  475. C
  476. C DF1D...
  477. C
  478. DRORO=0.0D0
  479. DROUX=0.0D0
  480. DROUY=0.0D0
  481. DROUZ=0.0D0
  482. DROP=0.0D0
  483. C
  484. C DF5D...
  485. C
  486. DPRO=DF5DP*DPDR
  487. DPUX=DF5DP*DPDUX
  488. DPUY=DF5DP*DPDUY
  489. DPUZ=DF5DP*DPDUZ
  490. DPP=DF5DP*DPDP
  491. C
  492. C DF2D...
  493. C
  494. DUXRO=DF2DP*DPDR
  495. DUXUX=DF2DP*DPDUX
  496. DUXUY=DF2DP*DPDUY
  497. DUXUZ=DF2DP*DPDUZ
  498. DUXP =DF2DP*DPDP
  499. C
  500. C DF3D
  501. C
  502. DUYRO=DF3DP*DPDR
  503. DUYUX=DF3DP*DPDUX
  504. DUYUY=DF3DP*DPDUY
  505. DUYUZ=DF3DP*DPDUZ
  506. DUYP =DF3DP*DPDP
  507. C
  508. C DF4D
  509. C
  510. DUZRO=DF4DP*DPDR
  511. DUZUX=DF4DP*DPDUX
  512. DUZUY=DF4DP*DPDUY
  513. DUZUZ=DF4DP*DPDUZ
  514. DUZP =DF4DP*DPDP
  515. C
  516. C******* Jacobian with respect to conservative variables
  517. C
  518. IF(IJAC.EQ.1)THEN
  519. GM1=GAMC-1.0D0
  520. C
  521. COEF1=-1.0D0*UXC/RC
  522. COEF2=-1.0D0*UYC/RC
  523. COEF3=-1.0D0*UZC/RC
  524. COEF4=0.5D0*GM1*((UXC*UXC)+(UYC*UYC)+(UZC*UZC))
  525. C
  526. RR.AM(IFAC,1,1)=DRORO+(DROUX*COEF1)+(DROUY*COEF2)+(DROUZ
  527. $ *COEF3)+(DROP*COEF4)
  528. RUX.AM(IFAC,1,1)=(DROUX/RC)-((UXC*GM1)*DROP)
  529. RUY.AM(IFAC,1,1)=(DROUY/RC)-((UYC*GM1)*DROP)
  530. RUZ.AM(IFAC,1,1)=(DROUZ/RC)-((UZC*GM1)*DROP)
  531. RRET.AM(IFAC,1,1)=GM1*DROP
  532. C
  533. UXR.AM(IFAC,1,1)=DUXRO+(DUXUX*COEF1)+(DUXUY*COEF2)+(DUXUZ
  534. $ *COEF3)+(DUXP*COEF4)
  535. UXUX.AM(IFAC,1,1)=(DUXUX/RC)-((UXC*GM1)*DUXP)
  536. UXUY.AM(IFAC,1,1)=(DUXUY/RC)-((UYC*GM1)*DUXP)
  537. UXUZ.AM(IFAC,1,1)=(DUXUZ/RC)-((UZC*GM1)*DUXP)
  538. UXRET.AM(IFAC,1,1)=GM1*DUXP
  539. C
  540. UYR.AM(IFAC,1,1)=DUYRO+(DUYUX*COEF1)+(DUYUY*COEF2)+(DUYUZ
  541. $ *COEF3)+(DUYP*COEF4)
  542. UYUX.AM(IFAC,1,1)=(DUYUX/RC)-((UXC*GM1)*DUYP)
  543. UYUY.AM(IFAC,1,1)=(DUYUY/RC)-((UYC*GM1)*DUYP)
  544. UYUZ.AM(IFAC,1,1)=(DUYUZ/RC)-((UZC*GM1)*DUYP)
  545. UYRET.AM(IFAC,1,1)=GM1*DUYP
  546. C
  547. UZR.AM(IFAC,1,1)=DUZRO+(DUZUX*COEF1)+(DUZUY*COEF2)+(DUZUZ
  548. $ *COEF3)+(DUZP*COEF4)
  549. UZUX.AM(IFAC,1,1)=(DUZUX/RC)-((UXC*GM1)*DUZP)
  550. UZUY.AM(IFAC,1,1)=(DUZUY/RC)-((UYC*GM1)*DUZP)
  551. UZUZ.AM(IFAC,1,1)=(DUZUZ/RC)-((UZC*GM1)*DUZP)
  552. UZRET.AM(IFAC,1,1)=GM1*DUZP
  553. C
  554. RETR.AM(IFAC,1,1)=DPRO+(DPUX*COEF1)+(DPUY*COEF2)+(DPUZ
  555. $ *COEF3)+(DPP*COEF4)
  556. RETUX.AM(IFAC,1,1)=(DPUX/RC)-((UXC*GM1)*DPP)
  557. RETUY.AM(IFAC,1,1)=(DPUY/RC)-((UYC*GM1)*DPP)
  558. RETUZ.AM(IFAC,1,1)=(DPUZ/RC)-((UZC*GM1)*DPP)
  559. RETRET.AM(IFAC,1,1)=GM1*DPP
  560. C
  561. ELSEIF(IJAC.EQ.2)THEN
  562. RR.AM(IFAC,1,1)=DRORO
  563. RUX.AM(IFAC,1,1)=DROUX
  564. RUY.AM(IFAC,1,1)=DROUY
  565. RUZ.AM(IFAC,1,1)=DROUZ
  566. RRET.AM(IFAC,1,1)=DROP
  567. C
  568. UXR.AM(IFAC,1,1)=DUXRO
  569. UXUX.AM(IFAC,1,1)=DUXUX
  570. UXUY.AM(IFAC,1,1)=DUXUY
  571. UXUZ.AM(IFAC,1,1)=DUXUZ
  572. UXRET.AM(IFAC,1,1)=DUXP
  573. C
  574. UYR.AM(IFAC,1,1)=DUYRO
  575. UYUX.AM(IFAC,1,1)=DUYUX
  576. UYUY.AM(IFAC,1,1)=DUYUY
  577. UYUZ.AM(IFAC,1,1)=DUYUZ
  578. UYRET.AM(IFAC,1,1)=DUYP
  579. C
  580. UZR.AM(IFAC,1,1)=DUZRO
  581. UZUX.AM(IFAC,1,1)=DUZUX
  582. UZUY.AM(IFAC,1,1)=DUZUY
  583. UZUZ.AM(IFAC,1,1)=DUZUZ
  584. UZRET.AM(IFAC,1,1)=DUZP
  585. C
  586. RETR.AM(IFAC,1,1)=DPRO
  587. RETUX.AM(IFAC,1,1)=DPUX
  588. RETUY.AM(IFAC,1,1)=DPUY
  589. RETUZ.AM(IFAC,1,1)=DPUZ
  590. RETRET.AM(IFAC,1,1)=DPP
  591. ENDIF
  592. ENDDO
  593. C
  594. SEGDES MELEFC
  595. C
  596. SEGSUP MLEMC
  597. SEGSUP MLEMCB
  598. SEGSUP MLEMF
  599. C
  600. SEGDES MPNORM
  601. SEGDES MPVOL
  602. SEGDES MPSURF
  603. SEGDES MPRC
  604. SEGDES MPPC
  605. SEGDES MPVC
  606. SEGDES MPGAMC
  607. SEGDES MPLIM
  608. C
  609. SEGDES RR , RUX , RUY , RUZ ,RRET ,
  610. & UXR , UXUX , UXUY , UXUZ ,UXRET ,
  611. & UYR , UYUX , UYUY , UYUZ , UYRET ,
  612. & UZR , UZUX , UZUY , UZUZ , UZRET ,
  613. & RETR , RETUX , RETUY, RETUZ , RETRET
  614. C
  615. 9999 CONTINUE
  616. RETURN
  617. END
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  

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