| 查看: 1986 | 回复: 0 | ||
[求助]
matlab 边界条件设置问题
|
|
很简单的问题,画关于Laplace方程的温度分布。我已经写好了大概,剩下边界条件设置的问题 clear close % Initialize square grid [x,y] = meshgrid(0:0.01:pi,0:0.01:pi); % Set maximum number of partial sums nmax = 900; % Initialize T T = zeros(length(x),length(y)); % Calculate steady state temperature distribution % boundary condition for n = 2:2:nmax T = T + (200*y/pi^2)-(400/pi.*sinh(n*y)/((n^2-1)*sinh(n*pi)).*cos(n*x)); end % Plot temperature distribution surface(x,y,T) shading('interp') colorbar colormap jet title('Steady-State Temperature Plot') 我的问题是如何设置边界条件呢?边界条件非常数,为: T(x,0)=0, dT/dx(在x=pi,y处)=0,dT/dx(在x=0,y处)=0,T(x,pi)=100sin(x) 非常感谢 |
» 猜你喜欢
申博求助
已经有4人回复
申博
已经有10人回复
憎水剂,表面活性剂
已经有3人回复
食品与机械 编辑C处理稿子时间
已经有4人回复










回复此楼