12P Ppppp

Páginas: 6 (1399 palabras) Publicado: 7 de diciembre de 2012
GUI Program for 2D-Truss Analysis




Developed in MATLAB 6.5





Name: Yan Luo

MAE, West Virginia Univ.

Date: Mar. 8, 2005
Content

1. Task 2
2. Overview 3
3. Program Structure 5
3.1 Global Variables 5
3.2 Main Callbacks & Functions 5
3.3 Relative Files 8
4. User’s Guide 9
4.1 Main Interface of the Program 9
4.2 How to Use It 9
4.3 Example 101. Task

Develop a GUI program in MATLAB to solve the following question. Meanwhile, the program can allow users to change the parameters in order to solve other general truss analysis problems.

Try to get the value of force and displacement at each node.
[pic] [pic]





2. Overview


In a truss, it’s required that all loads and reactions are applied only at thejoints and that all members are connected together at their ends by frictionless pin joints. The finite element method is applicable to statically determinate or indeterminate structures alike. The finite element method also provides joint deflections. Effects of temperature changes and support settlements can also be routinely handled.





The following FEM calculation algorithm (orprocedures) has been used in this GUI program.


[pic]


Figure 2.1 Procedures of this GUI Program (1)








[pic]


Figure 2.2 Procedures of this GUI Program (2)


3. Program Structure


3.1 Global Variables

There are 9 global variables defined in the program. They are:
E % Material's E
A % the cross section area of elements
NN % the number of nodesEN % the number of elements
NXY % store the coordinates of nodes {X1 Y1 X2 Y2 X3 Y3}
EFromTo % store the direction of elements (the node-order of each element) {1 3 2 3}
NodeCon % contrain of nodes {U1 U2 U3 U4 U5 U6} (1 -- constrained, 0 -- unconstrained)
NodeForce % force of nodes {R1 R2 R3 R4 R5 R6} --- value
NodeForceStatus % the status of the force of nodes (1 --known, 0 -- unknown)

3.2 Main Callbacks & Functions

function btn_NN_Minus_Callback(hObject, eventdata, handles)

global NN
global NXY
global NodeCon
global NodeForce
global NodeForceStatus

This function is to decrease the number of nodes, and some items relative to it will change together, such as Node Coordinates, Node Constrains, Node Force, Node Force Status.

functionbtn_NN_Plus_Callback(hObject, eventdata, handles)

global NN
global NXY
global NodeCon
global NodeForce
global NodeForceStatus

This function is to add the number of nodes, and some items relative to it will change together, such as Node Coordinates, Node Constrains, Node Force, Node Force Status.

function btn_EN_Minus_Callback(hObject, eventdata, handles)

global EFromTo
global EN
global Eglobal A

This function is to decrease the number of elements, and some items relative to it will change together, such as Direction of Elements, E and Areas of Elements.


function btn_EN_Plus_Callback(hObject, eventdata, handles)

global EFromTo
global EN
global E
global A

This function is to add the number of elements, and some items relative to it will change together, such asDirection of Elements, E and Areas of Elements.

function btn_Node_Callback(hObject, eventdata, handles)

global E % Material's E
global A % the cross section area of elements
global NN; % the number of Nodes
global EN; % the number of Elements
global NXY; % Coordinates of Nodes
global EFromTo; % Element Direction (construct elements)global NodeCon; % constrain of nodes
global NodeForce; % forces applied on Nodes
global NodeForceStatus; % the node force status (1 -- known, 0 -- unknown)


This function is to define the geometric parameters of nodes and display these nodes.



function btn_Element_Callback(hObject, eventdata, handles)

global E % Material's E
global A % the cross...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Ppppp
  • Ppppp
  • ppppp
  • Ppppp
  • Ppppp
  • ppppp
  • Ppppp
  • ppppp

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS