You are on page 1of 1

% �FDM_I.

m�
% One-Dimensional Consolidation: Basics
% This program evaluates the pore pressure, u(x,t), response using the
explicit scheme
clear all
theta=0.;
dt=0.001; % Time increment
dx=0.1; % Length increment
cv=1.; % Coef. of consolidation
r=cv*dt/dx/dx % Time factor
x=0.:0.1:1.; % Length vector
t=0.:0.001:0.02; % Time vector
nx=length(x); % Size of x
nt=length(t); % Size of t
%INITIALIZATION
for j=1,nt
for i=1:nx
u(i,j)=0.;
end
end
% INITIAL CONDITION
u(:,1)= [0. 0.2 0.4 0.6 0.8 1.0 0.8 0.6 0.4 0.2 0.];
% BOUNDARY CONDITION
for j=1:nt
u(1,j)=0.;
u(nx,j)=0.;
end
% Calculate the pore pressure values for all the interior nodes
for j=1:nt
for i= 2:nx-1
u(i,j+1)=r*(u(i-1,j)+u(i+1,j))+(1-2*r)*u(i,j);
end
end
% Plot
for j=1:5:nt
plot (x,u(:,j));
hold on
end
title (�Explicit Scheme�)
xlabel(�Distance, x�)
ylabel(�Pore Pressure, u�)
grid on

You might also like