How to solve and insert and plot differential equations ?
이전 댓글 표시
How to solve and insert and plot differential equations ?
답변 (1개)
There are different numerical methods to solve the differential equations , like RK method ( for initial value problem ) , FDM, FEM, ( for boundary value problem) and many others. Which method , you will use it depends on your system with which you are dealing.
For example, If you want to calculate potential distribution of a metal line under a direct current flow , you have a governing equation of electric problem and two boundary conditions for current input output. To solve the problem using finite difference mathod ( FDM ) . First you have to discretize the governing equation and boundary conditions ( FDM discretization, you will find in your numerical books) . Then you will have some algebric equations like p(i+1,j)+p(i-1,j) + p(i, j+1) + p(i, j-1) - 2p(i,j) = constant ( here, p= electric potential of a node (i,j) ) ,and solve these algebric equations using Ax=B , A is a coefficient matrix, x is variable matix and B is constant matrix. We need x. When you have x , you have already solved the governing equation.
Now, you can plot the x to show the potential distribution or for other properties, like electric flux or heat generation per unit volume you can post process the potential distribution and can plot them .
Thank you.
카테고리
도움말 센터 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!