Constant Pressure Boundary Conditions for PDEPE solver

조회 수: 2 (최근 30일)
Jacob
Jacob 2014년 6월 10일
댓글: Bill Greene 2014년 6월 11일
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
Jacob
Jacob 2014년 6월 11일
Bill, thanks for the response.
the left end is a no-flow boundary (dP/dx = 0). My code is:
pr = [0; 0];
qr = [1; 1];
The right side is atmospheric pressure( u1(1) + ul(2) - Patm = 0 )
I'm getting an error for trying these bc:
pl = [ul(1)+ul(2)-1; ul(1)+ul(2)-1];
ql = [0; 0];
However, I don't get an error by removing one of the u's from one of the boundary conditions. For example:
pl = [ul(1)+ul(2)-1;ul(2)-1];
ql = [0; 0];
It appears that I can't have pl(1) and pl(2) both depend on ul(1) and ul(2).
Any thoughts? Thanks again, Bill, for your continued help.
Bill Greene
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 CenterFile Exchange에서 Eigenvalue Problems에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by