Está en la página 1de 1

Disp(‘Solución numérica de la ecuación de Green Ampt’)

% Green and Ampt


clear
phi=0.4; % porousity
theta_i=0.2; % initial moisture content
psi_f=21.85; % critical matric pressure
Ks=0.15; % saturated hydraulic conductivity cm/hour
syms I
t=0:1/60:6;
F=zeros(length(t),1);
for n=1:length(t);

F(n,1)=vpasolve(+Ks*t(n)+psi_f*(phi-theta_i)*log(1+(I/(psi_f*(phi-
theta_i))))==I,I,Ks*t(n)); % numerically solving the implicit solution of Green
and Ampt

double(F(n));

end
q=diff(F)*60;

f=figure;
set(f,'units','normalize','position',[0 0 1 1]);
% plot
[ax,hline1,hline2] = plotyy(t,F,t(2:end),q);
set(ax,{'ycolor'},{'k';'k'})
xlabel('t (hours)');
axes(ax(1));
ylabel('I (cm)');
set(gca,'fontsize',20);
axes(ax(2));
ylabel('q (cm/hour)')
set(hline1,'linewidth',3,'linestyle','-','color','k');
set(hline2,'linewidth',3,'linestyle','--','color','k');
set(gca,'fontsize',20);
legend([hline1;hline2],'I (cm)','q (cm/hour)');
title('Green & Ampt cumulative Infiltration (I) and Flux
(q)','fontweight','bold')
set(findall(f,'type','text'),'fontname','times','fontsize',24);
box on

También podría gustarte