MathGroup Archive 2001

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

Search the Archive

Re: Using NDSolve for 2-variables function ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31131] Re: Using NDSolve for 2-variables function ?
  • From: Reza Malek-Madani <research at usna.edu>
  • Date: Fri, 12 Oct 2001 03:36:50 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Dear Florent:  NDSolve does not solve PDEs directly, but it is very
effective if you combine it with the spectral method or the method of
line.  NDSolve is primarily an ODE initial value solver.

You may want to look at Chapter 13 of my book "Advanced Engineering
Mathematics with Mathematica and MATLAB", 1998. It is an introduction on
how to use the characteristics method in Mathematica. In particular there
is a treatment of the Burgers equation there. If I understood your code
correctly, your f'[u] refers to the derivative of f[u] along
characteristics so your equation seems to be Burgers-like. I would be
happy to look at your quasilinear problem if you send me the
exact initial-boundary value problem.


Sincerely,

Reza Malek-Madani

-------------------------------------------------------------------------
Reza Malek-Madani               Director of Research
Research Office, MS 10m         Phone: 410-293-2504 (FAX -2507)
589 McNair Road                 DSN:      281-2504
U.S. Naval Academy              Nimitz Room 17 in ERC
Annapolis MD 21402-5031         Email: research at usna.edu

--------------------------------------------------------------------------


On Wed, 10 Oct 2001, Florent Saulnier wrote:

> Dear MathGroup,
> I'm trying to solve a quasi-linear PDE using the method of characteristics.
> For this, I need to calculate a function - for instance f[r_,t_] - by
> NDSolve (I simplified the equation for clarity) and then use it again in
> another differential equation :
>
> Input[1]
> f[r_,t_]=f[r]/.NDSolve[{f'[u]+u*f[u]==0,f[Sqrt[t]]==t^2},f,{u,Sqrt[t],10^9}]
> [[1]][[1]]
>
> ... gives the following error messages :
>          NDSolve::ndnl : Endpoint Sqrt[t] in {u,Sqrt[t],1000000000} is not
> a real number
>          ReplaceAll::reps : {uf[u]+f'[u]==0} is neither a list of
> replacement rules nor a valid dispatch table, and so cannot be used for
> replacing.
> Output[1] Null (f[r]/.uf[u]+f'[u]==0)
>
> If I give the definition of f[r,t] with the sign :=, it gives me the
> correct result at any given point, with the correct boundary conditions :
>
> Input[1]
> f[r_,t_]:=f[r]/.NDSolve[{f'[u]+u*f[u]==0,f[Sqrt[t]]==t^2},f,{u,Sqrt[t],10^9}
> ][[1]][[1]]
> Out[1] Null^2
> Input[2] f[3,5]
> Out[2]  3.3834
> Input[3] f[2,4]
> Out[3]  16
>
> The main problem is that I need f[r,t] for a second equation, and of course
> its resolution cannot be achieved :
>
> Input[1] g[t_]=h[t]/.NDSolve[{h'[u]-f[h[u],u]==0,h[1]==1},h,{u,1,10}][[1]][[1]]
>
>          ...which gives the same error messages :
>          NDSolve::ndnl : Endpoint Sqrt[t] in {u,Sqrt[t],1000000000} is not
> a real number
>          ReplaceAll::reps : {uf[u]+f'[u]==0} is neither a list of
> replacement rules nor a valid dispatch table, and so cannot be used for
> replacing.
>
> Could you please help me about these problems ?
> Is there any other instructions or objects I could use for it ?
>          Thanks a lot !
>          Florent Saulnier
>
>



  • Prev by Date: RE: Newbie Plot-Fit Questions.
  • Next by Date: Solving simultaneous equations with inequalities
  • Previous by thread: Re: patterns
  • Next by thread: Re: Using NDSolve for 2-variables function ?