Télécharger cli123.eso

Retour à la liste

Numérotation des lignes :

cli123
  1. C CLI123 SOURCE OF166741 24/12/13 21:15:15 12097
  2. SUBROUTINE CLI123(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 : CLI123
  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.  
  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,RC,PC,UXC,UYC,GAMC,CNX,CNY,CTX,CTY
  54. & ,CNZ,CTZ,CT1X,CT1Y,CT1Z,UZC,UZF,UT1C,UT1,UZ
  55. & ,RF,PF,UXF,UYF
  56. & ,UNC,UNF,ASONC,ASONF,ASON
  57. * & ,UTF,SF
  58. & ,UTC,SC
  59. & ,GM1,USGM1,DSGM1,G1,G3,ASON2,S,UT,UN,RHO,P,UX,UY
  60. & ,DUNDG3,DASDG3,DRHDG3,DPDG3,DRHDS,DPDS
  61. & ,DUZDG3,DUZDUT,DUXUT1,DUYUT1,DUZUT1,DFMXU1,DFMYU1,DFMZU1
  62. & ,DFMZG3,DFMZS,DFMZUT,DFEDU1,DG3DUZ,DUTDUZ
  63. & ,DU1DUX,DU1DUY,DU1DUZ,DROUZ,DUXUZ,DUYUZ,DPUZ
  64. & ,DUZRO,DUZUX,DUZUY,DUZUZ,DUZP
  65. * & ,CELL,EPS,CACCA
  66. & ,DUXDG3,DUYDG3,DUXDUT,DUYDUT
  67. & ,DFRDG3,DFRDS,DFMXG3,DFMXS,DFMXUT,DFMYG3,DFMYS,DFMYUT
  68. & ,DFEDG3,DFEDS,DFEDUT
  69. & ,DG3DR,DG3DP,DG3DUX,DG3DUY,DSDR,DSDP,DUTDUX,DUTDUY,COEF
  70. & ,DRORO,DROUX,DROUY,DROP
  71. & ,DUXRO,DUXUX,DUXUY,DUXP
  72. & ,DUYRO,DUYUX,DUYUY,DUYP
  73. & ,DPRO,DPUX,DPUY,DPP
  74. & ,COEF1,COEF2,COEF3,COEF4
  75. CHARACTER*(8) TYPE
  76. C
  77. C
  78. C**** KRIPAD pour la correspondance global/local
  79. C
  80. CALL KRIPAD(MELEMC,MLEMC)
  81. C SEGINI MLEMC
  82. CALL KRIPAD(MELECB,MLEMCB)
  83. C SEGINI MLEMCB
  84. CALL KRIPAD(MELEMF,MLEMF)
  85. C SEGINI MLEMF
  86. C
  87. C**** CHPOINTs de la table DOMAINE
  88. C
  89. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  90. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  91. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  92. C
  93. C**** LICHT active les MPOVALs en *MOD
  94. C
  95. C SEGACT MPNORM*MOD
  96. C SEGACT MPOVSU*MOD
  97. C SEGACT MPOVOL*MOD
  98. C
  99. C
  100. C**** CHPOINTs des variables
  101. C
  102. CALL LICHT(IROC,MPRC,TYPE,ICEL)
  103. CALL LICHT(IVITC,MPVC,TYPE,ICEL)
  104. CALL LICHT(IPC,MPPC,TYPE,ICEL)
  105. CALL LICHT(IGAMC,MPGAMC,TYPE,ICEL)
  106. CALL LICHT(ICHLIM,MPLIM,TYPE,ICEL)
  107. C
  108. C SEGACT *MOD
  109. C SEGACT *MOD
  110. C SEGACT *MOD
  111. C SEGACT *MOD
  112. C SEGACT *MOD
  113. C
  114. C
  115. C**** Boucle sur le face pour le calcul des invariants de
  116. C Riemann et du flux
  117. C
  118. SEGACT MELEFC
  119. NFAC=MELEFC.NUM(/2)
  120. C
  121. C**** Objet MATRIK
  122. C
  123. NRIGE = 7
  124. NMATRI = 1
  125. NKID = 9
  126. NKMT = 7
  127. C
  128. SEGINI MATRIK
  129. IJACO = MATRIK
  130. MATRIK.IRIGEL(1,1) = MELRES
  131. MATRIK.IRIGEL(2,1) = MELRES
  132. C
  133. C**** Matrice non symetrique
  134. C
  135. MATRIK.IRIGEL(7,1) = 2
  136. C
  137. NBME = 25
  138. NBSOUS = 1
  139. SEGINI IMATRI
  140. IF(IJAC.EQ.1)THEN
  141. MLMOTS=ILIINC
  142. ELSEIF(IJAC.EQ.2)THEN
  143. MLMOTS=ILIINP
  144. ENDIF
  145. SEGACT MLMOTS
  146. MATRIK.IRIGEL(4,1) = IMATRI
  147. C
  148. C
  149. IMATRI.LISPRI(1) = MLMOTS.MOTS(1)
  150. IMATRI.LISPRI(2) = MLMOTS.MOTS(2)
  151. IMATRI.LISPRI(3) = MLMOTS.MOTS(3)
  152. IMATRI.LISPRI(4) = MLMOTS.MOTS(4)
  153. IMATRI.LISPRI(5) = MLMOTS.MOTS(5)
  154. C
  155. IMATRI.LISPRI(6) = MLMOTS.MOTS(1)
  156. IMATRI.LISPRI(7) = MLMOTS.MOTS(2)
  157. IMATRI.LISPRI(8) = MLMOTS.MOTS(3)
  158. IMATRI.LISPRI(9) = MLMOTS.MOTS(4)
  159. IMATRI.LISPRI(10) = MLMOTS.MOTS(5)
  160. C
  161. IMATRI.LISPRI(11) = MLMOTS.MOTS(1)
  162. IMATRI.LISPRI(12) = MLMOTS.MOTS(2)
  163. IMATRI.LISPRI(13) = MLMOTS.MOTS(3)
  164. IMATRI.LISPRI(14) = MLMOTS.MOTS(4)
  165. IMATRI.LISPRI(15) = MLMOTS.MOTS(5)
  166. C
  167. IMATRI.LISPRI(16) = MLMOTS.MOTS(1)
  168. IMATRI.LISPRI(17) = MLMOTS.MOTS(2)
  169. IMATRI.LISPRI(18) = MLMOTS.MOTS(3)
  170. IMATRI.LISPRI(19) = MLMOTS.MOTS(4)
  171. IMATRI.LISPRI(20) = MLMOTS.MOTS(5)
  172. C
  173. IMATRI.LISPRI(21) = MLMOTS.MOTS(1)
  174. IMATRI.LISPRI(22) = MLMOTS.MOTS(2)
  175. IMATRI.LISPRI(23) = MLMOTS.MOTS(3)
  176. IMATRI.LISPRI(24) = MLMOTS.MOTS(4)
  177. IMATRI.LISPRI(25) = MLMOTS.MOTS(5)
  178. C
  179. SEGDES MLMOTS
  180. MLMOTS=ILIINC
  181. SEGACT MLMOTS
  182. C
  183. IMATRI.LISDUA(1) = MLMOTS.MOTS(1)
  184. IMATRI.LISDUA(2) = MLMOTS.MOTS(1)
  185. IMATRI.LISDUA(3) = MLMOTS.MOTS(1)
  186. IMATRI.LISDUA(4) = MLMOTS.MOTS(1)
  187. IMATRI.LISDUA(5) = MLMOTS.MOTS(1)
  188. C
  189. IMATRI.LISDUA(6) = MLMOTS.MOTS(2)
  190. IMATRI.LISDUA(7) = MLMOTS.MOTS(2)
  191. IMATRI.LISDUA(8) = MLMOTS.MOTS(2)
  192. IMATRI.LISDUA(9) = MLMOTS.MOTS(2)
  193. IMATRI.LISDUA(10) = MLMOTS.MOTS(2)
  194. C
  195. IMATRI.LISDUA(11) = MLMOTS.MOTS(3)
  196. IMATRI.LISDUA(12) = MLMOTS.MOTS(3)
  197. IMATRI.LISDUA(13) = MLMOTS.MOTS(3)
  198. IMATRI.LISDUA(14) = MLMOTS.MOTS(3)
  199. IMATRI.LISDUA(15) = MLMOTS.MOTS(3)
  200. C
  201. IMATRI.LISDUA(16) = MLMOTS.MOTS(4)
  202. IMATRI.LISDUA(17) = MLMOTS.MOTS(4)
  203. IMATRI.LISDUA(18) = MLMOTS.MOTS(4)
  204. IMATRI.LISDUA(19) = MLMOTS.MOTS(4)
  205. IMATRI.LISDUA(20) = MLMOTS.MOTS(4)
  206. C
  207. IMATRI.LISDUA(21) = MLMOTS.MOTS(5)
  208. IMATRI.LISDUA(22) = MLMOTS.MOTS(5)
  209. IMATRI.LISDUA(23) = MLMOTS.MOTS(5)
  210. IMATRI.LISDUA(24) = MLMOTS.MOTS(5)
  211. IMATRI.LISDUA(25) = MLMOTS.MOTS(5)
  212. C
  213. SEGDES MLMOTS
  214. NBEL = NFAC
  215. NBSOUS = 1
  216. NP = 1
  217. MP = 1
  218. SEGINI RR , RUX , RUY , RUZ ,RRET ,
  219. & UXR , UXUX , UXUY , UXUZ ,UXRET ,
  220. & UYR , UYUX , UYUY , UYUZ , UYRET ,
  221. & UZR , UZUX , UZUY , UZUZ , UZRET ,
  222. & RETR , RETUX , RETUY, RETUZ , RETRET
  223. C
  224. C**** Duale = IMATRI.LISDUA(1) = 'RN'
  225. C Primale = IMATRI.LISPRI(1) = 'RN'
  226. C -> IMATRI.LIZAFM(1,1) = RR
  227. C
  228. IMATRI.LIZAFM(1,1) = RR
  229. IMATRI.LIZAFM(1,2) = RUX
  230. IMATRI.LIZAFM(1,3) = RUY
  231. IMATRI.LIZAFM(1,4) = RUZ
  232. IMATRI.LIZAFM(1,5) = RRET
  233. C
  234. IMATRI.LIZAFM(1,6) = UXR
  235. IMATRI.LIZAFM(1,7) = UXUX
  236. IMATRI.LIZAFM(1,8) = UXUY
  237. IMATRI.LIZAFM(1,9) = UXUZ
  238. IMATRI.LIZAFM(1,10) = UXRET
  239. C
  240. IMATRI.LIZAFM(1,11) = UYR
  241. IMATRI.LIZAFM(1,12) = UYUX
  242. IMATRI.LIZAFM(1,13) = UYUY
  243. IMATRI.LIZAFM(1,14) = UYUZ
  244. IMATRI.LIZAFM(1,15) = UYRET
  245. C
  246. IMATRI.LIZAFM(1,16) = UZR
  247. IMATRI.LIZAFM(1,17) = UZUX
  248. IMATRI.LIZAFM(1,18) = UZUY
  249. IMATRI.LIZAFM(1,19) = UZUZ
  250. IMATRI.LIZAFM(1,20) = UZRET
  251. C
  252. IMATRI.LIZAFM(1,21) = RETR
  253. IMATRI.LIZAFM(1,22) = RETUX
  254. IMATRI.LIZAFM(1,23) = RETUY
  255. IMATRI.LIZAFM(1,24) = RETUZ
  256. IMATRI.LIZAFM(1,25) = RETRET
  257. C
  258. SEGDES MATRIK
  259. SEGDES IMATRI
  260. C
  261. C**** Fin definition MATRIK
  262. C
  263. DO IFAC=1,NFAC,1
  264. NGF=MELEFC.NUM(1,IFAC)
  265. NGC=MELEFC.NUM(2,IFAC)
  266. NLF=MLEMF.LECT(NGF)
  267. NLC=MLEMC.LECT(NGC)
  268. NLCB=MLEMCB.LECT(NGF)
  269. VOLU=MPVOL.VPOCHA(NLC,1)
  270. SURF=MPSURF.VPOCHA(NLF,1)
  271. C In CASTEM les normales sont sortantes
  272. CNX=MPNORM.VPOCHA(NLF,1)
  273. CNY=MPNORM.VPOCHA(NLF,2)
  274. CNZ=MPNORM.VPOCHA(NLF,3)
  275. CTX=MPNORM.VPOCHA(NLF,4)
  276. CTY=MPNORM.VPOCHA(NLF,5)
  277. CTZ=MPNORM.VPOCHA(NLF,6)
  278. CT1X=MPNORM.VPOCHA(NLF,7)
  279. CT1Y=MPNORM.VPOCHA(NLF,8)
  280. CT1Z=MPNORM.VPOCHA(NLF,9)
  281. C Variables au centre
  282. RC=MPRC.VPOCHA(NLC,1)
  283. PC=MPPC.VPOCHA(NLC,1)
  284. UXC=MPVC.VPOCHA(NLC,1)
  285. UYC=MPVC.VPOCHA(NLC,2)
  286. UZC=MPVC.VPOCHA(NLC,3)
  287. GAMC=MPGAMC.VPOCHA(NLC,1)
  288. C Variables à la face
  289. RF=MPLIM.VPOCHA(NLCB,1)
  290. UXF=MPLIM.VPOCHA(NLCB,2)
  291. UYF=MPLIM.VPOCHA(NLCB,3)
  292. UZF=MPLIM.VPOCHA(NLCB,4)
  293. PF=MPLIM.VPOCHA(NLCB,IDIM+2)
  294. C
  295. C******* On calcule UN, UT ASON, S
  296. C
  297. UNC=(UXC*CNX)+(UYC*CNY)+(UZC*CNZ)
  298. UTC=(UXC*CTX)+(UYC*CTY)+(UZC*CTZ)
  299. UT1C=(UXC*CT1X)+(UYC*CT1Y)+(UZC*CT1Z)
  300. UNF=(UXF*CNX)+(UYF*CNY)+(UZF*CNZ)
  301. C
  302. ASONC=(GAMC*PC/RC)**0.5D0
  303. ASONF=(GAMC*PF/RF)**0.5D0
  304. C
  305. SC=PC/(RC**GAMC)
  306. C SF=PF/(RF**GAMC)
  307. C
  308. C******* Densite, vitesse, pression sur le bord
  309. C
  310. GM1=(GAMC-1.0D0)
  311. USGM1=1.0D0/GM1
  312. DSGM1=2.0D0*USGM1
  313. G1=UNF-(DSGM1*ASONF)
  314. G3=UNC+(DSGM1*ASONC)
  315. UN=0.5D0*(G1+G3)
  316. ASON=(0.5D0*(G3-G1))
  317. ASON=ASON/DSGM1
  318. ASON2=ASON*ASON
  319. S=SC
  320. UT=UTC
  321. UT1=UT1C
  322. RHO=ASON2/(GAMC*S)
  323. RHO=RHO**USGM1
  324. P=RHO*ASON2/GAMC
  325. UX=(UN*CNX)+(UT*CTX)+(UT1*CT1X)
  326. UY=(UN*CNY)+(UT*CTY)+(UT1*CT1Y)
  327. UZ=(UN*CNZ)+(UT*CTZ)+(UT1*CT1Z)
  328. C
  329. C******* Derivatives
  330. C
  331. DUNDG3=0.5D0
  332. DASDG3=0.5D0/DSGM1
  333. DRHDG3=GAMC*S
  334. DRHDG3=1.0D0/DRHDG3
  335. DRHDG3=DRHDG3**USGM1
  336. DRHDG3=DRHDG3*DSGM1
  337. DRHDG3=DRHDG3*(ASON**((3.0D0-GAMC)/(GAMC-1.0D0)))
  338. DRHDG3=DRHDG3*DASDG3
  339. DRHDS=-1.0D0*USGM1*RHO/S
  340. DPDG3=((ASON2/GAMC)*DRHDG3)+(((2*ASON*RHO)/GAMC)*DASDG3)
  341. DPDS=(ASON2/GAMC)*DRHDS
  342. CC
  343. CC******* Test
  344. CC
  345. CC ...DG3
  346. C EPS=1.0D-6
  347. C G3=G3*(1+EPS)
  348. C CELL=UN
  349. C UN=0.5D0*(G1+G3)
  350. C write(*,*) DUNDG3, ((UN - CELL)/(EPS*G3))
  351. C CELL=ASON
  352. C ASON=(0.5D0*(G3-G1))
  353. C ASON=ASON/DSGM1
  354. C write(*,*) DASDG3, ((ASON - CELL)/(EPS*G3))
  355. C ASON2=ASON*ASON
  356. C S=SC
  357. C UT=UTC
  358. C CELL=RHO
  359. C RHO=ASON2/(GAMC*S)
  360. C RHO=RHO**USGM1
  361. C write(*,*) DRHDG3, ((RHO - CELL)/(EPS*G3))
  362. C CELL=P
  363. C P=RHO*ASON2/GAMC
  364. C write(*,*) DPDG3, ((P - CELL)/(EPS*G3))
  365. CC
  366. CC******* Test
  367. CC
  368. CC ...DS
  369. C EPS=1.0D-6
  370. C S=S*(1+EPS)
  371. C CELL=RHO
  372. C RHO=ASON2/(GAMC*S)
  373. C RHO=RHO**USGM1
  374. C write(*,*) DRHDS, ((RHO - CELL)/(EPS*S))
  375. C CELL=P
  376. C P=RHO*ASON2/GAMC
  377. C write(*,*) DPDS, ((P - CELL)/(EPS*S))
  378. CC
  379. CC************************************************************
  380. CC
  381. DUXDG3=DUNDG3*CNX
  382. DUYDG3=DUNDG3*CNY
  383. DUZDG3=DUNDG3*CNZ
  384. DUXDUT=CTX
  385. DUYDUT=CTY
  386. DUZDUT=CTZ
  387. DUXUT1=CT1X
  388. DUYUT1=CT1Y
  389. DUZUT1=CT1Z
  390. C
  391. DFRDG3=(DRHDG3*UN)+(RHO*DUNDG3)
  392. DFRDS=(DRHDS*UN)
  393. DFMXG3=(DRHDG3*UN*UX)+(RHO*DUNDG3*UX)+
  394. & (RHO*UN*DUXDG3)+(DPDG3*CNX)
  395. DFMXS=(DRHDS*UN*UX)+(DPDS*CNX)
  396. DFMXUT=(RHO*UN*DUXDUT)
  397. DFMXU1=(RHO*UN*DUXUT1)
  398. DFMYG3=(DRHDG3*UN*UY)+(RHO*DUNDG3*UY)+
  399. & (RHO*UN*DUYDG3)+(DPDG3*CNY)
  400. DFMYS=(DRHDS*UN*UY)+(DPDS*CNY)
  401. DFMYUT=(RHO*UN*DUYDUT)
  402. DFMYU1=(RHO*UN*DUYUT1)
  403. DFMZG3=(DRHDG3*UN*UZ)+(RHO*DUNDG3*UZ)+
  404. & (RHO*UN*DUZDG3)+(DPDG3*CNZ)
  405. DFMZS=(DRHDS*UN*UZ)+(DPDS*CNZ)
  406. DFMZUT=(RHO*UN*DUZDUT)
  407. DFMZU1=(RHO*UN*DUZUT1)
  408. DFEDG3=(DUNDG3*GAMC*USGM1*P) + (UN*GAMC*USGM1*DPDG3) +
  409. & (0.5D0*DRHDG3*UN*((UN*UN)+(UT*UT)+(UT1*UT1))) +
  410. & (0.5D0*RHO*DUNDG3*((UN*UN)+(UT*UT)+(UT1*UT1))) +
  411. & (RHO*UN*UN*DUNDG3)
  412. DFEDS=(UN*GAMC*USGM1*DPDS) +
  413. & (0.5D0*DRHDS*UN*((UN*UN)+(UT*UT)+(UT1*UT1)))
  414. DFEDUT=RHO*UN*UT
  415. DFEDU1=RHO*UN*UT1
  416. C
  417. C******* Jacobian with respect to primitive variables
  418. C
  419. DG3DR=-1*USGM1*ASONC/RC
  420. DG3DP=USGM1*ASONC/PC
  421. DG3DUX=CNX
  422. DG3DUY=CNY
  423. DG3DUZ=CNZ
  424. DSDR=-1*GAMC*S/RC
  425. DSDP=S/PC
  426. DUTDUX=CTX
  427. DUTDUY=CTY
  428. DUTDUZ=CTZ
  429. DU1DUX=CT1X
  430. DU1DUY=CT1Y
  431. DU1DUZ=CT1Z
  432. C
  433. COEF=-1*SURF/VOLU
  434. C
  435. DRORO=((DFRDG3*DG3DR)+(DFRDS*DSDR))*COEF
  436. DROUX=(DFRDG3*DG3DUX)*COEF
  437. DROUY=(DFRDG3*DG3DUY)*COEF
  438. DROUZ=(DFRDG3*DG3DUZ)*COEF
  439. DROP=((DFRDG3*DG3DP)+(DFRDS*DSDP))*COEF
  440. C
  441. DUXRO=((DFMXG3*DG3DR)+(DFMXS*DSDR))*COEF
  442. DUXUX=((DFMXG3*DG3DUX)+(DFMXUT*DUTDUX)+(DFMXU1*DU1DUX))*COEF
  443. DUXUY=((DFMXG3*DG3DUY)+(DFMXUT*DUTDUY)+(DFMXU1*DU1DUY))*COEF
  444. DUXUZ=((DFMXG3*DG3DUZ)+(DFMXUT*DUTDUZ)+(DFMXU1*DU1DUZ))*COEF
  445. DUXP=((DFMXG3*DG3DP)+(DFMXS*DSDP))*COEF
  446. C
  447. DUYRO=((DFMYG3*DG3DR)+(DFMYS*DSDR))*COEF
  448. DUYUX=((DFMYG3*DG3DUX)+(DFMYUT*DUTDUX)+(DFMYU1*DU1DUX))*COEF
  449. DUYUY=((DFMYG3*DG3DUY)+(DFMYUT*DUTDUY)+(DFMYU1*DU1DUY))*COEF
  450. DUYUZ=((DFMYG3*DG3DUZ)+(DFMYUT*DUTDUZ)+(DFMYU1*DU1DUZ))*COEF
  451. DUYP=((DFMYG3*DG3DP)+(DFMYS*DSDP))*COEF
  452. C
  453. DUZRO=((DFMZG3*DG3DR)+(DFMZS*DSDR))*COEF
  454. DUZUX=((DFMZG3*DG3DUX)+(DFMZUT*DUTDUX)+(DFMZU1*DU1DUX))*COEF
  455. DUZUY=((DFMZG3*DG3DUY)+(DFMZUT*DUTDUY)+(DFMZU1*DU1DUY))*COEF
  456. DUZUZ=((DFMZG3*DG3DUZ)+(DFMZUT*DUTDUZ)+(DFMZU1*DU1DUZ))*COEF
  457. DUZP=((DFMZG3*DG3DP)+(DFMZS*DSDP))*COEF
  458. CC
  459. DPRO=((DFEDG3*DG3DR)+(DFEDS*DSDR))*COEF
  460. DPUX=((DFEDG3*DG3DUX)+(DFEDUT*DUTDUX)+(DFEDU1*DU1DUX))*COEF
  461. DPUY=((DFEDG3*DG3DUY)+(DFEDUT*DUTDUY)+(DFEDU1*DU1DUY))*COEF
  462. DPUZ=((DFEDG3*DG3DUZ)+(DFEDUT*DUTDUZ)+(DFEDU1*DU1DUZ))*COEF
  463. DPP=((DFEDG3*DG3DP)+(DFEDS*DSDP))*COEF
  464. CC
  465. CC******* Jacobian with respect to conservative variables
  466. CC
  467. IF(IJAC.EQ.1)THEN
  468. COEF1=-1.0D0*UXC/RC
  469. COEF2=-1.0D0*UYC/RC
  470. COEF3=-1.0D0*UZC/RC
  471. COEF4=0.5D0*GM1*((UXC*UXC)+(UYC*UYC)+(UZC*UZC))
  472. C
  473. RR.AM(IFAC,1,1)=DRORO+(DROUX*COEF1)+(DROUY*COEF2)+(DROUZ
  474. $ *COEF3)+(DROP*COEF4)
  475. RUX.AM(IFAC,1,1)=(DROUX/RC)-((UXC*GM1)*DROP)
  476. RUY.AM(IFAC,1,1)=(DROUY/RC)-((UYC*GM1)*DROP)
  477. RUZ.AM(IFAC,1,1)=(DROUZ/RC)-((UZC*GM1)*DROP)
  478. RRET.AM(IFAC,1,1)=GM1*DROP
  479. C
  480. UXR.AM(IFAC,1,1)=DUXRO+(DUXUX*COEF1)+(DUXUY*COEF2)+(DUXUZ
  481. $ *COEF3)+(DUXP*COEF4)
  482. UXUX.AM(IFAC,1,1)=(DUXUX/RC)-((UXC*GM1)*DUXP)
  483. UXUY.AM(IFAC,1,1)=(DUXUY/RC)-((UYC*GM1)*DUXP)
  484. UXUZ.AM(IFAC,1,1)=(DUXUZ/RC)-((UZC*GM1)*DUXP)
  485. UXRET.AM(IFAC,1,1)=GM1*DUXP
  486. C
  487. UYR.AM(IFAC,1,1)=DUYRO+(DUYUX*COEF1)+(DUYUY*COEF2)+(DUYUZ
  488. $ *COEF3)+(DUYP*COEF4)
  489. UYUX.AM(IFAC,1,1)=(DUYUX/RC)-((UXC*GM1)*DUYP)
  490. UYUY.AM(IFAC,1,1)=(DUYUY/RC)-((UYC*GM1)*DUYP)
  491. UYUZ.AM(IFAC,1,1)=(DUYUZ/RC)-((UZC*GM1)*DUYP)
  492. UYRET.AM(IFAC,1,1)=GM1*DUYP
  493. C
  494. UZR.AM(IFAC,1,1)=DUZRO+(DUZUX*COEF1)+(DUZUY*COEF2)+(DUZUZ
  495. $ *COEF3)+(DUZP*COEF4)
  496. UZUX.AM(IFAC,1,1)=(DUZUX/RC)-((UXC*GM1)*DUZP)
  497. UZUY.AM(IFAC,1,1)=(DUZUY/RC)-((UYC*GM1)*DUZP)
  498. UZUZ.AM(IFAC,1,1)=(DUZUZ/RC)-((UZC*GM1)*DUZP)
  499. UZRET.AM(IFAC,1,1)=GM1*DUZP
  500. C
  501. RETR.AM(IFAC,1,1)=DPRO+(DPUX*COEF1)+(DPUY*COEF2)+(DPUZ
  502. $ *COEF3)+(DPP*COEF4)
  503. RETUX.AM(IFAC,1,1)=(DPUX/RC)-((UXC*GM1)*DPP)
  504. RETUY.AM(IFAC,1,1)=(DPUY/RC)-((UYC*GM1)*DPP)
  505. RETUZ.AM(IFAC,1,1)=(DPUZ/RC)-((UZC*GM1)*DPP)
  506. RETRET.AM(IFAC,1,1)=GM1*DPP
  507. C
  508. ELSEIF(IJAC.EQ.2)THEN
  509. RR.AM(IFAC,1,1)=DRORO
  510. RUX.AM(IFAC,1,1)=DROUX
  511. RUY.AM(IFAC,1,1)=DROUY
  512. RUZ.AM(IFAC,1,1)=DROUZ
  513. RRET.AM(IFAC,1,1)=DROP
  514. C
  515. UXR.AM(IFAC,1,1)=DUXRO
  516. UXUX.AM(IFAC,1,1)=DUXUX
  517. UXUY.AM(IFAC,1,1)=DUXUY
  518. UXUZ.AM(IFAC,1,1)=DUXUZ
  519. UXRET.AM(IFAC,1,1)=DUXP
  520. C
  521. UYR.AM(IFAC,1,1)=DUYRO
  522. UYUX.AM(IFAC,1,1)=DUYUX
  523. UYUY.AM(IFAC,1,1)=DUYUY
  524. UYUZ.AM(IFAC,1,1)=DUYUZ
  525. UYRET.AM(IFAC,1,1)=DUYP
  526. C
  527. UZR.AM(IFAC,1,1)=DUZRO
  528. UZUX.AM(IFAC,1,1)=DUZUX
  529. UZUY.AM(IFAC,1,1)=DUZUY
  530. UZUZ.AM(IFAC,1,1)=DUZUZ
  531. UZRET.AM(IFAC,1,1)=DUZP
  532. C
  533. RETR.AM(IFAC,1,1)=DPRO
  534. RETUX.AM(IFAC,1,1)=DPUX
  535. RETUY.AM(IFAC,1,1)=DPUY
  536. RETUZ.AM(IFAC,1,1)=DPUZ
  537. RETRET.AM(IFAC,1,1)=DPP
  538. ENDIF
  539. ENDDO
  540. C
  541. SEGDES MELEFC
  542. C
  543. SEGSUP MLEMC
  544. SEGSUP MLEMCB
  545. SEGSUP MLEMF
  546. C
  547. SEGDES MPNORM
  548. SEGDES MPVOL
  549. SEGDES MPSURF
  550. SEGDES MPRC
  551. SEGDES MPPC
  552. SEGDES MPVC
  553. SEGDES MPGAMC
  554. SEGDES MPLIM
  555. C
  556. SEGDES RR , RUX , RUY , RUZ ,RRET ,
  557. & UXR , UXUX , UXUY , UXUZ ,UXRET ,
  558. & UYR , UYUX , UYUY , UYUZ , UYRET ,
  559. & UZR , UZUX , UZUY , UZUZ , UZRET ,
  560. & RETR , RETUX , RETUY, RETUZ , RETRET
  561. C
  562. 9999 CONTINUE
  563. RETURN
  564. END
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  

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