Azzera filtri
Azzera filtri

PDE and Periodic Boundary Conditions

29 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Jonathan B.
Jonathan B. il 3 Giu 2012
Matlab's PDE developer answer :
"The reason I did not respond to your email or MATLAB central request is that, so far as I know, there is no example showing how to define periodic BCs with PDE Toolbox. I think such a thing is possible but it would require considerable experimentation to confirm that. We might create an example of this in the future but have no current plans to do so."

Più risposte (1)

giankly
giankly il 18 Mar 2013
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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by