## CASE A: statically determined structure

C:\Users\manto\Desktop\20190227_PAOM_lab\CasoA_immagine.png

List of symbols
P    :   external force
l    :   beam lenght
N_i  :   normal force related to the beam i-portion of interest
T_i  :   shear force related to the beam i-portion of interest
Mf_i :   bending moment related to the beam i-portion of interest
A    :   point located of the free extremity of the beam
B    :   point located at the clamped
s    :   curvilinear abscissa that spans the beam axis from point to point, e.g. from A to B, ... [0, l_AB]
xi   :   NORMALIZED curvilinear abscissa that spans the beam axis from point to point, e.g. from A to B, ... [0;1]
d_A  :   deflection of the beam evauated at point A  =========> unknown ???????????????
XB, YB, CB : reaction force and  moment at point B

l;

assume(l>0);

Reaction forces at B may be retrieved based on equilibrium equations

eqtx  :  0            = 0 ;
eqty  :  YB - P       = 0 ;
eqrBz :  CB + P*l     = 0 ;

linsolve( [eqty,eqrBz] , [YB,CB] ), globalsolve=true;

linear shape functions in the [0,1] interval;
N0(0)=1, N0(1)=0
N1(0)=0, N1(1)=1

two different constructions for defining a functions, NOT STRICTLY equivalent in general, equivalent in the present case

the expression at the define second argument is first evaluated, then assigned to N0. 
Hence, evaluation occurs at definition time.

define(
    N0( xi ),
    1-xi
);

define(
    N1( xi ), 
    xi
    );

Shear force definitions

           |------- first extreme ------|        |------- second extreme -----|
           |                            |        |                            |
           |  P .                       |        |  P .                       |  

TAB:( YB                          )*N0(xi)+( YB                       )*N1(xi);

Bending moment definitions

MfAB :
  ( bending moment contributions at each segment first  extreme A) * N0(xi)
+ ( bending moment contributions at each segment second extreme B) * N1(xi)

bending moment contributions inserted in the following order
. force P alone

           |------- first extreme ------|        |------- second extreme -----|
           |                            |        |                            |
           |  P .                       |        |  P .                       |  

MfAB:( CB                          )*N0(xi)+(0                         )*N1(xi);

in order to simplify the expression, I redefine the bending moment based 
on its "expanded" expression.

MfAB: expand(MfAB);

           |------- first extreme ------|        |------- second extreme -----|
           |                            |        |                            |
           |  P .                       |        |  P .                       |  

elastic internal energy on beam AB segment

in the following integral, ds = len_AB dxi = l * dxi

UAB:integrate( MfAB^2/2/E/J *l, xi,0,1)+ csi*integrate (TAB^2/2/A/G *l, xi,0,1);

total elastic internal energy

U: UAB;

Application of the Castigliano's theorem for obtaining the displacement at A, 
in particular:
. displacement y at A : d_A

d_A : diff(U,P);

G: E/2/(1+nu);
A: b*h;
J: b*h^3/12;

Dimensioning

dim1: [b=10, h=20, l=100, P=10000, csi=1.2,E=210000, nu=0.3];

ev(d_A, dim1, infeval);

## CASE B: STATICALLY DETERMINED STRUCTURE

kill(all);

C:\Users\manto\Desktop\20190227_PAOM_lab\CasoB_immagine.png

List of symbols
P    :   external force
l    :   beam lenght
N_i  :   normal force related to the beam i-portion of interest
T_i  :   shear force related to the beam i-portion of interest
Mf_i :   bending moment related to the beam i-portion of interest
A    :   point located of the free extremity of the beam
B    :   point located at the clamped
s    :   curvilinear abscissa that spans the beam axis from point to point, e.g. from A to B, ... [0, l_AB]
xi   :   NORMALIZED curvilinear abscissa that spans the beam axis from point to point, e.g. from A to B, ... [0;1]
d_A  :   deflection of the beam evauated at point A  =========> unknown ???????????????

l;

assume(l>0);

Reaction forces at the clamped section is not necessary to solve the problem
Therefore, I adopted two abscissas:
the first one, (x) from the free extremity to mid-lenght of the beam
the second one, (y) form the mid-lenght of the beam to its clamped section
separating the beam in two segments called 1 and 2

linear shape functions in the [0,1] interval;
N0(0)=1, N0(1)=0
N1(0)=0, N1(1)=1

two different constructions for defining a functions, NOT STRICTLY equivalent in general, equivalent in the present case

the expression at the define second argument is first evaluated, then assigned to N0. 
Hence, evaluation occurs at definition time.

define(
    N0( xi ),
    1-xi
);

define(
    N1( xi ), 
    xi
    );

           |------- first extreme ------|        |------- second extreme -----|
           |                            |        |                            |
           |  F .                  P.   |        |  F .                  P.   |   

MfAB:( 0          +         0     )*N0(xi)+( F*l/2        +           0    )*N1(xi);

in order to simplify the expression, I redefine the bending moment based 
on its "expanded" expression.

MfAB: expand(MfAB);

           |------- first extreme ------|        |------- second extreme -----|
           |                            |        |                            |
           |  F .                  P.   |        |  F .                  P.   |  

MfBC:( F*l/2           +    0    )*N0(xi)+(  F*(l/2+l/2)           +    P*l/2     )*N1(xi);

in order to simplify the expression, I redefine the bending moment based 
on its "expanded" expression.

MfBC: expand(MfBC);

elastic internal energy on beam AB segment

in the following integral, ds = len_AB dxi = l/2 * dxi

UAB:integrate( MfAB^2/2/E/J *l/2, xi,0,1);

elastic internal energy on beam BC segment

in the following integral, ds = len_BC dxi = l/2 * dxi

UBC:integrate( MfBC^2/2/E/J *l/2, xi,0,1);

U: UAB+UBC;

fullratsimp(%);

diff(%,F);

ev(%,F=0);

## CASE C: STATICALLY REDUNDANT STRUCTURE

kill(all);

C:\Users\manto\Desktop\20190227_PAOM_lab\CasoC_immagine.png

l;

assume(l>0);

define(
    N0( xi ),
    1-xi
);

define(
    N1( xi ), 
    xi
    );

           |------- first extreme ------|        |------- second extreme -----|
           |                            |        |                            |
           |  F .                  P.   |        |  F .                  P.   |   

MfAB:( 0          +         0     )*N0(xi)+( F*l/2        +           0    )*N1(xi);

MfAB: expand(MfAB);

           |------- first extreme ------|        |------- second extreme -----|
           |                            |        |                            |
           |  F .                  P.   |        |  F .                  P.   |  

MfBC:( F*l/2           +    0    )*N0(xi)+(  F*(l/2+l/2)       -  P*l/2     )*N1(xi);

MfBC: expand(MfBC);

UAB:integrate( MfAB^2/2/E/J *l/2, xi,0,1);

UBC:integrate( MfBC^2/2/E/J *l/2, xi,0,1);

U: UAB+UBC;

fullratsimp(%);

diff(%,F);

linsolve(%=0, F), globalsolve = true;

F:%;

ev(U, F);

fullratsimp(%);

U:%;

d_b:diff(U, P);