PDE and Periodic Boundary Conditions
显示 更早的评论
Hi everyone !
I need some help!!
I can't find something neither on the web, nor in the Matlab PDE documentation to get the information. It deals with periodic boundary conditions. I have read assempde(), pdebound, assemb, and it is always the same result : they do not treat the periodic boundary conditions. (only von Newman and Dirichlet)
I'm using the parabolic() solver with "square" geometry, and for the boundaries "squareb1" (Dirichlet only)
For instance, in the documentation PDE2012, impossible to find something on "squareb2","squareb4""squareb5", but I guess they only use a mix of von Newman and Dirichlet.
I just need von Newman conditions for y=±1, and periodic boundary conditions for x=±1. But I don't know how to proceed. I know I only need to write something like x(1)=x(end) or p(1,1)=p(1,end) (for the geometry) or u(1,:)=u(end,:) (for the solution) but I don't know how, and where. Inside the squareb1.m file ? Directly in the script code ?
What is amazing is that I spent hours to find to examples code dealing with periodic boundary conditions on Matlab and find nothing clear or interesting.
Thanks in advance !
Jonathan
采纳的回答
更多回答(1 个)
giankly
2013-3-18
Hi,
I've the same problem when using the pdepe function, i.e. I need to define some periodic boundary conditions (in pdepe I've only 1 space variable) for a system of 2 PDEs. In the definition of boundary conditions, why cannot I use something like the code below ?
function [pl,ql,pr,qr]=bound_cond(xl,ul,xr,ur,t)
pl=[ul(1)-ur(1); ul(2)-ur(2)];
ql=[0; 0];
pr=[ur(1)-ul(1); ur(2)-ul(2)];
qr=[0; 0];
In this way, I assign the value on the right boundary to the left one and viceversa. But, when trying this way, the matrix which should contain the solution is, in reality, a vector (i.e., the solution is computed in space only at the initial instant and no more).
However, it is unbelievable that Matlab does not implement periodic BC.
Giancarlo
类别
在 帮助中心 和 File Exchange 中查找有关 Boundary Conditions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!