I have a property calculator which is in a Table to generate well... a table of properties and growth rates depending on the value of d. The growth rate omega and qmax are functions of d.
Clear[h, \[Delta], A1, D1, S1, M1, P1, G1, m, E1, \[Lambda]max, qmax,
K1, d];
Table[
(*d=2.350*10^-3;*)
{
\[Rho] = 1333;
MW = 84.6;
Rg = 8.314;
\[Sigma] = 0.0295;
\[Sigma]T = 2.148*10^-4;
Ts = 300;
\[CapitalDelta]T = 10;
\[Nu] = 3.477*10^-7;
Cp = 1.18*10^3;
k = 0.14;
\[Chi] = k/(\[Rho] Cp);
\[Beta] = 10^-3;
\[Alpha] = 1.0;
xg = 0;
g = 9.81;
{
{L1 = 350*10^3;},
{G1 = xg g d^3/(\[Nu] \[Chi]);}
}
S1 = (\[Sigma] d)/(3 \[Rho] \[Nu]^2);
M1 = \[Sigma]T \[CapitalDelta]T d/(\[Rho] \[Nu] \[Chi]);
Bo = xg G1/S1;
K1 = 1;
B = 0.0;
Bi = 1 + B K;
P1 = \[Nu]/\[Chi];
A1 = 1.987*10^-11;
a = A1/S1;
m = (M1 K1 Bi)/(2 P1 S1);
E1 = k \[CapitalDelta]T/(\[Rho] \[Nu] L1);
D1 = 0.001;
\[Epsilon] = E1/S1;
\[Delta] = E1^2/(D1 S1);
qmax[Bo_, d_] :=
Sqrt[(a d^-1 - Bo d^3 + \[Delta] d^3 (Bi d + K1)^-3 +
m d^2 (Bi d + K1)^-2)/(2 (d^3))];
ScientificForm[
Re[Bi \[Epsilon]/((Bi d + K1)^2) - d^3 q^4 - Bo d^2 q^2 +
m q^2 d^2/((Bi d + K1)^2) + \[Delta] d^3 q^2/((Bi d +
K1)^3) /. {q -> qmax[Bo, 1]^2}]]},
{d, 0.0001, 0.005}
]
However, I get the following error.
Set::write: Tag Times in S1 {{Null},{Null}} is Protected. >>
Without the Table function, it runs fine:
Clear[h,\[Delta],A1,D1,S1,M1,P1,G1,m,E1,\[Lambda]max,qmax,K1,d];
\[Rho]=1333;
MW=84.6;
Rg=8.314;
\[Sigma]=0.0295;
\[Sigma]T=2.148*10^-4;
Ts=300;
\[CapitalDelta]T=10;
\[Nu]=3.477*10^-7;
Cp=1.18*10^3;
k=0.14;
\[Chi]=k/(\[Rho] Cp);
\[Beta]=10^-3;
\[Alpha]=1.0;
xg=0;
g=9.81;
L1=350*10^3;
G1=xg g d^3/(\[Nu] \[Chi]);
S1=(\[Sigma] d)/(3 \[Rho] \[Nu]^2);
M1=\[Sigma]T \[CapitalDelta]T d/(\[Rho] \[Nu] \[Chi]);
Bo=xg G1/S1;
K1=1;
B=0.0;
Bi=1+B K;
P1=\[Nu]/\[Chi];
A1=1.987*10^-11;
a=A1/S1;
m=(M1 K1 Bi)/(2 P1 S1);
E1=k \[CapitalDelta]T/(\[Rho] \[Nu] L1);
D1=0.001;
\[Epsilon]=E1/S1;
\[Delta]=E1^2/(D1 S1);
qmax[Bo_,d_]:=Sqrt[(a d^-1 -Bo d^3+\[Delta] d^3 (Bi d+K1)^-3+m d^2 (Bi d+K1)^-2)/(2 (d^3))];
ScientificForm[
Re[Bi \[Epsilon]/((Bi d+K1)^2)-d^3 q^4-Bo d^2 q^2+m q^2 d^2/((Bi d+K1)^2)+\[Delta] d^3 q^2/((Bi d+K1)^3)/.{q->qmax[Bo,1]^2}]]
Obviously this means that I don't have some = set correctly. I've been at it for hours and can't seem to detect anything wrong. Perhaps someone on here can?
The thing that bothers me is the code is staggered and I didn't do that....

