COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Coupled First Order PDEs

• Email
• Follow

```Is there any way to solve a set of two coupled first order
PDEs with Matlab? or is there any Matlab code to be able to solve
these kind of PDEs.
i.e:
dx(u1)= f(u1,u2,x,t)
dt(u2)=g(u1,u2,x,t)

The PDEPE of Matlab seems to be very restricted. It can only handle
special sets of elliptic-parabolic PDEs. It initialize its solver in
a strange way and the code has not been optimised.

Best regards
```
 0

See related articles to this posting

```In article <eefa55f.-1@webx.raydaftYaTP>,
>Is there any way to solve a set of two coupled first order
>PDEs with Matlab? or is there any Matlab code to be able to solve
>these kind of PDEs.
>  i.e:
>        dx(u1)= f(u1,u2,x,t)
>        dt(u2)=g(u1,u2,x,t)
>
>The PDEPE of Matlab seems to be very restricted. It can only handle
>special sets of elliptic-parabolic PDEs. It initialize its solver in
>a strange way and the code has not been optimised.
there is nothing strange with pdepe. it works using the "vertical" method of
lines using the BDF as time integrator, which is state of the art
in 1 space variable problems. your system above looks quite strange.
I assume u1=u1(x,t) and u2=u2(x,t). then i had assumed dx(u2) in the second
equation on the left and f,g both being differentiated with respect to t
(or vice versa with t and x). hence a nonlinear conservation law.
ii do not know about matlab code for this, but there is
le veque' s code  for ssytems of conservation laws:
http://www.amath.washington.edu/~claw
hth
peter

>
>Best regards
```
 0
Reply spellucci (466) 2/1/2005 12:02:38 PM

```Peter Spellucci wrote:
>
>
>
> In article <eefa55f.-1@webx.raydaftYaTP>,
> >Is there any way to solve a set of two coupled first order
> >PDEs with Matlab? or is there any Matlab code to be able to
solve
> >these kind of PDEs.
> > i.e:
> > dx(u1)= f(u1,u2,x,t)
> > dt(u2)=g(u1,u2,x,t)
> >
> >The PDEPE of Matlab seems to be very restricted. It can only
> handle
> >special sets of elliptic-parabolic PDEs. It initialize its
solver
> in
> >a strange way and the code has not been optimised.
> there is nothing strange with pdepe. it works using the "vertical"
> method of
> lines using the BDF as time integrator, which is state of the art
> in 1 space variable problems. your system above looks quite
> strange.
> I assume u1=u1(x,t) and u2=u2(x,t). then i had assumed dx(u2) in
> the second
> equation on the left and f,g both being differentiated with respect
> to t
> (or vice versa with t and x). hence a nonlinear conservation law.
> ii do not know about matlab code for this, but there is
> le veque' s code for ssytems of conservation laws:
> <http://www.amath.washington.edu/~claw>
> hth
> peter
>
>
> >
> >Best regards
>

Hi Peter,
If you follow step by step pdepe then you will see how strange it
will initialize itself (i.e determination the number of equations
passed ,IC and BCs, ...). But I am agree with you the its method is
state of art.

Regarding the above set of PDEs, they state poisoning in a fixed bed
reactor and they are correct( yes they were derived by mass balance).
The time scale for the first equation is very small and actually it
The real equations are:
dx(u1)=-u1*(1-u2)*f(u2)
dt(u2)=u2*(1-u2)*f(u2)
f is highly nonlinear.

Please let me know if you any suggestion.
that.

Thanks again

WBR,
```
 0

```In article <eefa55f.1@webx.raydaftYaTP>,
>Peter Spellucci wrote:
>>
>>
>>
>> In article <eefa55f.-1@webx.raydaftYaTP>,
>> >Is there any way to solve a set of two coupled first order
>> >PDEs with Matlab? or is there any Matlab code to be able to
>solve
>> >these kind of PDEs.
>> > i.e:
>> > dx(u1)= f(u1,u2,x,t)
>> > dt(u2)=g(u1,u2,x,t)
>> >
>> >The PDEPE of Matlab seems to be very restricted. It can only
>> handle
>> >special sets of elliptic-parabolic PDEs. It initialize its
>solver
>> in
>> >a strange way and the code has not been optimised.
>> there is nothing strange with pdepe. it works using the "vertical"
>> method of
>> lines using the BDF as time integrator, which is state of the art
>> in 1 space variable problems. your system above looks quite
>> strange.
>> I assume u1=u1(x,t) and u2=u2(x,t). then i had assumed dx(u2) in
>> the second
>> equation on the left and f,g both being differentiated with respect
>> to t
> > (or vice versa with t and x). hence a nonlinear conservation law.
>> ii do not know about matlab code for this, but there is
>> le veque' s code for ssytems of conservation laws:
>> <http://www.amath.washington.edu/~claw>
>> hth
>> peter
>>
>>
>> >
>> >Best regards
>>
>
>Hi Peter,
>If you follow step by step pdepe then you will see how strange it
>will initialize itself (i.e determination the number of equations
>passed ,IC and BCs, ...). But I am agree with you the its method is
>state of art.
>
>Regarding the above set of PDEs, they state poisoning in a fixed bed
>reactor and they are correct( yes they were derived by mass balance).
>The time scale for the first equation is very small and actually it
>The real equations are:
>   dx(u1)=-u1*(1-u2)*f(u2)
>   dt(u2)=u2*(1-u2)*f(u2)
>   f is highly nonlinear.
>
> Please let me know if you any suggestion.
>that.
>
>Thanks again
>
>WBR,

u1=u1(x,t), u2=u2(x,t) ??
then the second equation is an ordinary one with "x" acting as a parameter
and you can  integrate this one "in principle", the more as u1 does not enter
here.
Then insering this into the first, you get a simlar situation there now t and
u2(t,.) act as external parameters. might this help?
peter

```
 0
Reply spellucci (466) 2/4/2005 12:37:46 PM

```Peter,
I am sorry, I wrote by mistake u2 instead of u1 in the second
equation the correct form is:

Eq (1): dx(u1)= -u1 * (1-u2) * f(u2)
Eq (2): dt(u2)= u1 * (1-u2) * g(u2)

different time values inside another ODE integrator for some types of
f and g. The solution is good but not for all types of f and g
functions.

Peter Spellucci wrote:
>
>
>
> In article <eefa55f.1@webx.raydaftYaTP>,
> >Peter Spellucci wrote:
> >>
> >>
> >>
> >> In article <eefa55f.-1@webx.raydaftYaTP>,
writes:
> >> >Is there any way to solve a set of two coupled first
order
> >> >PDEs with Matlab? or is there any Matlab code to be
able to
> >solve
> >> >these kind of PDEs.
> >> > i.e:
> >> > dx(u1)= f(u1,u2,x,t)
> >> > dt(u2)=g(u1,u2,x,t)
> >> >
> >> >The PDEPE of Matlab seems to be very restricted. It
can only
> >> handle
> >> >special sets of elliptic-parabolic PDEs. It initialize
its
> >solver
> >> in
> >> >a strange way and the code has not been optimised.
> >> there is nothing strange with pdepe. it works using the
> "vertical"
> >> method of
> >> lines using the BDF as time integrator, which is state of
the
> art
> >> in 1 space variable problems. your system above looks
quite
> >> strange.
> >> I assume u1=u1(x,t) and u2=u2(x,t). then i had assumed
dx(u2)
> in
> >> the second
> >> equation on the left and f,g both being differentiated
with
> respect
> >> to t
> > > (or vice versa with t and x). hence a nonlinear
conservation
> law.
> >> ii do not know about matlab code for this, but there is
> >> le veque' s code for ssytems of conservation laws:
> >> <http://www.amath.washington.edu/~claw>
> >> hth
> >> peter
> >>
> >>
> >> >
> >> >Best regards
> >>
> >
> >Hi Peter,
> >If you follow step by step pdepe then you will see how strange
it
> >will initialize itself (i.e determination the number of
equations
> >passed ,IC and BCs, ...). But I am agree with you the its
method
> is
> >state of art.
> >
> >Regarding the above set of PDEs, they state poisoning in a
fixed
> bed
> >reactor and they are correct( yes they were derived by mass
> balance).
> >The time scale for the first equation is very small and
actually
> it
> >The real equations are:
> > dx(u1)=-u1*(1-u2)*f(u2)
> > dt(u2)=u2*(1-u2)*f(u2)
> > f is highly nonlinear.
> >
> > Please let me know if you any suggestion.
try
> >that.
> >
> >Thanks again
> >
> >WBR,
>
> u1=u1(x,t), u2=u2(x,t) ??
> then the second equation is an ordinary one with "x" acting as a
> parameter
> and you can integrate this one "in principle", the more as u1 does
> not enter
> here.
> Then insering this into the first, you get a simlar situation there
> now t and
> u2(t,.) act as external parameters. might this help?
> peter
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
```
 0

```Mohammad:

I have a binary adsorption-diffusion problem for solving
dq1/dt= f(q1,q2,r,t)
dq1/dt= f(q1,q2,r,t)

They are coupled PDEs. Do you happen to know if they can be solved by
Matlab 6.5.1?

>
>
> Is there any way to solve a set of two coupled first order
> PDEs with Matlab? or is there any Matlab code to be able to solve
> these kind of PDEs.
> i.e:
> dx(u1)= f(u1,u2,x,t)
> dt(u2)=g(u1,u2,x,t)
>
> The PDEPE of Matlab seems to be very restricted. It can only handle
> special sets of elliptic-parabolic PDEs. It initialize its solver
> in
> a strange way and the code has not been optimised.
>
> Best regards
```
 0
Reply aavila (2) 2/5/2005 6:35:35 PM

```Adolfo,
The two equations you have written here are the same, could you
write the correct equations. Moreover there is an article from K.
Bischoff which addresses the analytical solution of
adsorption-diffusion problem. For a special very nonlinear cases
there is numerical methods.

>
>
>
> I have a binary adsorption-diffusion problem for solving
> dq1/dt= f(q1,q2,r,t)
> dq1/dt= f(q1,q2,r,t)
>
> They are coupled PDEs. Do you happen to know if they can be solved
> by
> Matlab 6.5.1?
>
>>
>>
>> Is there any way to solve a set of two coupled first order
>> PDEs with Matlab? or is there any Matlab code to be able to
solve
>> these kind of PDEs.
>> i.e:
>> dx(u1)= f(u1,u2,x,t)
>> dt(u2)=g(u1,u2,x,t)
>>
>> The PDEPE of Matlab seems to be very restricted. It can only
> handle
>> special sets of elliptic-parabolic PDEs. It initialize its
solver
>> in
>> a strange way and the code has not been optimised.
>>
>> Best regards
```
 0