Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Table' topicStudent Support Forum > General > Archives > "Table"

Help | Reply To Topic
Author Comment/Response
Saba
03/30/11 12:02pm

Can anybody help me with the below program, I dont know wht I cant get the table while it is supposed to give me one


**************
TR = 273.15 + 20; (*K*)
Ru = 8314; (*Universal gas \
constant, J/ kmole.K = 8.314 Pa. m^3/mole. K*)
Theta = 1*^-5; (*Degree*)
Betta = 89; (*Degree*)
gamma = 2544 10^-5; (*J/m^2*)
Psat = 0.3 10^5/760; (*Pa*)
Pv = 9 10^-1*Psat;
vlinf = (1/750)*170.34; (*(m^3/kg)*(MW)=m^3/kmol*)
(***********************************************************)
Req = -2 gamma/(Psat + (Ru TR/vlinf) Log[Pv/Psat] - Pv);
h = 0.1*Req;
r[b_] := (b/Tan[Degree (Betta)] + h)/(Sin[Degree (Betta - Theta)] +
Cos[Degree (Theta)])
l[b_] := b - r[b]*(1 - Cos[Degree (Betta - Theta)])
Vs[b_] := (Pi/3)*(b^3 / Tan[Degree (Betta)])
Asl[b_] :=
Pi*(b^2/Sin[Degree (Betta)]) +
Pi (r[b] + l[b] - r[b] Sin[Degree (Theta)])^2
y1[b_] := -r[b]*Cos[Degree (Theta)]
y2[b_] := r[b]*Sin[Degree (Betta - Theta)]
Vl[b_] :=
Pi (y2[b] (l[b]^2 + 2 l[b] r[b] + 2 r[b]^2) -
y2[b] (l[b] + r[b]) Sqrt[r[b]^2 - y2[b]^2] -
r[b]^2 (l[b] + r[b]) ArcSin[y2[b]/Sqrt[r[b]^2]] - y2[b]^3/3) -
Pi (y1[b] (l[b]^2 + 2 l[b] r[b] + 2 r[b]^2) -
y1[b] (l[b] + r[b]) Sqrt[r[b]^2 - y1[b]^2] -
r[b]^2 (l[b] + r[b]) ArcSin[y1[b]/Sqrt[r[b]^2]] - y1[b]^3/3) -
Vs[b]
Alv[b_] :=
2 Pi Sqrt[r[b]^2/(r[b]^2 - y2[b]^2)] Sqrt[
r[b]^2 - y2[b]^2] ((l[b] + r[b]) ArcSin[y2[b]/Sqrt[r[b]^2]] -
y2[b]) -
2 Pi Sqrt[r[b]^2/(r[b]^2 - y1[b]^2)] Sqrt[
r[b]^2 - y1[b]^2] ((l[b] + r[b]) ArcSin[y1[b]/Sqrt[r[b]^2]] -
y1[b])
B[b_] := gamma (Alv[b] - Asl[b]* Cos [Degree (Theta)] + 2 Vl[b]/Req)

(* I want to plot B[b] vs. l[b] *)
S = b /. FindRoot [l[b] == 0, {b, 10^-12}];
U = b /. FindRoot [r[b] - 0.5*Req == 0, {b, 10^-8}];
max = b /. FindRoot[D[B[b], b] == 0, {b, S}];
min = b /. FindRoot[D[B[b], b] == 0, {b, F}];


TT = Table[{Betta, f, N[h, 4], Req, h/Req, l[max], l[min], l[max]/Req,
l[min]/Req, B[max], B[min]}];
TF = TableForm[TT[[1]],
TableHeadings -> {None, {"\[Beta]",
"f (\!\(\*FractionBox[SuperscriptBox[\(P\), \(V\)], \
SuperscriptBox[\(P\), \(Sat\)]]\))", "h",
"\!\(\*SubscriptBox[\(R\), \(eq\)]\)",
"\!\(\*FractionBox[\(h\), SubscriptBox[\(R\), \(eq\)]]\)",
"\!\(\*SubscriptBox[\(d\), \(max\)]\)",
"\!\(\*SubscriptBox[\(d\), \(min\)]\)",
"\!\(\*FractionBox[SubscriptBox[\(d\), \(max\)], \
SubscriptBox[\(R\), \(eq\)]]\)",
"\!\(\*FractionBox[SubscriptBox[\(d\), \(min\)], \
SubscriptBox[\(R\), \(eq\)]]\)", "(B-B0)max", "(B-B0)min"}}]

URL: ,
Help | Reply To Topic