I don’t know what is wrong with my code. I am trying to create 2-D or 3-D curves to simulate something like the SIR model, but with tumor growth instead.
It is a proliferation-invasion/ reaction-diffusion model.
Clear[a, r, d, g];
a=1.03*10^(-3);
r=.20;
d=1*10^(-7);
g=1/4;
Clear[DE1,DE2, DE3, c,m,v,t,CMVsys]; Grad
DE1=D[c[x,y,z,t], t]\[Equal]Div[(a*(1-v[x,y,z,t]))*Grad[(c[x,y,z,t]), {x,y,z}],{x,y,z}]+r*c[x,y,z,t]*(1-c[x,y,z,t]);
DE2=D[m[x,y,z,t],t]==Laplacian[(m[x,y,z,t]),{x,y,z}]+d*(c[x,y,z,t]- m[x,y,z,t]);
DE3=D[v[x,y,z,t],t]==v[x,y,z,t]*(1-v[x,y,z,t])-g*m[x,y,z,t]*v[x,y,z,t];
CMVsys={DE1,DE2,DE3};
Clear [solution, initial,cplot,mplot, vplot]; initial={c[x,y,z,0]==1, m[x,y,z,0]==1, v[x,y,z,0]==1};
solution=Flatten[NDSolve[Join[CMVsys, initial], {c,m,v}, {t,0,800}]]
cplot=Plot[c[x,y,z,t]/.solution[[1]], {t,0,800}, PlotStyle- >RGBColor[0,0,1], PlotRange-> {0,1}]
mplot=Plot[m[t]/.solution[[2]],{t,0,800}, PlotStyle->RGBColor[1,0,0]]
vplot=Plot[v[t]/.solution[[3]],{t,0,800},PlotStyle->RGBColor[0,1,0]]
Show[cplot, mplot, vplot, AxesLabel->{"t", "c=blue, m=red, v=green"}]
Grad
just before the definition ofDE1
; 2. don't you need to provideNDSolve
with additional information regardingx, y, z
? $\endgroup$