# How to make a calculator to display the Non-Dimensional number

I am a beginner here and want to learn this tool. At first, I want to make one calculator that will display the value of the Non-Dimensional number of Fluid dynamics based on user inputs.

In this code, I need to add one output display box, which will show the value of that number and named that output box name as Reynolds number.

Manipulate[ Rey[v], {{v, 1.5, "Velocity of Fluid(m/s): "}, ControlType -> InputField, FieldSize -> 7},{{roh, 1, "Fluid Density (Kg/m^3): "}, ControlType -> InputField, FieldSize -> 7}, {{dia, 0.01, "Hydraulic Diameter (m) "}, ControlType -> InputField, FieldSize -> 7}, {{muh, 0.00089, "Dynamic Viscosity (Kg/ms): "},ControlType -> InputField, FieldSize -> 7}, Initialization :> {Rey[v_] := (roh*v*dia)/muh}]

• Crossposted here. Sep 6, 2021 at 14:21

Update 2 Improve layout, add Calculate button

CloudDeploy[
Manipulate[ "Reynolds number: " <> ToString@Style[Rey[v], 14],
Text[Style["Reynolds number calculator", 16]],
Delimiter,
{{v, 1.5, "Velocity of Fluid(m/s): "}, ControlType -> InputField,
FieldSize -> 7}, {{roh, 1, "Fluid Density (Kg/m^3): "},
ControlType -> InputField,
FieldSize -> 7}, {{dia, 0.01, "Hydraulic Diameter (m) "},
ControlType -> InputField,
FieldSize -> 7}, {{muh, 0.00089, "Dynamic Viscosity (Kg/ms): "},
ControlType -> InputField, FieldSize -> 7},
Delimiter,
Item[Button["Calculate", Nothing, BaseStyle -> {15}]],
LabelStyle -> {14},
ContentSize -> 310,
Initialization :> {Rey[v_] := (roh*v*dia)/muh},
TrackedSymbols :> All]]


Update More attractive :-)

Manipulate[
ResourceFunction["WolfieSay"][Labeled[Rey[v], "Reynolds number", Top]],
{{v, 1.5, "Velocity of Fluid(m/s): "}, ControlType -> InputField, FieldSize -> 7},
{{roh, 1, "Fluid Density (Kg/m^3): "}, ControlType -> InputField, FieldSize -> 7},
{{dia, 0.01, "Hydraulic Diameter (m) "}, ControlType -> InputField, FieldSize -> 7},
{{muh, 0.00089, "Dynamic Viscosity (Kg/ms): "},ControlType -> InputField, FieldSize -> 7},
Initialization :> {Rey[v_] := (roh*v*dia)/muh},
TrackedSymbols :> All]


Something like this?

Manipulate[
Panel[Row[{"Reynolds number: ", Rey[v]}]],
{{v, 1.5, "Velocity of Fluid(m/s): "}, ControlType -> InputField, FieldSize -> 7},
{{roh, 1, "Fluid Density (Kg/m^3): "}, ControlType -> InputField, FieldSize -> 7},
{{dia, 0.01, "Hydraulic Diameter (m) "}, ControlType -> InputField, FieldSize -> 7},
{{muh, 0.00089, "Dynamic Viscosity (Kg/ms): "},ControlType -> InputField, FieldSize -> 7},
Initialization :> {Rey[v_] := (roh*v*dia)/muh},
TrackedSymbols :> All]

• Thanks, Rohit.. it is close to what I am looking for... Do you know any other way... which shows output more attractive... Sep 6, 2021 at 14:47
• What exactly do you mean by "output more attractive"? The output is a string and a real number. Sep 6, 2021 at 19:58
• I want to build a calculator something like given in this link resources.wolframcloud.com/FormulaRepository/resources/… Sep 7, 2021 at 15:09
• In the above link formula repository, we can input the real number on the corresponding string and after clicking the submit button we can display all values at bottom of it. In the same way, I want to build the calculator in my case. Do you know how I can get the source code of the above link? Sep 7, 2021 at 16:04
• The code in my answer does not require a submit button because it is not hosted on a web page. Change any of the numbers in the input fields and hit enter/return (not shift enter/return) and the computed Reynolds number will update. Are you interested in building a web interface or one that will run in Mathematica/Notebook Player? Sep 7, 2021 at 17:10