Author 
Comment/Response 
Marc

02/22/06 11:49pm
I am trying to solve a pair of coupled differential equations, and this is my first real experience with Mathematica. The problem is flow through a channel, with a velocity in the direction of the channel flow, and diffusion in the direction orthogonal to flow. The BCs, for Cv(y,z,t), are Cv(y,z,0)=0, Cv(y,0,t)=Cvo, dCv(1,z,t)/dy=0, and an equilibrium at the flowboundary interface with the second equation, which monitors the uptake of material into an adsorbent bed based on an equilibrium constant, Cp(0,z,t)/Cv(0,z,t)=Keq. Cp(y,z,t) is the concentration in the adsorbent bed, and it is a solid and there is no flow. For Cp, Cp(y,z,0)=0, dCp(h,z,t)/dy=0, and again this is linked to the first DE via the equilibrium boundary condition.
dCv/dt+Vz*dCv/dz=D*d^2Cv/dy^2 < for flow channel
dCp/dt=D*d^2Cp/dy^2 < for adsorbent bed
I am apparently not sure how exactly to set this up in Mathematica  I've done it to the best of my ability (this is my first time using Mathematica), and I get an error on the equilibrium boundary condition, saying that it is not on an edge of the boundary computational domain. I am aware that this is the case, strictly speaking. How would I formulate the problem correctly?
Code:
(*Some parameters*)
hv = 0.1; hp = 10 10^6; L = 7.5; Dv = 0.001; Dp = 0.1 10^6; Vz = 2;
Keq = 100; Cvo = 0.01; tmax = 50;
(*Using NDSolve*)
NDSolve[{
(* First, enter the two governing differential equations*)
D[Cv[y, z, t], t] + Vz D[Cv[y, z, t], z] == Dv D[Cv[y, z, t], y, y],
D[Cp[y, z, t], t] == Dp D[Cp[y, z, t], y, y],
(* Next, enter the boundary conditions : the simple ones first*)
Cv[y, z, 0] == 0,
Cp[y, z, 0] == 0,
Cv[y, 0, t] == Cvo,
(* Then the complicated ones, involving derivatives*)
Derivative[1, 0, 0][Cv][hv, z, t] == 0,
Derivative[1, 0, 0][Cp][hp, z, t] == 0,
Cp[0, z, t] == Keq Cv[0, z, t]},
(* Finally, what are we solving for? And over what range?*)
{Cv, Cp},
{y, hp, hv}, {z, 0, L}, {t, 0, tmax}]
My output error:
NDSolve::bcedge: Boundary condition Cp[0, z, t] == 100\Cv[0, z, t] is not \
specified on a single edge of the boundary of the computational domain.
Thank you very much for anything you can offer.
URL: , 
