How can I solve a coupled PDE and ODE using the method of lines?

  • Thread starter Thread starter thereisnospoo
  • Start date Start date
  • Tags Tags
    Coupled Ode Pde
thereisnospoo
Messages
5
Reaction score
0
I am trying to solve an ODE and PDE and I am having problems coming up with a method for doing so.

The PDE is:

k1*(dC/dt) = k2*(dC/dx)

But I have an ODE that is an expression for dC/dt:

dC/dt = k3*C

Where k1,k2 and k3 are constants.

I planned to use the method of lines to get a solution where C changes with t and x. However, I am having problems dealing with the dC/dt ODE expression. I can use method of lines only on the 1st equation, but that would not take the relationship of the second equation into consideration. If I plug the ODE equation into the PDE, then I will lose the "time" variable.

Anyone have any suggestions or tips?
 
Physics news on Phys.org
The ODE looks like a separable equation. Can't you use its solution and substitute into the first equation?
 
I'm assuming for your PDE you mean both as partial derivatives and for the ODE you mean total derivative?

In which case (writing D for total derivative and d for partial),

the ODE gives you: DC/Dt = dC/dt + [dC/dx][dx/dt]

Further, you know dC/dx in terms of dC/dt from the PDE, and you can plug that into get:

[1 + k1/k2][dC/dt] = k3*C

and this is a PDE you can solve :)

(Also, there's the special case when k2 is zero!)
 
Marioeden said:
I'm assuming for your PDE you mean both as partial derivatives and for the ODE you mean total derivative?

In which case (writing D for total derivative and d for partial),

the ODE gives you: DC/Dt = dC/dt + [dC/dx][dx/dt]

Further, you know dC/dx in terms of dC/dt from the PDE, and you can plug that into get:

[1 + k1/k2][dC/dt] = k3*C

and this is a PDE you can solve :)

(Also, there's the special case when k2 is zero!)

Thanks for the reply!

I actually meant that the 2nd equation is a partial derivative as well, which is why I think I'm running into my problem. do you have any insight into what I can do next?
 
thereisnospoo said:
Thanks for the reply!

I actually meant that the 2nd equation is a partial derivative as well, which is why I think I'm running into my problem. do you have any insight into what I can do next?

Oh, if the second one is partial as well then substitute it into the first one.

So assuming k2 is non-zero, you have dC/dx = [k1*k3/k2]*C

The solution to this is the standard exponential as in the ODE case, only your constant is now a function of time.

Then just plug this back into the original equations to check for consistency
 
There seems to be some confusion with ODE and PDE. Are you trying to solve for C? If you just plug the second eqn. one into the first you won't get the most general solution.

If so, since you are taking the partial against x and t you can assume the function is C(x,t).
Which case gives this relation:

dC = \frac{∂C}{∂x}dx + \frac{∂C}{∂t}dt

Now, you can plug in those two equations, and solve like an ODE to get the answer. And when you integrate don't forget a constant!
 
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...

Similar threads

Back
Top