Application Center - Maplesoft

App Preview:

Example 7: Symbolic Elastic Analysis

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

elastics3.mws

FINITE ELEMENTS

SYMBOLIC PROGRAMMING IN MAPLE

Artur Portela

Elastics Example 3: Symbolic Variables

> 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.

>

Symbolic Variables

For the sake of simplicity, start reading the data of example 1

> read_save_data();

read data from a file (y/n) ? y;

y

file name: "dat_test4.txt";

save data into a file (y/n) ? n;

n

> tcase;plane_case;control;nods;mat_props;elems;forces;bdr_conds;

[

[[1, 1], [0, 1], [1, 0], [0, 0]]

[[210000000000., .28, -77000., .1e-1]]

[[1, 2, 4, 1], [4, 3, 1, 1]]

[[1, 0, 10], [2, 0, 10]]

[[4, x, 0], [4, y, 0], [3, 90, 0], [2, 0, 0]]

Redefine this data with symbolic variables :

> nods:=[[l,l],[0,l],[l,0],[0,0]]:mat_props:=[[E,nu,b,1]]:forces:=[[1,0,P],[2,0,P]]:

> tcase;plane_case;control;nods;mat_props;elems;forces;bdr_conds;

[

[[l, l], [0, l], [l, 0], [0, 0]]

[[E, nu, b, 1]]

[[1, 2, 4, 1], [4, 3, 1, 1]]

[[1, 0, P], [2, 0, P]]

[[4, x, 0], [4, y, 0], [3, 90, 0], [2, 0, 0]]

> cst_fem(yes);

Plane*stress*analysis

`Initializing global matrices:`

matrix([[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0...

`Assembling element`*[1, 2, 4, 1]*`:`

matrix([[-1/2*E/(-1+nu^2), 0, 1/2*E/(-1+nu^2), -1/2...

`Assembling element`*[4, 3, 1, 1]*`:`

matrix([[1/4*E/(nu+1)-1/2*E/(-1+nu^2), 0, 1/2*E/(-1...

`Assembling point forces:`

vector([0, P, 0, P, 0, 0, 0, 0])

`Forcing exact boundary conditions:`

matrix([[1/4*E/(nu+1)-1/2*E/(-1+nu^2), 0, 0, -1/2*E...

vector([0, P, 0, P, 0, 0, 0, 0])

`Nodal displacements (disp):`*[u[x], u[y]]

[-2*P*nu/E, 2*P/E], vector([0, 2*P/E]), vector([-2*...

`Reactions (reacts):`*[node, direction, [reaction]]...

[4, x, [0]], [4, y, [-P]], [3, 90, [0, -P]], [2, 0,...

`Equilibrium:  `*Sigma*F[x]*`= 0`, `  and  `*Sigma*...

`Element stresses (e_sigma): `*[[sigma[x], sigma[y]...

[vector([0, 2*P/l, 0]), [2*P/l, 0, 90], P^2/E], [ve...

`Nodal stresses (n_sigma): `*[sigma[I], sigma[II], ...

[2*P/l, 0, 90, 2*P^2/(l^2*E)], [2*P/l, 0, 90, 2*P^2...

`Total strain energy:  `

2*P^2/E

`Cpu time:  2.112 seconds`

Print displacements [u[x], u[y]] :

> disp;

[[-2*P*nu/E, 2*P/E], vector([0, 2*P/E]), vector([-2...

Print element stresses [[sigma[x], sigma[y], sigma[xy]], [sigma[I], sigma[... :

> e_sigma;

[[vector([0, 2*P/l, 0]), [2*P/l, 0, 90], P^2/E], [v...

Print nodal stresses [sigma[I], sigma[II], angle, `strain energy density... :

> n_sigma;

[[2*P/l, 0, 90, 2*P^2/(l^2*E)], [2*P/l, 0, 90, 2*P^...

Print reactions [node, direction, [reaction]] :

> reacts;

[[4, x, [0]], [4, y, [-P]], [3, 90, [0, -P]], [2, 0...

Print total strain energy:

> total_strain_energy;

2*P^2/E

In order to display graphics, it is necessary to substitute symbolic variables by numeric values.

>