Télécharger pre22f.eso

Retour à la liste

Numérotation des lignes :

pre22f
  1. C PRE22F SOURCE OF166741 24/10/03 21:15:32 12022
  2. SUBROUTINE PRE22F(ICEN,IFACE,IFACEL,INORM,
  3. & IALP, IUVC, IULC, IPC, ITVC, ITLC, IRVC, IRLC,
  4. & IALPF, IUVF, IULF, IPF, ITVF, ITLF,
  5. & IRVF, IRLF,
  6. & LOGAN,LOGNEG,LOGBOR,MESERR,VALER,VAL1,VAL2)
  7. C************************************************************************
  8. C
  9. C PROJET : CASTEM 2000
  10. C
  11. C NOM : PRE22F
  12. C
  13. C DESCRIPTION : Voir PRE12F
  14. C
  15. C Two Dimensions
  16. C
  17. C Two Fluid Flow, 1st order in time and space
  18. C
  19. C Creations des objets MCHAML IALPF, IUVF, IULF,
  20. C IPF, ITVF, ITLF, IRVF, IRLF
  21. C
  22. C LANGAGE : FORTRAN 77 + ESOPE 2000 (avec extensions CISI)
  23. C
  24. C AUTEUR : A. BECCANTINI, DRN/DMT/SEMT/TTMF
  25. C Modified for two-fluid flow by
  26. C Jose R. Garcia-Cascales
  27. C
  28. C************************************************************************
  29. C
  30. C APPELES (Outils) : KRIPAD, LICHT
  31. C
  32. C APPELES (Calcul) : AUCUN
  33. C
  34. C************************************************************************
  35. C
  36. C ENTREES
  37. C
  38. C 1) Pointeurs de MELEMEs et de CHPOINTs de la table DOMAINE
  39. C
  40. C ICEN : MELEME de 'POI1' SPG des CENTRES
  41. C
  42. C IFACE : MELEME de 'POI1' SPG des FACES
  43. C
  44. C IFACEL : MELEME de 'SEG3' avec
  45. C CENTRE d'Elt "gauche"
  46. C CENTRE de Face
  47. C CENTRE d'Elt "droite"
  48. C
  49. C N.B. = IFACE.NUM(i,1) = IFACEL.NUM(i,2)
  50. C
  51. C INORM : CHPOINT des cosinus directeurs de normales aux faces
  52. C
  53. C 2) Pointeurs des CHPOINTs
  54. C
  55. C IALP : CHPOINT "CENTRE" containing void fraction
  56. C
  57. C IUVC : CHPOINT "CENTRE" containing UVX & UVY
  58. C
  59. C IULC : CHPOINT "CENTRE" containing ULX & ULY
  60. C
  61. C IPC : CHPOINT "CENTRE" containing P
  62. C
  63. C ITV : CHPOINT "CENTRE" containing TV
  64. C
  65. C ITL : CHPOINT "CENTRE" containing TL
  66. C
  67. C IRVC : CHPOINT "CENTRE" containing RV
  68. C
  69. C IRLC : CHPOINT "CENTRE" containing RL
  70. C
  71. C SORTIES
  72. C
  73. C IALPF : MCHAML defined en la MELEME of pointers
  74. C IFACEL, it contains the void fraction
  75. C (a gauche et a droite de chaque face).
  76. C Only one component ('SCAL')
  77. C
  78. C IUVF : MCHAML "FACEL" vapour velocity and the
  79. C director cosines (n,t) in the corresponding face;
  80. C in the 2D case 6 composantes:
  81. C 'UVN' = normal velocity,
  82. C 'UVT' = tangent velocity,
  83. C 'UVV' = tangent velocity,
  84. C these two velocities are defined in a local
  85. C reference framework defined over the MELEME
  86. C of pointers IFACE
  87. C 'NX' = n.x
  88. C 'NY' = n.y
  89. C 'TX' = t.x
  90. C 'TY' = t.y
  91. C
  92. C IULF : MCHAML "FACEL" liquid velocity
  93. C in the 2D case 2 composantes:
  94. C 'ULN' = normal velocity,
  95. C 'ULT' = tangent velocity,
  96. C
  97. C IPF : MCHAML "FACEL" pressure
  98. C Only one component ('SCAL')
  99. C
  100. C ITVF : MCHAML "FACEL" vapour temperature
  101. C Only one component ('SCAL')
  102. C
  103. C ITVL : MCHAML "FACEL" liquid temperature
  104. C Only one component ('SCAL')
  105. C
  106. C IRVF : MCHAML "FACEL" vapour density
  107. C Only one component ('SCAL')
  108. C
  109. C IRLF : MCHAML "FACEL" liquid temperature
  110. C Only one component ('SCAL')
  111. C
  112. C LOGAN : anomalie detectee (changement de la convention dans
  113. C la table domaine)
  114. C
  115. C LOGNEG : (LOGICAL): si .TRUE. une pression ou une densité
  116. C negative a été detectée -> en interactif le
  117. C programme s'arrete en GIBIANE
  118. C (erreur stocké en MESERR et VALER)
  119. C
  120. C LOGBOR : (LOGICAL): si .TRUE. un gamma a ete detecte
  121. C dehor 1 et 3 (sa valeur stockée en MESERR et VALER;
  122. C en VAL1 et en VAL2 on stocke 1.0 et 3.0)
  123. C
  124. C MESERR
  125. C VALER
  126. C VAL1,
  127. C VAL2 : pour les messages d'erreur
  128. C
  129. C************************************************************************
  130. C
  131. C HISTORIQUE (Anomalies et modifications éventuelles)
  132. C
  133. C HISTORIQUE : Créée le 11.6.98.(Adapted to two phase flow 26th
  134. C February 2002)
  135. C
  136. C************************************************************************
  137. C
  138. C
  139. C ATTENTION: Cet programme marche que si le MAILLAGE est convex;
  140. C si non il faut changer l'argoritme de calcul de
  141. C l'orientation des normales aux faces.
  142. C
  143. C
  144. C************************************************************************
  145. C
  146. IMPLICIT INTEGER(I-N)
  147. IMPLICIT REAL*8(A-H,O-Z)
  148.  
  149. C**** Les variables
  150. C
  151. INTEGER ICEN, IFACE, IFACEL,
  152. & IALP, IUVC, IULC, IPC, ITVC, ITLC, IRVC, IRLC, INORM,
  153. & IALPF, IUVF, IULF, IPF, ITVF, ITLF, IRVF, IRLF,
  154. & IGEOM, NFAC,
  155. & N1PTEL, N1EL, N2PTEL, N2EL, N2, N1, N3, L1,
  156. & NLCF, NGCF, NGCEG, NLCEG, NGCED, NLCED, NGCF1
  157. REAL*8 VALER, VAL1, VAL2, XG, YG, XC, YC, DXG, DYG,
  158. & CNX, CNY, CTX, CTY, ORIENT,
  159. & AG, UVXG, UVYG, UVNG, UVTG, ULXG, ULYG, ULNG, ULTG,
  160. & PG, TVG, TLG, RVG, RLG,
  161. & AD, UVXD, UVYD, UVND, UVTD, ULXD, ULYD, ULND, ULTD,
  162. & PD, TVD, TLD, RVD, RLD
  163. CHARACTER*(40) MESERR
  164. CHARACTER*(8) TYPE
  165. LOGICAL LOGAN,LOGNEG, LOGBOR
  166. C
  167. C**** Les Includes
  168. C
  169. -INC SMCOORD
  170.  
  171. -INC PPARAM
  172. -INC CCOPTIO
  173. -INC SMCHPOI
  174. POINTEUR MPALP.MPOVAL, MPUVC.MPOVAL, MPULC.MPOVAL,
  175. & MPPC.MPOVAL, MPTVC.MPOVAL, MPTLC.MPOVAL,
  176. & MPRVC.MPOVAL, MPRLC.MPOVAL, MPNORM.MPOVAL
  177. -INC SMCHAML
  178. POINTEUR MLALP.MELVAL, MLP.MELVAL,
  179. & MLTV.MELVAL, MLTL.MELVAL,
  180. & MLRV.MELVAL, MLRL.MELVAL
  181. POINTEUR MLUVN.MELVAL, MLUVT.MELVAL,
  182. & MLULN.MELVAL, MLULT.MELVAL,
  183. & MLVNX.MELVAL, MLVNY.MELVAL, MLVTX.MELVAL, MLVTY.MELVAL,
  184. & MLLNX.MELVAL, MLLNY.MELVAL, MLLTX.MELVAL, MLLTY.MELVAL
  185. -INC SMLENTI
  186. -INC SMELEME
  187. C
  188. C**** Initialisation des parametres d'erreur déjà faite, i.e.
  189. C
  190. C LOGNEG = .FALSE.
  191. C LOGBOR = .FALSE.
  192. C MESERR = ' '
  193. C MOTERR(1:40) = MESERR(1:40)
  194. C VALER = 0.0D0
  195. C VAL1 = 0.0D0
  196. C VAL2 = 0.0D0
  197. C
  198. C
  199. C**** KRIPAD pour la correspondance global/local de centre
  200. C
  201. CALL KRIPAD(ICEN,MLENT1)
  202. C
  203. C
  204. C**** MLENTI1 a MCORD.XCOORD(/1)/(IDIM+1) elements
  205. C
  206. C Si i est le numero global d'un noeud de ICEN,
  207. C MLENT1.LECT(i) contient sa position, i.e.
  208. C
  209. C I = numero global du noeud centre
  210. C MLENT1.LECT(i) = numero local du noeud centre
  211. C
  212. C MLENT1 déjà activé, i.e.
  213. C
  214. C SEGINI MLENTI1
  215. C
  216. C**** Activation de CHPOINTs
  217. C
  218. C void fraction
  219. C vapour velocities
  220. C liquid velocities
  221. C pressure
  222. C vapour temperature
  223. C liquid temperature
  224. C vapour density
  225. C liquid density
  226. C
  227. C cosinus directeurs des normales aux surface
  228. C
  229. CALL LICHT(IALP, MPALP, TYPE, IGEOM)
  230. CALL LICHT(IUVC, MPUVC, TYPE, IGEOM)
  231. CALL LICHT(IULC, MPULC, TYPE, IGEOM)
  232. CALL LICHT(IPC , MPPC , TYPE, IGEOM)
  233. CALL LICHT(ITVC, MPTVC, TYPE, IGEOM)
  234. CALL LICHT(ITLC, MPTLC, TYPE, IGEOM)
  235. CALL LICHT(IRVC, MPRVC, TYPE, IGEOM)
  236. CALL LICHT(IRLC, MPRLC, TYPE, IGEOM)
  237. CALL LICHT(INORM, MPNORM, TYPE, IGEOM)
  238. C
  239. C SEGACT MPALP
  240. C SEGACT MPUVC
  241. C SEGACT MPULC
  242. C SEGACT MPPC
  243. C SEGACT MPTVC
  244. C SEGACT MPTLC
  245. C SEGACT MPRVC
  246. C SEGACT MPRLC
  247. C SEGACT MPNORM
  248. C
  249. C**** MPOVA1 - MPOVA5 sont déjà activés i.e.:
  250. C
  251. C**** Le MELEME FACEL
  252. C
  253. IPT1 = IFACEL
  254. IPT2 = IFACE
  255. SEGACT IPT1
  256. SEGACT IPT2
  257. NFAC = IPT1.NUM(/2)
  258. C
  259. C**** Creation de MCHAMLs contenant les etats gauche et droite,
  260. C
  261. C i.e.:
  262. C
  263. C vitesse + cosinus directors du repere local
  264. C densité
  265. C pression
  266. C gamma
  267.  
  268. C
  269. C**** Cosinus directors du repere local et vitesse
  270. C
  271. C Les cosinus directeurs
  272. C
  273. C VAPOUR PHASE
  274.  
  275. N1 = 2
  276. N3 = 6
  277. L1 = 28
  278. SEGINI MCHEL1
  279. IUVF = MCHEL1
  280. MCHEL1.TITCHE = 'UV '
  281. MCHEL1.IMACHE(1) = IFACE
  282. MCHEL1.IMACHE(2) = IFACEL
  283. MCHEL1.CONCHE(1) = ' (n,t) in (x,y) '
  284. MCHEL1.CONCHE(2) = ' UV in (n,t) '
  285. C
  286. C**** Valeurs des cosinus definies par respect au repair global, i.e.
  287. C
  288. MCHEL1.INFCHE(1,1) = 2
  289. MCHEL1.INFCHE(1,3) = NIFOUR
  290. MCHEL1.INFCHE(1,4) = 0
  291. MCHEL1.INFCHE(1,5) = 0
  292. MCHEL1.INFCHE(1,6) = 1
  293. MCHEL1.IFOCHE = IFOUR
  294. C
  295. C**** Valeurs de vitesse definies par respect au repair local, i.e.
  296. C
  297. MCHEL1.INFCHE(2,1) = 1
  298. MCHEL1.INFCHE(2,3) = NIFOUR
  299. MCHEL1.INFCHE(2,4) = 0
  300. MCHEL1.INFCHE(2,5) = 0
  301. MCHEL1.INFCHE(2,6) = 1
  302. C
  303. C**** Le cosinus directeurs
  304. C
  305. N1PTEL = 1
  306. N1EL = NFAC
  307. N2PTEL = 0
  308. N2EL = 0
  309. C
  310. C**** MCHAML a N2 composantes:
  311. C
  312. C cosinus directeurs du repere local (n,t1)
  313. C
  314. C IDIM = 2 -> 4 composantes
  315. C
  316. N2 = 4
  317. SEGINI MCHAM1
  318. MCHEL1.ICHAML(1) = MCHAM1
  319. MCHAM1.NOMCHE(1) = 'NVX '
  320. MCHAM1.NOMCHE(2) = 'NVY '
  321. MCHAM1.NOMCHE(3) = 'TVX '
  322. MCHAM1.NOMCHE(4) = 'TVY '
  323. MCHAM1.TYPCHE(1) = 'REAL*8 '
  324. MCHAM1.TYPCHE(2) = 'REAL*8 '
  325. MCHAM1.TYPCHE(3) = 'REAL*8 '
  326. MCHAM1.TYPCHE(4) = 'REAL*8 '
  327. SEGINI MLVNX
  328. SEGINI MLVNY
  329. SEGINI MLVTX
  330. SEGINI MLVTY
  331. MCHAM1.IELVAL(1) = MLVNX
  332. MCHAM1.IELVAL(2) = MLVNY
  333. MCHAM1.IELVAL(3) = MLVTX
  334. MCHAM1.IELVAL(4) = MLVTY
  335. SEGDES MCHAM1
  336. C
  337. C**** Vitesse
  338. C
  339. N1EL = NFAC
  340. N1PTEL = 3
  341. N2EL = 0
  342. N2PTEL = 0
  343. C
  344. C**** MCHAML a N2 composantes:
  345. C
  346. C IDIM = 2 -> 2 composantes
  347. C
  348. N2 = 2
  349. SEGINI MCHAM1
  350. MCHEL1.ICHAML(2) = MCHAM1
  351. SEGDES MCHEL1
  352. MCHAM1.NOMCHE(1) = 'UVN '
  353. MCHAM1.NOMCHE(2) = 'UVT '
  354. MCHAM1.TYPCHE(1) = 'REAL*8 '
  355. MCHAM1.TYPCHE(2) = 'REAL*8 '
  356. SEGINI MLUVN
  357. SEGINI MLUVT
  358. MCHAM1.IELVAL(1) = MLUVN
  359. MCHAM1.IELVAL(2) = MLUVT
  360. SEGDES MCHAM1
  361. C
  362. C**** Cosinus directors du repere local et vitesse
  363. C
  364. C Les cosinus directeurs
  365. C
  366. C LIQUID PHASE
  367.  
  368. N1 = 2
  369. N3 = 6
  370. L1 = 28
  371. SEGINI MCHEL1
  372. IULF = MCHEL1
  373. MCHEL1.TITCHE = 'UL '
  374. MCHEL1.IMACHE(1) = IFACE
  375. MCHEL1.IMACHE(2) = IFACEL
  376. MCHEL1.CONCHE(1) = ' (n,t) in (x,y) '
  377. MCHEL1.CONCHE(2) = ' UL in (n,t) '
  378. C
  379. C**** Valeurs des cosinus definies par respect au repair global, i.e.
  380. C
  381. MCHEL1.INFCHE(1,1) = 2
  382. MCHEL1.INFCHE(1,3) = NIFOUR
  383. MCHEL1.INFCHE(1,4) = 0
  384. MCHEL1.INFCHE(1,5) = 0
  385. MCHEL1.INFCHE(1,6) = 1
  386. MCHEL1.IFOCHE = IFOUR
  387. C
  388. C**** Valeurs de vitesse definies par respect au repair local, i.e.
  389. C
  390. MCHEL1.INFCHE(2,1) = 1
  391. MCHEL1.INFCHE(2,3) = NIFOUR
  392. MCHEL1.INFCHE(2,4) = 0
  393. MCHEL1.INFCHE(2,5) = 0
  394. MCHEL1.INFCHE(2,6) = 1
  395. C
  396. C**** Le cosinus directeurs
  397. C
  398. N1PTEL = 1
  399. N1EL = NFAC
  400. N2PTEL = 0
  401. N2EL = 0
  402. C
  403. C**** MCHAML a N2 composantes:
  404. C
  405. C cosinus directeurs du repere local (n,t1)
  406. C
  407. C IDIM = 2 -> 4 composantes
  408. C
  409. N2 = 4
  410. SEGINI MCHAM1
  411. MCHEL1.ICHAML(1) = MCHAM1
  412. MCHAM1.NOMCHE(1) = 'NLX '
  413. MCHAM1.NOMCHE(2) = 'NLY '
  414. MCHAM1.NOMCHE(3) = 'TLX '
  415. MCHAM1.NOMCHE(4) = 'TLY '
  416. MCHAM1.TYPCHE(1) = 'REAL*8 '
  417. MCHAM1.TYPCHE(2) = 'REAL*8 '
  418. MCHAM1.TYPCHE(3) = 'REAL*8 '
  419. MCHAM1.TYPCHE(4) = 'REAL*8 '
  420. SEGINI MLLNX
  421. SEGINI MLLNY
  422. SEGINI MLLTX
  423. SEGINI MLLTY
  424. MCHAM1.IELVAL(1) = MLLNX
  425. MCHAM1.IELVAL(2) = MLLNY
  426. MCHAM1.IELVAL(3) = MLLTX
  427. MCHAM1.IELVAL(4) = MLLTY
  428. SEGDES MCHAM1
  429. C
  430. C**** Vitesse
  431. C
  432. N1EL = NFAC
  433. N1PTEL = 3
  434. N2EL = 0
  435. N2PTEL = 0
  436. C
  437. C**** MCHAML a N2 composantes:
  438. C
  439. C IDIM = 2 -> 2 composantes
  440. C
  441. N2 = 2
  442. SEGINI MCHAM1
  443. MCHEL1.ICHAML(2) = MCHAM1
  444. SEGDES MCHEL1
  445. MCHAM1.NOMCHE(1) = 'ULN '
  446. MCHAM1.NOMCHE(2) = 'ULT '
  447. MCHAM1.TYPCHE(1) = 'REAL*8 '
  448. MCHAM1.TYPCHE(2) = 'REAL*8 '
  449. SEGINI MLULN
  450. SEGINI MLULT
  451. MCHAM1.IELVAL(1) = MLULN
  452. MCHAM1.IELVAL(2) = MLULT
  453. SEGDES MCHAM1
  454. C
  455. C**** Void fraction
  456. C
  457. N1 = 1
  458. N3 = 6
  459. L1 = 15
  460. SEGINI MCHEL2
  461. IALPF = MCHEL2
  462. MCHEL2.IMACHE(1) = IFACEL
  463. MCHEL2.TITCHE = 'ALPHA '
  464. MCHEL2.CONCHE(1) = ' '
  465. C
  466. C**** Valeurs independente du repére, i.e.
  467. C
  468. MCHEL2.INFCHE(1,1) = 0
  469. MCHEL2.INFCHE(1,3) = NIFOUR
  470. MCHEL2.INFCHE(1,4) = 0
  471. MCHEL2.INFCHE(1,5) = 0
  472. MCHEL2.INFCHE(1,6) = 1
  473. MCHEL2.IFOCHE = IFOUR
  474. N2 = 1
  475. SEGINI MCHAM1
  476. MCHEL2.ICHAML(1) = MCHAM1
  477. SEGDES MCHEL2
  478. MCHAM1.NOMCHE(1) = 'SCAL '
  479. MCHAM1.TYPCHE(1) = 'REAL*8 '
  480. SEGINI MLALP
  481. MCHAM1.IELVAL(1) = MLALP
  482. SEGDES MCHAM1
  483. C
  484. C**** Pressure
  485. C
  486. MCHEL1 = IALPF
  487. SEGINI, MCHEL2 = MCHEL1
  488. IPF = MCHEL2
  489. MCHEL2.TITCHE = 'P '
  490. C
  491. C**** MCHAM1 = MCHAML de la alpha
  492. C
  493. SEGINI, MCHAM2 = MCHAM1
  494. MCHEL2.ICHAML(1) = MCHAM2
  495. SEGDES MCHEL2
  496. SEGINI MLP
  497. MCHAM2.IELVAL(1) = MLP
  498. SEGDES MCHAM2
  499. C
  500. C**** Vapour temperature
  501. C
  502. MCHEL1 = IALPF
  503. SEGINI, MCHEL2 = MCHEL1
  504. ITVF = MCHEL2
  505. MCHEL2.TITCHE = 'TV '
  506. C
  507. C**** MCHAM1 = MCHAML de la alpha
  508. C
  509. SEGINI, MCHAM2 = MCHAM1
  510. MCHEL2.ICHAML(1) = MCHAM2
  511. SEGDES MCHEL2
  512. SEGINI MLTV
  513. MCHAM2.IELVAL(1) = MLTV
  514. SEGDES MCHAM2
  515. C
  516. C**** Liquid temperature
  517. C
  518. MCHEL1 = IALPF
  519. SEGINI, MCHEL2 = MCHEL1
  520. ITLF = MCHEL2
  521. MCHEL2.TITCHE = 'TL '
  522. C
  523. C**** MCHAM1 = MCHAML de la alpha
  524. C
  525. SEGINI, MCHAM2 = MCHAM1
  526. MCHEL2.ICHAML(1) = MCHAM2
  527. SEGDES MCHEL2
  528. SEGINI MLTL
  529. MCHAM2.IELVAL(1) = MLTL
  530. SEGDES MCHAM2
  531. C
  532. C**** Vapour density
  533. C
  534. MCHEL1 = IALPF
  535. SEGINI, MCHEL2 = MCHEL1
  536. IRVF = MCHEL2
  537. MCHEL2.TITCHE = 'RV '
  538. C
  539. C**** MCHAM1 = MCHAML de la alpha
  540. C
  541. SEGINI, MCHAM2 = MCHAM1
  542. MCHEL2.ICHAML(1) = MCHAM2
  543. SEGDES MCHEL2
  544. SEGINI MLRV
  545. MCHAM2.IELVAL(1) = MLRV
  546. SEGDES MCHAM2
  547. C
  548. C**** Liquid density
  549. C
  550. MCHEL1 = IALPF
  551. SEGINI, MCHEL2 = MCHEL1
  552. IRLF = MCHEL2
  553. MCHEL2.TITCHE = 'RL '
  554. C
  555. C**** MCHAM1 = MCHAML de la alpha
  556. C
  557. SEGINI, MCHAM2 = MCHAM1
  558. MCHEL2.ICHAML(1) = MCHAM2
  559. SEGDES MCHEL2
  560. SEGINI MLRL
  561. MCHAM2.IELVAL(1) = MLRL
  562. SEGDES MCHAM2
  563.  
  564. C
  565. C**** Recapitulatif: les MELVALs et les MPOVALs actives
  566. C
  567. C MLVNX, MLVNY,
  568. C MLVTX, MLVTY,
  569. C
  570. C MLLNX, MLLNY,
  571. C MLLTX, MLLTY
  572. C
  573. C MLUVN, MLUVT -> vapour velocities
  574. C
  575. C MLULN, MLULT -> liquid velocities
  576. C
  577. C MLALP -> void fraction
  578. C
  579. C MLP -> pressure
  580. C
  581. C MLTV -> vapour temperature
  582. C
  583. C MLTL -> liquid temperature
  584. C
  585. C MLRV -> vapour density
  586. C
  587. C MLRL -> liquid density
  588. C****
  589. C MPALP -> void fraction
  590. C
  591. C MPUVC -> vapour velocity
  592. C
  593. C MPULC -> liquid velocity
  594. C
  595. C MPPC -> pressure
  596. C
  597. C MPTVC -> vapour temperature
  598. C
  599. C MPTLC -> liquid temperature
  600. C
  601. C MPRVC -> vapour density
  602. C
  603. C MPRLC -> liquid density
  604. C
  605. C MPNORM -> normales aux faces
  606. C
  607. C**** Boucle sur le faces
  608. C
  609. DO NLCF = 1, NFAC
  610. C
  611. C******* NLCF = numero local du centre de face
  612. C NGCF = numero global du centre de face
  613. C NGCEG = numero global du centre ELT "gauche"
  614. C NLCEG = numero local du centre ELT "gauche"
  615. C NGCED = numero global du centre ELT "droite"
  616. C NLCED = numero local du centre ELT "droite"
  617. C
  618. NGCEG = IPT1.NUM(1,NLCF)
  619. NGCF = IPT1.NUM(2,NLCF)
  620. NGCED = IPT1.NUM(3,NLCF)
  621. NLCEG = MLENT1.LECT(NGCEG)
  622. NLCED = MLENT1.LECT(NGCED)
  623. C
  624. C******* TEST: IPT2.NUM(1,NLCF) = IPT1.NUM(2,NLCF)
  625. C
  626. NGCF1 = IPT2.NUM(1,NLCF)
  627. IF( NGCF1 .NE. NGCF) THEN
  628. LOGAN = .TRUE.
  629. MESERR(1:40) = 'PRET, subroutine pre111.eso '
  630. GOTO 9999
  631. ENDIF
  632. C
  633. C******* Cosinus directeurs des NORMALES aux faces
  634. C
  635. C On impose que les normales sont direct "Gauche" -> "Centre"
  636. C
  637. XG = XCOOR((NGCEG-1)*(IDIM+1)+1)
  638. YG = XCOOR((NGCEG-1)*(IDIM+1)+2)
  639. XC = XCOOR((NGCF-1)*(IDIM+1)+1)
  640. YC = XCOOR((NGCF-1)*(IDIM+1)+2)
  641. DXG = XC - XG
  642. DYG = YC - YG
  643.  
  644. C
  645. C******* On calcule le sign du pruduit scalare
  646. C (Normales de Castem) * (vecteur "gauche" -> "centre")
  647. C
  648. CNX = MPNORM.VPOCHA(NLCF,1)
  649. CNY = MPNORM.VPOCHA(NLCF,2)
  650. ORIENT = CNX * DXG + CNY * DYG
  651. ORIENT = SIGN(1.0D0,ORIENT)
  652. IF(ORIENT .NE. 1.0D0)THEN
  653. LOGAN = .TRUE.
  654. MESERR(1:30)=
  655. & 'PRET , subroutine pre111.eso. '
  656. GOTO 9999
  657. ENDIF
  658. CNX = CNX * ORIENT
  659. CNY = CNY * ORIENT
  660. C
  661. C********** Cosinus directeurs de tangent 2D
  662. C
  663. CTX = -1.0D0 * CNY
  664. CTY = CNX
  665. C
  666. C
  667. C******* Les autres MELVALs
  668. C
  669. C
  670. C******* N.B.: On suppose qu'on a déjà controlle RO, P > 0
  671. C GAMMA \in (1,3)
  672. C Si non il faut le faire, en utlisant LOGBOR,
  673. C LOGNEG, VALER, VAL1, VAL2
  674. C
  675. C
  676. C
  677. C******* NGCEG = NGCED -> Mur
  678. C
  679.  
  680. IF( NGCEG .EQ. NGCED)THEN
  681. AG = MPALP.VPOCHA(NLCEG, 1)
  682. PG = MPPC.VPOCHA(NLCEG, 1)
  683. TVG = MPTVC.VPOCHA(NLCEG, 1)
  684. TLG = MPTLC.VPOCHA(NLCEG, 1)
  685. RVG = MPRVC.VPOCHA(NLCEG, 1)
  686. RLG = MPRLC.VPOCHA(NLCEG, 1)
  687. UVXG = MPUVC.VPOCHA(NLCEG, 1)
  688. UVYG = MPUVC.VPOCHA(NLCEG, 2)
  689. ULXG = MPULC.VPOCHA(NLCEG, 1)
  690. ULYG = MPULC.VPOCHA(NLCEG, 2)
  691. UVNG = UVXG * CNX + UVYG * CNY
  692. UVTG = UVXG * CTX + UVYG * CTY
  693. ULNG = ULXG * CNX + ULYG * CNY
  694. ULTG = ULXG * CTX + ULYG * CTY
  695. C
  696. C********** Son etat droite
  697. C
  698. AD = AG
  699. PD = PG
  700. TVD = TVG
  701. TLD = TLG
  702. RVD = RVG
  703. RLD = RLG
  704. UVND = -1.0D0 * UVNG
  705. UVTD = UVTG
  706. ULND = -1.0D0 * ULNG
  707. ULTD = ULTG
  708. C
  709. C************* Fin cas mur
  710. C
  711. ELSE
  712. C
  713. C************* Etat gauche
  714. C
  715. AG = MPALP.VPOCHA(NLCEG, 1)
  716. PG = MPPC.VPOCHA(NLCEG, 1)
  717. TVG = MPTVC.VPOCHA(NLCEG, 1)
  718. TLG = MPTLC.VPOCHA(NLCEG, 1)
  719. RVG = MPRVC.VPOCHA(NLCEG, 1)
  720. RLG = MPRLC.VPOCHA(NLCEG, 1)
  721. UVXG = MPUVC.VPOCHA(NLCEG, 1)
  722. UVYG = MPUVC.VPOCHA(NLCEG, 2)
  723. ULXG = MPULC.VPOCHA(NLCEG, 1)
  724. ULYG = MPULC.VPOCHA(NLCEG, 2)
  725. UVNG = UVXG * CNX + UVYG * CNY
  726. UVTG = UVXG * CTX + UVYG * CTY
  727. ULNG = ULXG * CNX + ULYG * CNY
  728. ULTG = ULXG * CTX + ULYG * CTY
  729. C
  730. C********** Etat gauche
  731. C
  732. AD = MPALP.VPOCHA(NLCED, 1)
  733. PD = MPPC.VPOCHA(NLCED, 1)
  734. TVD = MPTVC.VPOCHA(NLCED, 1)
  735. TLD = MPTLC.VPOCHA(NLCED, 1)
  736. RVD = MPRVC.VPOCHA(NLCED, 1)
  737. RLD = MPRLC.VPOCHA(NLCED, 1)
  738. UVXD = MPUVC.VPOCHA(NLCED, 1)
  739. UVYD = MPUVC.VPOCHA(NLCED, 2)
  740. ULXD = MPULC.VPOCHA(NLCED, 1)
  741. ULYD = MPULC.VPOCHA(NLCED, 2)
  742. UVND = UVXD * CNX + UVYD * CNY
  743. UVTD = UVXD * CTX + UVYD * CTY
  744. ULND = ULXD * CNX + ULYD * CNY
  745. ULTD = ULXD * CTX + ULYD * CTY
  746. ENDIF
  747. C
  748. C************* Les MELVALs
  749. C
  750. MLALP.VELCHE(1,NLCF) = AG
  751. MLALP.VELCHE(3,NLCF) = AD
  752. MLP.VELCHE(1,NLCF) = PG
  753. MLP.VELCHE(3,NLCF) = PD
  754. MLTV.VELCHE(1,NLCF) = TVG
  755. MLTV.VELCHE(3,NLCF) = TVD
  756. MLTL.VELCHE(1,NLCF) = TLG
  757. MLTL.VELCHE(3,NLCF) = TLD
  758. MLRV.VELCHE(1,NLCF) = RVG
  759. MLRV.VELCHE(3,NLCF) = RVD
  760. MLRL.VELCHE(1,NLCF) = RLG
  761. MLRL.VELCHE(3,NLCF) = RLD
  762.  
  763. MLUVN.VELCHE(1,NLCF) = UVNG
  764. MLUVN.VELCHE(3,NLCF) = UVND
  765. MLUVT.VELCHE(1,NLCF) = UVTG
  766. MLUVT.VELCHE(3,NLCF) = UVTD
  767. MLULN.VELCHE(1,NLCF) = ULNG
  768. MLULN.VELCHE(3,NLCF) = ULND
  769. MLULT.VELCHE(1,NLCF) = ULTG
  770. MLULT.VELCHE(3,NLCF) = ULTD
  771.  
  772. C LAS QUE VIENEN A CONTINUACION NO SIRVEN, TENEMOS LAS
  773. C MISMAS DIRECCIONES TANTO PARA LA FASE LIQUIDA COMO PARA
  774. C LA GASEOSA
  775.  
  776. MLVNX.VELCHE(1,NLCF) = CNX
  777. MLVNY.VELCHE(1,NLCF) = CNY
  778. MLVTX.VELCHE(1,NLCF) = CTX
  779. MLVTY.VELCHE(1,NLCF) = CTY
  780.  
  781. MLLNX.VELCHE(1,NLCF) = CNX
  782. MLLNY.VELCHE(1,NLCF) = CNY
  783. MLLTX.VELCHE(1,NLCF) = CTX
  784. MLLTY.VELCHE(1,NLCF) = CTY
  785.  
  786. ENDDO
  787. C
  788. C**** Desactivation des SEGMENTs
  789. C
  790. SEGDES IPT1
  791. SEGDES IPT2
  792. C
  793. SEGDES MPALP
  794. SEGDES MPUVC
  795. SEGDES MPULC
  796. SEGDES MPPC
  797. SEGDES MPTVC
  798. SEGDES MPTLC
  799. SEGDES MPRVC
  800. SEGDES MPRLC
  801. SEGDES MPNORM
  802. C
  803. SEGDES MLALP
  804. SEGDES MLP
  805. SEGDES MLTV
  806. SEGDES MLTL
  807. SEGDES MLRV
  808. SEGDES MLRL
  809.  
  810. C liquid vectors same as vapour ones,
  811. C there should have been only one set
  812.  
  813. SEGDES MLUVN
  814. SEGDES MLUVT
  815. SEGDES MLULN
  816. SEGDES MLULT
  817.  
  818. SEGDES MLVNX
  819. SEGDES MLVNY
  820. SEGDES MLVTX
  821. SEGDES MLVTY
  822. SEGDES MLLNX
  823. SEGDES MLLNY
  824. SEGDES MLLTX
  825. SEGDES MLLTY
  826. C
  827. C**** Destruction du MELNTI correspondance local/global
  828. C
  829. SEGSUP MLENT1
  830. C
  831. 9999 CONTINUE
  832. C
  833. RETURN
  834. END
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  

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