24小时热门版块排行榜    

查看: 4324  |  回复: 3

tyutzxy

金虫 (小有名气)

[求助] "小虫求助“ 未定义函数或变量 'Beam_InputData547'。 已有1人参与

小虫刚学习MATLAB,现正在学习《Matlab有限元结构动力学分析与工程应用》,在5.4.3瞬态问题分析。例5.7中按照书本附带的源程序运行提示
未定义函数或变量 'Beam_InputData547'。

出错 EX547 (line 28)
Beam_InputData547;                     % import the input data for the information of
代码开头部分如下:
%-------------------------------------------------------------------------%
% Example 5.4.7
%   To solve transient response of a 2-d frame structure.
%   The solution methods are: 1) central difference scheme. 3) Houbolt integration scheme.
%   4) Wilson ?? integration scheme. 5) Newmark integration scheme
%   nodal dof: {u1  v1  w1  x1  y1  z1  u2  v2  w2  x2  y2  z2}
% Problem description
%   Find the response of a frame structure which is made of three beams of lengths of 4 m,
%   3 m and 4 m, respectively. All beams have cross- section of 0.10 m height by 0.05 m
%   width. The elastic modulus is 2.10x10^11 Pa. The frame is subjected to an impulse load
%   of amplitude 500 N in the middle of the top beam. One end of the each vertical beam is
%   fixed. (see Fig. 5-9 for the element discretization)
% Variable descriptions
%   k, m - element stiffness matrix and mass matrix
%   kk, mm - system stiffness matrix and mass matrix
%   ff - system force vector
%   index - a vector containing system dofs associated with each element
%   bcdof - a vector containing dofs associated with boundary conditions
%   bcval - a vector containing boundary condition values associated with the dofs in 'bcdof'
%   dsp - displacement matrix
%   vel - velocity matrix
%   acc - acceleartion matrix
%--------------------------------------------------------------------------
%  (0) input control data
%--------------------------------------------------------------------------
clear; clc;

Beam_InputData547;                     % import the input data for the information of
                                  % nodes, elements, loads, constraints and materials
Opt_beam=1;                                        % option for type of the beam
                                                     % =1 Euler Bernoulli beam
                                                       % =2 Timoshenko beam
Opt_mass=2;                                            % option for mass matrix
                                                    % =1 consistent mass matrix
                                                      % =2 lumped mass matrix
Opt_section=1;                                    % option for type of cross-section
                                                  % = 1 rectangular cross-section
                                                     % = 2 circular cross-section
TypeMethod=1;                            % option for selecting the solution method
                                                 % = 1 central difference scheme
                                               % = 3 Houbolt integration scheme
                                             % = 4 Wilson   integration scheme
                                              % = 5 Newmark integration scheme
Typeload=1;                                    % option for selecting the load type
                                                           % = 1 impulse load
                                                              % = 2 step load
                                                          % = 3 Harmonic load

dt=0.00001;                                                    % time step size
ti=0;                                                            % initial time
tf=0.200;                                                          % final time
nt=fix((tf-ti)/dt);                                           % number of time steps
tt=ti:dt:ti+nt*dt;                                     % generate time samples vector

ac=0.00002; bc=0.00008;                       % Parameters for proportional damping

al=0;                            % angle between the reference coordinate system and
                                  % the local coordinate system for the space element
%--------------------------------------------------------------------------
%  (1) initialization of matrices and vectors to zero
%--------------------------------------------------------------------------
k=zeros(No_nel*No_dof,No_nel*No_dof);                   % element stiffness matrix
m=zeros(No_nel*No_dof,No_nel*No_dof);                     % element mass matrix

kk=zeros(Sys_dof,Sys_dof);                   % initialization of system stiffness matrix
mm=zeros(Sys_dof,Sys_dof);                     % initialization of system mass matrix
ff=zeros(Sys_dof,1);                            % initialization of system force vector

bcdof=zeros(Sys_dof,1);                               % initializing the vector bcdof
bcval=zeros(Sys_dof,1);                                % initializing the vector bcval

index=zeros(No_nel*No_dof,1);                        % initialization of index vector
------------------------------------------------------------------------------------------------------
未定义变量是否可以理解为Beam_InputData547=???
或Beam=input(data547),但在源文件中并未找到相关信息。
另外本章源程序开始第一句均为”Beam_InputData      ”
均出现如上问题,恳请大神赐教!!
现将第五章相关内容及程序在附上。。。"小虫求助“ 未定义函数或变量 'Beam_InputData547'。
错误提示.png
回复此楼

» 本帖附件资源列表

  • 欢迎监督和反馈:小木虫仅提供交流平台,不对该内容负责。
    本内容由用户自主发布,如果其内容涉及到知识产权问题,其责任在于用户本人,如对版权有异议,请联系邮箱:xiaomuchong@tal.com
  • 附件 1 : 第五章_源程序.rar
  • 2015-08-31 15:07:57, 40.55 K

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

lovellbaby

捐助贵宾 (正式写手)

【答案】应助回帖

源程序里没有提供相关的原始数据?
dajiahaohaohao
2楼2018-08-02 16:45:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

ashton

新虫 (小有名气)

有解决方法嘛
3楼2021-06-11 12:19:03
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

ashton

新虫 (小有名气)

引用回帖:
2楼: Originally posted by lovellbaby at 2018-08-02 16:45:09
源程序里没有提供相关的原始数据?

没有Beam_InputData-----一系列数据
4楼2021-06-11 12:19:40
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 tyutzxy 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 能源材料化学课题组招收硕士研究生8-10名 +4 脱颖而出 2026-03-16 9/450 2026-03-18 14:13 by 脱颖而出
[考研] 一志愿985,本科211,0817化学工程与技术319求调剂 +6 Liwangman 2026-03-15 6/300 2026-03-18 13:21 by 尽舜尧1
[考研] 0703化学调剂 +4 pupcoco 2026-03-17 7/350 2026-03-18 12:14 by djl2006
[考研] 303求调剂 +4 睿08 2026-03-17 6/300 2026-03-18 11:01 by Iveryant
[考研] 一志愿中国海洋大学,生物学,301分,求调剂 +3 1孙悟空 2026-03-17 3/150 2026-03-18 10:28 by macy2011
[考研] 265求调剂 +3 梁梁校校 2026-03-17 3/150 2026-03-18 09:12 by zhukairuo
[考研] 085600材料与化工求调剂 +5 绪幸与子 2026-03-17 5/250 2026-03-17 16:40 by laoshidan
[考研] [导师推荐]西南科技大学国防/材料导师推荐 +3 尖角小荷 2026-03-16 6/300 2026-03-16 23:21 by 尖角小荷
[考研] 0854控制工程 359求调剂 可跨专业 +3 626776879 2026-03-14 9/450 2026-03-16 17:42 by 626776879
[考研] 化学调剂0703 +8 啊我我的 2026-03-11 8/400 2026-03-16 17:23 by 我的船我的海
[考研] 0703一志愿211 285分求调剂 +5 ly3471z 2026-03-13 5/250 2026-03-16 16:16 by 哦哦123
[考研] 085600材料与化工 求调剂 +13 enenenhui 2026-03-13 14/700 2026-03-16 15:19 by 了了了了。。
[考研] 327求调剂 +6 拾光任染 2026-03-15 11/550 2026-03-15 22:47 by 拾光任染
[考研] 288求调剂 +4 奇点0314 2026-03-14 4/200 2026-03-14 23:04 by JourneyLucky
[考研] 中科大材料与化工319求调剂 +3 孟鑫材料 2026-03-14 3/150 2026-03-14 20:10 by ms629
[考研] 一志愿哈工大材料324分求调剂 +5 闫旭东 2026-03-14 5/250 2026-03-14 14:53 by 木瓜膏
[考研] 330求调剂 +3 ?酱给调剂跪了 2026-03-13 3/150 2026-03-14 10:13 by JourneyLucky
[考研] 求材料调剂 085600英一数二总分302 前三科235 精通机器学习 一志愿哈工大 +4 林yaxin 2026-03-12 4/200 2026-03-13 22:04 by 星空星月
[考研] 0856材料与化工301求调剂 +5 奕束光 2026-03-13 5/250 2026-03-13 22:00 by 星空星月
[考研] 333求调剂 +3 152697 2026-03-12 4/200 2026-03-13 07:08 by Iveryant
信息提示
请填处理意见