Author |
Message |
Richard Garner (richardgarner)
New member Username: richardgarner
Post Number: 1 Registered: 02-2009
| Posted on Wednesday, August 26, 2009 - 12:03 pm: | |
My question involves solving two coupled equations where one is a time dependent, 1 spatial dimension PDE and the other is simply an ODE in time. Of course, my question could involve a system where there are more than one PDE and more than one ODE. And of course the PDE’s could be 2d or 3d. But, let’s just keep it simple: one 1d PDE and one ODE in time. I could be more specific about the problem, but at this point possibly there is a suggestion as to how best to handle such a situation without going into too much detail. Call the dependent variable of the PDE ‘u(x,t)’ and the dependent variable of the ODE ‘y(t)’. The PDE has a term with y(t) in it and the ODE has a term which is a function of the volume integral of u(x,t) (i.e., a term of the form vol_integral(f(u(x,t)*dx) ). My question is how best to solve this (if, in fact, it could be done, which I presume is the case). I realize that if I specify both u and y as the variables in FlexPDE, then y(t) will really be defined over all mesh points, even though it is not really a function of space. But the equation for y(t) will not involve space. FlexPDE may have a problem with that?? I am familiar with the discussion in the user manual under the section titled “Smoothing Operators in PDE’s.” In the spirit of that discussion, would it be best to consider both u and y variables and then, in the y ODE, add a dummy spatial term in the form of Laplacian which damps on a sufficiently fast temporal scale? Or could one handle the ODE as a constraint? However, I don’t think I can write the ODE in the form integral(u(x,t)*dx) = g(t) where g(t) is some (specified) function. The ODE has a form like the following: R(t)*dy/dt + y*dR/dt = V(t), where the function R(t) is the aforementioned volume integral of u, and V(t) is specified. Of course, y(t) is not known, since it is really a solution to this ODE coupled with the PDE. Therefore, I’m not sure how to specify such a thing as a constraint to the PDE. Thank you for your attention and any help you can offer.
|
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 1288 Registered: 06-2003
| Posted on Wednesday, August 26, 2009 - 02:12 pm: | |
The GLOBAL VARIABLE facility is designed to solve this kind of problem. Declare "y" to be a GLOBAL VARIABLE and provide it with an equation that does not involve spatially-dependent quantities. You can use Integrals in the "y" equation. (It might be best not to use a name that collides with a default spatial coordinate.) See "GLOBAL VARIABLES" in the Help Index.
|
Richard Garner (richardgarner)
New member Username: richardgarner
Post Number: 2 Registered: 02-2009
| Posted on Wednesday, August 26, 2009 - 03:15 pm: | |
Thank you very much!! Works extremely well. I must have read the entire manual, plus the various Backstrom books, "umpteen" times, and I think I have come across this before. But, if you don't use it, you lose it. Thanks for your excellent responses to many of the questions posted. |
|