fdm之一维静态热传导

heat.m


function heat_neil
% Numerical Modeling in the Geosciences,  Humphrey
% homework problem in heat flow
% Mainly to get you working with Matrices
% ***************************************************************************
% Problem: steady state temperature field in a 1000 m thick layer of rock,
% with a surface temperature of 0degrees and a heat flux of 65 mW per square meter
% ***************************************************************************
clear
K = 2.2;                % granite
n = 9;   %number of internal nodes, total nodes (including BCs) =n+1
thickness = 1000; %thickness of rock layer in vertical, in meters
delx      = thickness/(n+1);
% delx used for plotting
upperBC = 0; % temp BCs, in degrees
upperq  = 6.5e-2; %


T(1) = upperBC;
T(2) = upperq*delx/K;


for j=3:n+2
    T(j) = T(j-1) + upperq*delx/K;
end




%plot result (I always like to plot the results to see if there are mistakes
plot(T, 0:delx:thickness,'-o');
axis ij; % makes the upper left corner the origin
axis([0 30 0 1000]);
title('Steady State temperature in a rock slab');
ylabel('Depth from surface in meters');
xlabel('Temperature in degrees');

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值