Re: system of nonlinear ODE
- To: mathgroup at smc.vnet.net
- Subject: [mg23790] Re: system of nonlinear ODE
- From: Brian Higgins <bghiggins at ucdavis.edu>
- Date: Sat, 10 Jun 2000 02:59:39 -0400 (EDT)
- References: <8gv85p$5mt@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
It is not clear from your question whether the problem is mathematically correct. As others have pointed out on this news group your problem is certainly not consistent with Mathematica notation. Nevertheless it appears that you are trying to solve the similarity solution for natural convection, where f(x) is realted to the stream function and z(x) is the temperature of the fluid, while x is the similarity variable.The parameter Fr would then be the Prandtl number. In the code below I illustrate how one can solve the free convection problem for the classical boundary layer flow near a vertical wall that is heated. Further details and an example solution can be found at http://www.bgh.ucdavis.edu/brian/convection/freeconvection.html Here is the code: ODE[G1_, G2_, Pr_] := {f'''[x] + 3 f[x] f''[x] - 2 f'[x]^2 + z[x] == 0, z''[x] + 3Pr\f[x] z'[x] == 0, z[0] == 1, z'[0] == G1, f'[0] == 0, f[0] == 0, f''[0] == G2} myODESol[G1_, G2_, Pr_] := NDSolve[ODE[G1, G2, Pr], {f, z}, {x, 0, 20}] fend[G1_, G2_, Pr_] := ({f'[20], z[20]} /. myODESol[G1, G2, Pr]) BC[Pr_] := Flatten[FindRoot[First[fend[G1, G2, Pr]] == 0, {G1, -.7, -.3}, {G2, .5, 1}, MaxIterations -> 100, DampingFactor -> 1]] myPlot[Pr_] := Plot[Evaluate[{f[x], f'[x], z[x]} /. myODESol[G1 /. BC[Pr], G2 /. BC[Pr], Pr]], {x, 0, 20}, PlotStyle -> {RGBColor[0, 0, 1], RGBColor[0, 1, 0], RGBColor[1, 0, 0]}, PlotRange -> All]; myPlot[.1] See the web page for the plot. Hope this helps. Brian Sent via Deja.com http://www.deja.com/ Before you buy.