资源简介
可以用来求解模拟一维水分运动方程过程,可以得到不同时刻,不同位置的土壤剖面的含水量变化
代码片段和文件信息
function richards
% Solution of the Richards equation
% using MATLAB pdepe
%
% $Ekkehard Holzbecher $Date: 2006/07/13 $
%
% Soil data for Guelph Loam (Hornberger and Wiberg 2005)
% m-file based partially on a first version by Janek Greskowiak
%--------------------------------------------------------------------------
L = 60; % length [cm]
T = 4; % maximum time [h]
qr = 0.102; % residual water content 残余含水量
f = 0.368; % porosity 饱和含水量
s1=0.4; %下渗率
s2=0; %底部压力水头
a = 0.0335; % van Genuchten parameter [1/L]
n = 2; % van Genuchten parameter
m = 1-1/n;
ks =0.00922; % saturated conductivity [L/T]
N=100;
M=25;
x = linspace(0LN);
t = linspace(0TM);
options=odeset(‘RelTol‘1e-4‘AbsTol‘1e-4‘NormControl‘‘off‘‘InitialStep‘1e-7)
u = pdepe(0@unsatpde@unsatic@unsatbcxtoptionss1s2qrfanks);
figure; %表示压力水头(基质势)分别在t=0h4h24h时刻随土壤深度分布图
size(u)
plot (xu(1:)‘-‘);
xlabel(‘Depth [L]‘);
ylabel(‘Pressure Head [L]‘);
legend(‘t=0h‘‘t=4h‘‘t=24h‘);
title(‘压力水头分别在t=0h4h24h时刻随土壤深度分布图‘);
figure; %表示压力水头分别在z=0cm16cm36cm60cm位置处随时间变化分布图
plot (tu(:1)‘-‘);
xlabel(‘T [h]‘);
ylabel(‘Pressure Head [L]‘);
legend(‘z=0cm‘‘z=16cm‘‘z=36cm‘‘z=60cm‘)
title(‘压力水头分别在z=0cm16cm36cm60cm位置处随时间变化分布图‘);
for j=1:length(t)
for i=1:length(x)
评论
共有 条评论