24小时热门版块排行榜    

查看: 1273  |  回复: 0

z770428

金虫 (正式写手)


[求助] matlab 热力耦合分析

各位高手,我正在做一平板中含一边裂纹的热力耦合有限元分析,计算,温度场,位移场,热应力场,板的上边界温度降低10,下边界保持为原来的0,固定下边位移,请问1 MATLAB边界条件中,温度边界条件和位移边界条件能写在一块么?
2,计算热应力应变的温差应为多少?
下面是我的MATLAB 边界条件代码
CODE:
function [freeDOF] = boundaryCond(DOF)
% This function defines the boundary conditions to be applied.              %  case 1              

global BC  CONNEC DOMAIN NODES

nXElem   = DOMAIN(1);                                                       % Number of elements in the x-direction
nYElem   = DOMAIN(2);                                                       % Number of elements in the y-direction
fixedTDOF = NaN(1,(DOMAIN(1)+1)*(DOMAIN(2)+1));                              % Initialize vector of fixed DOFs
fixedDOF = NaN(1,(DOMAIN(1)+1)*(DOMAIN(2)+1));   
TDOF     = 1*max(max(NODES));
index = 1;
switch BC
    case 1                                                                  % Fix the temperature in bottom and top edge of the domain
        
      
              for i = 1:nXElem+1;
                if i == 1;
                fixedTDOF(index) = node;                                        % Fix temperature in bottom edge of the domain
                fixedTDOFvalue=0;                                                  %    bcval2 = 0;
                index = index+1;
                 node = node+1;                                             
               
                 elseif node == (nYElem)*(nXElem+1)+1;
                fixedTDOF(index) = node;                                        %  bcval1 = -10;
                fixedTDOFvalue=-10;
                index = index+1;
                 node = node+1;
                                                            
                end  
               
             end
        
   
         
         
         
    case 2                                                                  % Boundary conditions for an edge crack
        fixedDOF = [2*(nXElem+1)-1 2*(nXElem+1) 2*(nXElem+1)*(nYElem+1)-1];
   
    case 3                                                                  % Fix the bottom edge of the domain
        for i = 1:nXElem+1
            if i == 1
                fixedDOF(index:(index+1)) = [2*i-1 2*i];                    % Fix displacement in x and y-direction
                index = index+2;
            else
                fixedDOF(index) = 2*i;                                      % Fix displacement in y-direction
                index = index+1;
            end
        end            
    case 4                                                                  % Boundary conditions for first quadrant
        node = 1;
        for i = 1:nYElem+1                                                  % Rollers left edge
            fixedDOF(index) = 2*node-1;
            index = index+1;
            node = node+nXElem+1;
        end               
        for i = 1:nXElem+1
            fixedDOF(index) = 2*i;                                          % Fix displacement in y-direction
            index = index+1;
        end      
end
                                         
fixedTDOF(:,isnan(fixedTDOF(1,:))) = [];  
freeTDOF = setdiff(1:TDOF,fixedTDOF);
fixedDOF(:,isnan(fixedDOF(1,:))) = [];
freeDOF = setdiff(1:DOF,fixedDOF);                                          % Solve for the free DOF

[ Last edited by dbb627 on 2012-6-30 at 18:10 ]
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

找到一些相关的精华帖子,希望有用哦~

科研从小木虫开始,人人为我,我为人人
相关版块跳转 我要订阅楼主 z770428 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 函评 +3 布布和一二 2026-06-13 3/150 2026-06-13 23:35 by 芋圆香飘飘
[硕博家园] T^T +6 m584r2z4j3 2026-06-11 7/350 2026-06-13 23:10 by 3eaav2pea1
[找工作] 售SCI文章,我:8.O.5.51O.5.4,科目齐全,可十急 +3 q1zg6x4lf3 2026-06-12 3/150 2026-06-13 19:07 by 1js5n6upxm
[公派出国] +4 q1zg6x4lf3 2026-06-12 4/200 2026-06-13 19:05 by 1js5n6upxm
[公派出国] T^T +5 q1zg6x4lf3 2026-06-12 5/250 2026-06-13 18:53 by lkmi35jdzt
[硕博家园] O(∩_∩)O +5 jk31rb6vyz 2026-06-12 7/350 2026-06-13 18:45 by lkmi35jdzt
[考博] π_π +4 m584r2z4j3 2026-06-11 4/200 2026-06-13 18:25 by lkmi35jdzt
[考博] T^T +3 q1zg6x4lf3 2026-06-12 3/150 2026-06-13 14:45 by 80j16ujcu8
[考研] O(∩_∩)O +3 q1zg6x4lf3 2026-06-12 4/200 2026-06-13 14:42 by 80j16ujcu8
[考研] ╭(╯ε╰)╮ +4 m584r2z4j3 2026-06-11 4/200 2026-06-13 14:22 by 80j16ujcu8
[考博] T^T +4 jk31rb6vyz 2026-06-12 4/200 2026-06-13 12:09 by 80j16ujcu8
[考博] T^T +3 m584r2z4j3 2026-06-11 3/150 2026-06-13 12:04 by 80j16ujcu8
[找工作] 售SCI文章,我:8.O.5.51O.5.4,科目齐全,可十急 +4 q1zg6x4lf3 2026-06-12 4/200 2026-06-13 08:53 by t4hz8376wy
[考博] →_→ +3 q1zg6x4lf3 2026-06-12 3/150 2026-06-13 08:49 by t4hz8376wy
[论文投稿] →_→ +5 m584r2z4j3 2026-06-11 5/250 2026-06-13 08:13 by t4hz8376wy
[基金申请] 面上项目没有好文章就没希望了吗? +19 1234567wang 2026-06-07 21/1050 2026-06-12 21:24 by littlezl
[考博] [急招]吉林大学招收26年9月入学考核制博士生1名,截止今晚24点前 +3 hehejin 2026-06-10 4/200 2026-06-12 18:24 by 冻雨天
[基金申请] 前几天时间戳更新了 +8 vito刘 2026-06-11 13/650 2026-06-12 14:17 by BlakeReary
[教师之家] AASSDDFF +3 m584r2z4j3 2026-06-11 3/150 2026-06-12 11:28 by zs48m4lz8g
[考博] 还有课题组有博士名额吗 +5 冻雨天 2026-06-07 6/300 2026-06-08 20:59 by RCS_tyro
信息提示
请填处理意见