Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with boundary condition in pdepe

597 views
Skip to first unread message

Christoph

unread,
Feb 14, 2012, 4:29:11 PM2/14/12
to
Hello everyone,

I try to solve a diffusion-convection-equation in matlab using pdepe. I set the boundary conditions, which are asked to be of the form

p(u,x,t)+q(x,t)*f(u,x,t,dudx)=0

My boundary condition says d^2u/dx^2=0 for x=0 and x=1. How can I get this BC to fit into the notation above?? Can I use only first order boundaries depending on du/dx and not on d^2u/dx^2??

If someone has an idea, i appreciate any help!
Thnx!
Chris

Nasser M. Abbasi

unread,
Feb 14, 2012, 4:55:18 PM2/14/12
to
On 2/14/2012 3:29 PM, Christoph wrote:

>
> My boundary condition says d^2u/dx^2=0 for x=0 and x=1.

I've never seen such a BC before for the 1D diffusion-convection-equation.

What is it called, and what does it represent physically?

--Nasser

Christoph

unread,
Feb 15, 2012, 2:44:13 AM2/15/12
to
"Nasser M. Abbasi" <n...@12000.org> wrote in message <jhel87$hrm$1...@speranza.aioe.org>...
Hello, thanks for your reply,

in my equation

du/dt=-w*du/dx+D*d^2u/dx+k(x,t,u)

the diffusion term is D*d^2u/dx^2 and the boundary condition
d^2u/dx^2=0 for x=0 and x=1
is to define, that there is no diffusion over the system boundaries. In this case, I am examining the flow in a granular bed, and where is no granular, there shall be no diffusion.
Can this BC be expressed somehow else or doesn't it make sense??

Chris

Nasser M. Abbasi

unread,
Feb 15, 2012, 3:00:03 AM2/15/12
to
On 2/15/2012 1:44 AM, Christoph wrote:
> "Nasser M. Abbasi"<n...@12000.org> wrote in message<jhel87$hrm$1...@speranza.aioe.org>...
>> On 2/14/2012 3:29 PM, Christoph wrote:
>>
>>>
>>> My boundary condition says d^2u/dx^2=0 for x=0 and x=1.
>>
>> I've never seen such a BC before for the 1D diffusion-convection-equation.
>>
>> What is it called, and what does it represent physically?
>>
>> --Nasser
>
> Hello, thanks for your reply,
>
> in my equation
>
> du/dt=-w*du/dx+D*d^2u/dx+k(x,t,u)
>
> the diffusion term is D*d^2u/dx^2 and the boundary condition
> d^2u/dx^2=0 for x=0 and x=1
> is to define, that there is no diffusion over the system boundaries.

I've never this before. For insulation, ones uses Neumann BC, which is
just du/dx = 0.

So, I do not know where you got the second derivative from.

>In this case, I am examining the flow in a granular bed, and where is
> no granular, there shall be no diffusion.

In all the books I have, none shows second derivative as BC for
diffusion-convection-advection pde, which is what you have.

> Can this BC be expressed somehow else or doesn't it make sense??
>
> Chris

Well, I am not expert on this subject, but your BC do not
make sense to me, but this does not mean anything, may be
it means something. I do not know.

I have few applets here on the diffusion convection and diffusion
advection pde's and such, you can try them and see, you need a
plugin in to run them on firefox or IE, link for the plugin
is shown on the page:

http://12000.org/my_notes/mma_demos/KERNEL/KERNEL.htm

check applets #27 and #28, these are related to your heat pde.
I only support Nuemman and Dirichlet for the diffusion-
advection-reaction, and only periodic BC for the diffusion-
convection.

--Nasser

Nasser M. Abbasi

unread,
Feb 15, 2012, 3:12:39 AM2/15/12
to
On 2/15/2012 2:00 AM, Nasser M. Abbasi wrote:

>
> I have few applets here on the diffusion convection and diffusion
> advection pde's and such, you can try them and see, you need a
> plugin in to run them on firefox or IE, link for the plugin
> is shown on the page:
>
> http://12000.org/my_notes/mma_demos/KERNEL/KERNEL.htm
>
> check applets #27 and #28, these are related to your heat pde.
> I only support Nuemman and Dirichlet for the diffusion-
> advection-reaction, and only periodic BC for the diffusion-
> convection.
>

If you need a Matlab version of some of these, I have some
here

http://12000.org/my_notes/my_matlab_functions/index.htm

I have one for the your PDE there as well, check #6.
But I do not use pdepe, I use finite difference. I find
it easier to solve these directly like this instead
of using a tool. This way, I learn better.

But use at your own risk, there could be bugs, as I am still
working on them, and I update these all the time with
fixes and more features as I need.

--Nasser

Christoph

unread,
Feb 15, 2012, 3:39:14 AM2/15/12
to
"Nasser M. Abbasi" <n...@12000.org> wrote in message <jhfpdq$rte$1...@speranza.aioe.org>...
Great, thanks a lot, I will look at your examples, there are so many! :-)

In my opinion, the BC d^2u/dx^2 does make sense, because diffusion shall not take place over the boundaries of the system. The BC du/dx=0 just means, there is no convection over the boundaries. In my case, I have a fixed bed of granular and there can be convection where is no granular, but no diffusion.

I will write here, if I find a solution!

Chris

Torsten

unread,
Feb 15, 2012, 9:26:49 AM2/15/12
to
On 15 Feb., 08:44, "Christoph " <schlad...@tuhh.de> wrote:
> "Nasser M. Abbasi" <n...@12000.org> wrote in message <jhel87$hr...@speranza.aioe.org>...
The usual way to set the diffusive flux at the boundary to zero is to
use the boundary condition du/dx = 0.
The usual way to set the condition that diffusive and convective flux
sum to zero is to set -w*u+D*du/dx = 0.

Best wishes
Torsten.

Nasser M. Abbasi

unread,
Feb 15, 2012, 9:44:10 AM2/15/12
to
On 2/15/2012 8:26 AM, Torsten wrote:
> On 15 Feb., 08:44, "Christoph "<schlad...@tuhh.de> wrote:

> The usual way to set the diffusive flux at the boundary to zero is to
> use the boundary condition du/dx = 0.

That is what I also just said Torsten :

me> For insulation, ones uses Neumann BC, which is just du/dx = 0.

but Chris did not agree with this.

--Nasser

Christoph

unread,
Feb 15, 2012, 9:45:24 AM2/15/12
to
Well, today, I tried to control the derivative of my function by influencing the concentration u itself... didn't really work.
But I think, I somehow get, why the diffusion is controlled via du/dx. If this is zero, d^2u/dx^2 will be zero as well.

Anyways, Torsten, this was the answer I needed! Thanks a lot!

Christoph

unread,
Feb 15, 2012, 9:47:24 AM2/15/12
to
"Nasser M. Abbasi" <n...@12000.org> wrote in message <jhggbt$m79$1...@speranza.aioe.org>...
I think, insulation is not the same, or am I wrong. Thermal conduction is equal to a diffusive flux, right?

Nasser M. Abbasi

unread,
Feb 15, 2012, 9:57:27 AM2/15/12
to
On 2/15/2012 8:47 AM, Christoph wrote:
>>
>> me> For insulation, ones uses Neumann BC, which is just du/dx = 0.
>>
>> but Chris did not agree with this.
>>
>> --Nasser
>
> I think, insulation is not the same, or am I wrong. Thermal conduction is
> equal to a diffusive flux, right?

"insulation" is a generic term used, since D*u_xx=u_t is commonly
called "heat" pde. When no diffusion at the boundary, it is like
having the boundary "insulated", since no "heat" diffuses out.

The bottom line, the BC is du/dx=0, which is what I said. If you
want to argue about terminology, well, that is something else. I
was just using the term insulation to mean du/dx=0 since it is
what is commonly used for the heat pde.

--Nasser

Christoph

unread,
Feb 15, 2012, 10:11:10 AM2/15/12
to
"Nasser M. Abbasi" <n...@12000.org> wrote in message <jhgh4p$okm$1...@speranza.aioe.org>...
Allright, since I am a newbie in this topic, I surely don't want to argue about terminology ;-)
Thank you very much, Nasser and Torsten, you helped me out very well!

Torsten

unread,
Feb 15, 2012, 10:37:47 AM2/15/12
to
On 15 Feb., 09:39, "Christoph " <schlad...@tuhh.de> wrote:
> "Nasser M. Abbasi" <n...@12000.org> wrote in message <jhfpdq$rt...@speranza.aioe.org>...
>
>
>
>
>
> > On 2/15/2012 2:00 AM, Nasser M. Abbasi wrote:
>
> > > I have few applets here on the diffusion convection and diffusion
> > > advection pde's and such, you can try them and see, you need a
> > > plugin in to run them on firefox or IE, link for the plugin
> > > is shown on the page:
>
> > >http://12000.org/my_notes/mma_demos/KERNEL/KERNEL.htm
>
> > > check applets #27 and #28, these are related to your heat pde.
> > > I only support Nuemman and Dirichlet for the diffusion-
> > > advection-reaction, and only periodic BC for the diffusion-
> > > convection.
>
> > If you need a Matlab version of some of these, I have some
> > here
>
> >http://12000.org/my_notes/my_matlab_functions/index.htm
>
> > I have one for the your PDE there as well, check #6.
> > But I do not use pdepe, I use finite difference. I find
> > it easier to solve these directly like this instead
> > of using a tool. This way, I learn better.
>
> > But use at your own risk, there could be bugs, as I am still
> > working on them, and I update these all the time with
> > fixes and more features as I need.
>
> > --Nasser
>
> Great, thanks a lot, I will look at your examples, there are so many! :-)
>
> In my opinion, the BC d^2u/dx^2 does make sense, because diffusion shall not take place over the boundaries of the system. The BC du/dx=0 just means, there is no convection over the boundaries.

No, that's wrong. The boundary condition w*u = 0 means that there is
no convection across the boundary since
-u*w is the convective flux.

> In my case, I have a fixed bed of granular and there can be convection where is no granular, but no diffusion.
>

D*du/dx is the diffusive flux - thus du/dx = 0 means that there is no
diffusion across the boundary.

> I will write here, if I find a solution!
>
> Chris- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Best wishes
Torsten.

Torsten

unread,
Feb 16, 2012, 10:42:53 AM2/16/12
to
On 15 Feb., 15:45, "Christoph " <schlad...@tuhh.de> wrote:
> Well, today, I tried to control the derivative of my function by influencing the concentration u itself... didn't really work.
> But I think, I somehow get, why the diffusion is controlled via du/dx. If this is zero, d^2u/dx^2 will be zero as well.

Sorry, but this is also wrong.
Consider u(x) = x^2 at x=0.

>
> Anyways, Torsten, this was the answer I needed! Thanks a lot!

Best wishes
Torsten.

farhan...@gmail.com

unread,
Jul 29, 2016, 4:41:19 PM7/29/16
to
Hi,
I have some problem in solving the Pde for heat equation for fluid.
Could you please guide me.
0 new messages