1 : * IMAGES PROCEDUR VALETA 95/01/06 21:29:15 1416 2 : DEBP IMAGES TABA*'TABLE'; 3 : 4 : *------------------------------------------------- 5 : * D'apres une idee originale de l'ISPRA, cette procédure 6 : * permet d'obtenir lors d'un calcul pas a pas : 7 : * - les deformees a differents instants de calculs 8 : * supperposees ou non avec la structure non deformee 9 : * - le champ de contraintes sur la deformee a differents 10 : * instants de calculs 11 : * - le champ de temperatures sur la structure non deformee 12 : * dans le cas d'un calcul thermique pur et a differents 13 : * instants de calculs. 14 : * - le champ de temperatures sur la structure deformee dans 15 : * le cas d'un calcul couple thermique/mecanique a differents 16 : * instants de calculs . 17 : * 18 : * Commentaire : 19 : * _____________ 20 : * 21 : * En entrée, TAB1 sert à définir les options et les paramètres du calcul. 22 : * Les indices de l'objet TAB1 sont des mots (a écrire en toutes lettres) 23 : * dont voici la liste : 24 : * 25 : * TABLACAST : table sortie de PASAPAS 26 : * 27 : * MAILLAGE : maillage 28 : * 29 : * TYPE : type de trace que l'on desire obtenir 30 : * = DDEFORMEE pour obtenir le trace des deformees 31 : * = DCONTRAINTES pour obtenir le trace du champ de contraintes 32 : * sur la deformee 33 : * = DTEMPERATURES pour obtenir le trace du champ de temperatures 34 : * sur la deformee dans le cas d'un calcul couple thermique/ 35 : * mecanique, sur la structure non deformee dans le cas d'un 36 : * calcul thermique pur 37 : * 38 : * LISTEMP : liste des temps a visualiser 39 : * 40 : * SIGCOMP : pour le trace du champ de contraintes, type de contraintes 41 : * que l'on desire visualiser sur la deformee 42 : * = SIGVMIS pour visualiser les contraintes de VON MISES 43 : * = nom de la composante du champ de contraintes 44 : * 45 : * DEFO_SUPP : pour le trace des deformees 46 : * = VRAI si l'on desire supperposer la deformee avec la structure 47 : * non deformee 48 : * = FAUX si l'on desire uniquement la deformee 49 : * 50 : * TITRE : titre du dessin 51 : * 52 : * OEIL : oeil pour un trace 3D 53 : * 54 : * COULEUR : couleur de la deformee (rouge par defaut) 55 : * 56 : * AMPLD : amplitude de la deformee (donnee facultative) 57 : * 58 : * 59 : * 60 : * En sortie on obtient un postscript. 61 : * 62 : * 63 : * Remarques : 64 : * ___________ 65 : * 66 : * Pour une presentation plus claire il est preferable de se limiter 67 : * a 6 dessins par page. 68 : * 69 : * 70 : * 71 : *--------------------------------------------------------------------- 72 : 73 : coefelim = 0.001; 74 : ngra = dime taba.'LISTEMP'; 75 : &dime = 'VALEUR' DIME; 76 : si (existe taba 'MAILLAGE'); 77 : objt = taba.'MAILLAGE'; 78 : sinon; 79 : objt = extr (taba.'TABLECAST'.'MODELE') mail; 80 : finsi; 81 : moj = taba.'TABLECAST'.'MODELE'; 82 : idefo = faux; 83 : icont = faux; 84 : itemp = faux; 85 : ither = faux; 86 : 87 : ********************************************** 88 : * tests sur les données 89 : ********************************************** 90 : 91 : si (existe taba 'OEIL'); 92 : oeil = taba.'OEIL'; 93 : finsi; 94 : 95 : si (existe taba 'TABLECAST' 'DEPLACEMENTS'); 96 : * calcul thermo-mecanique 97 : ither = faux; 98 : sinon; 99 : * calcul thermique pur 100 : ither = vrai; 101 : finsi; 102 : 103 : * 104 : ********* determination du coefficient d'amplitude 105 : * 106 : si ither; 107 : ampld = 0; 108 : sinon; 109 : si (existe taba 'AMPLD'); 110 : ampld = taba.'AMPLD'; 111 : depmax = table; 112 : k = 1; 113 : repeter bou1 ngra; 114 : tj = taba.'TABLECAST'.'DEPLACEMENTS'; 115 : notps = extr taba.'LISTEMP' k; 116 : notps = enti notps; 117 : uj = tj.notps; 118 : uuj = redu uj objt; 119 : ujmax = maxi uuj 'ABS'; 120 : depmax.k = ujmax; 121 : si (k > 1); 122 : si ((depmax.(k - 1)) > depmax.k); 123 : edge = (depmax.(k - 1))/(ampld); 124 : sinon; 125 : edge = (depmax.k)/(ampld); 126 : finsi; 127 : sinon; 128 : edge = (depmax.k)/(ampld); 129 : finsi; 130 : k = k + 1; 131 : fin bou1; 132 : 133 : sinon; 134 : k = 1; 135 : tampld = table; 136 : depmax = table; 137 : si (&dime ega 2); 138 : ch1 ch2 = coor objt; 139 : 1max = maxi ch1; 140 : 1min = mini ch1; 141 : 2max = maxi ch2; 142 : 2min = mini ch1; 143 : dif1 = 1max - 1min; 144 : dif2 = 2max - 2min; 145 : sinon; 146 : ch1 ch2 ch3 = coor objt; 147 : 1max = maxi ch1; 148 : 1min = mini ch1; 149 : 2max = maxi ch2; 150 : 2min = mini ch2; 151 : 3max = maxi ch3; 152 : 3min = mini ch3; 153 : dif1 = 1max - 1min; 154 : dif2 = 2max - 2min; 155 : dif3 = 3max - 3min; 156 : finsi; 157 : si (dif1 >eg dif2); 158 : lmax = dif1; 159 : sinon; 160 : lmax = dif2; 161 : finsi; 162 : si (&dime ega 3); 163 : si (lmax >eg dif3); 164 : lmax = lmax; 165 : sinon; 166 : lmax = dif3; 167 : finsi; 168 : finsi; 169 : repeter bou1 ngra; 170 : tj = taba.'TABLECAST'.'DEPLACEMENTS'; 171 : notps = extr taba.'LISTEMP' k; 172 : notps = enti notps; 173 : uj = tj.notps; 174 : uuj = redu uj objt; 175 : ujmax = maxi uuj 'ABS'; 176 : depmax.k = ujmax; 177 : si (ega ujmax 0); 178 : tampld.k = 0; 179 : sinon; 180 : tampld.k = lmax/(10*ujmax); 181 : finsi; 182 : si (k > 1); 183 : si ((tampld.(k - 1)) > tampld.k); 184 : ampld = tampld.(k - 1); 185 : sinon ; 186 : ampld = tampld.k; 187 : finsi; 188 : si ((depmax.(k - 1)) > depmax.k); 189 : edge = (depmax.(k - 1))/(ampld); 190 : sinon; 191 : edge = (depmax.k)/(ampld); 192 : finsi; 193 : sinon; 194 : ampld = tampld.k; 195 : edge = (depmax.k)/(ampld); 196 : finsi; 197 : k = k + 1; 198 : fin bou1; 199 : finsi; 200 : si (edge < 0.1); 201 : EDGE = EDGE * 10; 202 : finsi; 203 : 204 : finsi; 205 : 206 : 207 : si (exist taba 'COULEUR'); 208 : color = taba.'COULEUR'; 209 : sinon; 210 : color = rouge; 211 : finsi; 212 : 213 : si (exist taba 'TYPE'); 214 : si (ega (taba.'TYPE') 'DDEFORMEE'); 215 : idefo = vrai; 216 : finsi; 217 : si (ega (taba.'TYPE') 'DCONTRAINTES'); 218 : icont = vrai; 219 : finsi; 220 : si (ega (taba.'TYPE') 'DTEMPERATURE'); 221 : itemp = vrai; 222 : finsi; 223 : sinon; 224 : mess 'IL MANQUE LE TYPE DE TRACE DESIRE'; 225 : quitter images; 226 : finsi; 227 : 228 : ********************************************** 229 : * determination des dimensions maxi 230 : * des objets (lx ly lz) 231 : ********************************************** 232 : lx = 0.0 ;ly = 0.0; 233 : si (ega &dime 3); 234 : lz = 0.0; 235 : finsi; 236 : 237 : *--- cas de la thermique pure 238 : si ither; 239 : edge = 10; 240 : si (ega &dime 2); 241 : xj yj = coor objt; 242 : sinon; 243 : xj yj zj = coor objt; 244 : finsi; 245 : xjmin = mini xj; 246 : xjmax = maxi xj; 247 : yjmin = mini yj; 248 : yjmax = maxi yj; 249 : lxj = (xjmax - xjmin) * (1.0 + edge); 250 : lyj = (yjmax - yjmin) * (1.0 + edge); 251 : si (> lxj lx); 252 : lx = lxj; 253 : finsi; 254 : si (> lyj ly); 255 : ly = lyj; 256 : finsi; 257 : si (ega &dime 3); 258 : zjmin = mini zj; 259 : zjmax = maxi zj; 260 : lzj = (zjmax - zjmin) * (1.0 + edge); 261 : si (> lzj lz); 262 : lz = lzj; 263 : finsi; 264 : finsi; 265 : 266 : *--- cas de la thermo-mecanique 267 : sinon; 268 : 269 : *--------------------------------------------------- 270 : * Boucle 1 sur toutes les deformees pour determiner 271 : * les lx ly lz maximum 272 : *--------------------------------------------------- 273 : j=0; 274 : repe loop1 ngra; 275 : j=j + 1; 276 : tj = taba.'TABLECAST'.'DEPLACEMENTS'; 277 : notps = extr taba.'LISTEMP' j; 278 : notps = enti notps; 279 : uj = tj.notps; 280 : uuj = redu uj objt; 281 : dj = objt plus (ampld * uuj); 282 : si (ega &dime 2); 283 : xj yj = coor dj; 284 : sinon; 285 : xj yj zj = coor dj; 286 : finsi; 287 : xjmin = mini xj; 288 : xjmax = maxi xj; 289 : yjmin = mini yj; 290 : yjmax = maxi yj; 291 : lxj = (xjmax - xjmin) * (1.0 + edge); 292 : lyj = (yjmax - yjmin) * (1.0 + edge); 293 : si (> lxj lx); 294 : lx = lxj; 295 : finsi; 296 : si (> lyj ly); 297 : ly = lyj; 298 : finsi; 299 : si (ega &dime 3); 300 : zjmin = mini zj; 301 : zjmax = maxi zj; 302 : lzj = (zjmax - zjmin) * (1.0 + edge); 303 : si (> lzj lz); 304 : lz = lzj; 305 : finsi; 306 : finsi; 307 : fin loop1; 308 : 309 : finsi; 310 : *--- 311 : 312 : *--- cas 3D ----- 313 : si (ega &dime 3); 314 : 315 : * Determination de t1 et t2 vecteurs orthogonaux 316 : * unitaires perpendiculaires au plan normal au 317 : * vecteur indiquant l'angle de vue 318 : n = oeil plus (0 0 0); 319 : no = norm n; 320 : n = n / no; 321 : xn yn zn = coor n; 322 : 323 : si ((ega xn 0.0) et (ega yn 0.0)); 324 : si (> zn 0.0); 325 : * n=+k, t1=i, t2=j 326 : t1=1 0 0; t2=0 1 0; 327 : sinon; 328 : * n=-k, t1=i, t2=-j 329 : t1=1 0 0; t2=0 -1 0; 330 : finsi; 331 : sinon; 332 : * n not along z, 333 : * t1=(k x n)/||k x n|| 334 : t1=(0 0 1) pvec n; 335 : no=norm t1; t1=t1 / no; 336 : * t2=n x t1 337 : t2=n pvec t1; 338 : finsi; 339 : 340 : * stockage des huit faces du cube (lx ly lz) dans une table 341 : 342 : pp = table 'POINT'; 343 : pp.1 = 0 0 0; 344 : pp.2 = lx 0 0; 345 : pp.3 = lx ly 0; 346 : pp.4 = 0 ly 0; 347 : pp.5 = 0 0 lz; 348 : pp.6 = lx 0 lz; 349 : pp.7 = lx ly lz; 350 : pp.8 = 0 ly lz; 351 : 352 : * Situation de ces huit points dans l'espace (t1,t2) et 353 : * recherche des coordonnees maximales et minimales 354 : * Pour un point P donne sa situation dans le plan t1,t2 est 355 : * nu = (p . n) n 356 : * ro = p - nu 357 : * tau1 = ro . t1 358 : * tau2 = ro . t2 359 : * 360 : p1=pp.1; 361 : xp1 yp1 zp1 = coor p1; 362 : t1min = xp1; 363 : t1max = xp1; 364 : t2min = yp1; 365 : t2max = yp1; 366 : j=1; 367 : repe loop 7; 368 : j = j + 1; 369 : pj = pp.j; 370 : nu = (pj psca n) * n; 371 : ro = pj moin nu; 372 : tau1 = ro psca t1; 373 : tau2 = ro psca t2; 374 : si (< tau1 t1min); 375 : t1min = tau1; 376 : finsi; 377 : si (< tau2 t2min); 378 : t2min = tau2; 379 : finsi; 380 : si (> tau1 t1max); 381 : t1max = tau1; 382 : finsi; 383 : si (> tau2 t2max); 384 : t2max = tau2; 385 : finsi; 386 : fin loop; 387 : * 388 : lx=t1max - t1min; 389 : ly=t2max - t2min; 390 : 391 : finsi; 392 : *--- fin du cas 3D 393 : 394 : finsi; 395 : *--- fin de la determination du type de calcul 396 : 397 : ********************************************** 398 : * calcul du nombre de lignes et de colonnes 399 : ********************************************** 400 : 401 : cover = lx * ly * ngra; 402 : effm = 0.0; 403 : * 404 : ir = 0; repe loop1 ngra; ir = ir + 1; 405 : * 406 : ic = 0; repe loop2 ngra; ic = ic + 1; 407 : si ( >eg (ir * ic) ngra); 408 : quit loop2; 409 : finsi; 410 : fin loop2; 411 : * 412 : lxt = ic * lx; 413 : lyt = ir * ly; 414 : lm = lxt; 415 : si ( > lyt lm); 416 : lm = lyt; 417 : finsi; 418 : cadr = lm * lm; 419 : effi = cover / cadr; 420 : si ( >eg effi effm); 421 : nrow = ir; 422 : ncol = ic; 423 : effm = effi; 424 : sinon; 425 : quit loop1; 426 : finsi; 427 : fin loop1; 428 : 429 : *************************************************** 430 : * Boucle 2 (lignes & colonnes) sur tous les objets 431 : * afin de les placer (seulement pour les deformees) 432 : *************************************************** 433 : 434 : j=0; 435 : jr=0; 436 : repe loopr nrow; 437 : jr=jr + 1; 438 : ty=(1 - jr) * ly; 439 : jc=0; 440 : repe loopc ncol; 441 : jc=jc + 1; 442 : j=j + 1; 443 : si (> j ngra); 444 : quit loopc; 445 : finsi; 446 : tx=(jc - 1) * lx; 447 : 448 : *--- cas 3D 449 : si (ega &dime 3); 450 : * 451 : * transformation des deplacements tx,ty (dans le repere 452 : * t1,t2) en dx,dy,dz (dans le repere global) 453 : * 454 : dis = (tx * t1) plus (ty * t2); 455 : * 456 : finsi; 457 : *--- fin du cas 3D 458 : 459 : notps = extr taba.'LISTEMP' j; 460 : notps = enti notps; 461 : 462 : si ither; 463 : uuj = manu chpo objt 1 'SCAL' 0.; 464 : sinon; 465 : tj = taba.'TABLECAST'.'DEPLACEMENTS'; 466 : uj = tj.notps; 467 : uuj = redu uj objt; 468 : finsi; 469 : 470 : si (idefo et (non ither)); 471 : dj = objt plus (ampld * uuj); 472 : dj = dj coul color; 473 : si (ega &dime 3); 474 : depl dj 'PLUS' dis; 475 : sinon; 476 : depl dj 'PLUS' (tx ty); 477 : finsi; 478 : si (ega j 1); 479 : dd = dj; 480 : sinon; 481 : dd = dd et dj; 482 : finsi; 483 : finsi; 484 : 485 : 486 : si (icont et (non ither)); 487 : ejj = taba.'TABLECAST'.'CONTRAINTES'; 488 : ej = ejj.notps; 489 : 490 : * determination du type de contraintes a calculer 491 : 492 : si (existe taba 'SIGCOMP'); 493 : si (ega (taba.'SIGCOMP') 'SIGVMIS'); 494 : pj = vmis ej moj ; 495 : sinon; 496 : pj = exco ej (taba.'SIGCOMP'); 497 : finsi; 498 : sinon; 499 : mess 'IL MANQUE LE NOM DE LA CONTRAINTE A TRACER'; 500 : finsi; 501 : pj = chang chpo pj moj; 502 : pj = redu pj objt; 503 : 504 : 505 : si (&dime ega 2); 506 : vect1 = (tx ty); 507 : objt1 = objt plus vect1; 508 : pj1 = pj plus vect1; 509 : uuj1 = uuj plus vect1; 510 : objt2 = extr pj1 mail; 511 : objt3 = extr uuj1 mail; 512 : elim objt1 objt2 coefelim; 513 : elim objt3 objt2 coefelim; 514 : form (ampld * uuj1); 515 : sinon; 516 : objt1 = objt plus dis; 517 : pj1 = pj plus dis; 518 : uuj1 = uuj plus dis; 519 : objt2 = extr pj1 mail; 520 : objt3 = extr uuj1 mail; 521 : elim objt1 objt2 coefelim; 522 : elim objt3 objt2 coefelim; 523 : form (ampld * uuj1); 524 : finsi; 525 : si (ega j 1); 526 : dd = objt1; 527 : pp = pj1; 528 : sinon; 529 : dd = dd et objt1; 530 : pp = pp et pj1; 531 : finsi; 532 : finsi; 533 : 534 : 535 : si itemp; 536 : ejj = taba.'TABLECAST'.'TEMPERATURES'; 537 : ej = ejj.notps; 538 : pj = redu ej objt; 539 : 540 : si (&dime ega 2); 541 : vect1 = (tx ty); 542 : objt1 = objt plus vect1; 543 : pj1 = pj plus vect1; 544 : uuj1 = uuj plus vect1; 545 : objt2 = extr pj1 mail; 546 : objt3 = extr uuj1 mail; 547 : elim objt1 objt2 coefelim; 548 : elim objt3 objt2 coefelim; 549 : form (ampld * uuj1); 550 : sinon; 551 : objt1 = objt plus dis; 552 : pj1 = pj plus dis; 553 : uuj1 = uuj plus dis; 554 : objt2 = extr pj1 mail; 555 : objt3 = extr uuj1 mail; 556 : elim objt1 objt2 coefelim; 557 : elim objt3 objt2 coefelim; 558 : form (ampld * uuj1); 559 : finsi; 560 : si (ega j 1); 561 : dd = objt1; 562 : pp = pj1; 563 : sinon; 564 : dd = dd et objt1; 565 : pp = pp et pj1; 566 : finsi; 567 : finsi; 568 : 569 : 570 : fin loopc; 571 : fin loopr; 572 : * 573 : *--- cas du trace de la deformee supperposee avec la 574 : * geometrie initiale 575 : si idefo; 576 : * 577 : * Boucle 3 (lignes & colonnes) sur tous les objets 578 : * afin de les placer (deformee et geometrie initiale 579 : * supperposees) 580 : * 581 : j=0; 582 : jr=0; 583 : repe loopr2 nrow; 584 : jr = jr + 1; 585 : ty = (1 - jr) * ly; 586 : jc = 0; 587 : repe loopc2 ncol; 588 : jc=jc + 1; 589 : j=j + 1; 590 : si (> j ngra); 591 : quit loopc2; 592 : finsi; 593 : tx=(jc - 1) * lx; 594 : si (ega &dime 3); 595 : dis = (tx * t1) plus (ty * t2); 596 : finsi; 597 : tj = taba.'TABLECAST'.'DEPLACEMENTS'; 598 : notps = extr taba.'LISTEMP' j; 599 : notps = enti notps; 600 : uj = tj.notps; 601 : uuj = redu uj objt; 602 : dj = objt plus (ampld * uuj); 603 : dj = dj coul color; 604 : d0 = objt; 605 : si (ega &dime 2); 606 : depl dj 'PLUS' (tx ty); 607 : sinon; 608 : depl dj 'PLUS' dis; 609 : finsi; 610 : si (ega j 1); 611 : d0 = d0 coul 'BLAN'; 612 : si (ega &dime 3); 613 : ddi = dj et (d0 plus dis); 614 : sinon; 615 : ddi = dj et (d0 plus (tx ty)); 616 : finsi; 617 : 618 : 619 : sinon; 620 : si (ega &dime 3); 621 : d0 = d0 coul 'BLAN'; 622 : ddi = ddi et (d0 plus dis) et dj; 623 : sinon; 624 : d0 = d0 coul 'BLAN'; 625 : ddi = ddi et (d0 plus (tx ty)) et dj; 626 : finsi; 627 : 628 : finsi; 629 : fin loopc2; 630 : fin loopr2; 631 : 632 : finsi; 633 : *--- fin du cas de supperposition 634 : 635 : ********************************************** 636 : * trace du dessin desire 637 : ********************************************** 638 : 639 : si idefo; 640 : titre (taba.'TITRE') 'amplification = ' ampld; 641 : si (&dime ega 2); 642 : si (ega (taba.'DEFO_SUPP') VRAI); 643 : trac ddi ; 644 : sinon; 645 : trac dd ; 646 : finsi; 647 : sinon; 648 : si (ega (taba.'DEFO_SUPP') VRAI); 649 : trac cach ddi ; 650 : sinon; 651 : trac cach dd ; 652 : finsi; 653 : finsi; 654 : finsi; 655 : 656 : si icont; 657 : titre (taba.'TITRE') 'amplification = ' ampld; 658 : si (&dime ega 2); 659 : trac dd pp ; 660 : sinon; 661 : trac dd pp cach oeil; 662 : finsi; 663 : finsi; 664 : 665 : si itemp ; 666 : titre (taba.'TITRE') ; 667 : trac dd pp ; 668 : finsi; 669 : 670 : 671 : 672 : FINPROC ; 673 :
© Cast3M 2003 - All rights reserved.
Disclaimer