How to solve continuity equations together with Poisson equation?
14 views (last 30 days)
Show older comments
As I'm working a lot with semiconductor phyics, I wonder if there is a way to solve the common continuity equations together with the Poisson equation. Perhaps this is a known issue? I already tried it with pdepe, but continue to receive following error message:
Error using pdepe (line 293)
Spatial discretization has failed. Discretization supports only parabolic and elliptic equations, with flux term involving spatial
derivative.
Error in ContinuityEquations (line 27)
sol = pdepe(0,pdefun,icfun,bcfun,x,t);
I tried the following two versions of pdefun (all physical constants are set to 1). First version doesn't work because of the zero in the 3rd component of the flux-term I guess. Does anyone know what is wrong with the 2nd version?
function [c,f,s] = pdefun(x,t,u,DuDx)
c = [1;1;0];
f = [DuDx(1); DuDx(2); 0];
s = [u(1)*DuDx(3)+u(3)*DuDx(1); ...
-u(2)*DuDx(3)-u(3)*DuDx(2); ...
-DuDx(3)+u(2)-u(1)];
end
function [c,f,s] = pdefun(x,t,u,DuDx)
c = [1;1;0];
f = [DuDx(1)-u(1)*DuDx(3); ...
DuDx(2)+u(2)*DuDx(3); ...
DuDx(3)];
s = [-DuDx(3)*DuDx(1)+DuDx(1)*DuDx(3); ...
DuDx(3)*DuDx(2)-DuDx(2)*DuDx(3); ...
u(2)-u(1)];
end
0 Comments
Answers (2)
Sharmila Raghu
on 29 Dec 2016
The above error might occur if the boundary conditions are ill-posed. Please verify the boundary conditions to see if they are ill-posed. The boundary conditions specified as "p" and "q", follow this relationship:
p + q*f = 0
If "pr" and "qr" (the parameters for the right boundary) are both zero, this becomes 0+0=0, which is an ill-posed problem. To resolve this, please try setting "qr" to anything besides zero. This is equivalent to "f=0", which was probably the intended result.
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!