# How do i combine ODEs and PDEs?

Posted 10 years ago
2875 Views
|
4 Replies
|
1 Total Likes
|
 Hey everyone,im trying to integrate the system of equations which is attached.There are several issues. First of all, if i put it in, as it stands it says "more input needed". Does it mean, there are too few initial or boundary conditions?If i take away the integral he sais, it is no ODE, which is true, but it should be supposed to deal with both, doesnt it? Finally it doesnt like my boundary condition:c[t, 0] == $Nu] c[t, 2 \[Pi]]It is supposed to mimic the increase of c after going through a full period.Is there any way to get this with this function or do i have to take another option?Lufu Attachments: 4 Replies Sort By: Posted 10 years ago  Well it got no problems with the ordinary pbc:c[t,0]==c[t,2pi],Maybe its the discontinouity thatc[t,0]==4 c[t,2pi] causes? Posted 10 years ago  You're now solving a PDE.NDSolve uses the method of Lines to solve PDEs:https://reference.wolfram.com/mathematica/tutorial/NDSolvePDE.htmlhttp://www.scholarpedia.org/article/Method_of_linesPeriodic boundary conditions? I'm not sure what to do about that. If you look online about the method of lines and periodic boundary conditions, there's some articles and one specifically about Mathematica. The article addresses Dirichlet boundary conditions. Posted 10 years ago  I see. Indeed i used Ctrl + ^ instead of Ctrl + % for the upper bound in the integral, which i changed now.Now it says " Input is not an ODE ", which is probably cause by the integral. From a physical point of view i dont think i can just differentiate to get rid of it.But i'll think about that. Thanks so long.Edit: But that error even stays, when i replace the integral by 1, so probably it isnt just because of the Integral.Edit 2: Ok, i think i got that too. It seems like even though n is only a function of t, one has to declare it as a function of t and theta to get mathematica solving it. It even accept the integral. Only issue that is unsolved is my boundary condition. Mathematica says:"Boundary condition c[t,0]==4.\ c[t,2\$ is not specified on a single edge of the boundary of the computational domain."Which i dont understand, because it is specified on both edges of the boundary like a periodic boundary condition.
Posted 10 years ago
 If it says, "More Input Needed", then that is an actual programming syntax error. Using fancy, Traditional notation hides things. Sometimes it hides things that mess with the syntax. My suggestion is to to use InputForm to convert your code to InputForm and then see what you actually have. Espcially try to run InputForm on the first argument to NDSolve, the list containing the equations. If this doesn't reveal the problem, make a version of the NDSolve statement using InputForm  and copy it here in the forum. That will help people take a look at the problem. Not to get ahead of the actual problem, but I noticed your system of equations has an integral in it. NDSolve can be used to solve evolution equations. This rules out things like elliptic differential equations, integral equations, or in your case the integral you have there which needs a solution for the integrand in order to be evaluated. If the problem can be expressed without the integral by differentiating that equation, I would do this as well.