24小时热门版块排行榜    

查看: 1286  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 综述论文作为代表作会不会影响评审专家的印象分? +11 yufeiwaner 2026-08-09 12/600 2026-08-12 01:27 by 南京中西医
[基金申请] 帮忙看看fileCode +7 wwncly 2026-08-10 13/650 2026-08-11 19:36 by 冰心玉壶晴
[基金申请] 为什么网上很多人说本周 12号出结果 +6 瞬息宇宙 2026-08-10 7/350 2026-08-11 19:25 by Tide man
[硕博家园] 读博的好处 +3 lnee 2026-08-11 3/150 2026-08-11 18:10 by 希望我好好的
[基金申请] 什么时候出结果,有咨询渠道??? +3 Tide man 2026-08-11 3/150 2026-08-11 17:54 by kudofaye
[论文投稿] 职称评审,求友友推荐见刊最快的期刊 +3 工厂打螺丝 2026-08-08 3/150 2026-08-11 13:42 by 会议编辑
[基金申请] FileCode能看出啥? +7 要乐观耀哥 2026-08-10 17/850 2026-08-11 10:50 by 要乐观耀哥
[基金申请] 基金中了 +15 laoda193707 2026-08-06 15/750 2026-08-11 00:11 by jiafei2190
[基金申请] 确定了,国自然21号放榜 +6 布布和一二 2026-08-10 7/350 2026-08-10 19:15 by 2000zf36392
[基金申请] 据悉今年马上要出结果了 +7 瞬息宇宙 2026-08-10 8/400 2026-08-10 12:42 by Vivilian
[基金申请] 这样的filecode谁见过 +11 布布和一二 2026-08-08 22/1100 2026-08-10 11:10 by wmfsnow
[基金申请] 面上项目filecode邪修 +5 西山十月 2026-08-09 7/350 2026-08-10 07:32 by 仁砚薪传
[基金申请] filecode与中标关系的预测 +5 布布和一二 2026-08-07 5/250 2026-08-09 16:15 by 袁向阳007
[基金申请] 关于filecode,很负责任的告诉大家 +6 爱看书的可乐 2026-08-08 7/350 2026-08-08 22:13 by a_niu
[基金申请] 化学口download_prp&fileCode的固定段好像这几天一直没变,有变的大神么? +3 Tide man 2026-08-07 4/200 2026-08-07 22:39 by Tide man
[基金申请] 固定端突然变了,今天 +6 archvillain 2026-08-06 10/500 2026-08-07 16:03 by 医学老男孩
[基金申请] filecode变化情况 +6 布布和一二 2026-08-07 22/1100 2026-08-07 14:45 by 且听虎啸
[基金申请] 大家散了吧,后缀研究没有意义,别浪费时间了,过好目前的每一天,不要焦虑 +5 Tide man 2026-08-06 7/350 2026-08-07 13:11 by 医学老男孩
[基金申请] 求各位大神看下 100+6 hpkpkpkp 2026-08-05 33/1650 2026-08-06 14:49 by zhiyanjiang
[基金申请] 影响面上的因素 +8 布布和一二 2026-08-05 11/550 2026-08-06 10:41 by 宝贝虫子
信息提示
请填处理意见