Télécharger konjp3.eso

Retour à la liste

Numérotation des lignes :

konjp3
  1. C KONJP3 SOURCE OF166741 24/12/13 21:16:39 12097
  2. SUBROUTINE KONJP3(ILINC,ILINP,IRN,IUN,IPN,IGAMN,INORM,ICHPVO
  3. $ ,ICHPSU,MELEMC,MELEFE,MELLIM,IMAT)
  4. C
  5. C************************************************************************
  6. C
  7. C PROJET : CASTEM 2000
  8. C
  9. C NOM : KONJA3
  10. C
  11. C DESCRIPTION : Voir KON14
  12. C Calcul du jacobien du résidu pour la méthode de
  13. C VLH (variable primales = variables primitives,
  14. C variable duales = variables conservatives)
  15. C
  16. C Cas 3D, gaz "calorically perfect"
  17. C
  18. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI)
  19. C
  20. C AUTEUR : A. BECCANTINI, SFME/LTMF
  21. C
  22. C************************************************************************
  23. C
  24. C
  25. C APPELES (Outils
  26. C CASTEM) : KRIPAD, LICHT, ERREUR
  27. C
  28. C APPELES (Calcul) : VLHJ5, VLHJ7
  29. C
  30. C************************************************************************
  31. C
  32. C ENTREES
  33. C
  34. C ILINC : liste des inconnues duales (pointeur d'un LISTMOTS)
  35. C
  36. C ILINP : liste des inconnues primales (pointeur d'un LISTMOTS)
  37. C
  38. C 1) Pointeurs des CHPOINT
  39. C
  40. C IRN : CHPOINT CENTRE contenant la masse volumique ;
  41. C
  42. C IUN : CHPOINT CENTRE contenant la vitesse ;
  43. C
  44. C IPN : CHPOINT CENTRE contenant la pression ;
  45. C
  46. C IGAMN : CHPOINT CENTRE contenant le gamma ;
  47. C
  48. C INORM : CHPOINT FACE contenant les normales aux faces ;
  49. C
  50. C ICHPOVO : CHPOINT VOLUME contenant le volume
  51. C
  52. C ICHPOSU : CHPOINT FACE contenant la surface des faces
  53. C
  54. C
  55. C 2) Pointeurs de MELEME de la table DOMAINE
  56. C
  57. C MELEMC : MELEME 'CENTRE' du SPG des CENTRES
  58. C
  59. C MELEFE : MELEME 'FACEL' du connectivité Faces -> Elts
  60. C
  61. C MELLIM : MELEME SPG des conditions aux bords
  62. C
  63. C SORTIES
  64. C
  65. C IMAT : pointeur de la MATRIK du jacobien du residu
  66. C
  67. C************************************************************************
  68. C
  69. C HISTORIQUE (Anomalies et modifications éventuelles)
  70. C
  71. C HISTORIQUE :
  72. C
  73. C************************************************************************
  74. C
  75. C
  76. C N.B.: On suppose qu'on a déjà controllé RO, P > 0
  77. C GAMMA \in (1,3)
  78. C Si non il faut le faire!!!
  79. C
  80. C************************************************************************
  81. C
  82. IMPLICIT INTEGER(I-N)
  83. INTEGER ILINC, ILINP, IRN,IUN,IPN,IGAMN,INORM,ICHPVO,ICHPSU
  84. & , IMAT, IGEOMC, IGEOMF
  85. & , NFAC, NBSOUS, NBREF, NBELEM, NBNN, NRIGE, NMATRI, NKID
  86. & , NKMT, NBME, NBEL, MP, NP
  87. & , IFAC, NGCF, NLCF, NGCG, NGCD, NLCG, NLCD, NLFL
  88. REAL*8 ROG, PG, UXG, UYG, UZG, RETG, GAMG, VOLG
  89. & , ROD, PD, UXD, UYD, UZD, RETD, GAMD, VOLD
  90. & , SURF, CNX, CNY, CNZ, CT1X, CT1Y, CT1Z, CT2X, CT2Y, CT2Z
  91. & , FUNCEL
  92. & , DFRO(5), DFRET(5), DFRUN(5), DFRUT1(5), DFRUT2(5)
  93. CHARACTER*8 TYPE
  94. C
  95. C**** LES INCLUDES
  96. C
  97.  
  98. -INC PPARAM
  99. -INC CCOPTIO
  100. -INC SMCHPOI
  101. -INC SMELEME
  102. -INC SMLMOTS
  103. -INC SMLENTI
  104. POINTEUR MPRN.MPOVAL, MPUN.MPOVAL, MPPN.MPOVAL, MPGAMN.MPOVAL,
  105. & MPNORM.MPOVAL, MPVOLU.MPOVAL, MPOVSU.MPOVAL
  106. POINTEUR MELEMC.MELEME, MELEMF.MELEME, MELEFE.MELEME,
  107. & MELEDU.MELEME, MELLIM.MELEME
  108. POINTEUR MLENTC.MLENTI, MLENTF.MLENTI, MLELIM.MLENTI
  109. POINTEUR RR.IZAFM, RUX.IZAFM, RUY.IZAFM, RUZ.IZAFM, RP.IZAFM,
  110. & UXR.IZAFM, UXUX.IZAFM, UXUY.IZAFM, UXUZ.IZAFM, UXP.IZAFM,
  111. & UYR.IZAFM, UYUX.IZAFM, UYUY.IZAFM, UYUZ.IZAFM, UYP.IZAFM,
  112. & UZR.IZAFM, UZUX.IZAFM, UZUY.IZAFM, UZUZ.IZAFM, UZP.IZAFM,
  113. & RETR.IZAFM, RETUX.IZAFM, RETUY.IZAFM, RETUZ.IZAFM,
  114. & RETP.IZAFM
  115. POINTEUR MLMINC.MLMOTS
  116. C
  117. C**** KRIPAD pour la correspondance global/local des conditions limits
  118. C
  119. CALL KRIPAD(MELLIM,MLELIM)
  120. c SEGACT MELLIM
  121. C
  122. C**** KRIPAD pour la correspondance global/local des centres
  123. C
  124. CALL KRIPAD(MELEMC,MLENTC)
  125. C
  126. C SEGACT MLENTC
  127. SEGACT MELEMC
  128. C
  129. SEGACT MELEFE
  130. C
  131. CALL LICHT(ICHPSU,MPOVSU,TYPE,IGEOMF)
  132. CALL LICHT(INORM,MPNORM,TYPE,IGEOMF)
  133. CALL LICHT(ICHPVO,MPVOLU,TYPE,IGEOMC)
  134. C
  135. C**** LICHT active les MPOVALs en *MOD
  136. C
  137. C i.e.
  138. C
  139. C SEGACT MPOVSU*MOD
  140. C SEGACT MPOVNO*MOD
  141. C SEGACT MPVOLU*MOD
  142. C
  143. MELEMF = IGEOMF
  144. CALL KRIPAD(MELEMF,MLENTF)
  145. C
  146. C SEGACT MLENTF
  147. SEGACT MELEMF
  148. C
  149. CALL LICHT(IRN,MPRN,TYPE,IGEOMC)
  150. CALL LICHT(IPN,MPPN,TYPE,IGEOMC)
  151. CALL LICHT(IUN,MPUN,TYPE,IGEOMC)
  152. CALL LICHT(IGAMN,MPGAMN,TYPE,IGEOMC)
  153. C
  154. C SEGACT MPRN*MOD
  155. C SEGACT MPPN*MOD
  156. C SEGACT MPUN*MOD
  157. C SEGACT MPGAMN*MOD
  158. C
  159. NFAC = MELEFE.NUM(/2)
  160. C
  161. C**** Maillage des inconnues primales
  162. C
  163. NBSOUS = 0
  164. NBREF = 0
  165. NBELEM = NFAC
  166. NBNN = 2
  167. C
  168. SEGINI MELEDU
  169. C MELEPR = MELEDU
  170. C
  171. C**** MELEDU = 'SEG2'
  172. C
  173. MELEDU.ITYPEL = 2
  174. C
  175. NRIGE = 7
  176. NMATRI = 1
  177. NKID = 9
  178. NKMT = 7
  179. C
  180. SEGINI MATRIK
  181. IMAT = MATRIK
  182. MATRIK.IRIGEL(1,1) = MELEDU
  183. MATRIK.IRIGEL(2,1) = MELEDU
  184. C
  185. C**** Matrice non symetrique
  186. C
  187. MATRIK.IRIGEL(7,1) = 2
  188. C
  189. NBME = 25
  190. NBSOUS = 1
  191. SEGINI IMATRI
  192. MATRIK.IRIGEL(4,1) = IMATRI
  193. C
  194. C**** Variables primales (primitives)
  195. C
  196. MLMINC = ILINP
  197. SEGACT MLMINC
  198. IMATRI.LISPRI(1) = MLMINC.MOTS(1)
  199. IMATRI.LISPRI(2) = MLMINC.MOTS(2)
  200. IMATRI.LISPRI(3) = MLMINC.MOTS(3)
  201. IMATRI.LISPRI(4) = MLMINC.MOTS(4)
  202. IMATRI.LISPRI(5) = MLMINC.MOTS(5)
  203. C
  204. IMATRI.LISPRI(6) = MLMINC.MOTS(1)
  205. IMATRI.LISPRI(7) = MLMINC.MOTS(2)
  206. IMATRI.LISPRI(8) = MLMINC.MOTS(3)
  207. IMATRI.LISPRI(9) = MLMINC.MOTS(4)
  208. IMATRI.LISPRI(10) = MLMINC.MOTS(5)
  209. C
  210. IMATRI.LISPRI(11) = MLMINC.MOTS(1)
  211. IMATRI.LISPRI(12) = MLMINC.MOTS(2)
  212. IMATRI.LISPRI(13) = MLMINC.MOTS(3)
  213. IMATRI.LISPRI(14) = MLMINC.MOTS(4)
  214. IMATRI.LISPRI(15) = MLMINC.MOTS(5)
  215. C
  216. IMATRI.LISPRI(16) = MLMINC.MOTS(1)
  217. IMATRI.LISPRI(17) = MLMINC.MOTS(2)
  218. IMATRI.LISPRI(18) = MLMINC.MOTS(3)
  219. IMATRI.LISPRI(19) = MLMINC.MOTS(4)
  220. IMATRI.LISPRI(20) = MLMINC.MOTS(5)
  221. C
  222. IMATRI.LISPRI(21) = MLMINC.MOTS(1)
  223. IMATRI.LISPRI(22) = MLMINC.MOTS(2)
  224. IMATRI.LISPRI(23) = MLMINC.MOTS(3)
  225. IMATRI.LISPRI(24) = MLMINC.MOTS(4)
  226. IMATRI.LISPRI(25) = MLMINC.MOTS(5)
  227. SEGDES MLMINC
  228. C
  229. C**** Variables duales (conservatives)
  230. C
  231. MLMINC = ILINC
  232. SEGACT MLMINC
  233. IMATRI.LISDUA(1) = MLMINC.MOTS(1)
  234. IMATRI.LISDUA(2) = MLMINC.MOTS(1)
  235. IMATRI.LISDUA(3) = MLMINC.MOTS(1)
  236. IMATRI.LISDUA(4) = MLMINC.MOTS(1)
  237. IMATRI.LISDUA(5) = MLMINC.MOTS(1)
  238. C
  239. IMATRI.LISDUA(6) = MLMINC.MOTS(2)
  240. IMATRI.LISDUA(7) = MLMINC.MOTS(2)
  241. IMATRI.LISDUA(8) = MLMINC.MOTS(2)
  242. IMATRI.LISDUA(9) = MLMINC.MOTS(2)
  243. IMATRI.LISDUA(10) = MLMINC.MOTS(2)
  244. C
  245. IMATRI.LISDUA(11) = MLMINC.MOTS(3)
  246. IMATRI.LISDUA(12) = MLMINC.MOTS(3)
  247. IMATRI.LISDUA(13) = MLMINC.MOTS(3)
  248. IMATRI.LISDUA(14) = MLMINC.MOTS(3)
  249. IMATRI.LISDUA(15) = MLMINC.MOTS(3)
  250. C
  251. IMATRI.LISDUA(16) = MLMINC.MOTS(4)
  252. IMATRI.LISDUA(17) = MLMINC.MOTS(4)
  253. IMATRI.LISDUA(18) = MLMINC.MOTS(4)
  254. IMATRI.LISDUA(19) = MLMINC.MOTS(4)
  255. IMATRI.LISDUA(20) = MLMINC.MOTS(4)
  256. C
  257. IMATRI.LISDUA(21) = MLMINC.MOTS(5)
  258. IMATRI.LISDUA(22) = MLMINC.MOTS(5)
  259. IMATRI.LISDUA(23) = MLMINC.MOTS(5)
  260. IMATRI.LISDUA(24) = MLMINC.MOTS(5)
  261. IMATRI.LISDUA(25) = MLMINC.MOTS(5)
  262. SEGDES MLMINC
  263. C
  264. NBEL = NBELEM
  265. NBSOUS = 1
  266. NP = 2
  267. MP = 2
  268. SEGINI RR , RUX , RUY , RUZ, RP ,
  269. & UXR , UXUX , UXUY , UXUZ, UXP ,
  270. & UYR , UYUX , UYUY , UYUZ, UYP ,
  271. & UZR , UZUX , UZUY , UZUZ, UZP ,
  272. & RETR , RETUX , RETUY , RETUZ, RETP
  273. C
  274. C**** Duale = IMATRI.LISDUA(1) = 'RN'
  275. C Primale = IMATRI.LISPRI(1) = 'RN'
  276. C -> IMATRI.LIZAFM(1,1) = RR
  277. C
  278. C Duale = IMATRI.LISDUA(2) = 'RN'
  279. C Primale = IMATRI.LISPRI(1) = 'RUXN'
  280. C -> IMATRI.LIZAFM(1,2) = RUX
  281. C ...
  282. C
  283. IMATRI.LIZAFM(1,1) = RR
  284. IMATRI.LIZAFM(1,2) = RUX
  285. IMATRI.LIZAFM(1,3) = RUY
  286. IMATRI.LIZAFM(1,4) = RUZ
  287. IMATRI.LIZAFM(1,5) = RP
  288. C
  289. IMATRI.LIZAFM(1,6) = UXR
  290. IMATRI.LIZAFM(1,7) = UXUX
  291. IMATRI.LIZAFM(1,8) = UXUY
  292. IMATRI.LIZAFM(1,9) = UXUZ
  293. IMATRI.LIZAFM(1,10) = UXP
  294. C
  295. IMATRI.LIZAFM(1,11) = UYR
  296. IMATRI.LIZAFM(1,12) = UYUX
  297. IMATRI.LIZAFM(1,13) = UYUY
  298. IMATRI.LIZAFM(1,14) = UYUZ
  299. IMATRI.LIZAFM(1,15) = UYP
  300. C
  301. IMATRI.LIZAFM(1,16) = UZR
  302. IMATRI.LIZAFM(1,17) = UZUX
  303. IMATRI.LIZAFM(1,18) = UZUY
  304. IMATRI.LIZAFM(1,19) = UZUZ
  305. IMATRI.LIZAFM(1,20) = UZP
  306. C
  307. IMATRI.LIZAFM(1,21) = RETR
  308. IMATRI.LIZAFM(1,22) = RETUX
  309. IMATRI.LIZAFM(1,23) = RETUY
  310. IMATRI.LIZAFM(1,24) = RETUZ
  311. IMATRI.LIZAFM(1,25) = RETP
  312. C
  313. DO IFAC = 1, NFAC, 1
  314. NGCF = MELEFE.NUM(2,IFAC)
  315. NLCF = MLENTF.LECT(NGCF)
  316. IF(NLCF .NE. IFAC)THEN
  317. WRITE(IOIMP,*) 'Il ne faut pas jouer avec la table domaine'
  318. CALL ERREUR(5)
  319. GOTO 9999
  320. ENDIF
  321. NGCG = MELEFE.NUM(1,IFAC)
  322. NGCD = MELEFE.NUM(3,IFAC)
  323. NLFL = MLELIM.LECT(NGCF)
  324. IF(NLFL .NE. 0)THEN
  325. C
  326. C********** The point belongs on BC -> No contribution to jacobian!
  327. C
  328. MELEDU.NUM(1,IFAC) = NGCG
  329. MELEDU.NUM(2,IFAC) = NGCD
  330. ELSEIF(NGCG .NE. NGCD)THEN
  331. C
  332. C********** Les MELEMEs
  333. C
  334. MELEDU.NUM(1,IFAC) = NGCG
  335. MELEDU.NUM(2,IFAC) = NGCD
  336. C
  337. C********** Les etats G et D
  338. C
  339. NLCG = MLENTC.LECT(NGCG)
  340. NLCD = MLENTC.LECT(NGCD)
  341. C
  342. ROG = MPRN.VPOCHA(NLCG,1)
  343. PG = MPPN.VPOCHA(NLCG,1)
  344. UXG = MPUN.VPOCHA(NLCG,1)
  345. UYG = MPUN.VPOCHA(NLCG,2)
  346. UZG = MPUN.VPOCHA(NLCG,3)
  347. GAMG = MPGAMN.VPOCHA(NLCG,1)
  348. RETG= PG / (GAMG - 1.0D0) + 0.5D0 * ROG *
  349. & (UXG * UXG + UYG * UYG + UZG * UZG)
  350. VOLG = MPVOLU.VPOCHA(NLCG,1)
  351. C
  352. ROD = MPRN.VPOCHA(NLCD,1)
  353. PD = MPPN.VPOCHA(NLCD,1)
  354. UXD = MPUN.VPOCHA(NLCD,1)
  355. UYD = MPUN.VPOCHA(NLCD,2)
  356. UZD = MPUN.VPOCHA(NLCD,3)
  357. GAMD = MPGAMN.VPOCHA(NLCD,1)
  358. RETD= PD / (GAMD - 1.0D0) + 0.5D0 * ROD *
  359. & (UXD * UXD + UYD * UYD + UZD * UZD)
  360. VOLD = MPVOLU.VPOCHA(NLCD,1)
  361. C
  362. C********** La normale G->D
  363. C La tangente
  364. C
  365. SURF = MPOVSU.VPOCHA(NLCF,1)
  366. CNX = MPNORM.VPOCHA(NLCF,7)
  367. CNY = MPNORM.VPOCHA(NLCF,8)
  368. CNZ = MPNORM.VPOCHA(NLCF,9)
  369. C
  370. C********** Cosinus directeurs de tangente 1
  371. C
  372. CT1X = MPNORM.VPOCHA(NLCF,1)
  373. CT1Y = MPNORM.VPOCHA(NLCF,2)
  374. CT1Z = MPNORM.VPOCHA(NLCF,3)
  375. C
  376. C********** Cosinus directeurs de tangente 2
  377. C
  378. CT2X = MPNORM.VPOCHA(NLCF,4)
  379. CT2Y = MPNORM.VPOCHA(NLCF,5)
  380. CT2Z = MPNORM.VPOCHA(NLCF,6)
  381. C
  382. C********** La contribution de Gauche
  383. C
  384. CALL VLHJ5(ROG,UXG,UYG,UZG,PG,RETG,GAMG,CNX,CNY,CNZ,
  385. & CT1X,CT1Y,CT1Z,CT2X,CT2Y,CT2Z,
  386. & DFRO,DFRUN,DFRUT1,DFRUT2,DFRET)
  387. C
  388. C
  389. C********** AB.AM(IFAC,IPRIM,IDUAL)
  390. C A = nom de l'inconnu duale (Ro,rUX,rUY,RET)
  391. C B = nom de l'inconnu primale (Ro,rUX,rUY,RET)
  392. C IPRIM = 1, 2 -> G, D
  393. C IDUAL = 1, 2 -> G, D
  394. C i.e.
  395. C A_IDUAL = AB.AM(IFAC,IPRIM,IDUAL) * B_IPRIM + ...
  396. C
  397. C
  398. C********** Dual RN
  399. C
  400. FUNCEL = SURF * DFRO(1)
  401. RR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  402. RR.AM(IFAC,1,2) = FUNCEL / VOLD
  403. C
  404. FUNCEL = SURF * DFRO(2)
  405. RUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  406. RUX.AM(IFAC,1,2) = FUNCEL / VOLD
  407. C
  408. FUNCEL = SURF * DFRO(3)
  409. RUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  410. RUY.AM(IFAC,1,2) = FUNCEL / VOLD
  411. C
  412. FUNCEL = SURF * DFRO(4)
  413. RUZ.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  414. RUZ.AM(IFAC,1,2) = FUNCEL / VOLD
  415. C
  416. FUNCEL = SURF * DFRO(5)
  417. RP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  418. RP.AM(IFAC,1,2) = FUNCEL / VOLD
  419. C
  420. C********** Dual RUXN
  421. C
  422. FUNCEL = SURF * (DFRUN(1) * CNX + DFRUT1(1) * CT1X
  423. & + DFRUT2(1) * CT2X)
  424. UXR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  425. UXR.AM(IFAC,1,2) = FUNCEL / VOLD
  426. C
  427. FUNCEL = SURF * (DFRUN(2) * CNX + DFRUT1(2) * CT1X
  428. & + DFRUT2(2) * CT2X)
  429. UXUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  430. UXUX.AM(IFAC,1,2) = FUNCEL / VOLD
  431. C
  432. FUNCEL = SURF * (DFRUN(3) * CNX + DFRUT1(3) * CT1X
  433. & + DFRUT2(3) * CT2X)
  434. UXUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  435. UXUY.AM(IFAC,1,2) = FUNCEL / VOLD
  436. C
  437. FUNCEL = SURF * (DFRUN(4) * CNX + DFRUT1(4) * CT1X
  438. & + DFRUT2(4) * CT2X)
  439. UXUZ.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  440. UXUZ.AM(IFAC,1,2) = FUNCEL / VOLD
  441. C
  442. FUNCEL = SURF * (DFRUN(5) * CNX + DFRUT1(5) * CT1X
  443. & + DFRUT2(5) * CT2X)
  444. UXP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  445. UXP.AM(IFAC,1,2) = FUNCEL / VOLD
  446. C
  447. C********** Dual RUYN
  448. C
  449. FUNCEL = SURF * (DFRUN(1) * CNY + DFRUT1(1) * CT1Y
  450. & + DFRUT2(1) * CT2Y )
  451. UYR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  452. UYR.AM(IFAC,1,2) = FUNCEL / VOLD
  453. C
  454. FUNCEL = SURF * (DFRUN(2) * CNY + DFRUT1(2) * CT1Y
  455. & + DFRUT2(2) * CT2Y)
  456. UYUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  457. UYUX.AM(IFAC,1,2) = FUNCEL / VOLD
  458. C
  459. FUNCEL = SURF * (DFRUN(3) * CNY + DFRUT1(3) * CT1Y
  460. & + DFRUT2(3) * CT2Y)
  461. UYUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  462. UYUY.AM(IFAC,1,2) = FUNCEL / VOLD
  463. C
  464. FUNCEL = SURF * (DFRUN(4) * CNY + DFRUT1(4) * CT1Y
  465. & + DFRUT2(4) * CT2Y)
  466. UYUZ.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  467. UYUZ.AM(IFAC,1,2) = FUNCEL / VOLD
  468. C
  469. FUNCEL = SURF * (DFRUN(5) * CNY + DFRUT1(5) * CT1Y
  470. & + DFRUT2(5) * CT2Y)
  471. UYP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  472. UYP.AM(IFAC,1,2) = FUNCEL / VOLD
  473. C
  474. C********** Dual RUZN
  475. C
  476. FUNCEL = SURF * (DFRUN(1) * CNZ + DFRUT1(1) * CT1Z
  477. & + DFRUT2(1) * CT2Z )
  478. UZR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  479. UZR.AM(IFAC,1,2) = FUNCEL / VOLD
  480. C
  481. FUNCEL = SURF * (DFRUN(2) * CNZ + DFRUT1(2) * CT1Z
  482. & + DFRUT2(2) * CT2Z)
  483. UZUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  484. UZUX.AM(IFAC,1,2) = FUNCEL / VOLD
  485. C
  486. FUNCEL = SURF * (DFRUN(3) * CNZ + DFRUT1(3) * CT1Z
  487. & + DFRUT2(3) * CT2Z)
  488. UZUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  489. UZUY.AM(IFAC,1,2) = FUNCEL / VOLD
  490. C
  491. FUNCEL = SURF * (DFRUN(4) * CNZ + DFRUT1(4) * CT1Z
  492. & + DFRUT2(4) * CT2Z)
  493. UZUZ.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  494. UZUZ.AM(IFAC,1,2) = FUNCEL / VOLD
  495. C
  496. FUNCEL = SURF * (DFRUN(5) * CNZ + DFRUT1(5) * CT1Z
  497. & + DFRUT2(5) * CT2Z)
  498. UZP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  499. UZP.AM(IFAC,1,2) = FUNCEL / VOLD
  500. C
  501. C********** Dual RETN
  502. C
  503. FUNCEL = SURF * DFRET(1)
  504. RETR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  505. RETR.AM(IFAC,1,2) = FUNCEL / VOLD
  506. C
  507. FUNCEL = SURF * DFRET(2)
  508. RETUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  509. RETUX.AM(IFAC,1,2) = FUNCEL / VOLD
  510. C
  511. FUNCEL = SURF * DFRET(3)
  512. RETUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  513. RETUY.AM(IFAC,1,2) = FUNCEL / VOLD
  514. C
  515. FUNCEL = SURF * DFRET(4)
  516. RETUZ.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  517. RETUZ.AM(IFAC,1,2) = FUNCEL / VOLD
  518. C
  519. FUNCEL = SURF * DFRET(5)
  520. RETP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  521. RETP.AM(IFAC,1,2) = FUNCEL / VOLD
  522. C
  523. C
  524. C********** La contribution de D
  525. C
  526. CNX = -1.0D0 * CNX
  527. CNY = -1.0D0 * CNY
  528. CNZ = -1.0D0 * CNZ
  529. CT1X = -1.0D0 * CT1X
  530. CT1Y = -1.0D0 * CT1Y
  531. CT1Z = -1.0D0 * CT1Z
  532. CT2X = -1.0D0 * CT2X
  533. CT2Y = -1.0D0 * CT2Y
  534. CT2Z = -1.0D0 * CT2Z
  535. C
  536. CALL VLHJ5(ROD,UXD,UYD,UZD,PD,RETD,GAMD,CNX,CNY,CNZ,
  537. & CT1X,CT1Y,CT1Z,CT2X,CT2Y,CT2Z,
  538. & DFRO,DFRUN,DFRUT1,DFRUT2,DFRET)
  539. C
  540. C
  541. C********** Dual RN
  542. C
  543. FUNCEL = SURF * DFRO(1)
  544. RR.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  545. RR.AM(IFAC,2,1) = FUNCEL / VOLG
  546. C
  547. FUNCEL = SURF * DFRO(2)
  548. RUX.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  549. RUX.AM(IFAC,2,1) = FUNCEL / VOLG
  550. C
  551. FUNCEL = SURF * DFRO(3)
  552. RUY.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  553. RUY.AM(IFAC,2,1) = FUNCEL / VOLG
  554. C
  555. FUNCEL = SURF * DFRO(4)
  556. RUZ.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  557. RUZ.AM(IFAC,2,1) = FUNCEL / VOLG
  558. C
  559. FUNCEL = SURF * DFRO(5)
  560. RP.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  561. RP.AM(IFAC,2,1) = FUNCEL / VOLG
  562. C
  563. C********** Dual RUXN
  564. C
  565. FUNCEL = SURF * (DFRUN(1) * CNX + DFRUT1(1) * CT1X
  566. & + DFRUT2(1) * CT2X)
  567. UXR.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  568. UXR.AM(IFAC,2,1) = FUNCEL / VOLG
  569. C
  570. FUNCEL = SURF * (DFRUN(2) * CNX + DFRUT1(2) * CT1X
  571. & + DFRUT2(2) * CT2X)
  572. UXUX.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  573. UXUX.AM(IFAC,2,1) = FUNCEL / VOLG
  574. C
  575. FUNCEL = SURF * (DFRUN(3) * CNX + DFRUT1(3) * CT1X
  576. & + DFRUT2(3) * CT2X)
  577. UXUY.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  578. UXUY.AM(IFAC,2,1) = FUNCEL / VOLG
  579. C
  580. FUNCEL = SURF * (DFRUN(4) * CNX + DFRUT1(4) * CT1X
  581. & + DFRUT2(4) * CT2X)
  582. UXUZ.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  583. UXUZ.AM(IFAC,2,1) = FUNCEL / VOLG
  584. C
  585. FUNCEL = SURF * (DFRUN(5) * CNX + DFRUT1(5) * CT1X
  586. & + DFRUT2(5) * CT2X)
  587. UXP.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  588. UXP.AM(IFAC,2,1) = FUNCEL / VOLG
  589. C
  590. C********** Dual RUYN
  591. C
  592. FUNCEL = SURF * (DFRUN(1) * CNY + DFRUT1(1) * CT1Y
  593. & + DFRUT2(1) * CT2Y )
  594. UYR.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  595. UYR.AM(IFAC,2,1) = FUNCEL / VOLG
  596. C
  597. FUNCEL = SURF * (DFRUN(2) * CNY + DFRUT1(2) * CT1Y
  598. & + DFRUT2(2) * CT2Y)
  599. UYUX.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  600. UYUX.AM(IFAC,2,1) = FUNCEL / VOLG
  601. C
  602. FUNCEL = SURF * (DFRUN(3) * CNY + DFRUT1(3) * CT1Y
  603. & + DFRUT2(3) * CT2Y)
  604. UYUY.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  605. UYUY.AM(IFAC,2,1) = FUNCEL / VOLG
  606. C
  607. FUNCEL = SURF * (DFRUN(4) * CNY + DFRUT1(4) * CT1Y
  608. & + DFRUT2(4) * CT2Y)
  609. UYUZ.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  610. UYUZ.AM(IFAC,2,1) = FUNCEL / VOLG
  611. C
  612. FUNCEL = SURF * (DFRUN(5) * CNY + DFRUT1(5) * CT1Y
  613. & + DFRUT2(5) * CT2Y)
  614. UYP.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  615. UYP.AM(IFAC,2,1) = FUNCEL / VOLG
  616. C
  617. C********** Dual RUZN
  618. C
  619. FUNCEL = SURF * (DFRUN(1) * CNZ + DFRUT1(1) * CT1Z
  620. & + DFRUT2(1) * CT2Z )
  621. UZR.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  622. UZR.AM(IFAC,2,1) = FUNCEL / VOLG
  623. C
  624. FUNCEL = SURF * (DFRUN(2) * CNZ + DFRUT1(2) * CT1Z
  625. & + DFRUT2(2) * CT2Z)
  626. UZUX.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  627. UZUX.AM(IFAC,2,1) = FUNCEL / VOLG
  628. C
  629. FUNCEL = SURF * (DFRUN(3) * CNZ + DFRUT1(3) * CT1Z
  630. & + DFRUT2(3) * CT2Z)
  631. UZUY.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  632. UZUY.AM(IFAC,2,1) = FUNCEL / VOLG
  633. C
  634. FUNCEL = SURF * (DFRUN(4) * CNZ + DFRUT1(4) * CT1Z
  635. & + DFRUT2(4) * CT2Z)
  636. UZUZ.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  637. UZUZ.AM(IFAC,2,1) = FUNCEL / VOLG
  638. C
  639. FUNCEL = SURF * (DFRUN(5) * CNZ + DFRUT1(5) * CT1Z
  640. & + DFRUT2(5) * CT2Z)
  641. UZP.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  642. UZP.AM(IFAC,2,1) = FUNCEL / VOLG
  643. C
  644. C********** Dual RETN
  645. C
  646. FUNCEL = SURF * DFRET(1)
  647. RETR.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  648. RETR.AM(IFAC,2,1) = FUNCEL / VOLG
  649. C
  650. FUNCEL = SURF * DFRET(2)
  651. RETUX.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  652. RETUX.AM(IFAC,2,1) = FUNCEL / VOLG
  653. C
  654. FUNCEL = SURF * DFRET(3)
  655. RETUY.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  656. RETUY.AM(IFAC,2,1) = FUNCEL / VOLG
  657. C
  658. FUNCEL = SURF * DFRET(4)
  659. RETUZ.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  660. RETUZ.AM(IFAC,2,1) = FUNCEL / VOLG
  661. C
  662. FUNCEL = SURF * DFRET(5)
  663. RETP.AM(IFAC,2,2) = -1.0D0 * FUNCEL / VOLD
  664. RETP.AM(IFAC,2,1) = FUNCEL / VOLG
  665. C
  666. ELSE
  667. C
  668. C********** Murs (NGCG = NGCD)
  669. C
  670. C
  671. C********** Les MELEMEs
  672. C
  673. MELEDU.NUM(1,IFAC) = NGCG
  674. MELEDU.NUM(2,IFAC) = NGCD
  675. NLCG = MLENTC.LECT(NGCG)
  676. C
  677. ROG = MPRN.VPOCHA(NLCG,1)
  678. PG = MPPN.VPOCHA(NLCG,1)
  679. UXG = MPUN.VPOCHA(NLCG,1)
  680. UYG = MPUN.VPOCHA(NLCG,2)
  681. UZG = MPUN.VPOCHA(NLCG,3)
  682. GAMG = MPGAMN.VPOCHA(NLCG,1)
  683. VOLG = MPVOLU.VPOCHA(NLCG,1)
  684. C
  685. C********** La normale sortante
  686. C
  687. SURF = MPOVSU.VPOCHA(NLCF,1)
  688. CNX = MPNORM.VPOCHA(NLCF,7)
  689. CNY = MPNORM.VPOCHA(NLCF,8)
  690. CNZ = MPNORM.VPOCHA(NLCF,9)
  691. C
  692. CALL VLHJ7(ROG,UXG,UYG,UZG,PG,GAMG,CNX,CNY,CNZ,
  693. & DFRUN)
  694. C
  695. C********** Dual RN
  696. C
  697. RR.AM(IFAC,1,1) = 0.0D0
  698. RR.AM(IFAC,1,2) = 0.0D0
  699. C
  700. RUX.AM(IFAC,1,1) = 0.0D0
  701. RUX.AM(IFAC,1,2) = 0.0D0
  702. C
  703. RUY.AM(IFAC,1,1) = 0.0D0
  704. RUY.AM(IFAC,1,2) = 0.0D0
  705. C
  706. RUZ.AM(IFAC,1,1) = 0.0D0
  707. RUZ.AM(IFAC,1,2) = 0.0D0
  708. C
  709. RP.AM(IFAC,1,1) = 0.0D0
  710. RP.AM(IFAC,1,2) = 0.0D0
  711. C
  712. C********** Dual RUXN
  713. C
  714. FUNCEL = SURF * DFRUN(1) * CNX
  715. UXR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  716. UXR.AM(IFAC,1,2) = 0.0D0
  717. C
  718. FUNCEL = SURF * DFRUN(2) * CNX
  719. UXUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  720. UXUX.AM(IFAC,1,2) = 0.0D0
  721. C
  722. FUNCEL = SURF * DFRUN(3) * CNX
  723. UXUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  724. UXUY.AM(IFAC,1,2) = 0.0D0
  725. C
  726. FUNCEL = SURF * DFRUN(4) * CNX
  727. UXUZ.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  728. UXUZ.AM(IFAC,1,2) = 0.0D0
  729. C
  730. FUNCEL = SURF * DFRUN(5) * CNX
  731. UXP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  732. UXP.AM(IFAC,1,2) = 0.0D0
  733. C
  734. C********** Dual RUYN
  735. C
  736. FUNCEL = SURF * DFRUN(1) * CNY
  737. UYR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  738. UYR.AM(IFAC,1,2) = 0.0D0
  739. C
  740. FUNCEL = SURF * DFRUN(2) * CNY
  741. UYUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  742. UYUX.AM(IFAC,1,2) = 0.0D0
  743. C
  744. FUNCEL = SURF * DFRUN(3) * CNY
  745. UYUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  746. UYUY.AM(IFAC,1,2) = 0.0D0
  747. C
  748. FUNCEL = SURF * DFRUN(4) * CNY
  749. UYUZ.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  750. UYUZ.AM(IFAC,1,2) = 0.0D0
  751. C
  752. FUNCEL = SURF * DFRUN(5) * CNY
  753. UYP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  754. UYP.AM(IFAC,1,2) = 0.0D0
  755. C
  756. C********** Dual RUZN
  757. C
  758. FUNCEL = SURF * DFRUN(1) * CNZ
  759. UZR.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  760. UZR.AM(IFAC,1,2) = 0.0D0
  761. C
  762. FUNCEL = SURF * DFRUN(2) * CNZ
  763. UZUX.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  764. UZUX.AM(IFAC,1,2) = 0.0D0
  765. C
  766. FUNCEL = SURF * DFRUN(3) * CNZ
  767. UZUY.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  768. UZUY.AM(IFAC,1,2) = 0.0D0
  769. C
  770. FUNCEL = SURF * DFRUN(4) * CNZ
  771. UZUZ.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  772. UZUZ.AM(IFAC,1,2) = 0.0D0
  773. C
  774. FUNCEL = SURF * DFRUN(5) * CNZ
  775. UZP.AM(IFAC,1,1) = -1.0D0 * FUNCEL / VOLG
  776. UZP.AM(IFAC,1,2) = 0.0D0
  777. C
  778. C********** Dual RETN
  779. C
  780. RETR.AM(IFAC,1,1) = 0.0D0
  781. RETR.AM(IFAC,1,2) = 0.0D0
  782. C
  783. RETUX.AM(IFAC,1,1) = 0.0D0
  784. RETUX.AM(IFAC,1,2) = 0.0D0
  785. C
  786. RETUY.AM(IFAC,1,1) = 0.0D0
  787. RETUY.AM(IFAC,1,2) = 0.0D0
  788. C
  789. RETUZ.AM(IFAC,1,1) = 0.0D0
  790. RETUZ.AM(IFAC,1,2) = 0.0D0
  791. C
  792. RETP.AM(IFAC,1,1) = 0.0D0
  793. RETP.AM(IFAC,1,2) = 0.0D0
  794. C
  795. C********** Dual RN
  796. C
  797. RR.AM(IFAC,2,2) = 0.0D0
  798. RR.AM(IFAC,2,1) = 0.0D0
  799. C
  800. RUX.AM(IFAC,2,2) = 0.0D0
  801. RUX.AM(IFAC,2,1) = 0.0D0
  802. C
  803. RUY.AM(IFAC,2,2) = 0.0D0
  804. RUY.AM(IFAC,2,1) = 0.0D0
  805. C
  806. RUZ.AM(IFAC,2,2) = 0.0D0
  807. RUZ.AM(IFAC,2,1) = 0.0D0
  808. C
  809. RP.AM(IFAC,2,2) = 0.0D0
  810. RP.AM(IFAC,2,1) = 0.0D0
  811. C
  812. C********** Dual RUXN
  813. C
  814. UXR.AM(IFAC,2,2) = 0.0D0
  815. UXR.AM(IFAC,2,1) = 0.0D0
  816. C
  817. UXUX.AM(IFAC,2,2) = 0.0D0
  818. UXUX.AM(IFAC,2,1) = 0.0D0
  819. C
  820. UXUY.AM(IFAC,2,2) = 0.0D0
  821. UXUY.AM(IFAC,2,1) = 0.0D0
  822. C
  823. UXUZ.AM(IFAC,2,2) = 0.0D0
  824. UXUZ.AM(IFAC,2,1) = 0.0D0
  825. C
  826. UXP.AM(IFAC,2,2) = 0.0D0
  827. UXP.AM(IFAC,2,1) = 0.0D0
  828. C
  829. C********** Dual RUYN
  830. C
  831. UYR.AM(IFAC,2,2) = 0.0D0
  832. UYR.AM(IFAC,2,1) = 0.0D0
  833. C
  834. UYUX.AM(IFAC,2,2) = 0.0D0
  835. UYUX.AM(IFAC,2,1) = 0.0D0
  836. C
  837. UYUY.AM(IFAC,2,2) = 0.0D0
  838. UYUY.AM(IFAC,2,1) = 0.0D0
  839. C
  840. UYUZ.AM(IFAC,2,2) = 0.0D0
  841. UYUZ.AM(IFAC,2,1) = 0.0D0
  842. C
  843. UYP.AM(IFAC,2,2) = 0.0D0
  844. UYP.AM(IFAC,2,1) = 0.0D0
  845. C
  846. C********** Dual RUZN
  847. C
  848. UZR.AM(IFAC,2,2) = 0.0D0
  849. UZR.AM(IFAC,2,1) = 0.0D0
  850. C
  851. UZUX.AM(IFAC,2,2) = 0.0D0
  852. UZUX.AM(IFAC,2,1) = 0.0D0
  853. C
  854. UZUY.AM(IFAC,2,2) = 0.0D0
  855. UZUY.AM(IFAC,2,1) = 0.0D0
  856. C
  857. UZUZ.AM(IFAC,2,2) = 0.0D0
  858. UZUZ.AM(IFAC,2,1) = 0.0D0
  859. C
  860. UZP.AM(IFAC,2,2) = 0.0D0
  861. UZP.AM(IFAC,2,1) = 0.0D0
  862. C
  863. C********** Dual RETN
  864. C
  865. RETR.AM(IFAC,2,2) = 0.0D0
  866. RETR.AM(IFAC,2,1) = 0.0D0
  867. C
  868. RETUX.AM(IFAC,2,2) = 0.0D0
  869. RETUX.AM(IFAC,2,1) = 0.0D0
  870. C
  871. RETUY.AM(IFAC,2,2) = 0.0D0
  872. RETUY.AM(IFAC,2,1) = 0.0D0
  873. C
  874. RETUZ.AM(IFAC,2,2) = 0.0D0
  875. RETUZ.AM(IFAC,2,1) = 0.0D0
  876. C
  877. RETP.AM(IFAC,2,2) = 0.0D0
  878. RETP.AM(IFAC,2,1) = 0.0D0
  879. C
  880. ENDIF
  881. ENDDO
  882. C
  883. SEGDES MELEMC
  884. SEGDES MELEFE
  885. SEGDES MELEMF
  886. C
  887. SEGDES MPOVSU
  888. SEGDES MPVOLU
  889. SEGDES MPNORM
  890. C
  891. SEGDES MPRN
  892. SEGDES MPPN
  893. SEGDES MPUN
  894. SEGDES MPGAMN
  895. C
  896. SEGDES MELEDU
  897. SEGDES MATRIK
  898. SEGDES IMATRI
  899. C
  900. SEGDES RR , RUX , RUY , RUZ, RP ,
  901. & UXR , UXUX , UXUY , UXUZ, UXP ,
  902. & UYR , UYUX , UYUY , UYUZ, UYP ,
  903. & UZR , UZUX , UZUY , UZUZ, UYP ,
  904. & RETR , RETUX , RETUY , RETUZ, RETP
  905.  
  906. SEGSUP MLENTC
  907. SEGSUP MLENTF
  908. SEGDES MLMINC
  909. SEGSUP MLELIM
  910.  
  911. 9999 CONTINUE
  912. RETURN
  913. END
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  

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