# How to create 2-D or 3-D curves to simulate something like the SIR model

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;
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"}]

• Please edit your question to add your code from the images. Posting the code makes it easier for us to try it by copying and pasting it rather than typing it from scratch. Apr 25, 2021 at 2:40
• I edited the code! Apr 25, 2021 at 2:51
• 1. There is a spurious Grad just before the definition of DE1; 2. don't you need to provide NDSolve with additional information regarding x, y, z ? Apr 25, 2021 at 7:52
• You need to give boundary conditions. Apr 25, 2021 at 8:42