Adding more boundary conditions to pdepe
5 次查看(过去 30 天)
显示 更早的评论
so bcfun has the following signiture
function [pl,ql,pr,qr] = bcfun(xl,ul,xr,ur,t)
So it lets me set BCs at the left and right BCs.
My spacial domain is divided into 3 parts 0 to a, a to b, and then b to L. a, b, L are just arbitrary lengths. This means I need to have a BC at 0, a, b, and L.
So my question is that is it possible to set BCs at a and b. It is straight forward setting BCs at 0 and L but I cannot find a way to set them for the boundarys in the middle (if it is even possible)
0 个评论
采纳的回答
Torsten
2023-2-5
移动:Torsten
2023-2-5
So my question is that is it possible to set BCs at a and b.
It depends what boundary conditions you want to set. If it is simply continuity of function and first derivative, you don't need to divide the region in parts. It's enough to include a and b in the mesh you supply to "pdepe". If you want to set jump conditions, it's not possible with "pdepe".
6 个评论
Torsten
2023-2-6
So if I can couple the my BCs at a and b to my left and right BCs then I'll be to put it in the pdepe bcfun. I appreiciate your help.
No.
For pdepe, you can only prescribe boundary conditions at both ends of the integration interval. You cannot put additional boundary conditions in the function bcfun.
If you want to solve problems which are somehow differently defined in two or three regions, you can nonetheless use pdepe if over the separation points, you want to prescribe continuity of the solution and the flux. In this case, you only have to include the points separating the regions in your mesh vector. Changes to bcfun don't need to be made.
If you want to prescribe more difficult transmission conditions at the points that separate two regions (e.g. jump conditions), pdepe cannot be used.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 PDE Solvers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!