Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
pdepe flux term

Subject: pdepe flux term

From: Floris Zoutman

Date: 17 Apr, 2012 09:54:07

Message: 1 of 7

I'm trying to program a system of two partial differential equations and I'm a little stuck on programming the boundary conditions. My boundary conditions are simply that the flux term should vanish, but from the documentation it's not clear whether pdepe requires two or one condition. The documentation states the following equation but without stating dimensions:
p+qf=0
Should I program it as:
pl=pr=0 and ql=qr=ones(1,2)
OR
pl=pr=zeros(2,1) and ql=qr=eye(2)

Subject: pdepe flux term

From: Torsten

Date: 17 Apr, 2012 09:59:27

Message: 2 of 7

On 17 Apr., 11:54, "Floris Zoutman" <fzout...@hotmail.com> wrote:
> I'm trying to program a system of two partial differential equations and I'm a little stuck on programming the boundary conditions. My boundary conditions are simply that the flux term should vanish, but from the documentation it's not clear whether pdepe requires two or one condition. The documentation states the following equation but without stating dimensions:
> p+qf=0
> Should I program it as:
> pl=pr=0 and ql=qr=ones(1,2)
> OR
> pl=pr=zeros(2,1) and ql=qr=eye(2)

function [pl,ql,pr,qr] = pdex4bc(xl,ul,xr,ur,t)
pl = [0; 0];
ql = [1; 1];
pr = pl;
qr = ql;

Best wishes
Torsten.

Subject: pdepe flux term

From: Floris Zoutman

Date: 17 Apr, 2012 11:01:06

Message: 3 of 7

Torsten <Torsten.Hennig@umsicht.fraunhofer.de> wrote in message <a70a09ec-f0f1-469a-a7ec-965b76eb4b1a@h12g2000yqi.googlegroups.com>...
> On 17 Apr., 11:54, "Floris Zoutman" <fzout...@hotmail.com> wrote:
> > I'm trying to program a system of two partial differential equations and I'm a little stuck on programming the boundary conditions. My boundary conditions are simply that the flux term should vanish, but from the documentation it's not clear whether pdepe requires two or one condition. The documentation states the following equation but without stating dimensions:
> > p+qf=0
> > Should I program it as:
> > pl=pr=0 and ql=qr=ones(1,2)
> > OR
> > pl=pr=zeros(2,1) and ql=qr=eye(2)
>
> function [pl,ql,pr,qr] = pdex4bc(xl,ul,xr,ur,t)
> pl = [0; 0];
> ql = [1; 1];
> pr = pl;
> qr = ql;
>
> Best wishes
> Torsten.
I don't understand. The flux terms is 2X1 so the multiplication q*f does not exist in your specification.

Subject: pdepe flux term

From: Torsten

Date: 17 Apr, 2012 11:24:36

Message: 4 of 7

On 17 Apr., 13:01, "Floris Zoutman" <fzout...@hotmail.com> wrote:
> Torsten <Torsten.Hen...@umsicht.fraunhofer.de> wrote in message <a70a09ec-f0f1-469a-a7ec-965b76eb4...@h12g2000yqi.googlegroups.com>...
> > On 17 Apr., 11:54, "Floris Zoutman" <fzout...@hotmail.com> wrote:
> > > I'm trying to program a system of two partial differential equations and I'm a little stuck on programming the boundary conditions. My boundary conditions are simply that the flux term should vanish, but from the documentation it's not clear whether pdepe requires two or one condition. The documentation states the following equation but without stating dimensions:
> > > p+qf=0
> > > Should I program it as:
> > > pl=pr=0 and ql=qr=ones(1,2)
> > > OR
> > > pl=pr=zeros(2,1) and ql=qr=eye(2)
>
> > function [pl,ql,pr,qr] = pdex4bc(xl,ul,xr,ur,t)
> > pl = [0; 0];
> > ql = [1; 1];
> > pr = pl;
> > qr = ql;
>
> > Best wishes
> > Torsten.
>
> I don't understand. The flux terms is 2X1 so the multiplication q*f does not exist in your specification.- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

For equation i, you can only use the flux f_i associated with this
equation in the definition of the boundary
condition; thus q*f is simple scalar multiplication.
Take a look at example 2 under
http://www.mathworks.de/help/techdoc/ref/pdepe.html

Best wishes
Torsten.

Subject: pdepe flux term

From: Torsten

Date: 17 Apr, 2012 11:28:06

Message: 5 of 7

On 17 Apr., 13:24, Torsten <Torsten.Hen...@umsicht.fraunhofer.de>
wrote:
> On 17 Apr., 13:01, "Floris Zoutman" <fzout...@hotmail.com> wrote:
>
>
>
>
>
> > Torsten <Torsten.Hen...@umsicht.fraunhofer.de> wrote in message <a70a09ec-f0f1-469a-a7ec-965b76eb4...@h12g2000yqi.googlegroups.com>...
> > > On 17 Apr., 11:54, "Floris Zoutman" <fzout...@hotmail.com> wrote:
> > > > I'm trying to program a system of two partial differential equations and I'm a little stuck on programming the boundary conditions. My boundary conditions are simply that the flux term should vanish, but from the documentation it's not clear whether pdepe requires two or one condition. The documentation states the following equation but without stating dimensions:
> > > > p+qf=0
> > > > Should I program it as:
> > > > pl=pr=0 and ql=qr=ones(1,2)
> > > > OR
> > > > pl=pr=zeros(2,1) and ql=qr=eye(2)
>
> > > function [pl,ql,pr,qr] = pdex4bc(xl,ul,xr,ur,t)
> > > pl = [0; 0];
> > > ql = [1; 1];
> > > pr = pl;
> > > qr = ql;
>
> > > Best wishes
> > > Torsten.
>
> > I don't understand. The flux terms is 2X1 so the multiplication q*f does not exist in your specification.- Zitierten Text ausblenden -
>
> > - Zitierten Text anzeigen -
>
> For equation i, you can only use the flux f_i associated with this
> equation in the definition of the boundary
> condition; thus q*f is simple scalar multiplication.

Maybe "componentwise" instead of "scalar" would be a better to use
here: 0=p+q.*f

> Take a look at example 2 underhttp://www.mathworks.de/help/techdoc/ref/pdepe.html
>
> Best wishes
> Torsten.- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Subject: pdepe flux term

From: Floris Zoutman

Date: 17 Apr, 2012 12:10:06

Message: 6 of 7

Got it! Thanks. Just one more question: does that mean I should also program c as a vector instead of a diagonal matrix? This is not the clearest part in the documentation. You really have to go through the examples to understand the syntax. Would be much clearer if they'd use the componentwise operation in the description of the formulas.
Torsten <Torsten.Hennig@umsicht.fraunhofer.de> wrote in message <c5e8ecf6-1ac9-4c30-9a03-4ac62703f459@l18g2000vbx.googlegroups.com>...
> On 17 Apr., 13:24, Torsten <Torsten.Hen...@umsicht.fraunhofer.de>
> wrote:
> > On 17 Apr., 13:01, "Floris Zoutman" <fzout...@hotmail.com> wrote:
> >
> >
> >
> >
> >
> > > Torsten <Torsten.Hen...@umsicht.fraunhofer.de> wrote in message <a70a09ec-f0f1-469a-a7ec-965b76eb4...@h12g2000yqi.googlegroups.com>...
> > > > On 17 Apr., 11:54, "Floris Zoutman" <fzout...@hotmail.com> wrote:
> > > > > I'm trying to program a system of two partial differential equations and I'm a little stuck on programming the boundary conditions. My boundary conditions are simply that the flux term should vanish, but from the documentation it's not clear whether pdepe requires two or one condition. The documentation states the following equation but without stating dimensions:
> > > > > p+qf=0
> > > > > Should I program it as:
> > > > > pl=pr=0 and ql=qr=ones(1,2)
> > > > > OR
> > > > > pl=pr=zeros(2,1) and ql=qr=eye(2)
> >
> > > > function [pl,ql,pr,qr] = pdex4bc(xl,ul,xr,ur,t)
> > > > pl = [0; 0];
> > > > ql = [1; 1];
> > > > pr = pl;
> > > > qr = ql;
> >
> > > > Best wishes
> > > > Torsten.
> >
> > > I don't understand. The flux terms is 2X1 so the multiplication q*f does not exist in your specification.- Zitierten Text ausblenden -
> >
> > > - Zitierten Text anzeigen -
> >
> > For equation i, you can only use the flux f_i associated with this
> > equation in the definition of the boundary
> > condition; thus q*f is simple scalar multiplication.
>
> Maybe "componentwise" instead of "scalar" would be a better to use
> here: 0=p+q.*f
>
> > Take a look at example 2 underhttp://www.mathworks.de/help/techdoc/ref/pdepe.html
> >
> > Best wishes
> > Torsten.- Zitierten Text ausblenden -
> >
> > - Zitierten Text anzeigen -

Subject: pdepe flux term

From: Torsten

Date: 17 Apr, 2012 12:32:02

Message: 7 of 7

On 17 Apr., 14:10, "Floris Zoutman" <fzout...@hotmail.com> wrote:
> Got it! Thanks. Just one more question: does that mean I should also program c as a vector instead of a diagonal matrix? This is not the clearest part in the documentation. You really have to go through the examples to understand the syntax. Would be much clearer if they'd use the componentwise operation in the description of the formulas.
>
>
>
> Torsten <Torsten.Hen...@umsicht.fraunhofer.de> wrote in message <c5e8ecf6-1ac9-4c30-9a03-4ac62703f...@l18g2000vbx.googlegroups.com>...
> > On 17 Apr., 13:24, Torsten <Torsten.Hen...@umsicht.fraunhofer.de>
> > wrote:
> > > On 17 Apr., 13:01, "Floris Zoutman" <fzout...@hotmail.com> wrote:
>
> > > > Torsten <Torsten.Hen...@umsicht.fraunhofer.de> wrote in message <a70a09ec-f0f1-469a-a7ec-965b76eb4...@h12g2000yqi.googlegroups.com>...
> > > > > On 17 Apr., 11:54, "Floris Zoutman" <fzout...@hotmail.com> wrote:
> > > > > > I'm trying to program a system of two partial differential equations and I'm a little stuck on programming the boundary conditions. My boundary conditions are simply that the flux term should vanish, but from the documentation it's not clear whether pdepe requires two or one condition. The documentation states the following equation but without stating dimensions:
> > > > > > p+qf=0
> > > > > > Should I program it as:
> > > > > > pl=pr=0 and ql=qr=ones(1,2)
> > > > > > OR
> > > > > > pl=pr=zeros(2,1) and ql=qr=eye(2)
>
> > > > > function [pl,ql,pr,qr] = pdex4bc(xl,ul,xr,ur,t)
> > > > > pl = [0; 0];
> > > > > ql = [1; 1];
> > > > > pr = pl;
> > > > > qr = ql;
>
> > > > > Best wishes
> > > > > Torsten.
>
> > > > I don't understand. The flux terms is 2X1 so the multiplication q*f does not exist in your specification.- Zitierten Text ausblenden -
>
> > > > - Zitierten Text anzeigen -
>
> > > For equation i, you can only use the flux f_i associated with this
> > > equation in the definition of the boundary
> > > condition; thus q*f is simple scalar multiplication.
>
> > Maybe "componentwise" instead of "scalar" would be a better to use
> > here: 0=p+q.*f
>
> > > Take a look at example 2 underhttp://www.mathworks.de/help/techdoc/ref/pdepe.html
>
> > > Best wishes
> > > Torsten.- Zitierten Text ausblenden -
>
> > > - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -


Yes, c is a column vector and contains the diagonal elements of the
matrix C.

Best wishes
Torsten.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us