Télécharger konjp5.eso

Retour à la liste

Numérotation des lignes :

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

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