필터 지우기
필터 지우기

1D transport model using finite difference approach

조회 수: 4 (최근 30일)
Sumyia Pervin
Sumyia Pervin 2020년 7월 21일
How can I develop the model of advection-dispersion equation using initial and boundary condition? Can anyone help me, please?
%dc/dt=Dh/Rf*(d^2c/dx^2)-v/Rf(dc/dx)
clear
clc
%Input model physical parameter for simulation
L=100; % length of modeled domain
t=50; %time
Do=0.027; % molecular diffusion coefficient,m^2/yr
Dm=0.075; %mechanical dispersion coefficient,m^2/yr
Dn=0.02; %effective molecular diffusion coefficient, m^2/yr
alpha=0.15; %Dispersivity, M
v=0.5; %Advective velocity,m/yr
Dz=0.095; % Hydrodynamic Dispersion
n=0.4; % porosity
Rf=1; %Retardation factor
Hf=10; % equivalent height of leachate, M
delta_t=1; %time variation,s
delta_z=1.5; % depth, M
%governing Equation
%(dc/dt)=(Dz/Rf)*(d^2c/dx^2)-(v/Rf)*(dc/dx);
A=(Dz*delta_t)/(Rf*(delta_z)^2);
B=(v*delta_t)/(2*Rf*delta_z);
%finite difference form of governing equation
C(m+1,i)=(1-2*A-2*B)*C(m,i)+A*C(m,i+1)+(A+2*B)*C(m,i-1);
%initial condition
t=0;
z=0;
C(z,0)=0;
C(m,i)=0;
time = 0;
for n=1:nt % Timestep loop
%boundary condition
C(m,i)=0;
Ct(0,t1)=Co-(n/Hf*v)[Ct(0,0)*delta_t+Ct(0,1)*delta_t+Ct(0,2)*delta_t+Ct(0,t-1)*delta_t];
Ct(0,t)=(Co-(n/Hf*v)*(Ct(0,t1)))/[1+(n/Hf*v*delta_t)];

답변 (0개)

카테고리

Help CenterFile Exchange에서 Physics에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by