Why my graph not same as research paper?
Ältere Kommentare anzeigen

Hi, i want to ask why i did not get same graph as above?
This is my code that i have try:
%for t1=5%
x=0:0.2:10;
m=0.1;
C_0=1.0;
u_0=0.25;
D_0=0.45;
w_0=0.001;
p_0=0.02;
t1=5;
a=((((u_0)^2)/(4*D_0))+p_0);
b=((u_0)^2)/(4*D_0);
d=(1/(sqrt(2)*m));
e1=(log(2+sqrt(2)+(4+3*(sqrt(2)))*(tanh(m*t1/2))));
e2=(log(2+sqrt(2)-sqrt(2)*tanh(m*t1/2)));
T=d*(e1-e2);
f=((x-((((u_0)^2)+4*p_0*D_0)^1/2)*T)/(2*sqrt((D_0)*T)));
g=((x+((((u_0)^2)+4*p_0*D_0)^1/2)*T)/(2*sqrt((D_0)*T)));
h=((((u_0)-((((u_0)^2)+4*p_0*D_0)^1/2))*x)/(2*D_0));
i=((((u_0)+((((u_0)^2)+4*p_0*D_0)^1/2))*x)/(2*D_0));
j=((x-(u_0)*T)/(2*sqrt((D_0)*T)));
k=((x+(u_0)*T)/(2*sqrt((D_0)*T)));
l=(((u_0)*x)/(D_0));
n=exp(h);
o=erfc(f);
q=exp(i);
r=erfc(g);
s=exp(-p_0*T);
v=erfc(j);
y=erfc(k);
z=exp(l);
F=(((1/2).*n.*o)+((1/2).*q.*r));
G=(s.*(1-(1/2).*v-(1/2).*z.*y));
C1=(((w_0)/(p_0))+(C_0-((w_0)/(p_0))))*F-(((w_0)/(p_0))*G);
plot(x,C1)
hold on
%for t2=10%
x=0:0.2:10;
m=0.1;
C_0=1.0;
u_0=0.25;
D_0=0.45;
w_0=0.001;
p_0=0.02;
t2=10;
a=(((u_0)^2)/(4*D_0)+p_0);
b=((u_0)^2)/(4*D_0);
d=(1/(sqrt(2)*m));
e1=(log(2+sqrt(2)+(4+3*(sqrt(2)))*(tanh(m*t2/2))));
e2=(log(2+sqrt(2)-sqrt(2)*tanh(m*t2/2)));
T=d*(e1-e2);
f=((x-((((u_0)^2)+4*p_0*D_0)^1/2)*T)/(2*sqrt((D_0)*T)));
g=((x+((((u_0)^2)+4*p_0*D_0)^1/2)*T)/(2*sqrt((D_0)*T)));
h=((((u_0)-((((u_0)^2)+4*p_0*D_0)^1/2))*x)/(2*D_0));
i=((((u_0)+((((u_0)^2)+4*p_0*D_0)^1/2))*x)/(2*D_0));
j=((x-(u_0)*T)/(2*sqrt((D_0)*T)));
k=((x+(u_0)*T)/(2*sqrt((D_0)*T)));
l=(((u_0)*x)/(D_0));
n=exp(h);
o=erfc(f);
q=exp(i);
r=erfc(g);
s=exp(-p_0*T);
v=erfc(j);
y=erfc(k);
z=exp(l);
F=(((1/2).*n.*o)+((1/2).*q.*r));
G=(s.*(1-(1/2).*v-(1/2).*z.*y));
C2=(((w_0)/(p_0))+(C_0-((w_0)/(p_0))))*F-(((w_0)/(p_0))*G);
plot(x,C2)
hold off
hold on
%for t3=15%
x=0:10;
m=0.1;
C_0=1.0;
u_0=0.25;
D_0=0.45;
w_0=0.001;
p_0=0.02;
t3=15;
a=(((u_0)^2)/(4*D_0)+p_0);
b=((u_0)^2)/(4*D_0);
d=(1/(sqrt(2)*m));
e1=(log(2+sqrt(2)+(4+3*(sqrt(2)))*(tanh(m*t3/2))));
e2=(log(2+sqrt(2)-sqrt(2)*tanh(m*t3/2)));
T=d*(e1-e2);
f=((x-((((u_0)^2)+4*p_0*D_0)^1/2)*T)/(2*sqrt((D_0)*T)));
g=((x+((((u_0)^2)+4*p_0*D_0)^1/2)*T)/(2*sqrt((D_0)*T)));
h=((((u_0)-((((u_0)^2)+4*p_0*D_0)^1/2))*x)/(2*D_0));
i=((((u_0)+((((u_0)^2)+4*p_0*D_0)^1/2))*x)/(2*D_0));
j=((x-(u_0)*T)/(2*sqrt((D_0)*T)));
k=((x+(u_0)*T)/(2*sqrt((D_0)*T)));
l=(((u_0)*x)/(D_0));
n=exp(h);
o=erfc(f);
q=exp(i);
r=erfc(g);
s=exp(-p_0*T);
v=erfc(j);
y=erfc(k);
z=exp(l);
F=(((1/2).*n.*o)+((1/2).*q.*r));
G=(s.*(1-(1/2).*v-(1/2).*z.*y));
C3=(((w_0)/(p_0))+(C_0-((w_0)/(p_0))))*F-(((w_0)/(p_0))*G);
plot(x,C3)
hold on
legend({'t=5','t=10','t=15'},'Location','southwest')
xlabel('Distance,x (meter)')
ylabel('Concentration,C(x,t)')
%ylim([0, 1])
xlim([0, 10])
6 Kommentare
SALAH ALRABEEI
am 8 Jun. 2022
Bearbeitet: SALAH ALRABEEI
am 8 Jun. 2022
what is equation in the research paper!!
nur
am 8 Jun. 2022
nur
am 8 Jun. 2022
Torsten
am 8 Jun. 2022
The only thing that helps:
Compare the formulas from the article and yours.
Torsten
am 8 Jun. 2022
I corrected the three errors in your code detected by @SALAH ALRABEEI
Looks better now, but concentrations still become negative. So your search must go on.
Akzeptierte Antwort
Weitere Antworten (2)
Sam Chak
am 8 Jun. 2022
1 Stimme
Hi @nur
One of the ways to find out is to determine the equilibrium points from the advection-dispersion equation.
I haven't checked the long equations. Can you verify if you plotted C or
? Sometimes, the transformations can be a little tricky.

2 Kommentare
nur
am 8 Jun. 2022
Hi @nur
Try to make a little bit of value-added effort to the problem.
Another way is to plot the concentration C from the numerical solution of the advection-dispersion differential equation.
This way you can compare with the analytical solution obtained from the paper. Bear in mind that sometimes misprints can occur due to authors' mistake, or the production crew's mistake. So, what was shown on the paper might not be truly the analytical solution. Therefore, yes you have to check.
But I'd suggest you to take numerical solution approach because that is directly from the governing advection-dispersion law. The analytical solution, which is "human-processed equation" from the law.
Edit: Hey, check this out:
SALAH ALRABEEI
am 8 Jun. 2022
You have two mistakes here
s=(exp(p_0)*T);
The three s in the code should be this
s=(exp(-p_0*T));
3 Kommentare
nur
am 8 Jun. 2022
nur
am 8 Jun. 2022
SALAH ALRABEEI
am 8 Jun. 2022
The reason is that the curves have data less than zero. Unlike those in the paper.
Anyway, you still can do this by adding this
axis([0 10 0 1])
Kategorien
Mehr zu Just for fun finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


