Re: Numerical solution of coupled nonlinear PDEs
- To: mathgroup at smc.vnet.net
- Subject: [mg112124] Re: Numerical solution of coupled nonlinear PDEs
- From: Oliver Ruebenkoenig <ruebenko at wolfram.com>
- Date: Tue, 31 Aug 2010 04:18:17 -0400 (EDT)
On Mon, 30 Aug 2010, Dominic wrote: > Hi guys, > > For the functions a(t,y), b(t,y), and x(t,y),I have the PDE system: > > a'=a''+a x''+x'a' > > b'=b''-bx''-x'b' > > x''=b-a > > Sorry I can't show the system more clearly here but on the left side the > partial is respect to t for a and b and it's with respect to y for the > x(t,y), and on the right, all partials are with respect to y, > > and I'd like to obtain a numerical solution for any simple IBVP using > NDSolve, for example in the domain 0<t<1 and 0<y<1 with all initial > conditions set to y This is the code I'm using: > > mysol = NDSolve[{D[a[t, y], t] == > D[a[t, y], {y, 2}] + a[t, y] D[x[t, y], {y, 2}] + > D[x[t, y], y] D[a[t, y], y] > , > D[b[t, y], t] == > D[b[t, y], {y, 2}] - b[t, y] D[x[t, y], {y, 2}] - > D[x[t, y], y] D[b[t, y], y] > , > D[x[t, y], {y, 2}] == b[t, y] - a[t, y] > , > a[0, y] == y, a[t, 0] == 0, a[t, 1] == 1, > > b[0, y] == y, b[t, 0] == 0, b[t, 1] == 1, > > x[0, y] == y, x[t, 0] == 0, x[t, 1] == 1}, > > {a, b, x}, {t, 0, 1}, {y, 0, 1}, MaxSteps -> 10000] > > However, I receive boundary-value errors and singular errors. > > Can someone help me set up this system in any way for any reasonable > domain with any reasonable initial and bondary values to obtain a > non-trivial solution? > > Thanks guys, > > Dominic > Dominic, eqn = { D[a[t, y], t] == D[a[t, y], {y, 2}] + a[t, y] D[x[t, y], {y, 2}] + D[x[t, y], y] D[a[t, y], y], D[b[t, y], t] == D[b[t, y], {y, 2}] - b[t, y] D[x[t, y], {y, 2}] - D[x[t, y], y] D[b[t, y], y], D[D[x[t, y], {y, 2}] == b[t, y] - a[t, y], t]} mysol = NDSolve[{{eqn}, a[0, y] == y, a[t, 0] == 0, a[t, 1] == 1, b[0, y] == y, b[t, 0] == 0, b[t, 1] == 1, x[t, 0] == 0, x[t, 1] == 1, x[0, y] == y}, {a[t, y], b[t, y], x[t, y]}, {t, 0, 1}, {y, 0, 1}, Method -> {"MethodOfLines", "TemporalVariable" -> t}] does this help? Note that the x has been differentiated with respect to t - you need to set appropriate initial conditions. Oliver