From: Zoe on
I'm using matlab's parabolic function to solve a system of two nonlinear partial differential equations.

In my m file, partial derivatives are currently all second order derivatives with diffusion coefficients expressed by a constant labeled c.

Instead of diffusing equally in both the positive and negative directions, I want to incorporate uneven diffusion (i.e. more rapid diffusion in the positive direction than in the negative direction).

I believe that by adding a term k*d/dx (a constant,k, multiplied by a first order partial derivative) to the differential equation, I can express diffusion that goes only in the positive direction.

First, is this idea sensible?

Second, how would I incorporate this concept into my coding if I am already running an m file using the parabolic function?

Here is a simple(r) example the code I am working with:

%LVPDE: MATLAB script M-file for solving the PDE system.
a1=.12; a2=.12
m=size(p,2); %Number of endpoints
n=size(t,2); %Number of triangles
t_final=1.0; %Stop time
M=30; %take 30 time steps
dt=t_final/M; %Time-stepping increment (M-file time-stepping)
tlist=linspace(0,dt,2); %Time vector for MATLAB?s time-stepping
%Rectangular coordinates for plotting
x=linspace(0,1,25);
y=linspace(0,1,25);
%Set diffusion
c1=.1; %prey diffusion
c2=.1; %predator diffusion
%Initial conditions
for i=1:m %For each point of the triangular grid
[U(i),V(i)]=lvinitial(p(1,i),p(2,i));
end
%
for k=1:M
%Nonlinear interaction
for i=1:m
f1(i)=.2*(U(i)*V(i);
f2(i)=-.004*U(i)*V(i)
end
%NOTE: The nonlinear interaction terms must be defined at the centerpoints
%of the triangles. We can accomplish this with the function
%pdeintrp (pde interpolate).
f1center=pdeintrp(p,t,f1');
f2center=pdeintrp(p,t,f2');
%Solve the PDE
Unew=parabolic(U,tlist,b1,p,e,t,c1,-a1,f1center,1);
Vnew=parabolic(V,tlist,b2,p,e,t,c2,a2,f2center,1);
end


thanks.
From: Torsten Hennig on
> I'm using matlab's parabolic function to solve a
> system of two nonlinear partial differential
> equations.
>
> In my m file, partial derivatives are currently all
> second order derivatives with diffusion coefficients
> expressed by a constant labeled c.
>
> Instead of diffusing equally in both the positive and
> negative directions, I want to incorporate uneven
> diffusion (i.e. more rapid diffusion in the positive
> direction than in the negative direction).
>
> I believe that by adding a term k*d/dx (a constant,k,
> multiplied by a first order partial derivative) to
> the differential equation, I can express diffusion
> that goes only in the positive direction.
>

This is no diffusion, but convection (movement by an
external force, e.g. pressure gradients).
Can you define mathematically the driving force
for your "uneven" diffusion (for normal diffusion, the
driving force is the gradient (of concentration ...)) ?

> First, is this idea sensible?
>
> Second, how would I incorporate this concept into my
> coding if I am already running an m file using the
> parabolic function?
>
> Here is a simple(r) example the code I am working
> with:
>
> %LVPDE: MATLAB script M-file for solving the PDE
> system.
> a1=.12; a2=.12
> m=size(p,2); %Number of endpoints
> n=size(t,2); %Number of triangles
> t_final=1.0; %Stop time
> M=30; %take 30 time steps
> dt=t_final/M; %Time-stepping increment (M-file
> time-stepping)
> tlist=linspace(0,dt,2); %Time vector for MATLAB?s
> time-stepping
> %Rectangular coordinates for plotting
> x=linspace(0,1,25);
> y=linspace(0,1,25);
> %Set diffusion
> c1=.1; %prey diffusion
> c2=.1; %predator diffusion
> %Initial conditions
> for i=1:m %For each point of the triangular grid
> [U(i),V(i)]=lvinitial(p(1,i),p(2,i));
> end
> %
> for k=1:M
> %Nonlinear interaction
> for i=1:m
> f1(i)=.2*(U(i)*V(i);
> f2(i)=-.004*U(i)*V(i)
> end
> %NOTE: The nonlinear interaction terms must be
> defined at the centerpoints
> %of the triangles. We can accomplish this with the
> function
> %pdeintrp (pde interpolate).
> f1center=pdeintrp(p,t,f1');
> f2center=pdeintrp(p,t,f2');
> %Solve the PDE
> Unew=parabolic(U,tlist,b1,p,e,t,c1,-a1,f1center,1);
> Vnew=parabolic(V,tlist,b2,p,e,t,c2,a2,f2center,1);
> end
>
>
> thanks.

Best wishes
Torsten.
From: Zoe on
Torsten Hennig <Torsten.Hennig(a)umsicht.fhg.de> wrote in message <456642522.417382.1269243963413.JavaMail.root(a)gallium.mathforum.org>...

>
> This is no diffusion, but convection (movement by an
> external force, e.g. pressure gradients).
> Can you define mathematically the driving force
> for your "uneven" diffusion (for normal diffusion, the
> driving force is the gradient (of concentration ...)) ?
>

Hi Torsten,

In my model, wind is moving insects across a field. So the insects should be moving more in directions that wind is blowing strongly.

thanks.