MathGroup Archive 2008

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

Search the Archive

NDSolve of a 3rd Order Nonlinear equation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85942] NDSolve of a 3rd Order Nonlinear equation
  • From: david.breslauer at gmail.com
  • Date: Thu, 28 Feb 2008 02:51:38 -0500 (EST)

Hey all--

I'm extremely new to Mathematica, but an desperately trying to
numerically solve a 3rd order, non linear differential equation:

(h[x]/hf)^3*h'''[x] == (1 - (h[x]/hf)^3)*ohmegasqr*hf/w - s'''[x]
h[x1] == h[x2] == hf, h'[x1] == 0

x1, x2, hf, ohmegasqr, and w are defined values.
s[x] is a defined function.

Unfortunately, I keep getting a "Infinite expression 1/0.^3
encountered." and then "NDSolve::ndnum: Encountered non-numerical
value for a derivative at x == -0.0508. >>" error.

I've traced the problem to the initial (h[x]/hf)^3 term, but don't
really know how to fix it.

Any ideas? I've pasted the content of the notebook below, and the
actual Notebook file below that.

Thanks,
David
---



(* hf=film thickness.Likely,thickness of SU8*)

hf = 4*10^-6;(* meters *)

(* w=width/length of feature along spinning direction (+x). Likely, \
length of funnel *)
w = 100*10^-6;(* meters *)

(* ro=radial position of feature on wafer *)

ro = 2.5*10^-2;(* meters *)

(* rf=radius of wafer,for normalization of x for fcn s *)

rf = 0.0508;(* meters *)

(* precision for step *)
xstep = 0.001;

(* d=feature step height *)
d = 1.05*10^-6;

(* solving bounds *)
x1 = -rf;
x2 = rf;

s[x_] := -d/\[Pi] (ArcTan[(x/w - 1/2)/xstep] +
     ArcTan[(-(x/w) - 1/2)/xstep]);
Plot[s[x], {x, -w, w}, PlotRange -> {0, hf}, AxesLabel -> {"x", "s"}]


(* rot=rotational speed. Likely,SU8 spinning speed *)
rot = (2 \[Pi])/
  60*4100;(* radians/second *)

(* rho=fluid density.Density *)
rho = 1000;(* kg/m^3 *)

(* gamma=surface tension of fluid *)
gamma = 0.03;(* N/m *)

ohmegasqr = (rho*w^3*rot^2*ro)/(hf*gamma)
solution =
  NDSolve[{(h[x]/hf)^3*h'''[x] == (1 - (h[x]/hf)^3)*ohmegasqr*hf/w -
      s'''[x], h[x1] == h[x2] == hf, h'[x1] == 0}, h, {x, x1, x2}];
Plot[h[x] /. solution, {x, x1, x2}]





----

(* Content-type: application/mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 6.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       145,          7]
NotebookDataLength[      9811,        259]
NotebookOptionsPosition[      9564,        246]
NotebookOutlinePosition[      9899,        261]
CellTagsIndexPosition[      9856,        258]
WindowFrame->Normal
ContainsDynamic->False*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[
 RowBox[{
  RowBox[{"(*", " ",
   RowBox[{
    RowBox[{"hf", "=",
     RowBox[{"film", " ",
      RowBox[{"thickness", ".", "Likely"}]}]}], ",",
    RowBox[{"thickness", " ", "of", " ", "SU8"}]}], "*)"}], "\n",
  RowBox[{
   RowBox[{
    RowBox[{"hf", "=",
     RowBox[{"4", "*",
      SuperscriptBox["10",
       RowBox[{"-", "6"}]]}]}], ";"}],
   RowBox[{"(*", " ", "meters", " ", "*)"}], "\[IndentingNewLine]",
"\n",
   RowBox[{"(*", " ",
    RowBox[{
     RowBox[{"w", "=",
      RowBox[{
       RowBox[{"width", "/", "length"}], " ", "of", " ", "feature", "
",
       "along", " ", "spinning", " ", "direction", " ",
       RowBox[{
        RowBox[{"(",
         RowBox[{"+", "x"}], ")"}], ".", " ", "Likely"}]}]}], ",", "
",
     RowBox[{"length", " ", "of", " ", "funnel"}]}], " ", "*)"}],
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"w", "=",
     RowBox[{"100", "*",
      SuperscriptBox["10",
       RowBox[{"-", "6"}]]}]}], ";"}],
   RowBox[{"(*", " ", "meters", " ", "*)"}], "\n", "\
[IndentingNewLine]",
   RowBox[{"(*", " ",
    RowBox[{"ro", "=",
     RowBox[{
     "radial", " ", "position", " ", "of", " ", "feature", " ", "on",
" ",
      "wafer"}]}], " ", "*)"}], "\n",
   RowBox[{
    RowBox[{"ro", "=",
     RowBox[{"2.5", "*",
      SuperscriptBox["10",
       RowBox[{"-", "2"}]]}]}], ";"}],
   RowBox[{"(*", " ", "meters", " ", "*)"}], "\[IndentingNewLine]",
"\n",
   RowBox[{"(*", " ",
    RowBox[{
     RowBox[{"rf", "=",
      RowBox[{"radius", " ", "of", " ", "wafer"}]}], ",",
     RowBox[{
     "for", " ", "normalization", " ", "of", " ", "x", " ", "for", "
", "fcn",
       " ", "s"}]}], " ", "*)"}], "\n",
   RowBox[{
    RowBox[{"rf", "=", "0.0508"}], ";"}],
   RowBox[{"(*", " ", "meters", " ", "*)"}], "\n", "\n",
   RowBox[{"(*", " ",
    RowBox[{"precision", " ", "for", " ", "step"}], " ", "*)"}],
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"xstep", "=", "0.001"}], ";"}], "\n", "\
[IndentingNewLine]",
   RowBox[{"(*", " ",
    RowBox[{"d", "=",
     RowBox[{"feature", " ", "step", " ", "height"}]}], " ", "*)"}],
"\n",
   RowBox[{
    RowBox[{"d", "=",
     RowBox[{"1.05", "*",
      SuperscriptBox["10",
       RowBox[{"-", "6"}]]}]}], ";"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{"(*", " ",
    RowBox[{"solving", " ", "bounds"}], " ", "*)"}], "\n",
   RowBox[{
    RowBox[{"x1", " ", "=", " ",
     RowBox[{"-", "rf"}]}], ";"}], "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"x2", " ", "=", " ", "rf"}], ";"}], "\
[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{
     RowBox[{"s", "[", "x_", "]"}], ":=",
     RowBox[{
      FractionBox[
       RowBox[{"-", "d"}], "\[Pi]"],
      RowBox[{"(",
       RowBox[{
        RowBox[{"ArcTan", "[",
         FractionBox[
          RowBox[{"(",
           RowBox[{
            FractionBox["x", "w"], "-",
            FractionBox["1", "2"]}], ")"}], "xstep"], "]"}], "+",
        RowBox[{"ArcTan", "[",
         FractionBox[
          RowBox[{"(",
           RowBox[{
            RowBox[{"-",
             FractionBox["x", "w"]}], "-",
            FractionBox["1", "2"]}], ")"}], "xstep"], "]"}]}],
")"}]}]}],
    ";"}], "\[IndentingNewLine]",
   RowBox[{"Plot", "[",
    RowBox[{
     RowBox[{"s", "[", "x", "]"}], ",",
     RowBox[{"{",
      RowBox[{"x", ",",
       RowBox[{"-", "w"}], ",", "w"}], "}"}], ",",
     RowBox[{"PlotRange", "\[Rule]",
      RowBox[{"{",
       RowBox[{"0", ",", "hf"}], "}"}]}], ",",
     RowBox[{"AxesLabel", "\[Rule]",
      RowBox[{"{",
       RowBox[{"\"\<x\>\"", ",", "\"\<s\>\""}], "}"}]}]}], "]"}],
   "\[IndentingNewLine]", "\n", "\[IndentingNewLine]",
   RowBox[{"(*", " ",
    RowBox[{
     RowBox[{"rot", "=",
      RowBox[{"rotational", " ",
       RowBox[{"speed", ".", " ", "Likely"}]}]}], ",",
     RowBox[{"SU8", " ", "spinning", " ", "speed"}]}], " ", "*)"}],
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"rot", "=",
     RowBox[{
      FractionBox[
       RowBox[{"2", "\[Pi]"}], "60"], "*", "4100"}]}], ";",
    RowBox[{"(*", " ",
     RowBox[{"radians", "/", "second"}], " ", "*)"}], "\n", "\n",
    RowBox[{"(*", " ",
     RowBox[{"rho", "=",
      RowBox[{"fluid", " ",
       RowBox[{"density", ".", "Density"}]}]}], " ", "*)"}],
    "\[IndentingNewLine]",
    RowBox[{"rho", "=", "1000"}], ";",
    RowBox[{"(*", " ",
     RowBox[{"kg", "/",
      RowBox[{"m", "^", "3"}]}], " ", "*)"}], "\n", "\n",
    RowBox[{"(*", " ",
     RowBox[{"gamma", "=",
      RowBox[{"surface", " ", "tension", " ", "of", " ", "fluid"}]}],
" ",
     "*)"}], "\[IndentingNewLine]",
    RowBox[{"gamma", "=", "0.03"}], ";",
    RowBox[{"(*", " ",
     RowBox[{"N", "/", "m"}], " ", "*)"}], "\[IndentingNewLine]",
    "\[IndentingNewLine]",
    RowBox[{"ohmegasqr", "=",
     FractionBox[
      RowBox[{"rho", "*",
       SuperscriptBox["w", "3"], "*",
       SuperscriptBox["rot", "2"], "*", "ro"}],
      RowBox[{"hf", "*", "gamma"}]]}]}], "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"solution", " ", "=",
     RowBox[{"NDSolve", "[",
      RowBox[{
       RowBox[{"{",
        RowBox[{
         RowBox[{
          RowBox[{
           SuperscriptBox[
            RowBox[{"(",
             FractionBox[
              RowBox[{"h", "[", "x", "]"}], "hf"], ")"}], "3"], "*",
           RowBox[{
            RowBox[{"h", "'''"}], "[", "x", "]"}]}], "\[Equal]",
          RowBox[{
           RowBox[{
            RowBox[{"(",
             RowBox[{"1", "-",
              SuperscriptBox[
               RowBox[{"(",
                FractionBox[
                 RowBox[{"h", "[", "x", "]"}], "hf"], ")"}], "3"]}],
")"}],
            "*", "ohmegasqr", "*",
            FractionBox["hf", "w"]}], "-",
           RowBox[{
            RowBox[{"s", "'''"}], "[", "x", "]"}]}]}], ",",
         RowBox[{
          RowBox[{"h", "[", "x1", "]"}], "\[Equal]",
          RowBox[{"h", "[", "x2", "]"}], "==", "hf"}], ",",
         RowBox[{
          RowBox[{
           RowBox[{"h", "'"}], "[", "x1", "]"}], "\[Equal]", "0"}]}],
"}"}],
       ",", "h", ",",
       RowBox[{"{",
        RowBox[{"x", ",", "x1", ",", "x2"}], "}"}]}], "]"}]}], ";"}],
   "\[IndentingNewLine]",
   RowBox[{"Plot", "[",
    RowBox[{
     RowBox[{
      RowBox[{"h", "[", "x", "]"}], "/.", "solution"}], ",",
     RowBox[{"{",
      RowBox[{"x", ",", "x1", ",", "x2"}], "}"}]}], "]"}],
   "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{
  3.413111430927577*^9, {3.4131115373881207`*^9,
3.413111666237986*^9}, {
   3.413111726935742*^9, 3.413111840075963*^9},
{3.413111887010826*^9,
   3.4131119092610703`*^9}, {3.4131119714608307`*^9,
3.413111971748232*^9}, {
   3.413112046539139*^9, 3.413112102719515*^9}, {3.4131121733772*^9,
   3.4131123597867413`*^9}, {3.413112400416985*^9,
3.413112410218919*^9}, {
   3.413112453929551*^9, 3.413112465297611*^9},
{3.413112710892577*^9,
   3.413112899381797*^9}, {3.413112946916642*^9,
3.4131129658870277`*^9}, {
   3.4131130083127003`*^9, 3.413113237415053*^9},
{3.413113292176826*^9,
   3.4131133110063562`*^9}, {3.413113363615012*^9,
3.41311337520851*^9}, {
   3.413113497026219*^9, 3.413113512331257*^9},
{3.413113644184579*^9,
   3.413113650163204*^9}, {3.413113705184865*^9,
3.413113739659149*^9}, {
   3.413113787270136*^9, 3.4131138327395487`*^9},
{3.4131139375450974`*^9,
   3.413113981999775*^9}, 3.4131140168228292`*^9,
{3.413114053449093*^9,
   3.413114054388459*^9}, {3.413114254952673*^9, 3.41311431278682*^9},
{
   3.413114432900443*^9, 3.413114440811491*^9},
{3.4131144827067957`*^9,
   3.4131144908759727`*^9}, {3.413114542574057*^9,
3.413114543058976*^9}, {
   3.413114621849752*^9, 3.413114644727951*^9},
{3.4131147254059563`*^9,
   3.413114730205886*^9}, {3.413114771616315*^9,
3.4131147746457453`*^9}, {
   3.413125436154814*^9, 3.413125479168673*^9},
{3.413125578877687*^9,
   3.41312559656024*^9}, {3.413125800269329*^9, 3.413125840812818*^9},
{
   3.413125912006034*^9, 3.4131259521773653`*^9},
{3.4131259965893717`*^9,
   3.4131260082581587`*^9}, {3.41312608880905*^9,
3.413126131536799*^9}, {
   3.413126509426512*^9, 3.413126525384309*^9},
{3.4131266902347593`*^9,
   3.413126725333584*^9}, {3.4131267657553463`*^9,
3.413126766816489*^9}, {
   3.4131269095066757`*^9, 3.413126910430483*^9},
{3.4131269529771442`*^9,
   3.413126986186933*^9}, {3.413127060814258*^9,
3.4131271285331383`*^9}, {
   3.413127177228231*^9, 3.413127197233301*^9},
{3.4131272464956093`*^9,
   3.41312725325977*^9}, {3.413127291470043*^9, 3.413127331901906*^9},
{
   3.413127372028913*^9, 3.4131274594266853`*^9},
{3.413127495978286*^9,
   3.413127503296323*^9}, {3.413127732756802*^9,
3.413127863964082*^9}, {
   3.413129926444252*^9, 3.413130011417639*^9},
{3.4131316497119637`*^9,
   3.413131668619741*^9}, {3.4131317199983807`*^9,
3.4131317267565603`*^9}, {
   3.413131830293474*^9, 3.413131830827696*^9}, 3.413131985466963*^9}]
},
WindowSize->{1068, 853},
WindowMargins->{{6, Automatic}, {Automatic, 0}},
FrontEndVersion->"6.0 for Mac OS X x86 (32-bit) (June 19, 2007)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[568, 21, 8992, 223, 730, "Input"]
}
]
*)

(* End of internal cache information *)



  • Prev by Date: Re: Finding a continuous solution of a cubic
  • Next by Date: Re: Finding a continuous solution of a cubic
  • Previous by thread: option to fix the speed of exported avi file
  • Next by thread: Re: NDSolve of a 3rd Order Nonlinear equation