Constant Pressure Boundary Conditions for PDEPE solver
2 次查看(过去 30 天)
显示 更早的评论
Thanks for sharing your knowledge and experience!
Could you please shed some light on defining boundary conditions using the PDEPE solver?
I want the left side to have constant pressure, but still allow pressure flux (open boundary). The right side needs to be a no flow boundary.
I'm having trouble conceptualizing the math & code of these conditions. The pdepe solver requires boundary conditions in the form p(x,t,u) + q(x,t)f(x,t,u,DuDx)=0
Here's my (incorrect) code:
function [pl,ql,pr,qr] = pdex4bc(xl,ul,xr,ur,t) pl = [ul(1)-1; ul(2)-(0.011237)]; ql = [0; 0]; pr = [0; 0]; qr = [1; 1];
The results of this code successly set the constant pressure at the left boundary, but they do not seem to allow any pressure flux through the left side.
Any comments/suggestions are greatly appreciated! Thanks for your time.
5 个评论
Bill Greene
2014-6-11
>The right side is atmospheric pressure( u1(1) + ul(2) - Patm = 0 )
I believe you mean left side.
The problem with this:
pl = [ul(1)+ul(2)-1; ul(1)+ul(2)-1];
is that you have only one independent BC on the left but you need two.
I assume you are just experimenting with this:
pl = [ul(1)+ul(2)-1;ul(2)-1];
since that is the same as this:
pl = [ul(1); ul(2)-1];
which is not what you want.
I'm unclear on the physics you are trying to represent so can't be of much help on that. But if you get the physics sorted out and are still having trouble expressing this for pdepe, let us know.
Bill
回答(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!