Bill You are a savior...
I had been trying to check if the answers are correct or not .By simply choosing R1 and R2 similar we should have h=h1 and r1=r2 . But, I am having issue understanding the cause of the problem ... I checked my derivation and the equations used are correct also if I use a different method of simulation answers are what we expect .. but as the programming will get complex I need to figure using the find root and work with it.Hence need your advice :)
Following is the code in NB format ( Also see attached)
rhop = 1.781 10^3;
rhol = 0.781 10^3;
g = 9.80665;
T = 0.4/10^2;
q = Sqrt[((rhop - rhol) g)/T];
bb = 0.0000001;
alpha1 = Pi/6;
R1 = 900/10^9;
R2 = 900/10^9;
l0 = 400/10^9;
E1 = 1.781072418 ;
alpha2 = Pi/6;
For[h1 = 400/10^9, h1 < 1.2 R1 - l0, h1 = h1 + 10/10^9,
Psi1 = ArcSin[r1/R1] - alpha1;
Psi2 = ArcSin[r2/R2] - alpha2;
r1 = Sqrt[(l0 + h1) (2 R1 - l0 - h1)];
a = Sqrt[bb(bb + 2r1)(bb +
2r2)(bb + 2r1 + 2r2)/(4(bb + r1 + r2)^2)];
T1 = Log[(a/r1) + Sqrt[(a^2/r1^2) + 1]];
T2 = Log[(a/r2) + Sqrt[(a^2/r2^2) + 1]];
A = \!(
*SubsuperscriptBox[([Sum]), (k =
1), (2)](((1/
k))((((Sinh[k((T1 - T2))]))/((Sinh[
k*((T1 + T2))]))))));
B = \!(
*SubsuperscriptBox[([Sum]), (k =
1), (2)](((2/
k))((((Exp[(-k)T2Sinh[kT1]]))/((Sinh[
k*((T1 + T2))]))))));
(= r1Sin[
Psi1](T1 + 2Log[1 - Exp[-2T1]]) - (r1Sin[Psi1] +
r2Sin[Psi2])
Log[E1qa] + (r1Sin[Psi1] - r2Sin[Psi2])*(A + B) - h ;
(Plot[k,{h,-1/(510^6),30001/(510^6)}] ]))
r2 = Sqrt[(l0 + h) (2 R2 - l0 - h)];
Print["{r1,r2,h1,h, Energy}=", {N[r1], Re[r2], N[h1], Re[Abs[h]],
Re[(-((Pi*
T) ((2 h1 R1 Cos[alpha1] - r1 h1 Sin[Psi1] +
r1^2) + (2 Abs[h] R2 Cos[alpha2] -
r2 Abs[h] Sin[Psi2] +
r2^2)) - ((rhop - rhol) g) (
(
Pi/2)*(-(h1^2)/2) (2 l0 (2 R1 - l0) - h1^2) + ((4/
3 ) (R1 - l0) (-h1^2) + r1^2 h1^2) +
(Pi/2)* (-h^2/2) (2 l0 (2 R2 - l0) -
h^2) + ((4/
3 ) (R2 - l0) (-h^2) +
r2^2 h^2)))/(10^(-14)))]} /.
FindRoot[r2*Sin[
Psi2](T2 + 2Log[1 - Exp[-2T2]]) - (r1Sin[Psi1] +
r2Sin[Psi2])
Log[E1*q*a] + ((r1*Sin[Psi1] - r2*Sin[Psi2])*(A - B) ) - h ==
0, {h, 300*10^(-9)}]]](* this find root is to solve for the \
wetting height of the second sphere *)
Results:
{r1,r2,h1,h, Energy}={8.9442710^-7,8.5546510^-7,4.10^-7,7.7960510^-7,-4.68544}
{r1,r2,h1,h, Energy}={8.9548910^-7,3.0434210^-7,4.110^-7,5.3391610^-7,-2.78158}
{r1,r2,h1,h, Energy}={8.9643710^-7,3.0482410^-7,4.210^-7,5.3524910^-7,-2.79936}
{r1,r2,h1,h, Energy}={8.9727410^-7,3.0528610^-7,4.310^-7,5.3655110^-7,-2.81688}
{r1,r2,h1,h, Energy}={8.9799810^-7,3.0572710^-7,4.410^-7,5.3782410^-7,-2.83415}
{r1,r2,h1,h, Energy}={8.986110^-7,3.0614710^-7,4.510^-7,5.3906610^-7,-2.85117}
{r1,r2,h1,h, Energy}={8.9911110^-7,3.0654710^-7,4.610^-7,5.4027710^-7,-2.86795}
{r1,r2,h1,h, Energy}={8.99510^-7,3.0692610^-7,4.710^-7,5.4145910^-7,-2.8845}
{r1,r2,h1,h, Energy}={8.9977810^-7,3.0728410^-7,4.810^-7,5.4261110^-7,-2.90083}
{r1,r2,h1,h, Energy}={8.9994410^-7,3.0762110^-7,4.910^-7,5.4373210^-7,-2.91694}
{r1,r2,h1,h, Energy}={9.10^-7,3.0793710^-7,5.10^-7,5.4482410^-7,-2.93284}
{r1,r2,h1,h, Energy}={8.9994410^-7,3.0823110^-7,5.110^-7,5.4588510^-7,-2.94854}
{r1,r2,h1,h, Energy}={8.9977810^-7,3.0790810^-7,5.210^-7,5.4480810^-7,-2.96547}
{r1,r2,h1,h, Energy}={8.99510^-7,3.0756310^-7,5.310^-7,5.43710^-7,-2.98245}
{r1,r2,h1,h, Energy}={8.9911110^-7,3.0719810^-7,5.410^-7,5.4256310^-7,-2.99951}
{r1,r2,h1,h, Energy}={8.986110^-7,3.0681110^-7,5.510^-7,5.4139610^-7,-3.01664}
{r1,r2,h1,h, Energy}={8.9799810^-7,3.0640410^-7,5.610^-7,5.4019810^-7,-3.03385}
{r1,r2,h1,h, Energy}={8.9727410^-7,3.0597710^-7,5.710^-7,5.3897110^-7,-3.05116}
{r1,r2,h1,h, Energy}={8.9643710^-7,3.0552810^-7,5.810^-7,5.3771410^-7,-3.06856}
{r1,r2,h1,h, Energy}={8.9548910^-7,3.050610^-7,5.910^-7,5.3642610^-7,-3.08606}
{r1,r2,h1,h, Energy}={8.9442710^-7,3.0457110^-7,6.10^-7,5.3510910^-7,-3.10366}
{r1,r2,h1,h, Energy}={8.9325210^-7,3.0406210^-7,6.110^-7,5.337610^-7,-3.12138}
{r1,r2,h1,h, Energy}={8.9196410^-7,3.0353210^-7,6.210^-7,5.3238210^-7,-3.13922}
{r1,r2,h1,h, Energy}={8.9056210^-7,3.0298310^-7,6.310^-7,5.3097310^-7,-3.15719}
{r1,r2,h1,h, Energy}={8.8904410^-7,3.0241410^-7,6.410^-7,5.2953310^-7,-3.17528}
{r1,r2,h1,h, Energy}={8.8741210^-7,3.0182510^-7,6.510^-7,5.2806210^-7,-3.1935}
{r1,r2,h1,h, Energy}={8.8566410^-7,3.0121610^-7,6.610^-7,5.265610^-7,-3.21187}
{r1,r2,h1,h, Energy}={8.8379910^-7,3.0058710^-7,6.710^-7,5.2502710^-7,-3.23038}
I expect r1=r2 , h1=h ...
h is height so it is an real and absolute value , which we find using findrooot ..
This h is used to calculate r2 , but When I tried to replace h in r2 with Re[Abs[h]], the output becomes 0.
Another problem is different h ,when h should be equal to h1 is making me guess there is something going on with the summations of A and B or in findroot that is causing the error!
You had been a great help , I really mean it .. any suggestion is appreciated!
-SD
Attachments: