Constant Pressure Boundary Conditions for PDEPE solver

3 visualizaciones (últimos 30 días)
Jacob
Jacob el 10 de Jun. de 2014
Comentada: Bill Greene el 11 de Jun. de 2014
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 comentarios
Jacob
Jacob el 11 de Jun. de 2014
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 el 11 de Jun. de 2014
>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

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by