Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #13850 > unrolled thread
| Started by | Alexei Boulbitch <Alexei.Boulbitch@iee.lu> |
|---|---|
| First post | 2013-03-15 05:46 +0000 |
| Last post | 2013-04-02 07:25 +0000 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: NDSolve PDE problem Alexei Boulbitch <Alexei.Boulbitch@iee.lu> - 2013-03-15 05:46 +0000
Re: NDSolve PDE problem debguy <johnandsara2@cox.net> - 2013-04-01 04:57 +0000
Re: NDSolve PDE problem debguy <johnandsara2@cox.net> - 2013-04-02 07:25 +0000
| From | Alexei Boulbitch <Alexei.Boulbitch@iee.lu> |
|---|---|
| Date | 2013-03-15 05:46 +0000 |
| Subject | Re: NDSolve PDE problem |
| Message-ID | <khucio$83$1@smc.vnet.net> |
Hello All,
I am having a problem using NDSolve. I get the error:
"NDSolve::ivone: Boundary values may only be specified for one independent
variable. Initial values may only be specified at one value of the other in dependent variable."
The input is the following (I marked different entries with new lines for readability):
NDSolve[
{
1+10 DiracDelta[t] DiracDelta[-10+z]+10 DiracDelta[-5+z]==-10 (x^(0,2))[t,z]+(1+10 DiracDelta[-5+z]) (x^(2,0))[t,z],
x[0,z]==1/20 ((40-z) z+20 (z+(5-z) HeavisideTheta[-5+z])),
x[t,0]==0
}
,x[t,z],
{t,0,Sqrt[10]},
{z,0,10}
]
Essentially I have a second order PDE for x[t,z], and I define x[t=0,z] and x[t,z=0]. As far as I understand this is sufficient to solve this equation, or do I need more boundaries? Is my syntax wrong?
Best,
Ilya
Hi, Ilia,
I confirm the unreasonable message of Mathematica reported by Ilia. First, there is no discrepancy between the initial and the boundary conditions, and they are given according to the NDSolve rules.
I also checked, if Mathematica did not got "scared" by all DiracDeltas and HeavisideTheta functions. To this end I replaced these functions by more trivial ones that in no case may cause Mathematica problems:
Clear[x, z, t];
eq1 = 1 + 10 Exp[-t^2] Exp[-(-10 + z)^2] +
10 Exp[-(-5 + z)^2] == -10*\!\(
\*SubscriptBox[\(\[PartialD]\), \({z, 2}\)]\ \(x[t, z]\)\) + (1 +
10 Exp[-(-5 + z)^2])*\!\(
\*SubscriptBox[\(\[PartialD]\), \({t, 2}\)]\ \(x[t, z]\)\);
eq2 = x[0, z] == z;
eq3 = x[t, 0] == 0;
NDSolve[{eq1, eq2 , eq3}, x[t, z], {t, 0, Sqrt[10]}, {z, 0, 10}]
In this case, however, like in the original case reported by Ilia the equation is not solved and the message
reads:
NDSolve::ivone: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable
Is it a bug?
Alexei
Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG
Office phone : +352-2454-2566
Office fax: +352-2454-3566
mobile phone: +49 151 52 40 66 44
e-mail: alexei.boulbitch@iee.lu
[toc] | [next] | [standalone]
| From | debguy <johnandsara2@cox.net> |
|---|---|
| Date | 2013-04-01 04:57 +0000 |
| Message-ID | <kjb445$8k6$1@smc.vnet.net> |
| In reply to | #13850 |
I'm not convicned it's a bug. It appears to me your begging the allowable usage (see below). You need to arrange your work so it is in one of the many forms Mathematica allows is my guess. I see no reason you can't. "Essentially I have a second order PDE for x[t,z], and I define x[t=0,z] and x[t,z=0]" You define what? x[t=0,z] isn't a proper definition. And I doubt the nds algorithm is made to check your function at every value to see whether a new independant variables results and changes (everything). >From the excerpt I left below I assume Mathematica doesn't like f(u,v) because it thinks both u, v are both differenciable at once: which isn't allowed (in Mathematica v4). Maybe you can find a way to re-express your list of eq'n so Mathematica knows what you know. or bundle it. Seems like a "divide and conquer" strategy should work with DiracDelta it just alternates right? Anyhow it seems you have a x[t,z] term outside of DiracDelta which is documented to work with diffeq so shouldn't be the problem. I'm haven't bench checked and found a sol'n for you (sorry). so I dont' know. But from your definition it seems you may be able to use DiracDelta to not NOT use f(u,v) I think the below book excerpt applies: -------------------------------------------------------------- NDSolve uses a method for solving PDE's that is called the ~ For the method to work, an initial function must be specified for one variable and boundary values may be specified for the other variable. The initial function is used to find the initial conditions for the system of the ODE's. Boundary and initial values may be specified on at most three sides of a rectangle. ~
[toc] | [prev] | [next] | [standalone]
| From | debguy <johnandsara2@cox.net> |
|---|---|
| Date | 2013-04-02 07:25 +0000 |
| Message-ID | <kje14k$gv2$1@smc.vnet.net> |
| In reply to | #13995 |
I think I even confused myself with my reply. Let me just say: check usage of ",x[t,z]," where and how used as differently from the book's examples. There's an example in the book allot like what you posted.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web