Télécharger kfm14.eso

Retour à la liste

Numérotation des lignes :

kfm14
  1. C KFM14 SOURCE OF166741 24/12/13 21:16:07 12097
  2. C KFM14 SOURCE CHAT 05/01/13 00:55:31 5004
  3. SUBROUTINE KFM14(IRES,IRN,IGN,IRETN,IGAMN,IVCO,
  4. & ICHPSU,ICHPDI,ICHPVO,INORM,
  5. & MELEMC,MELEMF,MELEFL,MELTFA,DTPS,DCFL,
  6. & MELLIM,ICHLIM,NJAC,ICOEF,ICOEV,
  7. & IDU,IPROBL)
  8. C************************************************************************
  9. C
  10. C PROJET : CASTEM 2000
  11. C
  12. C NOM : KFM14
  13. C
  14. C DESCRIPTION : Voir aussi KFM1 et KFM12
  15. C
  16. C Cas 3D, gaz "calorically perfect"
  17. C relaxation de type SGS
  18. C
  19. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec estensions CISI)
  20. C
  21. C AUTEUR : T. KLOCZKO, DEN/DM2S/SFME/LTMF
  22. C
  23. C************************************************************************
  24. C ENTREES
  25. C
  26. C
  27. C 1) Pointeurs des CHPOINTs
  28. C
  29. C IRES : CHPOINT 'CENTRE' contenant le residu
  30. C
  31. C IRN : CHPOINT 'CENTRE' contenant la masse volumique
  32. C
  33. C IGN : CHPOINT 'CENTRE' contenant la q.d.m.
  34. C
  35. C IRETN : CHPOINT 'CENTRE' contenant l'energie totale
  36. C
  37. C IGAMN : CHPOINT 'CENTRE' contenant le gamma
  38. C
  39. C IVCO : CHPOINT 'CENTRE' contenant le cut-off
  40. C
  41. C ICHLIM : CHPOINT conditions aux bords
  42. C
  43. C ICOEV : CHPOINT 'CENTRE' contenant le (gamma - 1) K / (R \rho)
  44. C coeff pour calculer le ray. spect. de la matrice
  45. C visc.
  46. C
  47. C 3) Pointeurs de CHPOINTs de la table DOMAINE
  48. C
  49. C ICHPSU : CHPOINT "FACE" contenant la surface des faces
  50. C
  51. C ICHPDI : CHPOINT "CENTRE" contenant le diametre minimum
  52. C de chaque element
  53. C
  54. C ICHPVO : CHPOINT "CENTRE" contenant le volume
  55. C de chaque element
  56. C
  57. C INORM : CHPOINT "CENTRE" contenant le normales aux faces
  58. C
  59. C
  60. C 4) Pointeurs de MELEME de la table DOMAINE
  61. C
  62. C MELEMC : MELEME 'CENTRE' du SPG des CENTRES
  63. C
  64. C MELEMF : MELEME 'FACE' du SPG des FACES
  65. C
  66. C MELEFL : MELEME 'FACEL' du connectivité FACES -> ELEM
  67. C
  68. C MELLIM : MELEME SPG conditions aux bords
  69. C
  70. C 5)
  71. C
  72. C DCFL = le double de la CFL
  73. C
  74. C DTPS = pas de temps physique
  75. C
  76. C NJAC = nombre d'iterations dans le jacobien
  77. C
  78. C
  79. C SORTIES
  80. C
  81. C IDU : resultat
  82. C
  83. C IPROBL : si > 0, il y a un probleme
  84. C
  85. C************************************************************************
  86. C
  87. C HISTORIQUE (Anomalies et modifications éventuelles)
  88. C
  89. C HISTORIQUE : 2004 création
  90. C
  91. C************************************************************************
  92. C
  93. C
  94. C N.B.: On suppose qu'on a déjà controllé RO, P > 0
  95. C GAMMA \in (1,3)
  96. C Y \in (0,1)
  97. C Si non il faut le faire!!!
  98. C
  99. C************************************************************************
  100. C
  101. IMPLICIT INTEGER(I-N)
  102. INTEGER IRN,IGN,IRETN,IGAMN,ICHPSU,ICHPDI,ICHPVO,INORM
  103. & ,MELEMF,IDU,NFAC, NFACE
  104. & ,IGEOMF,IGEOMC, NGCEG, NGCED, NGCF, NLCF, NLCEG, NLCED
  105. & ,ICEN,NCEN,ICHLIM,MELLIM,NLLIM,IRES,NJAC,ICOMP
  106. & ,I1,I2, IBLJAC, IPROBL, IVCO, MELTFA
  107. & ,NSOUPO,IFACT,NELT, ISOUP, IELT, IFAC, IFACG, JG
  108. & ,ISOUP1, ISOUP2, ICOEF,ICOEV
  109. & , ID, IELT1, IELT2, IFAC1, IFAC2
  110. REAL*8 ROG, RUXG, RUYG, RUZG, RETG, GAMG, RHTG, RECG
  111. & , ROD, RUXD, RUYD, RUZD, RETD, GAMD, RHTD, RECD
  112. & , UXG, UYG, UZG, UNG, UTG, UVG, PG, VOLG, DIAMG, SURF
  113. & , UXD, UYD, UZD, UND, UTD, UVD, PD
  114. & , CNX, CNY, CNZ, CTX, CTY, CTZ, CVX, CVY, CVZ
  115. & , DCFL, DTPS, UNSDT, UNSDTF
  116. & , FR, FRUX, FRUY, FRUZ, FRET
  117. & , QG, CG, UCOG, ROF, PF, UNF, GAMF, UCOF, CF, SIGMAF
  118. & , QN, PHI2, COEF, COEF1
  119. C
  120. CHARACTER*8 TYPE
  121. LOGICAL LOGINV, LOGJAC
  122. C
  123. C**** LES INCLUDES
  124. C
  125.  
  126. -INC PPARAM
  127. -INC CCOPTIO
  128. -INC SMCHPOI
  129. POINTEUR MPOVSU.MPOVAL, MPOVDI.MPOVAL
  130. & , MPODU.MPOVAL, MPOVOL.MPOVAL
  131. & , MPRN.MPOVAL, MPGN.MPOVAL, MPRETN.MPOVAL, MPGAMN.MPOVAL
  132. & , MPNORM.MPOVAL, MPLIM.MPOVAL, MPORES.MPOVAL, MPOCO.MPOVAL
  133. & , MPOCO1.MPOVAL, MELEFL.MELEME, MELEMC.MELEME
  134. & , MPCOEV.MPOVAL
  135. -INC SMCOORD
  136. -INC SMELEME
  137. -INC SMLMOTS
  138. -INC SMLENTI
  139. POINTEUR MLELIM.MLENTI, MLESUP.MLENTI
  140. C
  141. C**** POINTEUR vecteurs
  142. C
  143. SEGMENT VEC
  144. REAL*8 VALVEC(I1)
  145. ENDSEGMENT
  146. POINTEUR SIGMA0.VEC, AN0.VEC, DN0.VEC, D1.VEC
  147. & , USDTI.VEC, PHI2V.VEC, SIGMAV.VEC
  148. C
  149. C**** POINTEUR matriciels
  150. C
  151. SEGMENT MAT
  152. REAL*8 VAL(I1,I2)
  153. ENDSEGMENT
  154. POINTEUR CONS0.MAT, CONS1.MAT, BN0.MAT, BN1.MAT
  155. & , CN0.MAT, CN1.MAT, DU.MAT
  156. & , RES.MAT
  157. & , Q1.MAT, Q2.MAT
  158. C
  159. C
  160. C**** IPROBL: si different de 0, un probleme a été detecté
  161. C
  162. IPROBL=0
  163. C
  164. C**** Initialisation des MLENTI des conditions aux limites
  165. C
  166. C
  167. CALL KRIPAD(MELLIM,MLELIM)
  168. C SEGINI MLELIM
  169. C
  170. C**** Initialisation des MELEMEs
  171. C
  172. C 'CENTRE', 'FACEL'
  173. C
  174. SEGACT MELEFL
  175. NFAC = MELEFL.NUM(/2)
  176. C
  177. C**** KRIPAD pour la correspondance global/local de centre
  178. C
  179. CALL KRIPAD(MELEMC,MLENT1)
  180. C
  181. C**** MLENTI1 a MCORD.XCOORD(/1)/(IDIM+1) elements
  182. C
  183. C Si i est le numero global d'un noeud de ICEN,
  184. C MLENT1.LECT(i) contient sa position, i.e.
  185. C
  186. C I = numero global du noeud centre
  187. C MLENT1.LECT(i) = numero local du noeud centre
  188. C
  189. C MLENT1 déjà activé, i.e.
  190. C
  191. C SEGINI MLENT1
  192. C
  193. C
  194. C**** KRIPAD pour la correspondance global/local de 'FACE'
  195. C
  196. CALL KRIPAD(MELEMF,MLENT2)
  197. C SEGINI MLENT2
  198. C
  199. C
  200. C**** CHPOINTs de la table DOMAINE
  201. C
  202. CALL LICHT(ICHPSU,MPOVSU,TYPE,IGEOMF)
  203. CALL LICHT(ICHPDI,MPOVDI,TYPE,IGEOMC)
  204. CALL LICHT(ICHPVO,MPOVOL,TYPE,IGEOMC)
  205. CALL LICHT(INORM,MPNORM,TYPE,IGEOMC)
  206. C
  207. C**** LICHT active les MPOVALs en *MOD
  208. C
  209. C i.e.
  210. C
  211. C SEGACT MPOVSU*MOD
  212. C SEGACT MPOVOL*MOD
  213. C SEGACT MPOVDI*MOD
  214. C SEGACT MPNORM*MOD
  215. C
  216. CALL LICHT(IDU,MPODU,TYPE,IGEOMC)
  217. C SEGACT MPODU*MOD
  218. C
  219. C USDTI initialisé a zero; USDTI = 1 / DT
  220. C
  221. NCEN=MPOVOL.VPOCHA(/1)
  222. I1=NCEN
  223. SEGINI USDTI
  224. C
  225. CALL LICHT(IRES,MPORES,TYPE,IGEOMC)
  226. CALL LICHT(IRN,MPRN,TYPE,IGEOMC)
  227. CALL LICHT(IGN,MPGN,TYPE,IGEOMC)
  228. CALL LICHT(IRETN,MPRETN,TYPE,IGEOMC)
  229. CALL LICHT(IGAMN,MPGAMN,TYPE,IGEOMC)
  230. CALL LICHT(IVCO,MPOCO,TYPE,IGEOMC)
  231. CALL LICHT(ICHLIM,MPLIM,TYPE,MELLIM)
  232. CALL LICHT(ICOEV,MPCOEV,TYPE,IGEOMC)
  233. C
  234. C SEGACT MPORES*MOD
  235. C SEGACT MPRN*MOD
  236. C SEGACT MPGN*MOD
  237. C SEGACT MPRETN*MOD
  238. C SEGACT MPGAMN*MOD
  239. C SEGACT MPOCO
  240. C SEGACT MPLIM*MOD
  241. C SEGACT MPCOEV*MOD
  242. C
  243. SEGINI, MPOCO1=MPOCO
  244. C
  245. C**** MPOCO1 is the "corrected cut-off" speed.
  246. C It is bigger than the given cut-off and the local
  247. C speed.
  248. C
  249. IF(IGEOMF .NE. MELEMF)THEN
  250. WRITE(IOIMP,*) 'Anomalie dans kfm14.eso'
  251. WRITE(IOIMP,*) 'Probleme de SPG'
  252. C 21 2
  253. C Données incompatibles
  254. CALL ERREUR(21)
  255. GOTO 9999
  256. ENDIF
  257. IF(IGEOMC .NE. MELEMC)THEN
  258. WRITE(IOIMP,*) 'Anomalie dans kfm14.eso'
  259. WRITE(IOIMP,*) 'Probleme de SPG'
  260. C 21 2
  261. C Données incompatibles
  262. CALL ERREUR(21)
  263. GOTO 9999
  264. ENDIF
  265. C
  266. C**** On initialise GAMMA=I+(1-phi2)/phi2*Q1.(Q2)^t
  267. C
  268. I1=5
  269. I2=NCEN
  270. SEGINI Q1
  271. SEGINI Q2
  272. C
  273. C**** On initialise le segment de travail D1
  274. C
  275. I1=5
  276. SEGINI D1
  277. C
  278. C**** On initialise AN0, DN0, PHI2V
  279. C
  280. I1=NCEN
  281. SEGINI AN0
  282. SEGINI DN0
  283. SEGINI PHI2V
  284. C
  285. C**** On initialise BN0
  286. C
  287. I1=5
  288. I2=NCEN
  289. SEGINI BN0
  290. C
  291. C**** On initialise BN1
  292. C
  293. I1=5
  294. I2=NCEN
  295. SEGINI BN1
  296. C
  297. C**** On initialise CN0
  298. C
  299. I1=5
  300. I2=NCEN
  301. SEGINI CN0
  302. C
  303. C**** On initialise CN1
  304. C
  305. I1=5
  306. I2=NCEN
  307. SEGINI CN1
  308. C
  309. C**** On initialise SIGMA0, SIGMAV
  310. C
  311. I1=NFAC
  312. SEGINI SIGMA0
  313. SEGINI SIGMAV
  314. C
  315. C**** RES
  316. C
  317. I1=5
  318. I2=NCEN
  319. SEGINI RES
  320. DO ICEN=1,NCEN,1
  321. DO ICOMP=1,5,1
  322. RES.VAL(ICOMP,ICEN)=MPORES.VPOCHA(ICEN,ICOMP)
  323. ENDDO
  324. ENDDO
  325. SEGDES MPORES
  326. C
  327. C***** DU (increment des variables conservatives)
  328. C
  329. I1=5
  330. I2=NCEN
  331. SEGINI DU
  332. C
  333. C**** Les variables conservatives
  334. C
  335. C CONS1.VAL contient les variables conservatives + gamma
  336. C i.e. rho(i) = CONS.VAL(1,i)
  337. C rhoux(i) = CONS.VAL(2,i)
  338. C rhouy(i) = CONS.VAL(3,i)
  339. C rhouz(i) = CONS.VAL(4,i)
  340. C rhoet(i) = CONS.VAL(5,i)
  341. C gam(i) = CONS.VAL(6,i)
  342. C
  343. I1=6
  344. I2=NCEN
  345. SEGINI CONS0
  346. DO ICEN=1,NCEN,1
  347. CONS0.VAL(1,ICEN)=MPRN.VPOCHA(ICEN,1)
  348. CONS0.VAL(2,ICEN)=MPGN.VPOCHA(ICEN,1)
  349. CONS0.VAL(3,ICEN)=MPGN.VPOCHA(ICEN,2)
  350. CONS0.VAL(4,ICEN)=MPGN.VPOCHA(ICEN,3)
  351. CONS0.VAL(5,ICEN)=MPRETN.VPOCHA(ICEN,1)
  352. CONS0.VAL(6,ICEN)=MPGAMN.VPOCHA(ICEN,1)
  353. ENDDO
  354. SEGDES MPRN
  355. SEGDES MPRETN
  356. SEGDES MPGN
  357. SEGDES MPGAMN
  358. C
  359. SEGINI, CONS1=CONS0
  360. C
  361. C**** Storage of l-1 values of F at the l Jacobi iteration
  362. C
  363. IPT1=MELTFA
  364. SEGACT IPT1
  365. NSOUPO= IPT1.LISOUS(/1)
  366. NSOUPO=MAX(NSOUPO,1)
  367. JG=NSOUPO
  368. SEGINI MLESUP
  369. IFACT=0
  370. IF(NSOUPO .EQ. 1)THEN
  371. MLESUP.LECT(1)=IPT1
  372. NFACE=IPT1.NUM(/1)
  373. NELT=IPT1.NUM(/2)
  374. IFACT=IFACT+(NFACE*NELT)
  375. ELSE
  376. DO ISOUP = 1, NSOUPO, 1
  377. IPT2=IPT1.LISOUS(ISOUP)
  378. MLESUP.LECT(ISOUP)=IPT2
  379. SEGACT IPT2
  380. NFACE=IPT2.NUM(/1)
  381. NELT=IPT2.NUM(/2)
  382. IFACT=IFACT+(NFACE*NELT)
  383. ENDDO
  384. ENDIF
  385. C
  386. C***********************************************************************
  387. C**** FIRST JACOBI ITERATION *******************************************
  388. C***********************************************************************
  389. C
  390. C
  391. C**** LOOP on ELTFA to compute:
  392. C
  393. C AN0_i = 1/(2 \Omega_i) \sum_j \sigma_i,j S_j
  394. C SIGMA0_j
  395. C The cut-off in each cell
  396. C The reciprocal of the dual time step USDTI
  397. C
  398. ICEN=0
  399. IFACG=0
  400. DO ISOUP=1,NSOUPO,1
  401. IPT2=MLESUP.LECT(ISOUP)
  402. NFACE=IPT2.NUM(/1)
  403. NELT=IPT2.NUM(/2)
  404. DO IELT=1,NELT,1
  405. ICEN=ICEN+1
  406. DO IFAC=1,NFACE,1
  407. C IFACG increase with IFAC,IELT,ISOUP
  408. IFACG = IFACG+1
  409. NGCF = IPT2.NUM(IFAC,IELT)
  410. NLCF = MLENT2.LECT(NGCF)
  411. C
  412. C************* NLCF = numero local du centre de facel
  413. C NGCF = numero global du centre de facel
  414. C NGCEG = numero global du centre ELT "gauche"
  415. C NLCEG = numero local du centre ELT "gauche"
  416. C NGCED = numero global du centre ELT "droite"
  417. C NLCED = numero local du centre ELT "droite"
  418. C
  419. NGCEG = MELEFL.NUM(1,NLCF)
  420. NGCED = MELEFL.NUM(3,NLCF)
  421. NLCEG = MLENT1.LECT(NGCEG)
  422. NLCED = MLENT1.LECT(NGCED)
  423. C
  424. CNX = MPNORM.VPOCHA(NLCF,7)
  425. CNY = MPNORM.VPOCHA(NLCF,8)
  426. CNZ = MPNORM.VPOCHA(NLCF,9)
  427. CTX = MPNORM.VPOCHA(NLCF,1)
  428. CTY = MPNORM.VPOCHA(NLCF,2)
  429. CTZ = MPNORM.VPOCHA(NLCF,3)
  430. CVX = MPNORM.VPOCHA(NLCF,4)
  431. CVY = MPNORM.VPOCHA(NLCF,5)
  432. CVZ = MPNORM.VPOCHA(NLCF,6)
  433. C
  434. C************* Left or right?
  435. C
  436. IF(NLCEG .EQ. ICEN)THEN
  437. LOGINV=.FALSE.
  438. ELSEIF(NLCED .EQ. ICEN)THEN
  439. LOGINV=.TRUE.
  440. ELSE
  441. WRITE(IOIMP,*) 'Anomalie dans kfm13.eso'
  442. WRITE(IOIMP,*) 'Probleme de SPG'
  443. C 21 2
  444. C Données incompatibles
  445. CALL ERREUR(21)
  446. GOTO 9999
  447. ENDIF
  448. C************* If right, inversion
  449. IF(LOGINV) THEN
  450. NLCED=NLCEG
  451. NLCEG=ICEN
  452. CNX = -1.0D0*CNX
  453. CNY = -1.0D0*CNY
  454. CNZ = -1.0D0*CNZ
  455. CTX = -1.0D0*CTX
  456. CTY = -1.0D0*CTY
  457. CTZ = -1.0D0*CTZ
  458. CVX = -1.0D0*CVX
  459. CVY = -1.0D0*CVY
  460. CVZ = -1.0D0*CVZ
  461. ENDIF
  462. C
  463. SURF = MPOVSU.VPOCHA(NLCF,1)
  464. C
  465. C************* Recuperation des Etats "gauche" et "droite"
  466. C
  467. C
  468. ROG = CONS0.VAL(1,NLCEG)
  469. RUXG = CONS0.VAL(2,NLCEG)
  470. RUYG = CONS0.VAL(3,NLCEG)
  471. RUZG = CONS0.VAL(4,NLCEG)
  472. RETG = CONS0.VAL(5,NLCEG)
  473. GAMG = CONS0.VAL(6,NLCEG)
  474. C
  475. UXG = RUXG / ROG
  476. UYG = RUYG / ROG
  477. UZG = RUZG / ROG
  478. C
  479. UNG = (UXG * CNX) + (UYG * CNY) + (UZG * CNZ)
  480. UTG = (UXG * CTX) + (UYG * CTY) + (UZG * CTZ)
  481. UVG = (UXG * CVX) + (UYG * CVY) + (UZG * CVZ)
  482. C
  483. RECG = 0.5D0 * (RUXG**2 + RUYG**2 + RUZG**2)
  484. RECG = RECG / ROG
  485. PG = (GAMG - 1.0D0) * (RETG - RECG)
  486. C
  487. VOLG = MPOVOL.VPOCHA(NLCEG,1)
  488. DIAMG = MPOVDI.VPOCHA(NLCEG,1)
  489. C
  490. ROD = CONS0.VAL(1,NLCED)
  491. RUXD = CONS0.VAL(2,NLCED)
  492. RUYD = CONS0.VAL(3,NLCED)
  493. RUZD = CONS0.VAL(4,NLCED)
  494. RETD = CONS0.VAL(5,NLCED)
  495. GAMD = CONS0.VAL(6,NLCED)
  496. C
  497. UXD = RUXD / ROD
  498. UYD = RUYD / ROD
  499. UZD = RUZD / ROD
  500. C
  501. UND = (UXD * CNX) + (UYD * CNY) + (UZD * CNZ)
  502. UTD = (UXD * CTX) + (UYD * CTY) + (UZD * CTZ)
  503. UVD = (UXD * CVX) + (UYD * CVY) + (UZD * CVZ)
  504. C
  505. RECD = 0.5D0 * (RUXD**2 + RUYD**2 + RUZD**2)
  506. RECD = RECD / ROD
  507. PD = (GAMD - 1.0D0) * (RETD - RECD)
  508. C
  509. IF(NLCEG .EQ. NLCED)THEN
  510. C Murs ou condition limite
  511. NLLIM=MLELIM.LECT(NGCF)
  512. IF(NLLIM .EQ.0)THEN
  513. C Mur
  514. UND = -1.0D0 * UNG
  515. UTD = UTG
  516. UVD = UVG
  517. UXD = UND * CNX + UTD * CTX + UVD * CVX
  518. UYD = UND * CNY + UTD * CTY + UVD * CVY
  519. UZD = UND * CNZ + UTD * CTZ + UVD * CVZ
  520. C
  521. RUXD = ROD * UXD
  522. RUYD = ROD * UYD
  523. RUZD = ROD * UZD
  524. C
  525. ELSE
  526. ROD = MPLIM.VPOCHA(NLLIM,1)
  527. UXD = MPLIM.VPOCHA(NLLIM,2)
  528. UYD = MPLIM.VPOCHA(NLLIM,3)
  529. UZD = MPLIM.VPOCHA(NLLIM,4)
  530. PD = MPLIM.VPOCHA(NLLIM,5)
  531. C
  532. RUXD = ROD*UXD
  533. RUYD = ROD*UYD
  534. RUZD = ROD * UZD
  535. C
  536. GAMD = GAMG
  537. C
  538. UND = (UXD * CNX) + (UYD * CNY) + (UZD * CNZ)
  539. UTD = (UXD * CTX) + (UYD * CTY) + (UZD * CTZ)
  540. UVD = (UXD * CVX) + (UYD * CVY) + (UZD * CVZ)
  541. C
  542. RETD = ((1.0D0/(GAMD - 1.0D0))*PD)
  543. & +(0.5D0*ROD*(UXD**2+UYD**2+UZD**2))
  544. ENDIF
  545. ENDIF
  546. C
  547. C************* We check that density and pressure are positive
  548. C
  549. IF((ROG .LE. 0.0D0) .OR. (ROD .LE. 0.0D0) .OR.
  550. & (PG .LE. 0.0D0) .OR. (PD .LE. 0.0D0))THEN
  551. WRITE(IOIMP,*) 'FMM'
  552. WRITE(IOIMP,*) 'TEST'
  553. C 22 0
  554. C**************** Opération malvenue. Résultat douteux
  555. C
  556. CALL ERREUR(22)
  557. IPROBL = 1
  558. GOTO 9998
  559. ENDIF
  560. C
  561. C************* We compute the interfacial state
  562. C
  563. ROF = 0.5D0*(ROG+ROD)
  564. PF = 0.5D0*(PG+PD)
  565. UNF = 0.5D0*(UNG+UND)
  566. GAMF = 0.5D0*(GAMG+GAMD)
  567. C
  568. C************* We compute SIGMA and the corrected cut-off speed
  569. C
  570. UCOF=MAX(MPOCO.VPOCHA(NLCEG,1),MPOCO.VPOCHA(NLCED,1))
  571. UCOF=MAX(UCOF,((UNG**2+UTG**2+UVG**2)**0.5D0))
  572. UCOF=MAX(UCOF,((UND**2+UTD**2+UVD**2)**0.5D0))
  573. IF(UCOF .GT. MPOCO1.VPOCHA(NLCEG,1))
  574. & MPOCO1.VPOCHA(NLCEG,1)= UCOF
  575. C
  576. QN = ABS(UNF)
  577. CF = (GAMF * PF / ROF)**0.5D0
  578. IF(UCOF .GE. CF)THEN
  579. PHI2 = 1.0D0
  580. ELSEIF(QN .GT. CF)THEN
  581. PHI2 = 1.0D0
  582. ELSEIF(QN .LT. UCOF)THEN
  583. PHI2 = UCOF / CF
  584. ELSE
  585. PHI2 = QN / CF
  586. ENDIF
  587. PHI2 = PHI2 * PHI2
  588. C
  589. SIGMAF = (1.0D0 - PHI2) * QN
  590. SIGMAF = SIGMAF * SIGMAF
  591. SIGMAF = SIGMAF + (4.0D0 * PHI2 * CF * CF)
  592. SIGMAF = SIGMAF**0.5D0
  593. SIGMAF = SIGMAF + ((1.0D0 + PHI2) * QN)
  594. SIGMAF = 0.5D0 * SIGMAF
  595. C
  596. SIGMA0.VALVEC(NLCF) = SIGMAF
  597. C
  598. C************* We compute AN0
  599. C
  600. AN0.VALVEC(NLCEG) = AN0.VALVEC(NLCEG)
  601. & + (0.5D0 * SIGMAF * SURF / VOLG)
  602. C
  603. C************* We compute the dual time step
  604. C
  605. UNSDT = USDTI.VALVEC(NLCEG)
  606. UNSDTF = SIGMAF / DIAMG
  607. IF(UNSDT .LT. UNSDTF) USDTI.VALVEC(NLCEG) = UNSDTF
  608. C
  609. C************* We compute SIGMAV
  610. C
  611. C COEF=FG
  612. COEF = (MCOORD.XCOOR(((NGCEG-1)*4)+1)
  613. & -MCOORD.XCOOR(((NGCF-1)*4)+1)) * CNX
  614. COEF = COEF
  615. & + (MCOORD.XCOOR(((NGCEG-1)*4)+2)
  616. & -MCOORD.XCOOR(((NGCF-1)*4)+2)) * CNY
  617. COEF = COEF
  618. & + (MCOORD.XCOOR(((NGCEG-1)*4)+3)
  619. & -MCOORD.XCOOR(((NGCF-1)*4)+3)) * CNZ
  620. C
  621. C COEF1=FD
  622. COEF1 = (MCOORD.XCOOR(((NGCED-1)*4)+1)
  623. & -MCOORD.XCOOR(((NGCF-1)*4)+1)) * CNX
  624. COEF1 = COEF1
  625. & + (MCOORD.XCOOR(((NGCED-1)*4)+2)
  626. & -MCOORD.XCOOR(((NGCF-1)*4)+2)) * CNY
  627. COEF1 = COEF1
  628. & + (MCOORD.XCOOR(((NGCED-1)*4)+3)
  629. & -MCOORD.XCOOR(((NGCF-1)*4)+3)) * CNZ
  630. C
  631. C COEF=|FG|+|FD|
  632. COEF = ABS(COEF)+ABS(COEF1)
  633. SIGMAF = 0.5D0 * (MPCOEV.VPOCHA(NLCEG,1)
  634. & +MPCOEV.VPOCHA(NLCED,1)) / COEF
  635. C
  636. C
  637. SIGMAV.VALVEC(NLCF) = SIGMAF
  638. C
  639. C************* We compute the contribution of SIGMAV to
  640. C the diagonal part of the matrix to invert
  641. C
  642. C In the given report, DNO is a_i^0, i.e.
  643. C DN0 = AN0 (previously defined) +
  644. C + (\frac{1}{{\Omega_i}}
  645. C \sum_j \sigma_{V,i,j}^{0} S_j)
  646. C + 1 / \Delta t^n
  647. C
  648. COEF = SURF / VOLG
  649. DN0.VALVEC(NLCEG) = DN0.VALVEC(NLCEG) + COEF * SIGMAF
  650. C
  651. C
  652. C************* We compute the flux
  653. C FLU.VALVEC(1:4,IFAC) flux in IFAC face
  654. C 1 -> mass
  655. C 2 -> momentum (x)
  656. C 3 -> momentum (y)
  657. C 4 -> energy
  658. C
  659. RHTD = RETD + PD
  660. FR = (ROD * UND)
  661. FRUX = (ROD * UND * UXD) + (PD * CNX)
  662. FRUY = (ROD * UND * UYD) + (PD * CNY)
  663. FRUZ = (ROD * UND * UZD) + (PD * CNZ)
  664. FRET = (UND * RHTD)
  665. C
  666. COEF = 0.5D0 * SURF / VOLG
  667. C
  668. BN0.VAL(1,NLCEG) = BN0.VAL(1,NLCEG)
  669. & + FR * COEF
  670. BN0.VAL(2,NLCEG) = BN0.VAL(2,NLCEG)
  671. & + FRUX * COEF
  672. BN0.VAL(3,NLCEG) = BN0.VAL(3,NLCEG)
  673. & + FRUY * COEF
  674. BN0.VAL(4,NLCEG) = BN0.VAL(4,NLCEG)
  675. & + FRUZ * COEF
  676. BN0.VAL(5,NLCEG) = BN0.VAL(5,NLCEG)
  677. & + FRET * COEF
  678. C
  679. C************* Viscous contribution
  680. C
  681. COEF = SURF * SIGMAV.VALVEC(NLCF) / VOLG
  682. C
  683. BN0.VAL(1,NLCEG) = BN0.VAL(1,NLCEG)
  684. & - (COEF * ROD)
  685. BN0.VAL(2,NLCEG) = BN0.VAL(2,NLCEG)
  686. & - (COEF * RUXD)
  687. BN0.VAL(3,NLCEG) = BN0.VAL(3,NLCEG)
  688. & - (COEF * RUYD)
  689. BN0.VAL(4,NLCEG) = BN0.VAL(4,NLCEG)
  690. & - (COEF * RUZD)
  691. BN0.VAL(5,NLCEG) = BN0.VAL(5,NLCEG)
  692. & - (COEF * RETD)
  693. C
  694. C************* On calcule CN0
  695. C
  696. C CN0 in the referred report is given by
  697. C \sum_j
  698. C \left\{
  699. C \frac{S_j}{2 \Omega_i} ~
  700. C \left(
  701. C \sigma_{i,j}^{0}
  702. C \mathbf{U}_{j,R}^{n+1,m}
  703. C \right)
  704. C \right\}
  705. C
  706. C
  707. COEF=SURF*SIGMA0.VALVEC(NLCF)/(2.0D0*VOLG)
  708. C
  709. CN0.VAL(1,NLCEG) = CN0.VAL(1,NLCEG)
  710. & + (COEF * ROD)
  711. CN0.VAL(2,NLCEG) = CN0.VAL(2,NLCEG)
  712. & + (COEF * RUXD)
  713. CN0.VAL(3,NLCEG) = CN0.VAL(3,NLCEG)
  714. & + (COEF * RUYD)
  715. CN0.VAL(4,NLCEG) = CN0.VAL(4,NLCEG)
  716. & + (COEF * RUZD)
  717. CN0.VAL(5,NLCEG) = CN0.VAL(5,NLCEG)
  718. & + (COEF * RETD)
  719.  
  720. ENDDO
  721. C
  722. C********** End of loop on the faces of the element
  723. C
  724. C N.B.: ICEN = NLCEG
  725. C
  726. C
  727. C Computation of the low-Mach preconditioning Matrix
  728. C
  729. CG = (GAMG * PG / ROG)**0.5D0
  730. UCOG = MPOCO1.VPOCHA(ICEN,1)
  731. QG = 2.0D0 * RECG / ROG
  732. QG = QG**0.5D0
  733. C
  734. IF(UCOG .GE. CG)THEN
  735. PHI2 = 1.0D0
  736. ELSEIF(QG .GT. CG)THEN
  737. PHI2 = 1.0D0
  738. ELSEIF(QG .LT. UCOG)THEN
  739. PHI2 = UCOG / CG
  740. ELSE
  741. PHI2 = QG / CG
  742. ENDIF
  743. PHI2 = PHI2 * PHI2
  744. PHI2V.VALVEC(ICEN) = PHI2
  745. C
  746. Q2.VAL(1,ICEN) = (0.5D0 * QG * QG)
  747. Q2.VAL(2,ICEN) = -1.0D0 * RUXG / ROG
  748. Q2.VAL(3,ICEN) = -1.0D0 * RUYG / ROG
  749. Q2.VAL(4,ICEN) = -1.0D0 * RUZG / ROG
  750. Q2.VAL(5,ICEN) = 1.0D0
  751. C
  752. COEF1 = (GAMG - 1.0D0) / (CG * CG)
  753. COEF = (1.0D0 / COEF1) + (0.5D0 * QG * QG)
  754. C COEF=HT
  755. Q1.VAL(1,ICEN) = COEF1
  756. Q1.VAL(2,ICEN) = COEF1 * RUXG / ROG
  757. Q1.VAL(3,ICEN) = COEF1 * RUYG / ROG
  758. Q1.VAL(4,ICEN) = COEF1 * RUZG / ROG
  759. Q1.VAL(5,ICEN) = COEF1 * COEF
  760. C
  761. C
  762. C Computation of the diagonal coefficients
  763. C
  764. AN0.VALVEC(ICEN) = AN0.VALVEC(ICEN)
  765. & + (USDTI.VALVEC(ICEN) * 2.0D0 / DCFL)
  766. C
  767. DN0.VALVEC(ICEN) = DN0.VALVEC(ICEN) + (1.0D0 / DTPS)
  768. c & + (USDTI.VALVEC(ICEN) * 2.0D0 / DCFL)
  769. C
  770. ENDDO
  771. ENDDO
  772. C
  773. C***********************************************************************
  774. C**** END FIRST JACOBI ITERATION ***************************************
  775. C***********************************************************************
  776. C
  777. C***********************************************************************
  778. C**** JACOBI LOOP ******************************************************
  779. C***********************************************************************
  780. C
  781. C
  782. LOGJAC=.TRUE.
  783. C
  784. DO IBLJAC=1,NJAC,1
  785. C
  786. C
  787. C Si ICOEF=2 (i.e. si on a "LJACOF" (voir kfm1.eso))
  788. C alors relaxation SGS avec uniquement des balayages "forward"
  789. C
  790. C Si ICOEF=3 (i.e. si on a "LJACOB")
  791. C alors relaxation SGS avec uniquement des balayages "backward"
  792. C
  793. C Sinon (i.e. si on a "LJACOFB")
  794. C alors relaxation SGS avec des balayages "forward" et "backward"
  795. C selon la parité de la sous-itération en cours (IBLJAC)...
  796. C
  797. IF(ICOEF .EQ. 2)THEN
  798. LOGJAC=.TRUE.
  799. ELSEIF(ICOEF .EQ. 3)THEN
  800. LOGJAC=.FALSE.
  801. ELSE
  802. LOGINV=LOGJAC
  803. LOGJAC=(IBLJAC / 2 * 2) .EQ. IBLJAC
  804. IF(LOGJAC)THEN
  805. LOGJAC= .NOT. LOGINV
  806. ELSE
  807. LOGJAC= LOGINV
  808. ENDIF
  809. ENDIF
  810. C
  811. IF(LOGJAC)THEN
  812. ICEN=0
  813. IFACG=0
  814. ID=1
  815. ISOUP1=1
  816. ISOUP2=NSOUPO
  817. ELSE
  818. ICEN=NCEN+1
  819. IFACG=IFACT+1
  820. ID=-1
  821. ISOUP1=NSOUPO
  822. ISOUP2=1
  823. ENDIF
  824. C
  825. DO ISOUP=ISOUP1,ISOUP2,ID
  826. IPT2=MLESUP.LECT(ISOUP)
  827. NFACE=IPT2.NUM(/1)
  828. NELT=IPT2.NUM(/2)
  829. C
  830. IF(LOGJAC)THEN
  831. IELT1=1
  832. IELT2=NELT
  833. IFAC1=1
  834. IFAC2=NFACE
  835. ELSE
  836. IELT2=1
  837. IELT1=NELT
  838. IFAC2=1
  839. IFAC1=NFACE
  840. ENDIF
  841. C
  842. DO IELT=IELT1,IELT2,ID
  843. ICEN=ICEN+ID
  844. DO IFAC=IFAC1,IFAC2,ID
  845. C IFACG increase with IFAC,IELT,ISOUP
  846. IFACG = IFACG+ID
  847. NGCF = IPT2.NUM(IFAC,IELT)
  848. NLCF = MLENT2.LECT(NGCF)
  849. NGCEG = MELEFL.NUM(1,NLCF)
  850. NGCED = MELEFL.NUM(3,NLCF)
  851. NLCEG = MLENT1.LECT(NGCEG)
  852. NLCED = MLENT1.LECT(NGCED)
  853. C
  854. CNX = MPNORM.VPOCHA(NLCF,7)
  855. CNY = MPNORM.VPOCHA(NLCF,8)
  856. CNZ = MPNORM.VPOCHA(NLCF,9)
  857. CTX = MPNORM.VPOCHA(NLCF,1)
  858. CTY = MPNORM.VPOCHA(NLCF,2)
  859. CTZ = MPNORM.VPOCHA(NLCF,3)
  860. CVX = MPNORM.VPOCHA(NLCF,4)
  861. CVY = MPNORM.VPOCHA(NLCF,5)
  862. CVZ = MPNORM.VPOCHA(NLCF,6)
  863. C
  864. C**************** Left or right?
  865. C
  866. IF(NLCEG .EQ. ICEN)THEN
  867. LOGINV=.FALSE.
  868. ELSEIF(NLCED .EQ. ICEN)THEN
  869. LOGINV=.TRUE.
  870. ELSE
  871. WRITE(IOIMP,*) 'Anomalie dans kfm14.eso'
  872. WRITE(IOIMP,*) 'Problème de SPG'
  873. C 21 2
  874. C Données incompatibles
  875. CALL ERREUR(21)
  876. GOTO 9999
  877. ENDIF
  878. C**************** If right, inversion
  879. IF(LOGINV) THEN
  880. NLCED=NLCEG
  881. NLCEG=ICEN
  882. CNX = -1.0D0*CNX
  883. CNY = -1.0D0*CNY
  884. CNZ = -1.0D0*CNZ
  885. CTX = -1.0D0*CTX
  886. CTY = -1.0D0*CTY
  887. CTZ = -1.0D0*CTZ
  888. CVX = -1.0D0*CVX
  889. CVY = -1.0D0*CVY
  890. CVZ = -1.0D0*CVZ
  891. ENDIF
  892. C
  893. SURF = MPOVSU.VPOCHA(NLCF,1)
  894. SIGMAF = SIGMA0.VALVEC(NLCF)
  895. C
  896. C**************** Recuperation des Etats "gauche" et "droite"
  897. C
  898. ROG = CONS1.VAL(1,NLCEG)
  899. RUXG = CONS1.VAL(2,NLCEG)
  900. RUYG = CONS1.VAL(3,NLCEG)
  901. RUZG = CONS1.VAL(4,NLCEG)
  902. RETG = CONS1.VAL(5,NLCEG)
  903. GAMG = CONS1.VAL(6,NLCEG)
  904. C
  905. UXG = RUXG / ROG
  906. UYG = RUYG / ROG
  907. UZG = RUZG / ROG
  908. C
  909. UNG = (UXG * CNX) + (UYG * CNY) + (UZG * CNZ)
  910. UTG = (UXG * CTX) + (UYG * CTY) + (UZG * CTZ)
  911. UVG = (UXG * CVX) + (UYG * CVY) + (UZG * CVZ)
  912. C
  913. RECG = 0.5D0 * (RUXG**2 + RUYG**2 + RUZG**2)
  914. RECG = RECG / ROG
  915. PG = (GAMG - 1.0D0) * (RETG - RECG)
  916. C
  917. VOLG = MPOVOL.VPOCHA(NLCEG,1)
  918. C
  919. ROD = CONS1.VAL(1,NLCED)
  920. RUXD = CONS1.VAL(2,NLCED)
  921. RUYD = CONS1.VAL(3,NLCED)
  922. RUZD = CONS1.VAL(4,NLCED)
  923. RETD = CONS1.VAL(5,NLCED)
  924. GAMD = CONS1.VAL(6,NLCED)
  925. C
  926. UXD = RUXD / ROD
  927. UYD = RUYD / ROD
  928. UZD = RUZD / ROD
  929. C
  930. UND = (UXD * CNX) + (UYD * CNY) + (UZD * CNZ)
  931. UTD = (UXD * CTX) + (UYD * CTY) + (UZD * CTZ)
  932. UVD = (UXD * CVX) + (UYD * CVY) + (UZD * CVZ)
  933. C
  934. RECD = 0.5D0 * (RUXD**2 + RUYD**2 + RUZD**2)
  935. RECD = RECD / ROD
  936. PD = (GAMD - 1.0D0) * (RETD - RECD)
  937. C
  938. IF(NLCEG .EQ. NLCED)THEN
  939. C Murs ou condition limite
  940. NLLIM=MLELIM.LECT(NGCF)
  941. IF(NLLIM .EQ.0)THEN
  942. C Mur
  943. UND = -1.0D0 * UNG
  944. UTD = UTG
  945. UVD = UVG
  946. UXD = UND * CNX + UTD * CTX + UVD * CVX
  947. UYD = UND * CNY + UTD * CTY + UVD * CVY
  948. UZD = UND * CNZ + UTD * CTZ + UVD * CVZ
  949. C
  950. RUXD = ROD*UXD
  951. RUYD = ROD*UYD
  952. RUZD = ROD * UZD
  953. C
  954. ELSE
  955. ROD = MPLIM.VPOCHA(NLLIM,1)
  956. UXD = MPLIM.VPOCHA(NLLIM,2)
  957. UYD = MPLIM.VPOCHA(NLLIM,3)
  958. UZD = MPLIM.VPOCHA(NLLIM,4)
  959. PD = MPLIM.VPOCHA(NLLIM,5)
  960. C
  961. RUXD = ROD*UXD
  962. RUYD = ROD*UYD
  963. RUZD = ROD * UZD
  964. C
  965. GAMD = GAMG
  966. C
  967. UND = (UXD * CNX) + (UYD * CNY) + (UZD * CNZ)
  968. UTD = (UXD * CTX) + (UYD * CTY) + (UZD * CTZ)
  969. UVD = (UXD * CVX) + (UYD * CVY) + (UZD * CVZ)
  970. RETD = ((1.0D0/(GAMD - 1.0D0))*PD)
  971. & +(0.5D0*ROD*(UXD**2+UYD**2+UZD**2))
  972. ENDIF
  973. ENDIF
  974. C
  975. C**************** We check that density and pressure are positive
  976. C
  977. IF((ROG .LE. 0.0D0) .OR. (ROD .LE. 0.0D0) .OR.
  978. & (PG .LE. 0.0D0) .OR. (PD .LE. 0.0D0))THEN
  979. WRITE(IOIMP,*) 'FMM'
  980. WRITE(IOIMP,*) 'ITERATION JAC',IBLJAC
  981. WRITE(IOIMP,*) 'ITERATION ICEN',ICEN
  982. WRITE(IOIMP,*) ROG,PG
  983. WRITE(IOIMP,*) ROD,PD
  984. C
  985. C 22 0
  986. C******************* Opération malvenue. Résultat douteux
  987. C
  988. CALL ERREUR(22)
  989. IPROBL = 1
  990. GOTO 9998
  991. ENDIF
  992. C
  993. C
  994. C**************** We compute the flux
  995. C FLU.VALVEC(1:4,IFAC) flux in IFAC face
  996. C 1 -> mass
  997. C 2 -> momentum (x)
  998. C 3 -> momentum (y)
  999. C 4 -> energy
  1000. C
  1001. RHTD = RETD + PD
  1002. FR = (ROD * UND)
  1003. FRUX = (ROD * UND * UXD) + (PD * CNX)
  1004. FRUY = (ROD * UND * UYD) + (PD * CNY)
  1005. FRUZ = (ROD * UND * UZD) + (PD * CNZ)
  1006. FRET = (UND * RHTD)
  1007. C
  1008. COEF = 0.5D0 * SURF / VOLG
  1009. C
  1010. BN1.VAL(1,NLCEG) = BN1.VAL(1,NLCEG)
  1011. & + FR * COEF
  1012. BN1.VAL(2,NLCEG) = BN1.VAL(2,NLCEG)
  1013. & + FRUX * COEF
  1014. BN1.VAL(3,NLCEG) = BN1.VAL(3,NLCEG)
  1015. & + FRUY * COEF
  1016. BN1.VAL(4,NLCEG) = BN1.VAL(4,NLCEG)
  1017. & + FRUZ * COEF
  1018. BN1.VAL(5,NLCEG) = BN1.VAL(5,NLCEG)
  1019. & + FRET * COEF
  1020. C
  1021. C**************** Viscous contribution
  1022. C
  1023. COEF = SURF * SIGMAV.VALVEC(NLCF) / VOLG
  1024. C
  1025. BN1.VAL(1,NLCEG) = BN1.VAL(1,NLCEG)
  1026. & - (COEF * ROD)
  1027. BN1.VAL(2,NLCEG) = BN1.VAL(2,NLCEG)
  1028. & - (COEF * RUXD)
  1029. BN1.VAL(3,NLCEG) = BN1.VAL(3,NLCEG)
  1030. & - (COEF * RUYD)
  1031. BN1.VAL(4,NLCEG) = BN1.VAL(4,NLCEG)
  1032. & - (COEF * RUZD)
  1033. BN1.VAL(5,NLCEG) = BN1.VAL(5,NLCEG)
  1034. & - (COEF * RETD)
  1035. C
  1036. C**************** On calcule DIS1
  1037. C
  1038. C DIS1 in the referred report is given by
  1039. C \sum_j
  1040. C \left\{
  1041. C \frac{S_j}{2 \Omega_i} ~
  1042. C \left(
  1043. C \sigma_{i,j}^{0}
  1044. C \mathbf{U}_{j,R}^{n+1,m,l}
  1045. C \right)
  1046. C \right\}
  1047. C
  1048. C
  1049. COEF=SURF*SIGMA0.VALVEC(NLCF)/(2.0D0*VOLG)
  1050. C
  1051. CN1.VAL(1,NLCEG) = CN1.VAL(1,NLCEG)
  1052. & + (COEF * ROD)
  1053. CN1.VAL(2,NLCEG) = CN1.VAL(2,NLCEG)
  1054. & + (COEF * RUXD)
  1055. CN1.VAL(3,NLCEG) = CN1.VAL(3,NLCEG)
  1056. & + (COEF * RUYD)
  1057. CN1.VAL(4,NLCEG) = CN1.VAL(4,NLCEG)
  1058. & + (COEF * RUZD)
  1059. CN1.VAL(5,NLCEG) = CN1.VAL(5,NLCEG)
  1060. & + (COEF * RETD)
  1061.  
  1062. ENDDO
  1063. C
  1064. C************* End of the loop on the faces of the element
  1065. C
  1066. DO ICOMP=1,5,1
  1067. D1.VALVEC(ICOMP) = 0.0D0
  1068. ENDDO
  1069. C
  1070. COEF=0.0D0
  1071. DO I1=1,5,1
  1072. COEF = COEF
  1073. & + (Q2.VAL(I1,ICEN) * (CN1.VAL(I1,ICEN)
  1074. & -CN0.VAL(I1,ICEN)))
  1075. ENDDO
  1076. COEF = COEF
  1077. & * (1.0D0 - PHI2V.VALVEC(ICEN))
  1078. & / PHI2V.VALVEC(ICEN)
  1079. C
  1080. DO I1=1,5,1
  1081. D1.VALVEC(I1) = (CN1.VAL(I1,ICEN) - CN0.VAL(I1,ICEN))
  1082. & + (COEF * Q1.VAL(I1,ICEN))
  1083. ENDDO
  1084. C
  1085. C************* At this moment D1 = \Gamma \cdot (\Delta CN1)
  1086. C
  1087. DO ICOMP=1,5,1
  1088. C
  1089. C************* First increment
  1090. C
  1091. D1.VALVEC(ICOMP) = (D1.VALVEC(ICOMP)
  1092. & + RES.VAL(ICOMP,ICEN)
  1093. & + (BN0.VAL(ICOMP,ICEN)
  1094. & -BN1.VAL(ICOMP,ICEN)))
  1095. & / (AN0.VALVEC(ICEN)
  1096. & +DN0.VALVEC(ICEN))
  1097. ENDDO
  1098. C
  1099. C************* At this moment, in the referred report,
  1100. C D1 is (\delta \mathbf{U}')^{l+1}_i in section A3
  1101. C
  1102. C************* Second increment
  1103. C
  1104. COEF=0.0D0
  1105. DO I1=1,5,1
  1106. COEF = COEF + (Q2.VAL(I1,ICEN) * D1.VALVEC(I1))
  1107. ENDDO
  1108. C
  1109. C************* COEF is the scalar product between Q2 and the first
  1110. C increment.
  1111. C Let us multiply it by
  1112. C b_i^0 / (a_i^0 + b_i^0)
  1113. C
  1114. COEF = COEF
  1115. & * AN0.VALVEC(ICEN)
  1116. & * (PHI2V.VALVEC(ICEN) - 1.0D0)
  1117. COEF = COEF
  1118. & / (AN0.VALVEC(ICEN)
  1119. & + (DN0.VALVEC(ICEN) * PHI2V.VALVEC(ICEN)))
  1120. C
  1121. DO I1=1,5,1
  1122. D1.VALVEC(I1) = D1.VALVEC(I1)
  1123. & + COEF * Q1.VAL(I1,ICEN)
  1124. ENDDO
  1125. C
  1126. C************* D1 = \delta \mathbf{U}
  1127. C
  1128. DO ICOMP=1,5,1
  1129. DU.VAL(ICOMP,ICEN) = D1.VALVEC(ICOMP)
  1130. C
  1131. CONS1.VAL(ICOMP,ICEN) = CONS0.VAL(ICOMP,ICEN)
  1132. & + D1.VALVEC(ICOMP)
  1133. C
  1134. BN1.VAL(ICOMP,ICEN) = 0.0D0
  1135. CN1.VAL(ICOMP,ICEN) = 0.0D0
  1136. ENDDO
  1137. C
  1138. C********** End of the loop on the elements
  1139. ENDDO
  1140. C
  1141. C******* End of the loop on the Domains
  1142. ENDDO
  1143. C
  1144. C**** End of the Jacobi loop
  1145. ENDDO
  1146. C
  1147. 9998 CONTINUE
  1148. DO ICEN=1,NCEN,1
  1149. DO ICOMP=1,5,1
  1150. MPODU.VPOCHA(ICEN,ICOMP) = DU.VAL(ICOMP,ICEN)
  1151. ENDDO
  1152. ENDDO
  1153. C
  1154. SEGSUP DU
  1155. SEGSUP RES
  1156. SEGSUP CONS0
  1157. SEGSUP CONS1
  1158. SEGSUP Q1
  1159. SEGSUP Q2
  1160. SEGSUP SIGMA0
  1161. SEGSUP AN0
  1162. SEGSUP AN0
  1163. SEGSUP BN0
  1164. SEGSUP BN1
  1165. SEGSUP CN0
  1166. SEGSUP CN1
  1167. SEGSUP DN0
  1168. SEGSUP PHI2V
  1169. SEGSUP USDTI
  1170. C
  1171. SEGDES MPOVSU
  1172. SEGDES MPOVDI
  1173. SEGDES MPOVOL
  1174. SEGDES MPNORM
  1175. SEGDES MPOCO
  1176. SEGDES MPCOEV
  1177. C
  1178. SEGSUP MPOCO1
  1179. C
  1180. SEGDES MPODU
  1181. C
  1182. SEGDES MELEFL
  1183. SEGSUP MLENT1
  1184. SEGSUP MLENT2
  1185. C
  1186. SEGSUP MLELIM
  1187. IF(MPLIM .GT. 0) SEGDES MPLIM
  1188. C
  1189. DO ISOUP=1,NSOUPO,1
  1190. IPT2=MLESUP.LECT(ISOUP)
  1191. SEGDES IPT2
  1192. ENDDO
  1193. IPT2 = MELTFA
  1194. IF(ISOUP .GT. 1) SEGDES IPT2
  1195. SEGSUP MLESUP
  1196. C
  1197. 9999 CONTINUE
  1198. RETURN
  1199. END
  1200. C
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  

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