⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 g.m

📁 this fem program is written in matlab to simulate a room temperature of a museum under the source of
💻 M
字号:
function value = g (u,j, xy, t )


%the neuman condition on different walls and windows
  kw = 1.1*1e-2*0.3; %conduction coefficient windows :units = W/k
  kc = 1.7*1e-2*30; %conduction coefficient concrete wall :units = W/k
  n = size ( xy, 1 );

  value = zeros ( n, 1 );

  index = find ( xy(1:n,1) == 1.0 );
  
%    if (xy(index,2)>1/4 & xy(index,2)<=3/4)
       w = index(find(xy(index,2)>1/4 & xy(index,2)<=3/4));

       value(w) = -kw*(u(w,j) - 15);
%    else
      c = index(find(xy(index,2)<=1/4 | xy(index,2)>3/4));
      value(c) = -kc*(u(c,j) - 15);
%    end

index = find ( xy(1:n,2) == 1.0 );
% value(c) = u(c,j);% - 10;%u(c,j-1);
value(index) = 0;%-kc*(u(index,j) - 15);%0;

index = find ( xy(1:n,2) == 0.0 );
% value(c) = u(c,j);% - 10;%u(c,j);
value(index) = 0;%-kc*(u(index,j) - 15);%0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -