Re: NDSolve with Boundary Condition
- To: mathgroup at smc.vnet.net
- Subject: [mg107780] Re: NDSolve with Boundary Condition
- From: marjan <marjan84 at gmail.com>
- Date: Thu, 25 Feb 2010 17:38:04 -0500 (EST)
- References: <201002231303.IAA16128@smc.vnet.net> <hm31vk$m5p$1@smc.vnet.net>
Dear Patrick, Thanks for your mail, the comment was useful. another thing is that if I solve this equation in one dimension with the real value of boundary conditions, after finding the best value for Precisions : ss = NDSolve[{D[Y[z], z, z] + 10^12 Sin[Y[z]] Cos[Y[z]] == 0, (D[Y[z], z] /. z -> 0) == 2*10^6, (D[Y[z], z] /. z -> 7*10^-6) == 2*10^6}, Y[z], {z, 0, 7*10^-6}, WorkingPrecision -> 12, PrecisionGoal -> 7, Method -> {"ExplicitRungeKutta", "DifferenceOrder" -> 7}, InterpolationOrder -> All] It gives this error NDSolve::berr: There are significant errors {-796330.005638,-795426.001883} in the boundary value residuals. Returning the best solution found {{Y[z] ->InterpolatingFunction[{{0,7.00000000000=D710^-6 }},<>][z]}} should I be worried about this error or this is at least the best approximation solution that is given? Regards Marjan On Feb 24, 12:19 pm, Patrick Scheibe <psche... at trm.uni-leipzig.de> wrote: > Hi, > > check > > D[f[x, y], x] // InputForm > > which gives > > Derivative[1, 0][f][x, y] > > Therefore, you can use something like > > Derivative[1, 0][f][0, y] == blub > > to give the values at the 0-boundary. If you want a working sample, read > the NDSolve documentation carefully. > > Cheers > Patrick > > On Tue, 2010-02-23 at 08:03 -0500, marjan wrote: > > Dear MathGroup members, > > > Please help me with this: > > I am trying to solve an numerical equation: sol = NDSolve[{D[Y[z, t], > > z, z] + > > 10^12 Sin[Y[z, t]] Cos[Y[z, t]] == D[Y[z, t], t] > > with boundary conditions: d(Y[a, t])/dz = 2*10^6 and d(Y[b, t]= )/dz > > = 2*10^6 , but i don't know how to write the boundary condition in > > this equation. when I write it like D[Y[a, t], z] == 20*10^5, D[Y [= b, > > t], z] == 20*10^5 Mathematica gives this error > > > NDSolve::deqn: equation or list of equations expected instead of > > "false" in the first argument {D[Y[z, t], z, z] + > > 10^12 Sin[Y[z, t]] Cos[Y[z, t]] == D[Y[z, t], t] , False= ,False} > > > Thanks for your attention > > Marjan
- References:
- NDSolve with Boundary Condition
- From: marjan <marjan84@gmail.com>
- NDSolve with Boundary Condition