(i accidentally posted this on sci.math.symbolic. sorry for dupes.)

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}, {

…

read more »