Télécharger cli112.eso

Retour à la liste

Numérotation des lignes :

cli112
  1. C CLI112 SOURCE OF166741 24/12/13 21:15:10 12097
  2. SUBROUTINE CLI112(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 : CLI112
  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.  
  45. INTEGER MELEMF,MELEMC,MELECB,INORM,ICHPVO,ICHPSU, IROC,IVITC,IPC
  46. & ,IGAMC,ICHLIM,ICEL,NFAC,IFAC,MELRES,IJACO
  47. & ,NGF,NGC,NLF,NLC,NLCB
  48. & ,ILIINC,ILIINP,IJAC
  49. & ,MP, NBEL, NBME, NBSOUS, NKID, NKMT, NMATRI, NP, NRIGE
  50. REAL*8 VOLU,SURF,RC,PC,UXC,UYC,GAMC,CNX,CNY,CTX,CTY
  51. & ,RF,PF,UXF,UYF
  52. & ,UNC,UNF,UTF,SF,ASONC,ASONF,ASON
  53. * & ,UTC,SC
  54. & ,GM1,USGM1,DSGM1,G1,G3,ASON2,S,UT,UN,RHO,P,UX,UY
  55. & ,DUNDG1,DASDG1,DRHDG1,DPDG1,DUXDG1,DUYDG1
  56. * & ,CELL,EPS,CACCA
  57. & ,DFRDG1,DFMXG1,DFMYG1,DFEDG1
  58. & ,DG1DR,DG1DP,DG1DUX,DG1DUY,COEF
  59. & ,DRORO,DROUX,DROUY,DROP
  60. & ,DUXRO,DUXUX,DUXUY,DUXP
  61. & ,DUYRO,DUYUX,DUYUY,DUYP
  62. & ,DPRO,DPUX,DPUY,DPP
  63. & ,COEF1,COEF2,COEF3
  64. CHARACTER*(8) TYPE
  65. C
  66. C
  67. C**** KRIPAD pour la correspondance global/local
  68. C
  69. CALL KRIPAD(MELEMC,MLEMC)
  70. C SEGINI MLEMC
  71. CALL KRIPAD(MELECB,MLEMCB)
  72. C SEGINI MLEMCB
  73. CALL KRIPAD(MELEMF,MLEMF)
  74. C SEGINI MLEMF
  75. C
  76. C**** CHPOINTs de la table DOMAINE
  77. C
  78. CALL LICHT(INORM,MPNORM,TYPE,ICEL)
  79. CALL LICHT(ICHPVO,MPVOL,TYPE,ICEL)
  80. CALL LICHT(ICHPSU,MPSURF,TYPE,ICEL)
  81. C
  82. C**** LICHT active les MPOVALs en *MOD
  83. C
  84. C SEGACT MPNORM*MOD
  85. C SEGACT MPOVSU*MOD
  86. C SEGACT MPOVOL*MOD
  87. C
  88. C
  89. C**** CHPOINTs des variables
  90. C
  91. CALL LICHT(IROC,MPRC,TYPE,ICEL)
  92. CALL LICHT(IVITC,MPVC,TYPE,ICEL)
  93. CALL LICHT(IPC,MPPC,TYPE,ICEL)
  94. CALL LICHT(IGAMC,MPGAMC,TYPE,ICEL)
  95. CALL LICHT(ICHLIM,MPLIM,TYPE,ICEL)
  96. C
  97. C SEGACT *MOD
  98. C SEGACT *MOD
  99. C SEGACT *MOD
  100. C SEGACT *MOD
  101. C SEGACT *MOD
  102. C
  103. C
  104. C**** Boucle sur le face pour le calcul des invariants de
  105. C Riemann et du flux
  106. C
  107. SEGACT MELEFC
  108. NFAC=MELEFC.NUM(/2)
  109. C
  110. C**** Objet MATRIK
  111. C
  112. NRIGE = 7
  113. NMATRI = 1
  114. NKID = 9
  115. NKMT = 7
  116. C
  117. SEGINI MATRIK
  118. IJACO = MATRIK
  119. MATRIK.IRIGEL(1,1) = MELRES
  120. MATRIK.IRIGEL(2,1) = MELRES
  121. C
  122. C**** Matrice non symetrique
  123. C
  124. MATRIK.IRIGEL(7,1) = 2
  125. C
  126. NBME = 16
  127. NBSOUS = 1
  128. SEGINI IMATRI
  129. IF(IJAC.EQ.1)THEN
  130. MLMOTS=ILIINC
  131. ELSEIF(IJAC.EQ.2)THEN
  132. MLMOTS=ILIINP
  133. ENDIF
  134. SEGACT MLMOTS
  135. MATRIK.IRIGEL(4,1) = IMATRI
  136. C
  137. IMATRI.LISPRI(1) = MLMOTS.MOTS(1)
  138. IMATRI.LISPRI(2) = MLMOTS.MOTS(2)
  139. IMATRI.LISPRI(3) = MLMOTS.MOTS(3)
  140. IMATRI.LISPRI(4) = MLMOTS.MOTS(4)
  141. IMATRI.LISPRI(5) = MLMOTS.MOTS(1)
  142. IMATRI.LISPRI(6) = MLMOTS.MOTS(2)
  143. IMATRI.LISPRI(7) = MLMOTS.MOTS(3)
  144. IMATRI.LISPRI(8) = MLMOTS.MOTS(4)
  145. IMATRI.LISPRI(9) = MLMOTS.MOTS(1)
  146. IMATRI.LISPRI(10) = MLMOTS.MOTS(2)
  147. IMATRI.LISPRI(11) = MLMOTS.MOTS(3)
  148. IMATRI.LISPRI(12) = MLMOTS.MOTS(4)
  149. IMATRI.LISPRI(13) = MLMOTS.MOTS(1)
  150. IMATRI.LISPRI(14) = MLMOTS.MOTS(2)
  151. IMATRI.LISPRI(15) = MLMOTS.MOTS(3)
  152. IMATRI.LISPRI(16) = MLMOTS.MOTS(4)
  153. C
  154. SEGDES MLMOTS
  155. MLMOTS=ILIINC
  156. SEGACT MLMOTS
  157. C
  158. IMATRI.LISDUA(1) = MLMOTS.MOTS(1)
  159. IMATRI.LISDUA(2) = MLMOTS.MOTS(1)
  160. IMATRI.LISDUA(3) = MLMOTS.MOTS(1)
  161. IMATRI.LISDUA(4) = MLMOTS.MOTS(1)
  162. IMATRI.LISDUA(5) = MLMOTS.MOTS(2)
  163. IMATRI.LISDUA(6) = MLMOTS.MOTS(2)
  164. IMATRI.LISDUA(7) = MLMOTS.MOTS(2)
  165. IMATRI.LISDUA(8) = MLMOTS.MOTS(2)
  166. IMATRI.LISDUA(9) = MLMOTS.MOTS(3)
  167. IMATRI.LISDUA(10) = MLMOTS.MOTS(3)
  168. IMATRI.LISDUA(11) = MLMOTS.MOTS(3)
  169. IMATRI.LISDUA(12) = MLMOTS.MOTS(3)
  170. IMATRI.LISDUA(13) = MLMOTS.MOTS(4)
  171. IMATRI.LISDUA(14) = MLMOTS.MOTS(4)
  172. IMATRI.LISDUA(15) = MLMOTS.MOTS(4)
  173. IMATRI.LISDUA(16) = MLMOTS.MOTS(4)
  174. C
  175. SEGDES MLMOTS
  176. NBEL = NFAC
  177. NBSOUS = 1
  178. NP = 1
  179. MP = 1
  180. SEGINI RR , RUX , RUY , RRET ,
  181. & UXR , UXUX , UXUY , UXRET ,
  182. & UYR , UYUX , UYUY , UYRET ,
  183. & RETR , RETUX , RETUY , RETRET
  184. C
  185. C**** Duale = IMATRI.LISDUA(1) = 'RN'
  186. C Primale = IMATRI.LISPRI(1) = 'RN'
  187. C -> IMATRI.LIZAFM(1,1) = RR
  188. C
  189. IMATRI.LIZAFM(1,1) = RR
  190. IMATRI.LIZAFM(1,2) = RUX
  191. IMATRI.LIZAFM(1,3) = RUY
  192. IMATRI.LIZAFM(1,4) = RRET
  193. IMATRI.LIZAFM(1,5) = UXR
  194. IMATRI.LIZAFM(1,6) = UXUX
  195. IMATRI.LIZAFM(1,7) = UXUY
  196. IMATRI.LIZAFM(1,8) = UXRET
  197. IMATRI.LIZAFM(1,9) = UYR
  198. IMATRI.LIZAFM(1,10) = UYUX
  199. IMATRI.LIZAFM(1,11) = UYUY
  200. IMATRI.LIZAFM(1,12) = UYRET
  201. IMATRI.LIZAFM(1,13) = RETR
  202. IMATRI.LIZAFM(1,14) = RETUX
  203. IMATRI.LIZAFM(1,15) = RETUY
  204. IMATRI.LIZAFM(1,16) = RETRET
  205. C
  206. SEGDES MATRIK
  207. SEGDES IMATRI
  208. C
  209. C**** Fin definition MATRIK
  210. C
  211. DO IFAC=1,NFAC,1
  212. NGF=MELEFC.NUM(1,IFAC)
  213. NGC=MELEFC.NUM(2,IFAC)
  214. NLF=MLEMF.LECT(NGF)
  215. NLC=MLEMC.LECT(NGC)
  216. NLCB=MLEMCB.LECT(NGF)
  217. VOLU=MPVOL.VPOCHA(NLC,1)
  218. SURF=MPSURF.VPOCHA(NLF,1)
  219. C In CASTEM les normales sont sortantes
  220. CNX=-1*MPNORM.VPOCHA(NLF,1)
  221. CNY=-1*MPNORM.VPOCHA(NLF,2)
  222. CTX=-1.0D0*CNY
  223. CTY=CNX
  224. C Variables au centre
  225. RC=MPRC.VPOCHA(NLC,1)
  226. PC=MPPC.VPOCHA(NLC,1)
  227. UXC=MPVC.VPOCHA(NLC,1)
  228. UYC=MPVC.VPOCHA(NLC,2)
  229. GAMC=MPGAMC.VPOCHA(NLC,1)
  230. C Variables à la face
  231. RF=MPLIM.VPOCHA(NLCB,1)
  232. UXF=MPLIM.VPOCHA(NLCB,2)
  233. UYF=MPLIM.VPOCHA(NLCB,3)
  234. PF=MPLIM.VPOCHA(NLCB,IDIM+2)
  235. C
  236. C******* On calcule UN, UT ASON, S
  237. C
  238. UNC=(UXC*CNX)+(UYC*CNY)
  239. * UTC=(UXC*CTX)+(UYC*CTY)
  240. UNF=(UXF*CNX)+(UYF*CNY)
  241. UTF=(UXF*CTX)+(UYF*CTY)
  242. C
  243. ASONC=(GAMC*PC/RC)**0.5D0
  244. ASONF=(GAMC*PF/RF)**0.5D0
  245. C
  246. * SC=PC/(RC**GAMC)
  247. SF=PF/(RF**GAMC)
  248. C
  249. C******* Densite, vitesse, pression sur le bord
  250. C
  251. GM1=(GAMC-1.0D0)
  252. USGM1=1.0D0/GM1
  253. DSGM1=2.0D0*USGM1
  254. G1=UNC-(DSGM1*ASONC)
  255. G3=UNF+(DSGM1*ASONF)
  256. UN=0.5D0*(G1+G3)
  257. ASON=(0.5D0*(G3-G1))
  258. ASON=ASON/DSGM1
  259. ASON2=ASON*ASON
  260. S=SF
  261. UT=UTF
  262. RHO=ASON2/(GAMC*S)
  263. RHO=RHO**USGM1
  264. P=RHO*ASON2/GAMC
  265. UX=(UN*CNX)+(UT*CTX)
  266. UY=(UN*CNY)+(UT*CTY)
  267. C
  268. C******* Derivatives
  269. C
  270. DUNDG1=0.5D0
  271. DASDG1=-0.5D0/DSGM1
  272. DRHDG1=GAMC*S
  273. DRHDG1=1.0D0/DRHDG1
  274. DRHDG1=DRHDG1**USGM1
  275. DRHDG1=DRHDG1*DSGM1
  276. DRHDG1=DRHDG1*(ASON**((3.0D0-GAMC)/(GAMC-1.0D0)))
  277. DRHDG1=DRHDG1*DASDG1
  278. DPDG1=((ASON2/GAMC)*DRHDG1)+(((2*ASON*RHO)/GAMC)*DASDG1)
  279. CC
  280. CC******* Test
  281. CC
  282. C DFEDG1=(DUNDG1*GAMC*USGM1*P) + (UN*GAMC*USGM1*DPDG1) +
  283. C & (0.5D0*DRHDG1*UN*((UN*UN)+(UT*UT))) +
  284. C & (0.5D0*RHO*DUNDG1*((UN*UN)+(UT*UT))) +
  285. C & (RHO*UN*UN*DUNDG1)
  286. C CACCA=UN*GAMC*USGM1*P + 0.5D0*RHO*UN*(UN*UN+UT*UT)
  287. C EPS=1.0D-6
  288. C G1=G1*(1+EPS)
  289. C CELL=UN
  290. C UN=0.5D0*(G1+G3)
  291. C write(*,*) DUNDG1, ((UN - CELL)/(EPS*G1))
  292. C CELL=ASON
  293. C ASON=(0.5D0*(G3-G1))
  294. C ASON=ASON/DSGM1
  295. C write(*,*) DASDG1, ((ASON - CELL)/(EPS*G1))
  296. C ASON2=ASON*ASON
  297. C S=SF
  298. C UT=UTF
  299. C CELL=RHO
  300. C RHO=ASON2/(GAMC*S)
  301. C RHO=RHO**USGM1
  302. C write(*,*) DRHDG1, ((RHO - CELL)/(EPS*G1))
  303. C CELL=P
  304. C P=RHO*ASON2/GAMC
  305. C write(*,*) DPDG1, ((P - CELL)/(EPS*G1))
  306. C CELL=CACCA
  307. C CACCA=UN*GAMC*USGM1*P + 0.5D0*RHO*UN*(UN*UN+UT*UT)
  308. C write(*,*) DFEDG1, ((CACCA - CELL)/(EPS*G1))
  309. CC
  310. CC************************************************************
  311. CC
  312. DUXDG1=DUNDG1*CNX
  313. DUYDG1=DUNDG1*CNY
  314. C
  315. DFRDG1=(DRHDG1*UN)+(RHO*DUNDG1)
  316. DFMXG1=(DRHDG1*UN*UX)+(RHO*DUNDG1*UX)+
  317. & (RHO*UN*DUXDG1)+(DPDG1*CNX)
  318. DFMYG1=(DRHDG1*UN*UY)+(RHO*DUNDG1*UY)+
  319. & (RHO*UN*DUYDG1)+(DPDG1*CNY)
  320. DFEDG1=(DUNDG1*GAMC*USGM1*P) + (UN*GAMC*USGM1*DPDG1) +
  321. & (0.5D0*DRHDG1*UN*((UN*UN)+(UT*UT))) +
  322. & (0.5D0*RHO*DUNDG1*((UN*UN)+(UT*UT))) +
  323. & (RHO*UN*UN*DUNDG1)
  324. C
  325. C******* Jacobian with respect to primitive variables
  326. C
  327. DG1DR=USGM1*ASONC/RC
  328. DG1DP=-1.0D0*USGM1*ASONC/PC
  329. DG1DUX=CNX
  330. DG1DUY=CNY
  331. C
  332. COEF=SURF/VOLU
  333. C
  334. DRORO=DFRDG1*DG1DR*COEF
  335. DROUX=DFRDG1*DG1DUX*COEF
  336. DROUY=DFRDG1*DG1DUY*COEF
  337. DROP=DFRDG1*DG1DP*COEF
  338. C
  339. DUXRO=DFMXG1*DG1DR*COEF
  340. DUXUX=DFMXG1*DG1DUX*COEF
  341. DUXUY=DFMXG1*DG1DUY*COEF
  342. DUXP=DFMXG1*DG1DP*COEF
  343. C
  344. DUYRO=DFMYG1*DG1DR*COEF
  345. DUYUX=DFMYG1*DG1DUX*COEF
  346. DUYUY=DFMYG1*DG1DUY*COEF
  347. DUYP=DFMYG1*DG1DP*COEF
  348. C
  349. DPRO=DFEDG1*DG1DR*COEF
  350. DPUX=DFEDG1*DG1DUX*COEF
  351. DPUY=DFEDG1*DG1DUY*COEF
  352. DPP=DFEDG1*DG1DP*COEF
  353. C
  354. C******* Jacobian with respect to conservative variables
  355. C
  356. IF(IJAC.EQ.1)THEN
  357. C
  358. COEF1=-1.0D0*UXC/RC
  359. COEF2=-1.0D0*UYC/RC
  360. COEF3=0.5D0*GM1*((UXC*UXC)+(UYC*UYC))
  361. C
  362. RR.AM(IFAC,1,1)=DRORO+(DROUX*COEF1)+(DROUY*COEF2)+(DROP
  363. $ *COEF3)
  364. RUX.AM(IFAC,1,1)=(DROUX/RC)-((UXC*GM1)*DROP)
  365. RUY.AM(IFAC,1,1)=(DROUY/RC)-((UYC*GM1)*DROP)
  366. RRET.AM(IFAC,1,1)=GM1*DROP
  367. C
  368. UXR.AM(IFAC,1,1)=DUXRO+(DUXUX*COEF1)+(DUXUY*COEF2)+(DUXP
  369. $ *COEF3)
  370. UXUX.AM(IFAC,1,1)=(DUXUX/RC)-((UXC*GM1)*DUXP)
  371. UXUY.AM(IFAC,1,1)=(DUXUY/RC)-((UYC*GM1)*DUXP)
  372. UXRET.AM(IFAC,1,1)=GM1*DUXP
  373. C
  374. UYR.AM(IFAC,1,1)=DUYRO+(DUYUX*COEF1)+(DUYUY*COEF2)+(DUYP
  375. $ *COEF3)
  376. UYUX.AM(IFAC,1,1)=(DUYUX/RC)-((UXC*GM1)*DUYP)
  377. UYUY.AM(IFAC,1,1)=(DUYUY/RC)-((UYC*GM1)*DUYP)
  378. UYRET.AM(IFAC,1,1)=GM1*DUYP
  379. C
  380. RETR.AM(IFAC,1,1)=DPRO+(DPUX*COEF1)+(DPUY*COEF2)+(DPP
  381. $ *COEF3)
  382. RETUX.AM(IFAC,1,1)=(DPUX/RC)-((UXC*GM1)*DPP)
  383. RETUY.AM(IFAC,1,1)=(DPUY/RC)-((UYC*GM1)*DPP)
  384. RETRET.AM(IFAC,1,1)=GM1*DPP
  385. C
  386. ELSEIF(IJAC.EQ.2)THEN
  387. RR.AM(IFAC,1,1)=DRORO
  388. RUX.AM(IFAC,1,1)=DROUX
  389. RUY.AM(IFAC,1,1)=DROUY
  390. RRET.AM(IFAC,1,1)=DROP
  391. C
  392. UXR.AM(IFAC,1,1)=DUXRO
  393. UXUX.AM(IFAC,1,1)=DUXUX
  394. UXUY.AM(IFAC,1,1)=DUXUY
  395. UXRET.AM(IFAC,1,1)=DUXP
  396. C
  397. UYR.AM(IFAC,1,1)=DUYRO
  398. UYUX.AM(IFAC,1,1)=DUYUX
  399. UYUY.AM(IFAC,1,1)=DUYUY
  400. UYRET.AM(IFAC,1,1)=DUYP
  401. C
  402. RETR.AM(IFAC,1,1)=DPRO
  403. RETUX.AM(IFAC,1,1)=DPUX
  404. RETUY.AM(IFAC,1,1)=DPUY
  405. RETRET.AM(IFAC,1,1)=DPP
  406. ENDIF
  407.  
  408. ENDDO
  409. C
  410. SEGDES MELEFC
  411. C
  412. SEGSUP MLEMC
  413. SEGSUP MLEMCB
  414. SEGSUP MLEMF
  415. C
  416. SEGDES MPNORM
  417. SEGDES MPVOL
  418. SEGDES MPSURF
  419. SEGDES MPRC
  420. SEGDES MPPC
  421. SEGDES MPVC
  422. SEGDES MPGAMC
  423. SEGDES MPLIM
  424. C
  425. SEGDES RR , RUX , RUY , RRET ,
  426. & UXR , UXUX , UXUY , UXRET ,
  427. & UYR , UYUX , UYUY , UYRET ,
  428. & RETR , RETUX , RETUY , RETRET
  429. C
  430. 9999 CONTINUE
  431. RETURN
  432. END
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  

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