Télécharger pre32f.eso

Retour à la liste

Numérotation des lignes :

  1. C PRE32F SOURCE KK2000 14/04/10 21:15:30 8032
  2. SUBROUTINE PRE32F(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 : PRE32F
  12. C
  13. C DESCRIPTION : Voir PRE12F
  14. C
  15. C Three 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 & UVZ
  58. C
  59. C IULC : CHPOINT "CENTRE" containing ULX, UVY & ULZ
  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 'T1X' = t1.x
  90. C 'T1Y' = t1.y
  91. C 'T2X' = t2.x
  92. C 'T2Y' = t2.y
  93. C
  94. C IULF : MCHAML "FACEL" liquid velocity
  95. C in the 2D case 2 composantes:
  96. C 'ULN' = normal velocity
  97. C 'ULT' = tangent velocity
  98. C 'ULV' = tangent velocity
  99. C
  100. C IPF : MCHAML "FACEL" pressure
  101. C Only one component ('SCAL')
  102. C
  103. C ITVF : MCHAML "FACEL" vapour temperature
  104. C Only one component ('SCAL')
  105. C
  106. C ITVL : MCHAML "FACEL" liquid temperature
  107. C Only one component ('SCAL')
  108. C
  109. C IRVF : MCHAML "FACEL" vapour density
  110. C Only one component ('SCAL')
  111. C
  112. C IRLF : MCHAML "FACEL" liquid density
  113. C Only one component ('SCAL')
  114. C
  115. C LOGAN : anomalie detectee (changement de la convention dans
  116. C la table domaine)
  117. C
  118. C LOGNEG : (LOGICAL): si .TRUE. une pression ou une densité
  119. C negative a été detectée -> en interactif le
  120. C programme s'arrete en GIBIANE
  121. C (erreur stocké en MESERR et VALER)
  122. C
  123. C LOGBOR : (LOGICAL): si .TRUE. un gamma a ete detecte
  124. C dehor 1 et 3 (sa valeur stockée en MESERR et VALER;
  125. C en VAL1 et en VAL2 on stocke 1.0 et 3.0)
  126. C
  127. C MESERR
  128. C VALER
  129. C VAL1,
  130. C VAL2 : pour les messages d'erreur
  131. C
  132. C************************************************************************
  133. C
  134. C HISTORIQUE (Anomalies et modifications éventuelles)
  135. C
  136. C HISTORIQUE : Créée le 11.6.98.(Adapted to two phase flow 26th
  137. C February 2002)
  138. C
  139. C************************************************************************
  140. C
  141. C
  142. C ATTENTION: Cet programme marche que si le MAILLAGE est convex;
  143. C si non il faut changer l'argoritme de calcul de
  144. C l'orientation des normales aux faces.
  145. C
  146. C
  147. C************************************************************************
  148. C
  149. IMPLICIT INTEGER(I-N)
  150. IMPLICIT REAL*8(A-H,O-Z)
  151.  
  152. C
  153. C**** Les variables
  154. C
  155. INTEGER ICEN, IFACE, IFACEL,
  156. & IALP, IUVC, IULC, IPC, ITVC, ITLC, IRVC, IRLC, INORM,
  157. & IALPF, IUVF, IULF, IPF, ITVF, ITLF, IRVF, IRLF,
  158. & IGEOM, NFAC,
  159. & N1PTEL, N1EL, N2PTEL, N2EL, N2, N1, N3, L1,
  160. & NLCF, NGCF, NGCEG, NLCEG, NGCED, NLCED, NGCF1
  161. REAL*8 VALER, VAL1, VAL2, XG, YG, ZG, XC, YC, ZC, DXG, DYG, DZG,
  162. & CNX, CNY, CNZ, CTX, CTY, CTZ, CVX, CVY, CVZ, ORIENT,
  163. & AG, UVXG, UVYG, UVZG, UVNG, UVTG, UVVG,
  164. & ULXG, ULYG, ULZG, ULNG, ULTG, ULVG,
  165. & PG, TVG, TLG, RVG, RLG,
  166. & AD, UVXD, UVYD, UVZD, UVND, UVTD, UVVD,
  167. & ULXD, ULYD, ULZD, ULND, ULTD, ULVD,
  168. & PD, TVD, TLD, RVD, RLD
  169. CHARACTER*(40) MESERR
  170. CHARACTER*(8) TYPE
  171. LOGICAL LOGAN,LOGNEG, LOGBOR
  172. C
  173. C**** Les Includes
  174. C
  175. -INC SMCOORD
  176. -INC CCOPTIO
  177. -INC SMCHPOI
  178. POINTEUR MPALP.MPOVAL, MPUVC.MPOVAL, MPULC.MPOVAL,
  179. & MPPC.MPOVAL, MPTVC.MPOVAL, MPTLC.MPOVAL,
  180. & MPRVC.MPOVAL, MPRLC.MPOVAL, MPNORM.MPOVAL
  181. -INC SMCHAML
  182. POINTEUR MLALP.MELVAL, MLP.MELVAL,
  183. & MLTV.MELVAL, MLTL.MELVAL,
  184. & MLRV.MELVAL, MLRL.MELVAL
  185. POINTEUR MLUVN.MELVAL, MLUVT.MELVAL, MLUVV.MELVAL,
  186. & MLULN.MELVAL, MLULT.MELVAL, MLULV.MELVAL,
  187. & MLVNX.MELVAL, MLVNY.MELVAL, MLVNZ.MELVAL,
  188. & MLVT1X.MELVAL, MLVT1Y.MELVAL, MLVT1Z.MELVAL,
  189. & MLVT2X.MELVAL, MLVT2Y.MELVAL, MLVT2Z.MELVAL,
  190. & MLLNX.MELVAL, MLLNY.MELVAL, MLLNZ.MELVAL,
  191. & MLLT1X.MELVAL, MLLT1Y.MELVAL, MLLT1Z.MELVAL,
  192. & MLLT2X.MELVAL, MLLT2Y.MELVAL, MLLT2Z.MELVAL
  193. -INC SMLENTI
  194. -INC SMELEME
  195. C
  196. C**** Initialisation des parametres d'erreur déjà faite, i.e.
  197. C
  198. C LOGNEG = .FALSE.
  199. C LOGBOR = .FALSE.
  200. C MESERR = ' '
  201. C MOTERR(1:40) = MESERR(1:40)
  202. C VALER = 0.0D0
  203. C VAL1 = 0.0D0
  204. C VAL2 = 0.0D0
  205. C
  206. C
  207. C**** KRIPAD pour la correspondance global/local de centre
  208. C
  209. CALL KRIPAD(ICEN,MLENT1)
  210. C
  211. C
  212. C**** MLENTI1 a MCORD.XCOORD(/1)/(IDIM+1) elements
  213. C
  214. C Si i est le numero global d'un noeud de ICEN,
  215. C MLENT1.LECT(i) contient sa position, i.e.
  216. C
  217. C I = numero global du noeud centre
  218. C MLENT1.LECT(i) = numero local du noeud centre
  219. C
  220. C MLENT1 déjà activé, i.e.
  221. C
  222. C SEGINI MLENTI1
  223. C
  224. C**** Activation de CHPOINTs
  225. C
  226. C void fraction
  227. C vapour velocities
  228. C liquid velocities
  229. C pressure
  230. C vapour temperature
  231. C liquid temperature
  232. C vapour density
  233. C liquid density
  234. C
  235. C cosinus directeurs des normales aux surface
  236. C
  237. CALL LICHT(IALP, MPALP, TYPE, IGEOM)
  238. CALL LICHT(IUVC, MPUVC, TYPE, IGEOM)
  239. CALL LICHT(IULC, MPULC, TYPE, IGEOM)
  240. CALL LICHT(IPC , MPPC , TYPE, IGEOM)
  241. CALL LICHT(ITVC, MPTVC, TYPE, IGEOM)
  242. CALL LICHT(ITLC, MPTLC, TYPE, IGEOM)
  243. CALL LICHT(IRVC, MPRVC, TYPE, IGEOM)
  244. CALL LICHT(IRLC, MPRLC, TYPE, IGEOM)
  245. CALL LICHT(INORM, MPNORM, TYPE, IGEOM)
  246. C
  247. C SEGACT MPALP
  248. C SEGACT MPUVC
  249. C SEGACT MPULC
  250. C SEGACT MPPC
  251. C SEGACT MPTVC
  252. C SEGACT MPTLC
  253. C SEGACT MPRVC
  254. C SEGACT MPRLC
  255. C SEGACT MPNORM
  256. C
  257. C**** MPOVA1 - MPOVA5 sont déjà activés i.e.:
  258. C
  259. C**** Le MELEME FACEL
  260. C
  261. IPT1 = IFACEL
  262. IPT2 = IFACE
  263. SEGACT IPT1
  264. SEGACT IPT2
  265. NFAC = IPT1.NUM(/2)
  266. C
  267. C**** Creation de MCHAMLs contenant les etats gauche et droite,
  268. C
  269. C i.e.:
  270. C
  271. C vitesse + cosinus directors du repere local
  272. C densité
  273. C pression
  274. C gamma
  275.  
  276. C
  277. C**** Cosinus directors du repere local et vitesse
  278. C
  279. C Les cosinus directeurs
  280. C
  281. C VAPOUR PHASE
  282.  
  283. N1 = 2
  284. N3 = 6
  285. L1 = 28
  286. SEGINI MCHEL1
  287. IUVF = MCHEL1
  288. MCHEL1.TITCHE = 'UV '
  289. MCHEL1.IMACHE(1) = IFACE
  290. MCHEL1.IMACHE(2) = IFACEL
  291. MCHEL1.CONCHE(1) = '(n,t,v) in (x,y)'
  292. MCHEL1.CONCHE(2) = ' UV in (n,t,v) '
  293. C
  294. C**** Valeurs des cosinus definies par respect au repair global, i.e.
  295. C
  296. MCHEL1.INFCHE(1,1) = 2
  297. MCHEL1.INFCHE(1,3) = NIFOUR
  298. MCHEL1.INFCHE(1,4) = 0
  299. MCHEL1.INFCHE(1,5) = 0
  300. MCHEL1.INFCHE(1,6) = 0
  301. MCHEL1.IFOCHE = IFOUR
  302. C
  303. C**** Valeurs de vitesse definies par respect au repair local, i.e.
  304. C
  305. MCHEL1.INFCHE(2,1) = 1
  306. MCHEL1.INFCHE(2,3) = NIFOUR
  307. MCHEL1.INFCHE(2,4) = 0
  308. MCHEL1.INFCHE(2,5) = 0
  309. MCHEL1.INFCHE(2,6) = 0
  310. C
  311. C**** Le cosinus directeurs
  312. C
  313. N1PTEL = 1
  314. N1EL = NFAC
  315. N2PTEL = 0
  316. N2EL = 0
  317. C
  318. C**** MCHAML a N2 composantes:
  319. C
  320. C cosinus directeurs du repere local (n,t1)
  321. C
  322. C IDIM = 3 -> 9 composantes
  323. C
  324. N2 = 9
  325. SEGINI MCHAM1
  326. MCHEL1.ICHAML(1) = MCHAM1
  327. MCHAM1.NOMCHE(1) = 'NVX '
  328. MCHAM1.NOMCHE(2) = 'NVY '
  329. MCHAM1.NOMCHE(3) = 'NVZ '
  330. MCHAM1.NOMCHE(4) = 'TVX '
  331. MCHAM1.NOMCHE(5) = 'TVY '
  332. MCHAM1.NOMCHE(6) = 'TVZ '
  333. MCHAM1.NOMCHE(7) = 'VVX '
  334. MCHAM1.NOMCHE(8) = 'VVY '
  335. MCHAM1.NOMCHE(9) = 'VVZ '
  336. MCHAM1.TYPCHE(1) = 'REAL*8 '
  337. MCHAM1.TYPCHE(2) = 'REAL*8 '
  338. MCHAM1.TYPCHE(3) = 'REAL*8 '
  339. MCHAM1.TYPCHE(4) = 'REAL*8 '
  340. MCHAM1.TYPCHE(5) = 'REAL*8 '
  341. MCHAM1.TYPCHE(6) = 'REAL*8 '
  342. MCHAM1.TYPCHE(7) = 'REAL*8 '
  343. MCHAM1.TYPCHE(8) = 'REAL*8 '
  344. MCHAM1.TYPCHE(9) = 'REAL*8 '
  345. SEGINI MLVNX
  346. SEGINI MLVNY
  347. SEGINI MLVNZ
  348. SEGINI MLVT1X
  349. SEGINI MLVT1Y
  350. SEGINI MLVT1Z
  351. SEGINI MLVT2X
  352. SEGINI MLVT2Y
  353. SEGINI MLVT2Z
  354. MCHAM1.IELVAL(1) = MLVNX
  355. MCHAM1.IELVAL(2) = MLVNY
  356. MCHAM1.IELVAL(3) = MLVNZ
  357. MCHAM1.IELVAL(4) = MLVT1X
  358. MCHAM1.IELVAL(5) = MLVT1Y
  359. MCHAM1.IELVAL(6) = MLVT1Z
  360. MCHAM1.IELVAL(7) = MLVT2X
  361. MCHAM1.IELVAL(8) = MLVT2Y
  362. MCHAM1.IELVAL(9) = MLVT2Z
  363. SEGDES MCHAM1
  364. C
  365. C**** Vitesse
  366. C
  367. N1EL = NFAC
  368. N1PTEL = 3
  369. N2EL = 0
  370. N2PTEL = 0
  371. C
  372. C**** MCHAML a N2 composantes:
  373. C
  374. C IDIM = 3 -> 3 composantes
  375. C
  376. N2 = 3
  377. SEGINI MCHAM1
  378. MCHEL1.ICHAML(2) = MCHAM1
  379. SEGDES MCHEL1
  380. MCHAM1.NOMCHE(1) = 'UVN '
  381. MCHAM1.NOMCHE(2) = 'UVT '
  382. MCHAM1.NOMCHE(3) = 'UVV '
  383. MCHAM1.TYPCHE(1) = 'REAL*8 '
  384. MCHAM1.TYPCHE(2) = 'REAL*8 '
  385. MCHAM1.TYPCHE(3) = 'REAL*8 '
  386. SEGINI MLUVN
  387. SEGINI MLUVT
  388. SEGINI MLUVV
  389. MCHAM1.IELVAL(1) = MLUVN
  390. MCHAM1.IELVAL(2) = MLUVT
  391. MCHAM1.IELVAL(3) = MLUVV
  392. SEGDES MCHAM1
  393. C
  394. C**** Cosinus directors du repere local et vitesse
  395. C
  396. C Les cosinus directeurs
  397. C
  398. C LIQUID PHASE
  399.  
  400. N1 = 2
  401. N3 = 6
  402. L1 = 28
  403. SEGINI MCHEL1
  404. IULF = MCHEL1
  405. MCHEL1.TITCHE = 'UL '
  406. MCHEL1.IMACHE(1) = IFACE
  407. MCHEL1.IMACHE(2) = IFACEL
  408. MCHEL1.CONCHE(1) = '(n,t,v) in (x,y)'
  409. MCHEL1.CONCHE(2) = ' UL in (n,t,v) '
  410. C
  411. C**** Valeurs des cosinus definies par respect au repair global, i.e.
  412. C
  413. MCHEL1.INFCHE(1,1) = 2
  414. MCHEL1.INFCHE(1,3) = NIFOUR
  415. MCHEL1.INFCHE(1,4) = 0
  416. MCHEL1.INFCHE(1,5) = 0
  417. MCHEL1.INFCHE(1,6) = 0
  418. MCHEL1.IFOCHE = IFOUR
  419. C
  420. C**** Valeurs de vitesse definies par respect au repair local, i.e.
  421. C
  422. MCHEL1.INFCHE(2,1) = 1
  423. MCHEL1.INFCHE(2,3) = NIFOUR
  424. MCHEL1.INFCHE(2,4) = 0
  425. MCHEL1.INFCHE(2,5) = 0
  426. MCHEL1.INFCHE(2,6) = 0
  427. C
  428. C**** Le cosinus directeurs
  429. C
  430. N1PTEL = 1
  431. N1EL = NFAC
  432. N2PTEL = 0
  433. N2EL = 0
  434. C
  435. C**** MCHAML a N2 composantes:
  436. C
  437. C cosinus directeurs du repere local (n,t1)
  438. C
  439. C IDIM = 3 -> 9 composantes
  440. C
  441. N2 = 9
  442. SEGINI MCHAM1
  443. MCHEL1.ICHAML(1) = MCHAM1
  444. MCHAM1.NOMCHE(1) = 'NLX '
  445. MCHAM1.NOMCHE(2) = 'NLY '
  446. MCHAM1.NOMCHE(3) = 'NLZ '
  447. MCHAM1.NOMCHE(4) = 'TLX '
  448. MCHAM1.NOMCHE(5) = 'TLY '
  449. MCHAM1.NOMCHE(6) = 'TLZ '
  450. MCHAM1.NOMCHE(7) = 'VLX '
  451. MCHAM1.NOMCHE(8) = 'VLY '
  452. MCHAM1.NOMCHE(9) = 'VLZ '
  453. MCHAM1.TYPCHE(1) = 'REAL*8 '
  454. MCHAM1.TYPCHE(2) = 'REAL*8 '
  455. MCHAM1.TYPCHE(3) = 'REAL*8 '
  456. MCHAM1.TYPCHE(4) = 'REAL*8 '
  457. MCHAM1.TYPCHE(5) = 'REAL*8 '
  458. MCHAM1.TYPCHE(6) = 'REAL*8 '
  459. MCHAM1.TYPCHE(7) = 'REAL*8 '
  460. MCHAM1.TYPCHE(8) = 'REAL*8 '
  461. MCHAM1.TYPCHE(9) = 'REAL*8 '
  462. SEGINI MLLNX
  463. SEGINI MLLNY
  464. SEGINI MLLNZ
  465. SEGINI MLLT1X
  466. SEGINI MLLT1Y
  467. SEGINI MLLT1Z
  468. SEGINI MLLT2X
  469. SEGINI MLLT2Y
  470. SEGINI MLLT2Z
  471. MCHAM1.IELVAL(1) = MLLNX
  472. MCHAM1.IELVAL(2) = MLLNY
  473. MCHAM1.IELVAL(3) = MLLNZ
  474. MCHAM1.IELVAL(4) = MLLT1X
  475. MCHAM1.IELVAL(5) = MLLT1Y
  476. MCHAM1.IELVAL(6) = MLLT1Z
  477. MCHAM1.IELVAL(7) = MLLT2X
  478. MCHAM1.IELVAL(8) = MLLT2Y
  479. MCHAM1.IELVAL(9) = MLLT2Z
  480. SEGDES MCHAM1
  481. C
  482. C**** Vitesse
  483. C
  484. N1EL = NFAC
  485. N1PTEL = 3
  486. N2EL = 0
  487. N2PTEL = 0
  488. C
  489. C**** MCHAML a N2 composantes:
  490. C
  491. C IDIM = 3 -> 3 composantes
  492. C
  493. N2 = 3
  494. SEGINI MCHAM1
  495. MCHEL1.ICHAML(2) = MCHAM1
  496. SEGDES MCHEL1
  497. MCHAM1.NOMCHE(1) = 'ULN '
  498. MCHAM1.NOMCHE(2) = 'ULT '
  499. MCHAM1.NOMCHE(3) = 'ULV '
  500. MCHAM1.TYPCHE(1) = 'REAL*8 '
  501. MCHAM1.TYPCHE(2) = 'REAL*8 '
  502. MCHAM1.TYPCHE(3) = 'REAL*8 '
  503. SEGINI MLULN
  504. SEGINI MLULT
  505. SEGINI MLULV
  506. MCHAM1.IELVAL(1) = MLULN
  507. MCHAM1.IELVAL(2) = MLULT
  508. MCHAM1.IELVAL(3) = MLULV
  509. SEGDES MCHAM1
  510. C
  511. C**** Void fraction
  512. C
  513. N1 = 1
  514. N3 = 6
  515. L1 = 15
  516. SEGINI MCHEL2
  517. IALPF = MCHEL2
  518. MCHEL2.IMACHE(1) = IFACEL
  519. MCHEL2.TITCHE = 'ALPHA '
  520. MCHEL2.CONCHE(1) = ' '
  521. C
  522. C**** Valeurs independente du repére, i.e.
  523. C
  524. MCHEL2.INFCHE(1,1) = 0
  525. MCHEL2.INFCHE(1,3) = NIFOUR
  526. MCHEL2.INFCHE(1,4) = 0
  527. MCHEL2.INFCHE(1,5) = 0
  528. MCHEL2.INFCHE(1,6) = 0
  529. MCHEL2.IFOCHE = IFOUR
  530. N2 = 1
  531. SEGINI MCHAM1
  532. MCHEL2.ICHAML(1) = MCHAM1
  533. SEGDES MCHEL2
  534. MCHAM1.NOMCHE(1) = 'SCAL '
  535. MCHAM1.TYPCHE(1) = 'REAL*8 '
  536. SEGINI MLALP
  537. MCHAM1.IELVAL(1) = MLALP
  538. SEGDES MCHAM1
  539. C
  540. C**** Pressure
  541. C
  542. MCHEL1 = IALPF
  543. SEGINI, MCHEL2 = MCHEL1
  544. IPF = MCHEL2
  545. MCHEL2.TITCHE = 'P '
  546. C
  547. C**** MCHAM1 = MCHAML de la alpha
  548. C
  549. SEGINI, MCHAM2 = MCHAM1
  550. MCHEL2.ICHAML(1) = MCHAM2
  551. SEGDES MCHEL2
  552. SEGINI MLP
  553. MCHAM2.IELVAL(1) = MLP
  554. SEGDES MCHAM2
  555. C
  556. C**** Vapour temperature
  557. C
  558. MCHEL1 = IALPF
  559. SEGINI, MCHEL2 = MCHEL1
  560. ITVF = MCHEL2
  561. MCHEL2.TITCHE = 'TV '
  562. C
  563. C**** MCHAM1 = MCHAML de la alpha
  564. C
  565. SEGINI, MCHAM2 = MCHAM1
  566. MCHEL2.ICHAML(1) = MCHAM2
  567. SEGDES MCHEL2
  568. SEGINI MLTV
  569. MCHAM2.IELVAL(1) = MLTV
  570. SEGDES MCHAM2
  571. C
  572. C**** Liquid temperature
  573. C
  574. MCHEL1 = IALPF
  575. SEGINI, MCHEL2 = MCHEL1
  576. ITLF = MCHEL2
  577. MCHEL2.TITCHE = 'TL '
  578. C
  579. C**** MCHAM1 = MCHAML de la alpha
  580. C
  581. SEGINI, MCHAM2 = MCHAM1
  582. MCHEL2.ICHAML(1) = MCHAM2
  583. SEGDES MCHEL2
  584. SEGINI MLTL
  585. MCHAM2.IELVAL(1) = MLTL
  586. SEGDES MCHAM2
  587. C
  588. C**** Vapour density
  589. C
  590. MCHEL1 = IALPF
  591. SEGINI, MCHEL2 = MCHEL1
  592. IRVF = MCHEL2
  593. MCHEL2.TITCHE = 'RV '
  594. C
  595. C**** MCHAM1 = MCHAML de la alpha
  596. C
  597. SEGINI, MCHAM2 = MCHAM1
  598. MCHEL2.ICHAML(1) = MCHAM2
  599. SEGDES MCHEL2
  600. SEGINI MLRV
  601. MCHAM2.IELVAL(1) = MLRV
  602. SEGDES MCHAM2
  603. C
  604. C**** Liquid density
  605. C
  606. MCHEL1 = IALPF
  607. SEGINI, MCHEL2 = MCHEL1
  608. IRLF = MCHEL2
  609. MCHEL2.TITCHE = 'RL '
  610. C
  611. C**** MCHAM1 = MCHAML de la alpha
  612. C
  613. SEGINI, MCHAM2 = MCHAM1
  614. MCHEL2.ICHAML(1) = MCHAM2
  615. SEGDES MCHEL2
  616. SEGINI MLRL
  617. MCHAM2.IELVAL(1) = MLRL
  618. SEGDES MCHAM2
  619.  
  620. C
  621. C**** Recapitulatif: les MELVALs et les MPOVALs actives
  622. C
  623. C MLVNX, MLVNY, MLVNZ
  624. C MLVTX, MLVTY, MLVTZ
  625. C MLVVX, MLVVY, MLVVZ
  626. C
  627. C MLLNX, MLLNY, MLLNZ
  628. C MLLTX, MLLTY, MLLTZ
  629. C MLLVX, MLLVY, MLLVZ
  630. C
  631. C MLUVN, MLUVT, MLUVV -> vapour velocities
  632. C
  633. C MLULN, MLULT, MLULV -> liquid velocities
  634. C
  635. C MLALP -> void fraction
  636. C
  637. C MLP -> pressure
  638. C
  639. C MLTV -> vapour temperature
  640. C
  641. C MLTL -> liquid temperature
  642. C
  643. C MLRV -> vapour density
  644. C
  645. C MLRL -> liquid density
  646. C****
  647. C MPALP -> void fraction
  648. C
  649. C MPUVC -> vapour velocity
  650. C
  651. C MPULC -> liquid velocity
  652. C
  653. C MPPC -> pressure
  654. C
  655. C MPTVC -> vapour temperature
  656. C
  657. C MPTLC -> liquid temperature
  658. C
  659. C MPRVC -> vapour density
  660. C
  661. C MPRLC -> liquid density
  662. C
  663. C MPNORM -> normales aux faces
  664. C
  665. C**** Boucle sur le faces
  666. C
  667. DO NLCF = 1, NFAC
  668. C
  669. C******* NLCF = numero local du centre de face
  670. C NGCF = numero global du centre de face
  671. C NGCEG = numero global du centre ELT "gauche"
  672. C NLCEG = numero local du centre ELT "gauche"
  673. C NGCED = numero global du centre ELT "droite"
  674. C NLCED = numero local du centre ELT "droite"
  675. C
  676. NGCEG = IPT1.NUM(1,NLCF)
  677. NGCF = IPT1.NUM(2,NLCF)
  678. NGCED = IPT1.NUM(3,NLCF)
  679. NLCEG = MLENT1.LECT(NGCEG)
  680. NLCED = MLENT1.LECT(NGCED)
  681. C
  682. C******* TEST: IPT2.NUM(1,NLCF) = IPT1.NUM(2,NLCF)
  683. C
  684. NGCF1 = IPT2.NUM(1,NLCF)
  685. IF( NGCF1 .NE. NGCF) THEN
  686. LOGAN = .TRUE.
  687. MESERR(1:40) = 'PRET, subroutine pre111.eso '
  688. GOTO 9999
  689. ENDIF
  690. C
  691. C******* Cosinus directeurs des NORMALES aux faces
  692. C
  693. C On impose que les normales sont direct "Gauche" -> "Centre"
  694. C
  695. XG = XCOOR((NGCEG-1)*(IDIM+1)+1)
  696. YG = XCOOR((NGCEG-1)*(IDIM+1)+2)
  697. ZG = XCOOR((NGCEG-1)*(IDIM+1)+3)
  698. XC = XCOOR((NGCF-1)*(IDIM+1)+1)
  699. YC = XCOOR((NGCF-1)*(IDIM+1)+2)
  700. ZC = XCOOR((NGCF-1)*(IDIM+1)+3)
  701. DXG = XC - XG
  702. DYG = YC - YG
  703. DZG = ZC - ZG
  704.  
  705. C
  706. C******* On calcule le sign du pruduit scalare
  707. C (Normales de Castem) * (vecteur "gauche" -> "centre")
  708. C
  709. CNX = MPNORM.VPOCHA(NLCF,7)
  710. CNY = MPNORM.VPOCHA(NLCF,8)
  711. CNZ = MPNORM.VPOCHA(NLCF,9)
  712. ORIENT = CNX * DXG + CNY * DYG + CNZ * DZG
  713. ORIENT = SIGN(1.0D0,ORIENT)
  714. IF(ORIENT .NE. 1.0D0)THEN
  715. LOGAN = .TRUE.
  716. MESERR(1:30)=
  717. & 'PRET , subroutine pre121.eso. '
  718. GOTO 9999
  719. ENDIF
  720. CNX = CNX * ORIENT
  721. CNY = CNY * ORIENT
  722. CNZ = CNZ * ORIENT
  723. C
  724. C********** Cosinus directeurs de tangente 1
  725. C
  726. CTX = MPNORM.VPOCHA(NLCF,1) * ORIENT
  727. CTY = MPNORM.VPOCHA(NLCF,2) * ORIENT
  728. CTZ = MPNORM.VPOCHA(NLCF,3) * ORIENT
  729. C
  730. C********** Cosinus directeurs de tangente 2
  731. C
  732. CVX = MPNORM.VPOCHA(NLCF,4) * ORIENT
  733. CVY = MPNORM.VPOCHA(NLCF,5) * ORIENT
  734. CVZ = MPNORM.VPOCHA(NLCF,6) * ORIENT
  735. C
  736. C
  737. C
  738. C******* Les autres MELVALs
  739. C
  740. C
  741. C******* N.B.: On suppose qu'on a déjà controlle RO, P > 0
  742. C GAMMA \in (1,3)
  743. C Si non il faut le faire, en utlisant LOGBOR,
  744. C LOGNEG, VALER, VAL1, VAL2
  745. C
  746. C
  747. C
  748. C******* NGCEG = NGCED -> Mur
  749. C
  750.  
  751. IF( NGCEG .EQ. NGCED)THEN
  752. AG = MPALP.VPOCHA(NLCEG, 1)
  753. PG = MPPC.VPOCHA(NLCEG, 1)
  754. TVG = MPTVC.VPOCHA(NLCEG, 1)
  755. TLG = MPTLC.VPOCHA(NLCEG, 1)
  756. RVG = MPRVC.VPOCHA(NLCEG, 1)
  757. RLG = MPRLC.VPOCHA(NLCEG, 1)
  758. UVXG = MPUVC.VPOCHA(NLCEG, 1)
  759. UVYG = MPUVC.VPOCHA(NLCEG, 2)
  760. UVZG = MPUVC.VPOCHA(NLCEG, 3)
  761. ULXG = MPULC.VPOCHA(NLCEG, 1)
  762. ULYG = MPULC.VPOCHA(NLCEG, 2)
  763. ULZG = MPULC.VPOCHA(NLCEG, 3)
  764. UVNG = UVXG * CNX + UVYG * CNY + UVZG * CNZ
  765. UVTG = UVXG * CTX + UVYG * CTY + UVZG * CTZ
  766. UVVG = UVXG * CVX + UVYG * CVY + UVZG * CVZ
  767. ULNG = ULXG * CNX + ULYG * CNY + ULZG * CNZ
  768. ULTG = ULXG * CTX + ULYG * CTY + ULZG * CTZ
  769. ULVG = ULXG * CVX + ULYG * CVY + ULZG * CVZ
  770. C
  771. C********** Son etat droite
  772. C
  773. AD = AG
  774. PD = PG
  775. TVD = TVG
  776. TLD = TLG
  777. RVD = RVG
  778. RLD = RLG
  779. UVND = -1.0D0 * UVNG
  780. UVTD = UVTG
  781. UVVD = UVVG
  782. ULND = -1.0D0 * ULNG
  783. ULTD = ULTG
  784. ULVD = ULVG
  785. C
  786. C************* Fin cas mur
  787. C
  788. ELSE
  789. C
  790. C************* Etat gauche
  791. C
  792. AG = MPALP.VPOCHA(NLCEG, 1)
  793. PG = MPPC.VPOCHA(NLCEG, 1)
  794. TVG = MPTVC.VPOCHA(NLCEG, 1)
  795. TLG = MPTLC.VPOCHA(NLCEG, 1)
  796. RVG = MPRVC.VPOCHA(NLCEG, 1)
  797. RLG = MPRLC.VPOCHA(NLCEG, 1)
  798. UVXG = MPUVC.VPOCHA(NLCEG, 1)
  799. UVYG = MPUVC.VPOCHA(NLCEG, 2)
  800. UVZG = MPUVC.VPOCHA(NLCEG, 3)
  801. ULXG = MPULC.VPOCHA(NLCEG, 1)
  802. ULYG = MPULC.VPOCHA(NLCEG, 2)
  803. ULZG = MPULC.VPOCHA(NLCEG, 3)
  804. UVNG = UVXG * CNX + UVYG * CNY + UVZG * CNZ
  805. UVTG = UVXG * CTX + UVYG * CTY + UVZG * CTZ
  806. UVVG = UVXG * CVX + UVYG * CVY + UVZG * CVZ
  807. ULNG = ULXG * CNX + ULYG * CNY + ULZG * CNZ
  808. ULTG = ULXG * CTX + ULYG * CTY + ULZG * CTZ
  809. ULVG = ULXG * CVX + ULYG * CVY + ULZG * CVZ
  810. C
  811. C********** Etat gauche
  812. C
  813. AD = MPALP.VPOCHA(NLCED, 1)
  814. PD = MPPC.VPOCHA(NLCED, 1)
  815. TVD = MPTVC.VPOCHA(NLCED, 1)
  816. TLD = MPTLC.VPOCHA(NLCED, 1)
  817. RVD = MPRVC.VPOCHA(NLCED, 1)
  818. RLD = MPRLC.VPOCHA(NLCED, 1)
  819. UVXD = MPUVC.VPOCHA(NLCED, 1)
  820. UVYD = MPUVC.VPOCHA(NLCED, 2)
  821. UVZD = MPUVC.VPOCHA(NLCED, 3)
  822. ULXD = MPULC.VPOCHA(NLCED, 1)
  823. ULYD = MPULC.VPOCHA(NLCED, 2)
  824. ULZD = MPULC.VPOCHA(NLCED, 3)
  825. UVND = UVXD * CNX + UVYD * CNY + UVZD * CNZ
  826. UVTD = UVXD * CTX + UVYD * CTY + UVZD * CTZ
  827. UVVD = UVXD * CVX + UVYD * CVY + UVZD * CVZ
  828. ULND = ULXD * CNX + ULYD * CNY + ULZD * CNZ
  829. ULTD = ULXD * CTX + ULYD * CTY + ULZD * CTZ
  830. ULVD = ULXD * CVX + ULYD * CVY + ULZD * CVZ
  831. ENDIF
  832. C
  833. C************* Les MELVALs
  834. C
  835. MLALP.VELCHE(1,NLCF) = AG
  836. MLALP.VELCHE(3,NLCF) = AD
  837. MLP.VELCHE(1,NLCF) = PG
  838. MLP.VELCHE(3,NLCF) = PD
  839. MLTV.VELCHE(1,NLCF) = TVG
  840. MLTV.VELCHE(3,NLCF) = TVD
  841. MLTL.VELCHE(1,NLCF) = TLG
  842. MLTL.VELCHE(3,NLCF) = TLD
  843. MLRV.VELCHE(1,NLCF) = RVG
  844. MLRV.VELCHE(3,NLCF) = RVD
  845. MLRL.VELCHE(1,NLCF) = RLG
  846. MLRL.VELCHE(3,NLCF) = RLD
  847.  
  848. MLUVN.VELCHE(1,NLCF) = UVNG
  849. MLUVN.VELCHE(3,NLCF) = UVND
  850. MLUVT.VELCHE(1,NLCF) = UVTG
  851. MLUVT.VELCHE(3,NLCF) = UVTD
  852. MLUVV.VELCHE(1,NLCF) = UVVG
  853. MLUVV.VELCHE(3,NLCF) = UVVD
  854.  
  855. MLULN.VELCHE(1,NLCF) = ULNG
  856. MLULN.VELCHE(3,NLCF) = ULND
  857. MLULT.VELCHE(1,NLCF) = ULTG
  858. MLULT.VELCHE(3,NLCF) = ULTD
  859. MLULV.VELCHE(1,NLCF) = ULVG
  860. MLULV.VELCHE(3,NLCF) = ULVD
  861.  
  862. MLVNX.VELCHE(1,NLCF) = CNX
  863. MLVNY.VELCHE(1,NLCF) = CNY
  864. MLVNZ.VELCHE(1,NLCF) = CNZ
  865. MLVT1X.VELCHE(1,NLCF) = CTX
  866. MLVT1Y.VELCHE(1,NLCF) = CTY
  867. MLVT1Z.VELCHE(1,NLCF) = CTZ
  868. MLVT2X.VELCHE(1,NLCF) = CVX
  869. MLVT2Y.VELCHE(1,NLCF) = CVY
  870. MLVT2Z.VELCHE(1,NLCF) = CVZ
  871.  
  872. MLLNX.VELCHE(1,NLCF) = CNX
  873. MLLNY.VELCHE(1,NLCF) = CNY
  874. MLLNZ.VELCHE(1,NLCF) = CNZ
  875. MLLT1X.VELCHE(1,NLCF) = CTX
  876. MLLT1Y.VELCHE(1,NLCF) = CTY
  877. MLLT1Z.VELCHE(1,NLCF) = CTZ
  878. MLVT2X.VELCHE(1,NLCF) = CVX
  879. MLVT2Y.VELCHE(1,NLCF) = CVY
  880. MLVT2Z.VELCHE(1,NLCF) = CVZ
  881.  
  882. ENDDO
  883. C
  884. C**** Desactivation des SEGMENTs
  885. C
  886. SEGDES IPT1
  887. SEGDES IPT2
  888. C
  889. SEGDES MPALP
  890. SEGDES MPUVC
  891. SEGDES MPULC
  892. SEGDES MPPC
  893. SEGDES MPTVC
  894. SEGDES MPTLC
  895. SEGDES MPRVC
  896. SEGDES MPRLC
  897. SEGDES MPNORM
  898.  
  899. SEGDES MLALP
  900. SEGDES MLP
  901. SEGDES MLTV
  902. SEGDES MLTL
  903. SEGDES MLRV
  904. SEGDES MLRL
  905.  
  906. SEGDES MLUVN
  907. SEGDES MLUVT
  908. SEGDES MLUVV
  909. SEGDES MLULN
  910. SEGDES MLULT
  911. SEGDES MLULV
  912.  
  913. SEGDES MLVNX
  914. SEGDES MLVNY
  915. SEGDES MLVNZ
  916. SEGDES MLVT1X
  917. SEGDES MLVT1Y
  918. SEGDES MLVT1Z
  919. SEGDES MLVT2X
  920. SEGDES MLVT2Y
  921. SEGDES MLVT2Z
  922.  
  923. SEGDES MLLNX
  924. SEGDES MLLNY
  925. SEGDES MLLNZ
  926. SEGDES MLLT1X
  927. SEGDES MLLT1Y
  928. SEGDES MLLT1Z
  929. SEGDES MLLT2X
  930. SEGDES MLLT2Y
  931. SEGDES MLLT2Z
  932.  
  933. C
  934. C**** Destruction du MELNTI correspondance local/global
  935. C
  936. SEGSUP MLENT1
  937. C
  938. 9999 CONTINUE
  939. C
  940. RETURN
  941. END
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  

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