From: Kate on
I am trying to solve a system of PDEs that includes diffusion and chemotaxis terms. The equations are:

dn/dt = d^2n/dx^2 - d/dx(n*dc/dx)
dc/dt = d^2c/dx^2

so the first equation includes a second derivative of c. I can't figure out a way to program this using pdepe, because the format of the pdex1pde function only allows for an input of DuDx, and I can't figure out a way to specify which derivative this is. Using DuDx to program the first equation, in this example, would correspond with dn/dx, but I want it to correspond with dc/dx for the second term. Any ideas?
From: Torsten Hennig on
> I am trying to solve a system of PDEs that includes
> diffusion and chemotaxis terms. The equations are:
>
> dn/dt = d^2n/dx^2 - d/dx(n*dc/dx)
> dc/dt = d^2c/dx^2
>
> so the first equation includes a second derivative of
> c. I can't figure out a way to program this using
> pdepe, because the format of the pdex1pde function
> only allows for an input of DuDx, and I can't figure
> out a way to specify which derivative this is. Using
> DuDx to program the first equation, in this example,
> would correspond with dn/dx, but I want it to
> correspond with dc/dx for the second term. Any ideas?

If n = u(1) and c = u(2), you can set

f(1) = DuDx(1)-u(1)*DuDx(2)
f(2) = DuDx(2)

Best wishes
Torsten.
From: Kate on
Thank you so much!