Constant Pressure Boundary Conditions for PDEPE solver
Show older comments
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
Bill Greene
on 10 Jun 2014
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
Jacob
on 11 Jun 2014
Bill Greene
on 11 Jun 2014
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
Jacob
on 11 Jun 2014
Bill Greene
on 11 Jun 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
Answers (0)
Categories
Find more on Eigenvalue Problems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!