Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

T elements1.html file:///C:/Users/LM_STU~1/AppData/Local/Temp/Rar$EXa9636.315...

>
TRIANGULAR ELEMENTS (2D)
Lando Mentrasti - Teoria delle Strutture 2018 - Università Politecnica delle Marche

Initializations
> restart:
ContoursLevel := [-.2,0,.2,.6,.4,.8,1]:

> # Lagrange's polynomial


lagrange := proc( x0, x1, nOrdine, k )
local i, xi, elle;
if nOrdine = 0 then #definizione di l[0,0]
return 1;
end if;
for i from 0 to nOrdine
do
xi[i] := x0 + (x1-x0) * i /nOrdine;
od;
elle := 1;
for i from 0 to nOrdine
do
if evalb(i = k) then next;
end if;
elle := elle * (xi - xi[i]) /(xi[k] - xi[i]);
od:
return unapply( elle, xi );
end proc:

> # cartesian coordinates


x_coord := ( vL ) -> vL[1] * x[1] + vL[2] * x[2] + (1-vL[1]-vL[2]) * x[3];

(1.1)

Triangular Vertices
> x[1] := Vector( 2, [0,2] );
x[2] := Vector( 2, [3,0] );
x[3] := Vector( 2, [2,3] );

(1.1.1)

> plot3d( [ x_coord( vL )[1], x_coord( vL )[2], 0 ], vL[1]=0..1, vL[2]=0..1-vL[1], view = -2..1.5, axes = NORMAL,
labels=["x","y","z"] );

1 di 13 14/02/2023, 17:15
T elements1.html file:///C:/Users/LM_STU~1/AppData/Local/Temp/Rar$EXa9636.315...

Shape functions
Rem: k = 1-(j+k)

> N := (i,j, n) -> lagrange(0,i/n, i,i)( L[1] )


* lagrange(0,j/n, j,j)( L[2] )
* lagrange(0,(n-i-j)/n, (n-i-j),(n-i-j))( 1-L[1]-L[2] );

(2.1)

T6
> n := 2:

N( 2,0,0)
> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 2,0, n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -0.5..1.0, style =
surfacecontour, contours = ContoursLevel, axes = BOXED );

2 di 13 14/02/2023, 17:15
T elements1.html file:///C:/Users/LM_STU~1/AppData/Local/Temp/Rar$EXa9636.315...

>

N( 1,1,0)

> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 1,1 ,n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -1..1.0, style =
surfacecontour, contours = ContoursLevel, axes = BOXED );

3 di 13 14/02/2023, 17:15
T elements1.html file:///C:/Users/LM_STU~1/AppData/Local/Temp/Rar$EXa9636.315...

>

T10
> n := 3:

N( 3,0,0)
> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 3,0, n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -0.5..1.0, contours =
ContoursLevel, style= "surfacecontour", axes = BOXED );

4 di 13 14/02/2023, 17:15
T elements1.html file:///C:/Users/LM_STU~1/AppData/Local/Temp/Rar$EXa9636.315...

>

N( 2,1,0)

> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 2,1 ,n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -1..1.5, contours =
ContoursLevel, style= "surfacecontour", axes = BOXED );

> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 2,1 ,n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -1..1.5, contours =
ContoursLevel, style= "surfacecontour", axes = BOXED );

5 di 13 14/02/2023, 17:15
T elements1.html file:///C:/Users/LM_STU~1/AppData/Local/Temp/Rar$EXa9636.315...

N( 1,1,0)
> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 1,1 ,n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -1..1.5, contours
= ContoursLevel, style= "surfacecontour", axes = BOXED );

T15

6 di 13 14/02/2023, 17:15
T elements1.html file:///C:/Users/LM_STU~1/AppData/Local/Temp/Rar$EXa9636.315...

> n := 4:

N( 4,0,0)
> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 4,0, n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -0.5..1.0, contours =
ContoursLevel, style= "surfacecontour", axes = BOXED );

N( 3,1,0)
> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 3,1, n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -0.5..1.5,
contours = ContoursLevel, style= "surfacecontour", axes = BOXED );

7 di 13 14/02/2023, 17:15
T elements1.html file:///C:/Users/LM_STU~1/AppData/Local/Temp/Rar$EXa9636.315...

>

N( 2,2,0)
> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 2,2, n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -1.0..1.0,
contours = ContoursLevel, style= "surfacecontour", axes = BOXED );

> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 2,2, n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -1.0..1.0,
contours = ContoursLevel, style= "surfacecontour", axes = BOXED );

8 di 13 14/02/2023, 17:15
T elements1.html file:///C:/Users/LM_STU~1/AppData/Local/Temp/Rar$EXa9636.315...

N( 2,1,0)
> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 2,1, n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -0.5..1.5,
contours = ContoursLevel, style= "surfacecontour", axes = BOXED );

>

9 di 13 14/02/2023, 17:15
T elements1.html file:///C:/Users/LM_STU~1/AppData/Local/Temp/Rar$EXa9636.315...

T21
> n := 5:

N( 5,0,0)
> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 5,0, n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -0.5..1.0, contours =
ContoursLevel, style= "surfacecontour", axes = BOXED );

>

>

N( 4,1,0)
> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 4,1, n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -0.5..1.5, contours =
ContoursLevel, style= "surfacecontour", axes = BOXED );

10 di 13 14/02/2023, 17:15
T elements1.html file:///C:/Users/LM_STU~1/AppData/Local/Temp/Rar$EXa9636.315...

N( 3,2,0)
> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 3,2, n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -1.5..1.0, contours =
ContoursLevel, style= "surfacecontour", axes = BOXED );

>

11 di 13 14/02/2023, 17:15
T elements1.html file:///C:/Users/LM_STU~1/AppData/Local/Temp/Rar$EXa9636.315...

N( 3,1,0)
> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 3,1, n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -0.5..1.5, contours =
ContoursLevel, style= "surfacecontour", axes = BOXED );

N( 2,1,0)
> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 2,1, n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -1.0..1.5, contours =
ContoursLevel, style= "surfacecontour", axes = BOXED );

> plot3d( [ x_coord( L )[1], x_coord( L )[2], N( 2,1, n ) ], L[1]=0..1, L[2]=0..1-L[1], view = -1.0..1.5, contours =
ContoursLevel, style= "surfacecontour", axes = BOXED );

12 di 13 14/02/2023, 17:15
T elements1.html file:///C:/Users/LM_STU~1/AppData/Local/Temp/Rar$EXa9636.315...

13 di 13 14/02/2023, 17:15

You might also like