From ab6e18ed2e36b1f8a9d0fb9f9e383e8a0f22ddee Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Wed, 2 Feb 2022 18:16:44 +0100 Subject: [PATCH] Added code --- .gitignore | 3 + 0_MAILLAGE/maillage.dgibi | 135 +++++++++++++++++++++++++++++++++ 0_MAILLAGE/maillage3d.dgibi | 138 ++++++++++++++++++++++++++++++++++ 1_PARAMETERS/parameters.dgibi | 23 ++++++ 2_RESOLUTION/resolution.dgibi | 11 +++ 3_POSTPROCESS/post.dgibi | 12 +++ 6 files changed, 322 insertions(+) create mode 100644 .gitignore create mode 100644 0_MAILLAGE/maillage.dgibi create mode 100644 0_MAILLAGE/maillage3d.dgibi create mode 100644 1_PARAMETERS/parameters.dgibi create mode 100644 2_RESOLUTION/resolution.dgibi create mode 100644 3_POSTPROCESS/post.dgibi diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..193e59a --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.ps +*.trace +*.sauv diff --git a/0_MAILLAGE/maillage.dgibi b/0_MAILLAGE/maillage.dgibi new file mode 100644 index 0000000..3b73408 --- /dev/null +++ b/0_MAILLAGE/maillage.dgibi @@ -0,0 +1,135 @@ +OPTI 'DIME' 2 'ELEM' 'TRI3'; + +LX1p = 4.; +LX1 = 20.; +LY1 = 5.; +LY1t = 3.; +N1 = 5; + +LX0 = (LX1 * N1) + (LX1p * (N1+1)); + +LX2 = 21.; +LY2 = 10.; +LY2t = 3.; +N2 = N1; +LX2p = (LX0 - (N2 * LX2)) / (N2 + 1); + +LX3 = 5.; +LY3 = 2.; +LY3t = 4.; +N3 = N2 * 3; +LX3p = (LX0 - (N3 * LX3)) / (N3 + 1); + +Y1 = LY1 + (LX1/2) + LY1t; +Y2 = Y1 + LY2 + (LX2/2) + LY2t; +Y3 = Y2 + LY3 + (LX3/2) + LY3t; + +DENSITE 1; + +P0 = (0.-LX1p) 0.; +PB = 0. 0.; +LI = D P0 PB; +BL1 = D P0 PB; +I = 0; +REPETER BOUCLE1; + SI (I < N1); + PA = PB; + PB = (I * (LX1p+LX1)) LY1; + LI = LI ET (D PA PB); + + PA = PB; + PB = (I * (LX1p+LX1) + LX1) LY1; + LI = LI ET (C PASS PA ((I * (LX1p+LX1) + (LX1/2)) (LY1+(LX1/2))) PB); + + PA = PB; + PB = (I * (LX1p+LX1) + LX1) 0.; + LI = LI ET (D PA PB); + + PA = PB; + PB = (I * (LX1p+LX1) + LX1 + LX1p) 0.; + LI = LI ET (D PA PB); + BL1 = BL1 ET (D PA PB); + + I = I + 1; + SINON; + QUITTER BOUCLE1; + FINSI; +FIN BOUCLE1; +PA = PB; +PB = (I * (LX1p+LX1)) (LY1 + (LX1/2)); +LI = LI ET (D PA PB); + +PA = PB; +PB = (I * (LX1p+LX1)) Y3; +LI = LI ET (D PA PB); + +PA = PB; +PB = (0.-LX1p) Y3; +LI = LI ET (D PA PB); + +LI = LI ET (D PB P0); + +TR2 = LI; +I = N2-1; +REPETER BOUCLE2; + SI (I >EG 0); + PB = (I * (LX2p+LX2) + LX2p - LX1p) Y1; + PA = (I * (LX2p+LX2) + LX2 + LX2p - LX1p) Y1; + TRx = D PA PB; + + PA = PB; + PB = (I * (LX2p+LX2) + LX2p - LX1p) (Y1+LY2); + TRx = TRx ET (D PA PB); + + PA = PB; + PB = (I * (LX2p+LX2) + LX2 + LX2p - LX1p) (Y1+LY2); + TRx = TRx ET (C PASS PA ((I * (LX2p+LX2) + (LX2/2) + LX2p - LX1p) (Y1+LY2+(LX2/2))) PB); + + PA = PB; + PB = (I * (LX2p+LX2) + LX2 + LX2p - LX1p) Y1; + TRx = TRx ET (D PA PB); + + TR2 = TR2 ET TRx; + I = I - 1; + SINON; + QUITTER BOUCLE2; + FINSI; +FIN BOUCLE2; + +I = N3-1; +REPETER BOUCLE3; + SI (I >EG 0); + PB = (I * (LX3p+LX3) - LX1p + LX3p) Y2; + PA = (I * (LX3p+LX3) + LX3 - LX1p + LX3p) Y2; + TRx = D PA PB; + + PA = PB; + PB = (I * (LX3p+LX3) - LX1p + LX3p) (Y2+LY3); + TRx = TRx ET (D PA PB); + + PA = PB; + PB = (I * (LX3p+LX3) + LX3 - LX1p + LX3p) (Y2+LY3); + TRx = TRx ET (C PASS PA ((I * (LX3p+LX3) + (LX3/2) - LX1p + LX3p) (Y2+LY3+(LX3/2))) PB); + + PA = PB; + PB = (I * (LX3p+LX3) + LX3 - LX1p + LX3p) Y2; + TRx = TRx ET (D PA PB); + + TR2 = TR2 ET TRx; + I = I - 1; + SINON; + QUITTER BOUCLE3; + FINSI; +FIN BOUCLE3; + +ELIM TR2 .1; +TRAC TR2; + +SU = SURF TR2; +ELIM SU .01; +TRAC SU; + +OPTI 'SAUV' 'MAILLAGE.sauv'; +SAUV; + +FIN; diff --git a/0_MAILLAGE/maillage3d.dgibi b/0_MAILLAGE/maillage3d.dgibi new file mode 100644 index 0000000..ca2afa7 --- /dev/null +++ b/0_MAILLAGE/maillage3d.dgibi @@ -0,0 +1,138 @@ +OPTI 'DIME' 3 'ELEM' 'CU20'; + +LX1p = 4.; +LX1 = 20.; +LY1 = 5.; +LY1t = 3.; +N1 = 5; + +LX0 = (LX1 * N1) + (LX1p * (N1+1)); + +LX2 = 21.; +LY2 = 10.; +LY2t = 3.; +N2 = N1; +LX2p = (LX0 - (N2 * LX2)) / (N2 + 1); + +LX3 = 5.; +LY3 = 2.; +LY3t = 4.; +N3 = N2 * 3; +LX3p = (LX0 - (N3 * LX3)) / (N3 + 1); + +Y1 = LY1 + (LX1/2) + LY1t; +Y2 = Y1 + LY2 + (LX2/2) + LY2t; +Y3 = Y2 + LY3 + (LX3/2) + LY3t; + +DENSITE 1; + +P0 = (0.-LX1p) 0. 0.; +PB = 0. 0. 0.; +LI = D P0 PB; +BL1 = D P0 PB; +I = 0; +REPETER BOUCLE1; + SI (I < N1); + PA = PB; + PB = (I * (LX1p+LX1)) LY1 0.; + LI = LI ET (D PA PB); + + PA = PB; + PB = (I * (LX1p+LX1) + LX1) LY1 0.; + LI = LI ET (C PASS PA ((I * (LX1p+LX1) + (LX1/2)) (LY1+(LX1/2)) 0.) PB); + + PA = PB; + PB = (I * (LX1p+LX1) + LX1) 0. 0.; + LI = LI ET (D PA PB); + + PA = PB; + PB = (I * (LX1p+LX1) + LX1 + LX1p) 0. 0.; + LI = LI ET (D PA PB); + BL1 = BL1 ET (D PA PB); + + I = I + 1; + SINON; + QUITTER BOUCLE1; + FINSI; +FIN BOUCLE1; +PA = PB; +PB = (I * (LX1p+LX1)) (LY1 + (LX1/2)) 0.; +LI = LI ET (D PA PB); + +PA = PB; +PB = (I * (LX1p+LX1)) Y3 0.; +LI = LI ET (D PA PB); + +PA = PB; +PB = (0.-LX1p) Y3 0.; +LI = LI ET (D PA PB); + +LI = LI ET (D PB P0); + +TR2 = LI; +I = N2-1; +REPETER BOUCLE2; + SI (I >EG 0); + PB = (I * (LX2p+LX2) + LX2p - LX1p) Y1 0.; + PA = (I * (LX2p+LX2) + LX2 + LX2p - LX1p) Y1 0.; + TRx = D PA PB; + + PA = PB; + PB = (I * (LX2p+LX2) + LX2p - LX1p) (Y1+LY2) 0.; + TRx = TRx ET (D PA PB); + + PA = PB; + PB = (I * (LX2p+LX2) + LX2 + LX2p - LX1p) (Y1+LY2) 0.; + TRx = TRx ET (C PASS PA ((I * (LX2p+LX2) + (LX2/2) + LX2p - LX1p) (Y1+LY2+(LX2/2)) 0.) PB); + + PA = PB; + PB = (I * (LX2p+LX2) + LX2 + LX2p - LX1p) Y1 0.; + TRx = TRx ET (D PA PB); + + TR2 = TR2 ET TRx; + I = I - 1; + SINON; + QUITTER BOUCLE2; + FINSI; +FIN BOUCLE2; + +I = N3-1; +REPETER BOUCLE3; + SI (I >EG 0); + PB = (I * (LX3p+LX3) - LX1p + LX3p) Y2 0.; + PA = (I * (LX3p+LX3) + LX3 - LX1p + LX3p) Y2 0.; + TRx = D PA PB; + + PA = PB; + PB = (I * (LX3p+LX3) - LX1p + LX3p) (Y2+LY3) 0.; + TRx = TRx ET (D PA PB); + + PA = PB; + PB = (I * (LX3p+LX3) + LX3 - LX1p + LX3p) (Y2+LY3) 0.; + TRx = TRx ET (C PASS PA ((I * (LX3p+LX3) + (LX3/2) - LX1p + LX3p) (Y2+LY3+(LX3/2)) 0.) PB); + + PA = PB; + PB = (I * (LX3p+LX3) + LX3 - LX1p + LX3p) Y2 0.; + TRx = TRx ET (D PA PB); + + TR2 = TR2 ET TRx; + I = I - 1; + SINON; + QUITTER BOUCLE3; + FINSI; +FIN BOUCLE3; + +ELIM TR2 .1; +TRAC TR2; + +SU = SURF 'PLAN' TR2; +ELIM SU .01; +TRAC SU; + +VO = SU VOLU 6 'TRAN' (0. 0. 4.) ; +TRAC VO; + +OPTI 'SAUV' 'MAILLAGE3d.sauv'; +SAUV; + +FIN; diff --git a/1_PARAMETERS/parameters.dgibi b/1_PARAMETERS/parameters.dgibi new file mode 100644 index 0000000..5cbe3f0 --- /dev/null +++ b/1_PARAMETERS/parameters.dgibi @@ -0,0 +1,23 @@ +OPTI 'REST' '../0_MAILLAGE/MAILLAGE3d.sauv'; +REST; + +* TRAC SU; + +* OPTI 'MODE' 'PLAN' 'DEFO'; +OPTI 'DIME' 3 'ELEM' 'CU20'; + +EP0 = 4.; + +MOM = MODE VO 'MECANIQUE' 'ELASTIQUE'; +MAM = MATERIAL MOM YOUN 2.4E11 NU 0.2 RHO 2700.; +CL1 = BLOQ DEPLA ROTA BL1; + +RIG1 = RIGI MOM MAM; +RIG1 = RIG1 ET CL1; + +MAS1 = MASS MOM MAM; + +OPTI 'SAUV' 'PARAMS.sauv'; +SAUV; + +FIN; diff --git a/2_RESOLUTION/resolution.dgibi b/2_RESOLUTION/resolution.dgibi new file mode 100644 index 0000000..84ce670 --- /dev/null +++ b/2_RESOLUTION/resolution.dgibi @@ -0,0 +1,11 @@ +OPTI 'REST' '../1_PARAMETERS/PARAMS.sauv'; +REST; + +TAB1 = VIBR PROCHE (PROG 1.) ( ENTI (PROG 10) ) RIG1 MAS1; + +LIST TAB1; + +OPTI 'SAUV' 'RESULTS.sauv'; +SAUV; + +FIN; diff --git a/3_POSTPROCESS/post.dgibi b/3_POSTPROCESS/post.dgibi new file mode 100644 index 0000000..b9e9060 --- /dev/null +++ b/3_POSTPROCESS/post.dgibi @@ -0,0 +1,12 @@ +OPTI 'REST' '../2_RESOLUTION/RESULTS.sauv'; +REST; + +OPTI 'TRAC' 'PS'; +REPETER POUR ((DIME (TAB1 . MODES)) - 2); + OPTI 'FTRA' (CHAI 'MODE' &POUR '.ps'); + LIST &POUR; + LIST TAB1 . MODES . (&POUR); + DEF = DEFO VO TAB1 . MODES . (&POUR) . DEFORMEE_MODALE 10. 'ROUG'; + TR = TRAC DEF 'FACE'; +FIN POUR; +FIN;