Télécharger konjp3.eso

Retour à la liste

Numérotation des lignes :

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

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