Télécharger konja6.eso

Retour à la liste

Numérotation des lignes :

konja6
  1. C KONJA6 SOURCE OF166741 24/12/13 21:16:34 12097
  2. SUBROUTINE KONJA6(ILINC,IRN,IUN,IPN,IGAMN,INORM,ICHPVO
  3. $ ,ICHPSU,IUINF,IUPRI,MELEMC,MELEFE,MELLIM,IMAT)
  4. C
  5. C************************************************************************
  6. C
  7. C PROJET : CASTEM 2000
  8. C
  9. C NOM : KONJA6
  10. C
  11. C DESCRIPTION : Voir KON12
  12. C Calcul du jacobien du résidu pour la méthode
  13. C AUSMplus Low Mach
  14. C
  15. C Cas deux dimensions, gaz "calorically perfect"
  16. C
  17. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI)
  18. C
  19. C AUTEUR : A.BECCANTINI, S. KUDRIAKOV, DM2S/SFME/LTMF
  20. C
  21. C************************************************************************
  22. C
  23. C
  24. C APPELES (Outils
  25. C CASTEM) : KRIPAD, LICHT, ERREUR
  26. C
  27. C APPELES (Calcul) : JAKBM, JAKWBM
  28. C
  29. C************************************************************************
  30. C
  31. C ENTREES
  32. C
  33. C ILINC : liste des inconnues (pointeur d'un objet de type LISTMOTS)
  34. C
  35. C 1) Pointeurs des CHPOINT
  36. C
  37. C IRN : CHPOINT CENTRE contenant la masse volumique ;
  38. C
  39. C IUN : CHPOINT CENTRE contenant la vitesse ;
  40. C
  41. C IPN : CHPOINT CENTRE contenant la pression ;
  42. C
  43. C IGAMN : CHPOINT CENTRE contenant le gamma ;
  44. C
  45. C INORM : CHPOINT FACE contenant les normales aux faces ;
  46. C
  47. C ICHPVO : CHPOINT VOLUME contenant le volume
  48. C
  49. C ICHPSU : CHPOINT FACE contenant la surface des faces
  50. C
  51. C 2) Pointeurs de MELEME de la table DOMAINE
  52. C
  53. C MELEMC : MELEME 'CENTRE' du SPG des CENTRES
  54. C
  55. C MELEFE : MELEME 'FACEL' du connectivité Faces -> Elts
  56. C
  57. C MELLIM : MELEME SPG des conditions aux bords
  58. C N.B.: Sur le bord on ne calcule rien!
  59. C
  60. C 3) Cas Bas MACH
  61. C
  62. C IUINF : CHPOINT, one component, "cut-off velocity"
  63. C 0 if there is no Bas MACH
  64. C
  65. C IUPRI : CHPOINT, one component, second "cut-off velocity"
  66. C 0 if there is no Bas MACH
  67. C
  68. C SORTIES
  69. C
  70. C IMAT : pointeur de la MATRIK du jacobien du residu
  71. C
  72. C************************************************************************
  73. C
  74. C HISTORIQUE (Anomalies et modifications éventuelles)
  75. C
  76. C HISTORIQUE :
  77. C
  78. C************************************************************************
  79. C
  80. C
  81. C N.B.: On suppose qu'on a déjà controllé RO, P > 0
  82. C GAMMA \in (1,3)
  83. C Si non il faut le faire!!!
  84. C
  85. C************************************************************************
  86. C
  87. IMPLICIT INTEGER(I-N)
  88. INTEGER ILINC, IRN,IUN,IPN,IGAMN,INORM,ICHPVO,ICHPSU
  89. & , IMAT, IGEOMC, IGEOMF, IUINF, IUPRI
  90. & , NFAC, NBSOUS, NBREF, NBELEM, NBNN, NRIGE, NMATRI, NKID
  91. & , NKMT, NBME, NBEL, MP, NP
  92. & , IFAC, NGCF, NLCF, NGCG, NGCD, NLCG, NLCD, NLFL
  93. REAL*8 ROG, PG, UXG, UYG, GAMG, VOLG
  94. & , ROD, PD, UXD, UYD, VOLD, UPR_L, UPR_R
  95. & , SURF, FUNCEL, V_INF, UPR_M
  96. REAL*8 WVEC_L(4), WVEC_R(4), NVECT(2), TVECT(2)
  97. REAL*8 JTL(4,4), JTR(4,4)
  98. REAL*8 ZC1, ZC2, ZC3, ZC4
  99. CHARACTER*8 TYPE
  100. C
  101. C**** LES INCLUDES
  102. C
  103.  
  104. -INC PPARAM
  105. -INC CCOPTIO
  106. -INC SMCHPOI
  107. -INC SMELEME
  108. -INC SMLMOTS
  109. -INC SMLENTI
  110. POINTEUR MPRN.MPOVAL, MPUN.MPOVAL, MPPN.MPOVAL, MPGAMN.MPOVAL,
  111. & MPNORM.MPOVAL, MPVOLU.MPOVAL, MPOVSU.MPOVAL,
  112. & MPOVDI.MPOVAL
  113. POINTEUR MELEMC.MELEME, MELEMF.MELEME, MELEFE.MELEME,
  114. & MELEDU.MELEME, MELLIM.MELEME
  115. POINTEUR MLENTC.MLENTI, MLENTF.MLENTI, MLELIM.MLENTI
  116. POINTEUR RR.IZAFM, RUX.IZAFM, RUY.IZAFM, RRET.IZAFM,
  117. & UXR.IZAFM, UXUX.IZAFM, UXUY.IZAFM, UXRET.IZAFM,
  118. & UYR.IZAFM, UYUX.IZAFM, UYUY.IZAFM, UYRET.IZAFM,
  119. & RETR.IZAFM, RETUX.IZAFM, RETUY.IZAFM, RETRET.IZAFM
  120. POINTEUR MLMINC.MLMOTS, MPUPRI.MPOVAL, MPUINF.MPOVAL
  121. C
  122. C**** KRIPAD pour la correspondance global/local des conditions limits
  123. C
  124. CALL KRIPAD(MELLIM,MLELIM)
  125. C SEGACT MELLIM
  126. C
  127. C**** KRIPAD pour la correspondance global/local des centres
  128. C
  129. CALL KRIPAD(MELEMC,MLENTC)
  130. C
  131. C SEGACT MLENTC
  132. SEGACT MELEMC
  133. C
  134. SEGACT MELEFE
  135. C
  136. CALL LICHT(ICHPSU,MPOVSU,TYPE,IGEOMF)
  137. CALL LICHT(INORM,MPNORM,TYPE,IGEOMF)
  138. CALL LICHT(ICHPVO,MPVOLU,TYPE,IGEOMC)
  139. C
  140. C**** LICHT active les MPOVALs en *MOD
  141. C
  142. C i.e.
  143. C
  144. C SEGACT MPOVSU*MOD
  145. C SEGACT MPOVNO*MOD
  146. C SEGACT MPVOLU*MOD
  147. C
  148. MELEMF = IGEOMF
  149. CALL KRIPAD(MELEMF,MLENTF)
  150. C
  151. C SEGACT MLENTF
  152. SEGACT MELEMF
  153. C
  154. CALL LICHT(IRN,MPRN,TYPE,IGEOMC)
  155. CALL LICHT(IPN,MPPN,TYPE,IGEOMC)
  156. CALL LICHT(IUN,MPUN,TYPE,IGEOMC)
  157. CALL LICHT(IGAMN,MPGAMN,TYPE,IGEOMC)
  158. C
  159. C SEGACT MPRN*MOD
  160. C SEGACT MPPN*MOD
  161. C SEGACT MPUN*MOD
  162. C SEGACT MPGAMN*MOD
  163. C
  164. NFAC = MELEFE.NUM(/2)
  165. C
  166. C**** Maillage des inconnues primales
  167. C
  168. NBSOUS = 0
  169. NBREF = 0
  170. NBELEM = NFAC
  171. NBNN = 2
  172. C
  173. SEGINI MELEDU
  174. C MELEPR = MELEDU
  175. C
  176. C**** MELEDU = 'SEG2'
  177. C
  178. MELEDU.ITYPEL = 2
  179. C
  180. NRIGE = 7
  181. NMATRI = 1
  182. NKID = 9
  183. NKMT = 7
  184. C
  185. SEGINI MATRIK
  186. IMAT = MATRIK
  187. MATRIK.IRIGEL(1,1) = MELEDU
  188. MATRIK.IRIGEL(2,1) = MELEDU
  189. C
  190. C**** Matrice non symetrique
  191. C
  192. MATRIK.IRIGEL(7,1) = 2
  193. C
  194. NBME = 16
  195. NBSOUS = 1
  196. SEGINI IMATRI
  197. MLMINC = ILINC
  198. SEGACT MLMINC
  199. MATRIK.IRIGEL(4,1) = IMATRI
  200. C
  201. IMATRI.LISPRI(1) = MLMINC.MOTS(1)
  202. IMATRI.LISPRI(2) = MLMINC.MOTS(2)
  203. IMATRI.LISPRI(3) = MLMINC.MOTS(3)
  204. IMATRI.LISPRI(4) = MLMINC.MOTS(4)
  205. IMATRI.LISPRI(5) = MLMINC.MOTS(1)
  206. IMATRI.LISPRI(6) = MLMINC.MOTS(2)
  207. IMATRI.LISPRI(7) = MLMINC.MOTS(3)
  208. IMATRI.LISPRI(8) = MLMINC.MOTS(4)
  209. IMATRI.LISPRI(9) = MLMINC.MOTS(1)
  210. IMATRI.LISPRI(10) = MLMINC.MOTS(2)
  211. IMATRI.LISPRI(11) = MLMINC.MOTS(3)
  212. IMATRI.LISPRI(12) = MLMINC.MOTS(4)
  213. IMATRI.LISPRI(13) = MLMINC.MOTS(1)
  214. IMATRI.LISPRI(14) = MLMINC.MOTS(2)
  215. IMATRI.LISPRI(15) = MLMINC.MOTS(3)
  216. IMATRI.LISPRI(16) = MLMINC.MOTS(4)
  217. C
  218. IMATRI.LISDUA(1) = MLMINC.MOTS(1)
  219. IMATRI.LISDUA(2) = MLMINC.MOTS(1)
  220. IMATRI.LISDUA(3) = MLMINC.MOTS(1)
  221. IMATRI.LISDUA(4) = MLMINC.MOTS(1)
  222. IMATRI.LISDUA(5) = MLMINC.MOTS(2)
  223. IMATRI.LISDUA(6) = MLMINC.MOTS(2)
  224. IMATRI.LISDUA(7) = MLMINC.MOTS(2)
  225. IMATRI.LISDUA(8) = MLMINC.MOTS(2)
  226. IMATRI.LISDUA(9) = MLMINC.MOTS(3)
  227. IMATRI.LISDUA(10) = MLMINC.MOTS(3)
  228. IMATRI.LISDUA(11) = MLMINC.MOTS(3)
  229. IMATRI.LISDUA(12) = MLMINC.MOTS(3)
  230. IMATRI.LISDUA(13) = MLMINC.MOTS(4)
  231. IMATRI.LISDUA(14) = MLMINC.MOTS(4)
  232. IMATRI.LISDUA(15) = MLMINC.MOTS(4)
  233. IMATRI.LISDUA(16) = MLMINC.MOTS(4)
  234. C
  235. NBEL = NBELEM
  236. NBSOUS = 1
  237. NP = 2
  238. MP = 2
  239. SEGINI RR , RUX , RUY , RRET ,
  240. & UXR , UXUX , UXUY , UXRET ,
  241. & UYR , UYUX , UYUY , UYRET ,
  242. & RETR , RETUX , RETUY , RETRET
  243. C
  244. C**** Duale = IMATRI.LISDUA(1) = 'RN'
  245. C Primale = IMATRI.LISPRI(1) = 'RN'
  246. C -> IMATRI.LIZAFM(1,1) = RR
  247. C
  248. C Duale = IMATRI.LISDUA(2) = 'RN'
  249. C Primale = IMATRI.LISPRI(1) = 'RUXN'
  250. C -> IMATRI.LIZAFM(1,2) = RUX
  251. C ...
  252. C
  253. IMATRI.LIZAFM(1,1) = RR
  254. IMATRI.LIZAFM(1,2) = RUX
  255. IMATRI.LIZAFM(1,3) = RUY
  256. IMATRI.LIZAFM(1,4) = RRET
  257. IMATRI.LIZAFM(1,5) = UXR
  258. IMATRI.LIZAFM(1,6) = UXUX
  259. IMATRI.LIZAFM(1,7) = UXUY
  260. IMATRI.LIZAFM(1,8) = UXRET
  261. IMATRI.LIZAFM(1,9) = UYR
  262. IMATRI.LIZAFM(1,10) = UYUX
  263. IMATRI.LIZAFM(1,11) = UYUY
  264. IMATRI.LIZAFM(1,12) = UYRET
  265. IMATRI.LIZAFM(1,13) = RETR
  266. IMATRI.LIZAFM(1,14) = RETUX
  267. IMATRI.LIZAFM(1,15) = RETUY
  268. IMATRI.LIZAFM(1,16) = RETRET
  269. C**************************************************************
  270. C Bas Mach
  271. C**************************************************************
  272. CALL LICHT(IUPRI,MPUPRI,TYPE,IGEOMC)
  273. CALL LICHT(IUINF,MPUINF,TYPE,IGEOMC)
  274. C**************************************************************
  275. DO IFAC = 1, NFAC, 1
  276. NGCF = MELEFE.NUM(2,IFAC)
  277. NLCF = MLENTF.LECT(NGCF)
  278. IF(NLCF .NE. IFAC)THEN
  279. WRITE(IOIMP,*) 'Il ne faut pas jouer avec la table domaine'
  280. CALL ERREUR(5)
  281. GOTO 9999
  282. ENDIF
  283. NLFL = MLELIM.LECT(NGCF)
  284. NGCG = MELEFE.NUM(1,IFAC)
  285. NGCD = MELEFE.NUM(3,IFAC)
  286. IF(NLFL .NE. 0)THEN
  287. C
  288. C********** The point belongs on BC -> No contribution to jacobian!
  289. C
  290. MELEDU.NUM(1,IFAC) = NGCG
  291. MELEDU.NUM(2,IFAC) = NGCD
  292. ELSEIF(NGCG .NE. NGCD)THEN
  293. C
  294. C********** Les MELEMEs
  295. C
  296. MELEDU.NUM(1,IFAC) = NGCG
  297. MELEDU.NUM(2,IFAC) = NGCD
  298. C
  299. C********** Les etats G et D
  300. C
  301. NLCG = MLENTC.LECT(NGCG)
  302. NLCD = MLENTC.LECT(NGCD)
  303. C*************************************************
  304. C*************************************************
  305. ROG = MPRN.VPOCHA(NLCG,1)
  306. PG = MPPN.VPOCHA(NLCG,1)
  307. UXG = MPUN.VPOCHA(NLCG,1)
  308. UYG = MPUN.VPOCHA(NLCG,2)
  309. GAMG = MPGAMN.VPOCHA(NLCG,1)
  310. VOLG = MPVOLU.VPOCHA(NLCG,1)
  311. C-------------------------------------------------
  312. WVEC_L(1)=ROG
  313. WVEC_L(2)=UXG
  314. WVEC_L(3)=UYG
  315. WVEC_L(4)=PG
  316. C-------------------------------------------------
  317. ROD = MPRN.VPOCHA(NLCD,1)
  318. PD = MPPN.VPOCHA(NLCD,1)
  319. UXD = MPUN.VPOCHA(NLCD,1)
  320. UYD = MPUN.VPOCHA(NLCD,2)
  321. VOLD = MPVOLU.VPOCHA(NLCD,1)
  322. C------------------------------------------------
  323. WVEC_R(1)=ROD
  324. WVEC_R(2)=UXD
  325. WVEC_R(3)=UYD
  326. WVEC_R(4)=PD
  327. c------------------------------------------------
  328. UPR_L=MPUPRI.VPOCHA(NLCG,1)
  329. UPR_R=MPUPRI.VPOCHA(NLCD,1)
  330. UPR_M=MAX(UPR_L,UPR_R)
  331. V_INF=MAX(MPUINF.VPOCHA(NLCG,1),MPUINF.VPOCHA(NLCD,1))
  332. V_INF=MAX(UPR_M,V_INF)
  333. C------------------------------------------------
  334. C
  335. C********** La normale G->D
  336. C La tangente
  337. C
  338. SURF = MPOVSU.VPOCHA(NLCF,1)
  339. NVECT(1) = MPNORM.VPOCHA(NLCF,1)
  340. NVECT(2) = MPNORM.VPOCHA(NLCF,2)
  341. TVECT(1) = -1.0D0 * NVECT(2)
  342. TVECT(2) = NVECT(1)
  343. C
  344. CALL JAKBM(JTL,JTR,WVEC_L,WVEC_R,
  345. & NVECT,TVECT,GAMG,V_INF)
  346. C
  347. C
  348. C********** AB.AM(IFAC,IPRIM,IDUAL)
  349. C A = nom de l'inconnu duale (Ro,rUX,rUY,RET)
  350. C B = nom de l'inconnu primale (Ro,rUX,rUY,RET)
  351. C IPRIM = 1, 2 -> G, D
  352. C IDUAL = 1, 2 -> G, D
  353. C i.e.
  354. C A_IDUAL = AB.AM(IFAC,IPRIM,IDUAL) * B_IPRIM + ...
  355. C
  356. C
  357. C********** Dual RN
  358. C
  359. FUNCEL = SURF * JTL(1,1)
  360. RR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  361. RR.AM(IFAC,1,2) = FUNCEL / VOLD
  362. C
  363. FUNCEL = SURF * JTL(1,2)
  364. RUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  365. RUX.AM(IFAC,1,2) = FUNCEL / VOLD
  366. C
  367. FUNCEL = SURF * JTL(1,3)
  368. RUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  369. RUY.AM(IFAC,1,2) = FUNCEL / VOLD
  370. C
  371. FUNCEL = SURF * JTL(1,4)
  372. RRET.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  373. RRET.AM(IFAC,1,2) = FUNCEL / VOLD
  374. C
  375. C********** Dual RUXN
  376. C
  377. FUNCEL = SURF * JTL(2,1)
  378. UXR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  379. UXR.AM(IFAC,1,2) = FUNCEL / VOLD
  380. C
  381. FUNCEL = SURF * JTL(2,2)
  382. UXUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  383. UXUX.AM(IFAC,1,2) = FUNCEL / VOLD
  384. C
  385. FUNCEL = SURF * JTL(2,3)
  386. UXUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  387. UXUY.AM(IFAC,1,2) = FUNCEL / VOLD
  388. C
  389. FUNCEL = SURF * JTL(2,4)
  390. UXRET.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  391. UXRET.AM(IFAC,1,2) = FUNCEL / VOLD
  392. C
  393. C********** Dual RUYN
  394. C
  395. FUNCEL = SURF * JTL(3,1)
  396. UYR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  397. UYR.AM(IFAC,1,2) = FUNCEL / VOLD
  398. C
  399. FUNCEL = SURF * JTL(3,2)
  400. UYUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  401. UYUX.AM(IFAC,1,2) = FUNCEL / VOLD
  402. C
  403. FUNCEL = SURF * JTL(3,3)
  404. UYUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  405. UYUY.AM(IFAC,1,2) = FUNCEL / VOLD
  406. C
  407. FUNCEL = SURF * JTL(3,4)
  408. UYRET.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  409. UYRET.AM(IFAC,1,2) = FUNCEL / VOLD
  410. C
  411. C********** Dual RETN
  412. C
  413. FUNCEL = SURF * JTL(4,1)
  414. RETR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  415. RETR.AM(IFAC,1,2) = FUNCEL / VOLD
  416. C
  417. FUNCEL = SURF * JTL(4,2)
  418. RETUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  419. RETUX.AM(IFAC,1,2) = FUNCEL / VOLD
  420. C
  421. FUNCEL = SURF * JTL(4,3)
  422. RETUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  423. RETUY.AM(IFAC,1,2) = FUNCEL / VOLD
  424. C
  425. FUNCEL = SURF * JTL(4,4)
  426. RETRET.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  427. RETRET.AM(IFAC,1,2) = FUNCEL / VOLD
  428. C
  429. C********** Dual RN
  430. C
  431. FUNCEL = SURF * JTR(1,1)
  432. RR.AM(IFAC,2,2) = FUNCEL / VOLD
  433. RR.AM(IFAC,2,1) = -FUNCEL / VOLG
  434. C
  435. FUNCEL = SURF * JTR(1,2)
  436. RUX.AM(IFAC,2,2) = FUNCEL / VOLD
  437. RUX.AM(IFAC,2,1) = -FUNCEL / VOLG
  438. C
  439. FUNCEL = SURF * JTR(1,3)
  440. RUY.AM(IFAC,2,2) = FUNCEL / VOLD
  441. RUY.AM(IFAC,2,1) = -FUNCEL / VOLG
  442. C
  443. FUNCEL = SURF * JTR(1,4)
  444. RRET.AM(IFAC,2,2) = FUNCEL / VOLD
  445. RRET.AM(IFAC,2,1) = -FUNCEL / VOLG
  446. C
  447. C********** Dual RUXN
  448. C
  449. FUNCEL = SURF * JTR(2,1)
  450. UXR.AM(IFAC,2,2) = FUNCEL / VOLD
  451. UXR.AM(IFAC,2,1) = -FUNCEL / VOLG
  452. C
  453. FUNCEL = SURF * JTR(2,2)
  454. UXUX.AM(IFAC,2,2) = FUNCEL / VOLD
  455. UXUX.AM(IFAC,2,1) = -FUNCEL / VOLG
  456. C
  457. FUNCEL = SURF * JTR(2,3)
  458. UXUY.AM(IFAC,2,2) = FUNCEL / VOLD
  459. UXUY.AM(IFAC,2,1) = -FUNCEL / VOLG
  460. C
  461. FUNCEL = SURF * JTR(2,4)
  462. UXRET.AM(IFAC,2,2) = FUNCEL / VOLD
  463. UXRET.AM(IFAC,2,1) = -FUNCEL / VOLG
  464. C
  465. C********** Dual RUYN
  466. C
  467. FUNCEL = SURF * JTR(3,1)
  468. UYR.AM(IFAC,2,2) = FUNCEL / VOLD
  469. UYR.AM(IFAC,2,1) = -FUNCEL / VOLG
  470. C
  471. FUNCEL = SURF * JTR(3,2)
  472. UYUX.AM(IFAC,2,2) = FUNCEL / VOLD
  473. UYUX.AM(IFAC,2,1) = -FUNCEL / VOLG
  474. C
  475. FUNCEL = SURF * JTR(3,3)
  476. UYUY.AM(IFAC,2,2) = FUNCEL / VOLD
  477. UYUY.AM(IFAC,2,1) = -FUNCEL / VOLG
  478. C
  479. FUNCEL = SURF * JTR(3,4)
  480. UYRET.AM(IFAC,2,2) = FUNCEL / VOLD
  481. UYRET.AM(IFAC,2,1) = -FUNCEL / VOLG
  482. C
  483. C********** Dual RETN
  484. C
  485. FUNCEL = SURF * JTR(4,1)
  486. RETR.AM(IFAC,2,2) = FUNCEL / VOLD
  487. RETR.AM(IFAC,2,1) = -FUNCEL / VOLG
  488. C
  489. FUNCEL = SURF * JTR(4,2)
  490. RETUX.AM(IFAC,2,2) = FUNCEL / VOLD
  491. RETUX.AM(IFAC,2,1) = -FUNCEL / VOLG
  492. C
  493. FUNCEL = SURF * JTR(4,3)
  494. RETUY.AM(IFAC,2,2) = FUNCEL / VOLD
  495. RETUY.AM(IFAC,2,1) = -FUNCEL / VOLG
  496. C
  497. FUNCEL = SURF * JTR(4,4)
  498. RETRET.AM(IFAC,2,2) = FUNCEL / VOLD
  499. RETRET.AM(IFAC,2,1) = -FUNCEL / VOLG
  500. C
  501. ELSE
  502. C
  503. C********** Murs (NGCG = NGCD)
  504. C
  505. C
  506. C********** Les MELEMEs
  507. C
  508. MELEDU.NUM(1,IFAC) = NGCG
  509. MELEDU.NUM(2,IFAC) = NGCD
  510. NLCG = MLENTC.LECT(NGCG)
  511. C
  512. ROG = MPRN.VPOCHA(NLCG,1)
  513. PG = MPPN.VPOCHA(NLCG,1)
  514. UXG = MPUN.VPOCHA(NLCG,1)
  515. UYG = MPUN.VPOCHA(NLCG,2)
  516. GAMG = MPGAMN.VPOCHA(NLCG,1)
  517. VOLG = MPVOLU.VPOCHA(NLCG,1)
  518. C-------------------------------------------
  519. WVEC_L(1)=ROG
  520. WVEC_L(2)=UXG
  521. WVEC_L(3)=UYG
  522. WVEC_L(4)=PG
  523. C-------------------------------------------------
  524. SURF = MPOVSU.VPOCHA(NLCF,1)
  525. NVECT(1) = MPNORM.VPOCHA(NLCF,1)
  526. NVECT(2) = MPNORM.VPOCHA(NLCF,2)
  527. TVECT(1) =-NVECT(2)
  528. TVECT(2) = NVECT(1)
  529. C------- COEFFICIENTS ----------------------------
  530. ZC1=NVECT(1)*TVECT(2)+TVECT(1)*NVECT(2)
  531. ZC2=NVECT(1)*TVECT(2)-TVECT(1)*NVECT(2)
  532. ZC3=2.0D0*NVECT(1)*TVECT(1)
  533. ZC4=2.0D0*NVECT(2)*TVECT(2)
  534. C-------------------------------------------------
  535. ROD = ROG
  536. PD = PG
  537. UXD = -ZC1*UXG/ZC2-ZC4*UYG/ZC2
  538. UYD = ZC3*UXG/ZC2+ZC1*UYG/ZC2
  539. VOLD = VOLG
  540. C------------------------------------------------
  541. UPR_L=MPUPRI.VPOCHA(NLCG,1)
  542. UPR_R=UPR_L
  543. V_INF=MAX(MPUINF.VPOCHA(NLCG,1),UPR_L)
  544. C------------------------------------------------
  545. WVEC_R(1)=ROD
  546. WVEC_R(2)=UXD
  547. WVEC_R(3)=UYD
  548. WVEC_R(4)=PD
  549. C-------------------------------------------
  550. C********** La normale sortante
  551. C-------------------------------------------
  552. CALL JAKWBM(JTL,WVEC_L,WVEC_R,
  553. & NVECT,TVECT,GAMG,V_INF)
  554. C
  555. C********** Dual RN
  556. C
  557. RR.AM(IFAC,1,1) = 0.0D0
  558. RR.AM(IFAC,1,2) = 0.0D0
  559. C
  560. RUX.AM(IFAC,1,1) = 0.0D0
  561. RUX.AM(IFAC,1,2) = 0.0D0
  562. C
  563. RUY.AM(IFAC,1,1) = 0.0D0
  564. RUY.AM(IFAC,1,2) = 0.0D0
  565. C
  566. RRET.AM(IFAC,1,1) = 0.0D0
  567. RRET.AM(IFAC,1,2) = 0.0D0
  568. C
  569. C********** Dual RUXN
  570. C
  571. FUNCEL = SURF * JTL(2,1)
  572. UXR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  573. UXR.AM(IFAC,1,2) = 0.0D0
  574. C
  575. FUNCEL = SURF * JTL(2,2)
  576. UXUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  577. UXUX.AM(IFAC,1,2) = 0.0D0
  578. C
  579. FUNCEL = SURF * JTL(2,3)
  580. UXUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  581. UXUY.AM(IFAC,1,2) = 0.0D0
  582. C
  583. FUNCEL = SURF * JTL(2,4)
  584. UXRET.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  585. UXRET.AM(IFAC,1,2) = 0.0D0
  586. C
  587. C********** Dual RUYN
  588. C
  589. FUNCEL = SURF * JTL(3,1)
  590. UYR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  591. UYR.AM(IFAC,1,2) = 0.0D0
  592. C
  593. FUNCEL = SURF * JTL(3,2)
  594. UYUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  595. UYUX.AM(IFAC,1,2) = 0.0D0
  596. C
  597. FUNCEL = SURF * JTL(3,3)
  598. UYUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  599. UYUY.AM(IFAC,1,2) = 0.0D0
  600. C
  601. FUNCEL = SURF * JTL(3,4)
  602. UYRET.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  603. UYRET.AM(IFAC,1,2) = 0.0D0
  604. C
  605. C********** Dual RETN
  606. C
  607. RETR.AM(IFAC,1,1) = 0.0D0
  608. RETR.AM(IFAC,1,2) = 0.0D0
  609. C
  610. RETUX.AM(IFAC,1,1) = 0.0D0
  611. RETUX.AM(IFAC,1,2) = 0.0D0
  612. C
  613. RETUY.AM(IFAC,1,1) = 0.0D0
  614. RETUY.AM(IFAC,1,2) = 0.0D0
  615. C
  616. RETRET.AM(IFAC,1,1) = 0.0D0
  617. RETRET.AM(IFAC,1,2) = 0.0D0
  618. C
  619. C********** Dual RN
  620. C
  621. RR.AM(IFAC,2,2) = 0.0D0
  622. RR.AM(IFAC,2,1) = 0.0D0
  623. C
  624. RUX.AM(IFAC,2,2) = 0.0D0
  625. RUX.AM(IFAC,2,1) = 0.0D0
  626. C
  627. RUY.AM(IFAC,2,2) = 0.0D0
  628. RUY.AM(IFAC,2,1) = 0.0D0
  629. C
  630. RRET.AM(IFAC,2,2) = 0.0D0
  631. RRET.AM(IFAC,2,1) = 0.0D0
  632. C
  633. C********** Dual RUXN
  634. C
  635. UXR.AM(IFAC,2,2) = 0.0D0
  636. UXR.AM(IFAC,2,1) = 0.0D0
  637. C
  638. UXUX.AM(IFAC,2,2) = 0.0D0
  639. UXUX.AM(IFAC,2,1) = 0.0D0
  640. C
  641. UXUY.AM(IFAC,2,2) = 0.0D0
  642. UXUY.AM(IFAC,2,1) = 0.0D0
  643. C
  644. UXRET.AM(IFAC,2,2) = 0.0D0
  645. UXRET.AM(IFAC,2,1) = 0.0D0
  646. C
  647. C********** Dual RUYN
  648. C
  649. UYR.AM(IFAC,2,2) = 0.0D0
  650. UYR.AM(IFAC,2,1) = 0.0D0
  651. C
  652. UYUX.AM(IFAC,2,2) = 0.0D0
  653. UYUX.AM(IFAC,2,1) = 0.0D0
  654. C
  655. UYUY.AM(IFAC,2,2) = 0.0D0
  656. UYUY.AM(IFAC,2,1) = 0.0D0
  657. C
  658. UYRET.AM(IFAC,2,2) = 0.0D0
  659. UYRET.AM(IFAC,2,1) = 0.0D0
  660. C
  661. C********** Dual RETN
  662. C
  663. RETR.AM(IFAC,2,2) = 0.0D0
  664. RETR.AM(IFAC,2,1) = 0.0D0
  665. C
  666. RETUX.AM(IFAC,2,2) = 0.0D0
  667. RETUX.AM(IFAC,2,1) = 0.0D0
  668. C
  669. RETUY.AM(IFAC,2,2) = 0.0D0
  670. RETUY.AM(IFAC,2,1) = 0.0D0
  671. C
  672. RETRET.AM(IFAC,2,2) = 0.0D0
  673. RETRET.AM(IFAC,2,1) = 0.0D0
  674. C
  675. ENDIF
  676. ENDDO
  677. C
  678. SEGDES MELEMC
  679. SEGDES MELEFE
  680. SEGDES MELEMF
  681. C
  682. SEGDES MPOVSU
  683. SEGDES MPVOLU
  684. SEGDES MPNORM
  685. C
  686. SEGDES MPRN
  687. SEGDES MPPN
  688. SEGDES MPUN
  689. SEGDES MPGAMN
  690. C
  691. SEGDES MELEDU
  692. SEGDES MATRIK
  693. SEGDES IMATRI
  694. C
  695. SEGDES RR , RUX , RUY , RRET ,
  696. & UXR , UXUX , UXUY , UXRET ,
  697. & UYR , UYUX , UYUY , UYRET ,
  698. & RETR , RETUX , RETUY , RETRET
  699.  
  700. SEGSUP MLENTC
  701. SEGSUP MLENTF
  702. SEGDES MLMINC
  703. SEGSUP MLELIM
  704. C
  705. SEGDES MPUPRI
  706. SEGDES MPUINF
  707. IF(MELLIM .NE.0) SEGDES MELLIM
  708. C
  709. 9999 CONTINUE
  710. RETURN
  711. END
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  

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