《应力状态分析材力上机实验报告》由会员分享,可在线阅读,更多相关《应力状态分析材力上机实验报告(24页珍藏版)》请在金锄头文库上搜索。
1、材料力学上机大作业一、题目要求:应力状态分析应力状态分析输入:1.平面应力状态输入:(x、y、xy);某截面方位角2.空间应力状态输入(x、y、z、xy、yz、zx)输出:1. 输出主应力(1、2、3)2. 最大切应力max=13=(1-3)/23. 如为平面应力状态则需输入方位角斜截面上的应力、及主方向角0。4. 画出应力圆示意图,如为平面应力状态则需标明斜截面上的应力、对应点及半径程序:由matlAB程序GUI功能实现可视化窗口,使界面更加友好。程序分为三个部分:1.主页;2.平面应力计算;3.空间应力计算。在主页可以选择进入平面应力计算或是空间应力计算,从平面或空间应力计算也可以返回主页
2、。下面是程序代码:1.主页:function varargout = zhuye(varargin)% ZHUYE MATLAB code for zhuye.fig% ZHUYE, by itself, creates a new ZHUYE or raises the existing% singleton*.% H = ZHUYE returns the handle to a new ZHUYE or the handle to% the existing singleton*.% ZHUYE(CALLBACK,hObject,eventData,handles,.) calls th
3、e local% function named CALLBACK in ZHUYE.M with the given input arguments.% ZHUYE(Property,Value,.) creates a new ZHUYE or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before zhuye_OpeningFcn gets called. An% unrecognized property name or inv
4、alid value makes property application% stop. All inputs are passed to zhuye_OpeningFcn via varargin.% *See GUI Options on GUIDEs Tools menu. Choose GUI allows only one% instance to run (singleton).% See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help zhuye % Las
5、t Modified by GUIDE v2.5 27-May-2014 15:42:51 % Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, zhuye_OpeningFcn, . gui_OutputFcn, zhuye_OutputFcn, . gui_LayoutFcn, , . gui_Callback, );if nargin & isch
6、ar(varargin1) gui_State.gui_Callback = str2func(varargin1);end if nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT % - Executes just before zhuye is made visible.function zhuye_OpeningFcn(hObject, eventda
7、ta, handles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% varargin command line arguments to zhuye (see VARARGIN) % Choose default c
8、ommand line output for zhuyehandles.output = hObject; % Update handles structureguidata(hObject, handles); % UIWAIT makes zhuye wait for user response (see UIRESUME)% uiwait(handles.figure1); % - Outputs from this function are returned to the command line.function varargout = zhuye_OutputFcn(hObject
9、, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structurevara
10、rgout1 = handles.output; % - Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)h=gcf
11、;ping2;close(h); % - Executes on button press in pushbutton2.function pushbutton2_Callback(hObject, eventdata, handles)% hObject handle to pushbutton2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)h=gcf;kong;cl
12、ose(h);2.平面应力计算function varargout = ping2(varargin)% PING2 MATLAB code for ping2.fig% PING2, by itself, creates a new PING2 or raises the existing% singleton*.% H = PING2 returns the handle to a new PING2 or the handle to% the existing singleton*.% PING2(CALLBACK,hObject,eventData,handles,.) calls t
13、he local% function named CALLBACK in PING2.M with the given input arguments.% PING2(Property,Value,.) creates a new PING2 or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before ping2_OpeningFcn gets called. An% unrecognized property name or in
14、valid value makes property application% stop. All inputs are passed to ping2_OpeningFcn via varargin.% *See GUI Options on GUIDEs Tools menu. Choose GUI allows only one% instance to run (singleton).% See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help ping2 % Last Modified by GUIDE v2.5 27-May-2014 15:10:45 % Begin initialization code - DO NOT E