3D Finite different method using matlab

In summary, the conversation revolves around solving the 3D diffusion equation using MATLAB and FDM. The speaker suggests using a stencil that only utilizes nearest and next nearest neighbors on a cubic periodic domain with N lattice points in each direction. They also provide a definition for the system and matrices, and mention using the matrix A(lp,lp,lm) in the stencil. The conversation ends with a question about further learning and a suggestion to try solving the equation on one's own first.
  • #1
nnadiya
2
0
Can anyone show me how to solve the 3D diffusion equation which has been modeled into FDM by using matlab?
 
Physics news on Phys.org
  • #2
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.
 
  • #3
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.
Can I learn further from you?
 
  • #4
You are sure you don't want to try yourself first? Also you haven't mentioned which time update algorithm you are using.
 

Frequently Asked Questions about 3D Finite Difference Method using MATLAB

1. What is the 3D Finite Difference Method and how is it used in MATLAB?

The 3D Finite Difference Method is a numerical method used to solve partial differential equations (PDEs) in three-dimensional space. It involves discretizing the spatial domain into a grid and approximating derivatives using finite difference formulas. In MATLAB, this method can be implemented using built-in functions and algorithms, making it a powerful tool for solving complex PDEs.

2. What are the advantages of using MATLAB for 3D Finite Difference Method?

There are several advantages of using MATLAB for 3D Finite Difference Method. Firstly, MATLAB has built-in functions for creating and manipulating grids, making it easier to set up the problem. Secondly, it has a wide range of numerical algorithms and solvers that can be used for solving PDEs. Additionally, MATLAB has a user-friendly interface and a powerful graphics system, allowing for easy visualization of results.

3. What are the limitations of using 3D Finite Difference Method in MATLAB?

One limitation of using 3D Finite Difference Method in MATLAB is that it may require a lot of computational resources, especially for large and complex problems. As the number of grid points increases, the computation time and memory usage also increase significantly. Additionally, the accuracy of the results can be affected by the choice of grid size and time step, which may require some trial and error to determine the optimal values.

4. Can 3D Finite Difference Method in MATLAB handle non-linear PDEs?

Yes, 3D Finite Difference Method in MATLAB can handle non-linear PDEs. However, the implementation may be more complex and may require additional techniques such as iterative solvers or implicit time integration methods. It is also important to note that the accuracy and stability of the solution can be affected by the non-linearity of the problem.

5. Are there any resources available for learning 3D Finite Difference Method in MATLAB?

Yes, there are many resources available for learning 3D Finite Difference Method in MATLAB. MATLAB's documentation provides detailed explanations and examples of how to use the built-in functions and algorithms for solving PDEs. There are also many online tutorials, books, and courses available that cover the theory and implementation of the method. Additionally, MATLAB's community forums are a great place to ask for help and advice from experienced users.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
2K
  • Differential Equations
Replies
9
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
23
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top