- /
-
Mold Growth
on 10 Oct 2021
- 9
- 55
- 0
- 0
- 276
%% system parameters
f=.055; % slime feedrate
k=.062; % slime killrate
M=64; % middle (M=64)
%% initial conditions
x = meshgrid(1:99);
u = 0*x+1;
v = 0*u;
%v(M,M)=1; % center seeding
v(80,40)=1; % off center seeding
%% petri-dish filter
w=(sqrt((x-M).^2 + (x.'-M).^2) <= .9*M);
%% numerical PDE solver
while j < 1e4
u = u+w.*((del2(u,2))-u.*v.^2+f.*(1-u));
v = v+w.*((del2(v,2))/2+u.*v.^2-(f+k).*v);
j = j + 1;
end
%% plotting magic ;)
surf(x,x.',w.*u)
shading interp
axis off
colormap yellow
view(20,70)
camva(3)