Télécharger konja3.eso

Retour à la liste

Numérotation des lignes :

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

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