Hi all, I’m trying to implement diffusion in my 3D Agents.jl agent-based model. The “agents” produce or consume substance at each time step, thus changing the local concentration at their grid position x,y,z. I then run Δt diffusion using a stencil from ParallelStencil.jl’s heat equation example.
function diffusion3D_step!(T2, T, λ, dt, dx, dy, dz)
@inn(T2) = @inn(T) + dt*(λ*(@d2_xi(T)/dx^2 + @d2_yi(T)/dy^2 + @d2_zi(T)/dz^2));
end
My question is, does this amount to an explicit method for solving the heat equation? If so, are there any automated methods in the Julia ecosystem that could slot in here that are implicit? Or should I be looking at linear algebra packages to invert a big matrix?
Apologies if this doesn’t really make sense, I am very new to this, thanks for reading.