Télécharger pre32f.eso

Retour à la liste

Numérotation des lignes :

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

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