For some reason I can't see the actual drop on the website, I can only see the axes. Same thing happened when I downloaded the source code and tried it on my installed mathematica. So I wanted to know if this was just me or there is a problem in the code. And if there is a problem, how can i change it to show me the drop?
http://demonstrations.wolfram.com/ConfigurationOfASessileDrop/
and the source code is
Manipulate[
Module[
{RHS1, RHS2, sol, sol2, smax = 4, ODEs1, ODEs2, myfunc, myfunc2,
myfunc3, s, svalue, svalue2, svalue3, x, z, \[Theta], V, A, tics,
data},
RHS1[U__?NumberQ, s_] := Module[{v},
v = {U};
If[s >
0, (2 R0value + ( 9.8065^3/gammavalue) v[[2]] - Sin[v[[3]]]/
v[[1]]), R0value]
];
RHS2[U__?NumberQ, s_, R0_] := Module[{v},
v = {U};
If[s > 0,
(2 R0 + ( 9.8065^3/gammavalue) v[[2]] - Sin[v[[3]]]/v[[1]]), R0]
];
ODEs1 = {\[Theta]'[s] == RHS1[x[s], z[s], \[Theta][s], s],
z'[s] == Sin[\[Theta][s]], x'[s] == Cos[\[Theta][s]],
V'[s] == -\[Pi] x[s]^2 Sin[\[Theta][s]],
A'[s] == 2 \[Pi] x[s], \[Theta][0] == 0, z[0] == 0, x[0] == 0,
V[0] == 0, A[0] == 0};
ODEs2[R0_] := {\[Theta]'[s] == RHS2[x[s], z[s], \[Theta][s], s, R0],
z'[s] == Sin[\[Theta][s]], x'[s] == Cos[\[Theta][s]],
V'[s] == -\[Pi] x[s]^2 Sin[\[Theta][s]],
A'[s] == 2 \[Pi] x[s], \[Theta][0] == 0, z[0] == 0, x[0] == 0,
V[0] == 0, A[0] == 0};
sol = NDSolve[ODEs1, {\[Theta], z, x, V, A}, {s, 0, smax}];
sol2[R00_?NumericQ] :=
NDSolve[ODEs2[R00], {\[Theta], z, x, V, A}, {s, 0, smax}];
myfunc[s_?NumericQ] :=
First[\[Theta][s] /. sol] + \[Theta]end (\[Pi]/180);
myfunc2[s_?NumericQ] := First[\[Theta][s] /. sol] + 90 (\[Pi]/180);
myfunc3[s_?NumericQ, R00_?NumericQ] :=
First[\[Theta][s] /. sol2[R00]] + \[Theta]end (\[Pi]/180);
svalue = s /. FindRoot[myfunc[s] == 0, {s, 0, smax}];
data = Grid[{{Style["\nDrop Shape Parameters",
14]}, {Grid[{{"Volume (\!\(\*SuperscriptBox[\(cm\), \(3\)]\))",
First[V[svalue] /.
sol]}, {"Area (\!\(\*SuperscriptBox[\(cm\), \(2\)]\))",
First[A[svalue] /. sol]}, {"Height (cm)",
Abs[First[z[svalue] /. sol]]}, {"Contact radius (cm)",
Abs[First[x[svalue] /. sol]]}}, Frame -> All,
Spacings -> {1, 1}]}}, Spacings -> {1, 1}];
svalue2 = smax/2;
Which[Abs[First[z[svalue] /. sol]] <= 0.01,
tics = {{{0, Round[First[z[svalue] /. sol] 10000]/10000.},
None}, {Automatic, None}},
0.01 < Abs[First[z[svalue] /. sol]] < 0.30,
tics = {{{0, Round[First[z[svalue] /. sol] 1000]/1000.},
None}, {Automatic, None}}, True,
tics = {{{0, Round[First[z[svalue] /. sol] 100]/200.,
Round[First[z[svalue] /. sol] 100]/100.}, None}, {Automatic,
None}}];
Pane[
Switch[ctr,
1, RevolutionPlot3D[
Evaluate[{{-x[s], z[s]}, {x[s], z[s]}} /. sol], {s, 0, svalue},
AxesLabel -> {Text@
Row[{Style["x", Italic, 16], Style[" (cm)", 16]}],
Text@Row[{Style["z", Italic, 16], Style[" (cm)", 16]}]},
ImageSize -> {550, 350}, AspectRatio -> Automatic, Boxed -> True,
FaceGrids -> All, FaceGridsStyle -> Directive[Orange],
ColorFunction ->
Function[{x, y, z, s, r}, Blend[{Blue, LightBlue}, z]],
BoundaryStyle -> None, Mesh -> False,
Ticks -> {Automatic, Automatic, tics[[1, 1]]}],
2, Text@
Grid[{{ParametricPlot[
Evaluate[{{-x[s], z[s]}, {x[s], z[s]}} /. sol], {s, 0,
svalue}, PlotStyle -> Thick, Frame -> True,
FrameTicks -> tics, AspectRatio -> Automatic,
FrameLabel -> {Text@
Row[{Style["x", Italic, 16], Style[" (cm)", 16]}],
Text@Row[{Style["z", Italic, 16], Style[" (cm)", 16]}]},
ImageSize -> {550, 180}]}, {data}},
Alignment -> {Center, Center}],
3, ParametricPlot[
Evaluate[{{-x[s], z[s]}, {x[s], z[s]}} /. sol], {s, 0, smax},
PlotStyle -> Thick,
ColorFunction ->
Function[{x, y, s}, If[s <= svalue , Blue, Red]], Frame -> True,
ColorFunctionScaling -> False, Axes -> False,
Epilog -> {{Thick,
Arrow[{{0, -(0.9 First[z[svalue2] /. sol] -
First[z[svalue2] /. sol])}, {0,
First[z[svalue2] /. sol]}}]}, {Text[
Style["gravity", 14], {0.00,
1.17 First[z[svalue2] /. sol]}, {0, -1}]}},
AspectRatio -> 0.5,
FrameLabel -> {Text@
Row[{Style["x", Italic, 16], Style[" (cm)", 16]}],
Text@Row[{Style["z", Italic, 16], Style[" (cm)", 16]}]},
ImageSize -> {550, 350}], 4, VPlot ],
ImageSize -> {550, 360}]],
{{ctr, 2, ""}, {1 -> "3D view", 2 -> "drop profile",
3 -> "nodoid family"}},
{{R0value, -0.8,
" 1/\!\(\*SubscriptBox[\(R\), \(0\)]\) \
(\!\(\*SuperscriptBox[\(cm\), \(-1\)]\))"}, -0.2, -10, 0.05,
Appearance -> "Labeled"},
{{gammavalue, 72,
" \[Gamma] (dyne/\!\(\*SuperscriptBox[\(cm\), \(2\)]\))"}, 30, 75,
2, Appearance -> "Labeled"},
{{\[Theta]end, 90,
" \!\(\*SubscriptBox[\(\[Theta]\), \(c\)]\)\[Degree]"}, 10, 180,
10, Appearance -> "Labeled"}, ControlPlacement -> Top,
TrackedSymbols :> {R0value, \[Theta]end, gammavalue, ctr}]
When a drop of liquid with interfacial tension is placed on a non-wetting solid surface, the drop assumes a shape that is determined by the contact angle that the liquid makes at the three-phase contact line, in accordance with the Young–Dupré equation. Under static conditions, the drop shape must also satisfy the Young–Laplace equation of capillarity, which describes the mechanical equilibrium for two homogeneous fluids separated by an interface