Télécharger cli112.eso

Retour à la liste

Numérotation des lignes :

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

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