nnadiya
- 2
- 0
Can anyone show me how to solve the 3D diffusion equation which has been modeled into FDM by using matlab?
The discussion centers around solving the 3D diffusion equation using the finite difference method (FDM) in MATLAB. Participants explore the formulation of the problem, including the definition of stencils and matrix setups for numerical implementation.
The discussion does not reach a consensus, as participants express differing levels of willingness to engage with the problem independently and provide varying degrees of technical detail.
Participants have not clarified specific assumptions regarding the time update algorithm or the overall approach to the finite difference method, which may affect the discussion.
Can I learn further from you?Strum said:Suppose your stencil only uses nearest and next nearest neighbors on a cubic periodic domain with N lattice points in each direction. Define I am = (1:N)-1;Im(Im==0)=N; and Ip = 2:N+1;Ip(Ip==N+1)=1; Define your system and matrices and use A(lp,lp,lm) ## \sim A_{i+1,i+1,i-1} ## in your stencil.