Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Assign value from WolframAlpha query.' topicStudent Support Forum > General > Archives > "Assign value from WolframAlpha query."

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
brian ebert
08/13/12 11:07am

In Response To 'Re: Assign value from WolframAlpha query.'
---------
Thank you for taking time to look at this. I think I figured out what I need but now have other questions. The vapor viscosity value are used when selecting pulldown. This works but I can't seem to get a default initial value? I thought it would use the first value listed. This example(H2)...

Manipulate[graphDP[spress, gas],
{{spress, "60", "Supply Pressure (psig)"}, {0.06375 -> "30",
0.073413 -> "45", 0.046032 -> "60", 0.046528 -> "90"}},
{{gas, "H2",
"Gas Selection"}, {WolframAlpha[
"Hydrogen vapor viscosity", {{"UnitConversion", 3},
"NumberData"}] -> "H2",
WolframAlpha[
"Ammonia vapor viscosity", {{"UnitConversion", 3},
"NumberData"}] -> "NH3",
WolframAlpha[
"Oxygen vapor viscosity", {{"UnitConversion", 3},
"NumberData"}] -> "O2",
WolframAlpha[
"Argon vapor viscosity", {{"UnitConversion", 3},
"NumberData"}] -> "Ar",
WolframAlpha[
"Krypton vapor viscosity", {{"UnitConversion", 3},
"NumberData"}] -> "Kr",
WolframAlpha[
"Xenon vapor viscosity", {{"UnitConversion", 3},
"NumberData"}] -> "Xe",
WolframAlpha[
"helium vapor viscosity", {{"UnitConversion", 3},
"NumberData"}] -> "He",
WolframAlpha[
"CO2 vapor viscosity", {{"UnitConversion", 3}, "NumberData"}] ->
"CO2",
WolframAlpha[
"Neon vapor viscosity", {{"UnitConversion", 3}, "NumberData"}] ->
"Ne"}},
Initialization :> (graphDP[spress_, gas_] :=
Module[{flow, gasconv, dp, dpbase, fdatbase, fdat, data},
flow = Range[10, 100, 1];
gasconv = 0.01780474063167445 / gas;
dp = flow (spress / gasconv);
dpbase = flow spress;
fdatbase = Transpose[{flow, dpbase}];
fdat = Transpose[{flow, dp}];
data =
Table[{{Transpose[{flow, dp}]}, {Transpose[{flow, dpbase}]}}];
ListLinePlot[Tooltip[{fdat, fdatbase}], Filling -> Axis,
PlotStyle -> {{Thick, Blue}, {Thick, Red}},
PlotLabel -> "Pressure Drop vs. Gas Flow",
FrameLabel -> {"SLPM", "Dp"}, GridLines -> Automatic,
Frame -> True, GridLinesStyle -> Directive[Orange, Dashed],
Mesh -> All, PlotRange -> {{0, 100}, {0, 10}}]
])]

URL: ,

Subject (listing for 'Assign value from WolframAlpha query.')
Author Date Posted
Assign value from WolframAlpha query. Bebert 08/08/12 4:26pm
Re: Assign value from WolframAlpha query. Michael 08/13/12 09:40am
Re: Re: Assign value from WolframAlpha query. brian ebert 08/13/12 11:07am
Re: Re: Re: Assign value from WolframAlpha query. Michael 08/14/12 2:04pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic