Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to solve coupled ODEs and PDEs(2ode+2pde) with NDSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82998] Re: How to solve coupled ODEs and PDEs(2ode+2pde) with NDSolve
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 6 Nov 2007 03:47:00 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <fgk93u$p9c$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

if you have
NDSolve[
  {f'[t] == t,
   Derivative[0, 1][u][x, t] == Derivative[2, 0][u][x, t] + f[t],
   u[x, 0] == x*(1 - x), u[0, t] == 0, u[1, t] == 0,
   f[0] == 1/2}, {u[x, t], f[x, t]}, {x, 0, 1}, {t, 0, 2}]

let simpliy depend f[t] on x too, i.e, f[x,t] and write:

NDSolve[
  {Derivative[0, 1][f][x, t] == t,
   Derivative[0, 1][u][x, t] == Derivative[2, 0][u][x, t] + f[x, t],
   u[x, 0] == x*(1 - x), u[0, t] == 0, u[1, t] == 0,
   f[x, 0] == 1/2}, {u[x, t], f[x, t]}, {x, 0, 1}, {t, 0, 2}]

Regards
   Jens


Santhosh wrote:
> hi all
> I am relatively new to mathematica. I have 2 odes and 2 pdes. When I tried to
> solve them with NDSolve I got following error.
> 
> The length of the derivator operator Derivative[1] in xf'[t] is not same as
> number of arguments.
> 
> I know the meaning of error. but in my system xf depends on t only.
> any idea from anyone
> 
> thanks in advance
> 
> 


  • Prev by Date: Re: Reproducing a hash code
  • Next by Date: Crash with simple plot command
  • Previous by thread: How to solve coupled ODEs and PDEs(2ode+2pde) with NDSolve
  • Next by thread: Size of graphic