Constant Pressure Boundary Conditions for PDEPE solver

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 Comments

Is one of your two unknowns, pressure? What is the second unknown? Are you defining pressure flux to be some constant multiplied by d_pressure/d_x? The BCs you show above set u(1) to be one and u(2) to be .011237 on the left boundary and that doesn't seem like what you want.
Bill
Bill, Thanks for the continued support!
u(1) and u(2) are both pressure. They represent the partial pressures of 2 isotopes. Originally, one isotope is 1.1237% of the other.
The boundary condition is atmospheric pressure, but I'm not sure how to express atm press at the boundary.
The ratios of these isotopes ( u(1) compared to u(2) ) should change over time, just the total boundary pressure needs to be atm.
Do you have any suggestions on how to express this boundary condition? Thanks so much!
If you can provide a mathematical definition of the boundary conditions for your problem, we can probably help you convert that to the form pdepe requires.
It sounds to me like one of the conditions at the left end (one of the components of pl) should look something like:
c1*ul(1) + c2*ul(2) - p_atmosphere
But since there are two dependent variables, one more BC is needed at the left end.
Bill
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.
>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

Sign in to comment.

Answers (0)

Asked:

on 10 Jun 2014

Commented:

on 11 Jun 2014

Community Treasure Hunt

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

Start Hunting!