Télécharger cli183.eso

Retour à la liste

Numérotation des lignes :

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

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