FDM & FEM using the Matlab (Electrodynamics)
- 최초 등록일
- 2013.07.06
- 최종 저작일
- 2013.05
- 25페이지/ MS 파워포인트
- 가격 2,000원
목차
없음
본문내용
Solving the 2-D Poisson equation by the Finite Difference
...Method
% Numerical scheme used is a second order central difference in space
...(5-point difference)
%%
%Specifying parameters
nx=80; %Number of steps in space(x)
ny=80; %Number of steps in space(y)
niter=1000; %Number of iterations
dx=2/(nx-1); %Width of space step(x)
dy=2/(ny-1); %Width of space step(y)
x=0:dx:2; %Range of x(0,2) and specifying the grid points
y=0:dy:2; %Range of y(0,2) and specifying the grid points
b=zeros(nx,ny); %Preallocating b
pn=zeros(nx,ny); %Preallocating pn
<중 략>
The most attractive feature of finite differences is that it can be very easy to implement. There are several ways one could consider the FDM a special case of the FEM approach. E.g., first order FEM is identical to FDM for Poisson`s equation, if the problem is discretized by a regular rectangular mesh with each rectangle divided into two triangles. There are reasons to consider the mathematical foundation of the finite element approximation more sound, for instance, because the quality of the approximation between grid points is poor in FDM. The quality of a FEM approximation is often higher than in the corresponding FDM approach, but this is extremely problem-dependent and several examples to the contrary can be provided.
참고 자료
www.en.wikipedia.org/
www.mathworks.com/