FINITE ELEMENTS
SYMBOLIC PROGRAMMING IN MAPLE
by Artur Portela
Elastics Example 2:
Bending of a Short Cantilever
> restart;
> libname := "C:/mylib/fem", libname:
> interface(verboseproc=3):printlevel:=3:
> with(Plotter):
> with(Cst_fem): with(G_cst_fem):
Data Preparation
The best way to input data for Cst_fem is to use the procedure read_save_data , which reads a file with the following structure:
*elements*
[element, node1, node2, node3, material]
1 1 2 4 1
2 4 3 1 1
*nodes*
[node, x, y]
1 1 1
2 0 1
3 1 0
4 0 0
*materials*
[material, Young modulus, Poisson coef, specific weight, thickness]
1 210000000000. .28 -77000. 0.01
*forces*
[node, fx, fy]
1 0 10
2 0 10
*constraints*
[node, direction(x, y or angle measured from x), displacement]
4 x 0
4 y 0
3 90 0
2 0 0
*control*
[title, plane stress/strain, point forces, self weight]
title Plate Under Uniaxial Traction
plane stress
point forces
*end*
The data blocks, with the respective keyword on the top, can be given in any order.
Alternatively, data can be given manually through the definition of the variables: title , plane_case , control , nods , mat_props , elems , forces and bdr_conds . See bellow the structure of these variables.
>
Bending of a Short Cantilever
As another problem, consider the case of a square catilever plate, with 1
m
of length, under the simultaneous action of the self weight and a load of 100
kN/
, uniformly distributed on the free end, perpendicular to the
x
direction. The analysis of this short cantilever will be carried out for 1
m
of thickness. The material properties are
E=
206*
kN/
,
and
//
. For the sake of simplicity, consider the discretization of the plate with 2 finite elements. Note that the distributed load is replaced by the equivalent nodal loads.
> read_save_data();
read data from a file (y/n) ? y;
file name: "dat_test5.txt";
save data into a file (y/n) ? n;
This is the finite element data:
> #tcase;plane_case;control;nods;mat_props;elems;forces;bdr_conds;
Check data
> plot_problem_data();plot_mesh();
Run the finite element procedure
> cst_fem();
> plot_displacements();animate_displacements();
Plot element principal stresses
> plot_stresses([seq(e_sigma[i][2],i=1..nops(e_sigma))]);
plot title: "Element Principal Stresses";
Plot nodal principal stresses
> plot_stresses([seq(n_sigma[i][1..3],i=1..nops(n_sigma))]);
plot title: "Nodal Principal Stresses";
> animate_3D_rot([seq(n_sigma[i][4],i=1..nops(n_sigma))]);
plot title: "Nodal Strain Energy Density";
> animate_3D_def([seq(n_sigma[i][4],i=1..nops(n_sigma))]);
plot title: "Nodal Strain Energy Density";
> animate_3D_rot([seq(e_sigma[i][3],i=1..nops(e_sigma))]);
plot title: "Element Strain Energy";
> animate_3D_def([seq(e_sigma[i][3],i=1..nops(e_sigma))]);
plot title: "Element Strain Energy";
>