Value Of: Difference between revisions

From StarLogo Nova Wiki
(Marked this version for translation)
(Marked this version for translation)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>
<!--T:4-->
<section begin="image"/>[[File:value_of.png|alt=The Value Of Block|thumb]]<section end="image"/>
==Usage== <!--T:5-->


<!--T:2-->
<!--T:2-->
<p id="tooltip">Returns the value of a selected variable.</p>
<p id="tooltip">Returns the value of a selected variable.</p>
==Syntax== <!--T:6-->
<!--T:7-->
Inputs in this block:
#a variable from the dropdown menu
==Example== <!--T:8-->
<!--T:9-->
[[File:value_of_example.gif|alt=Value Of example gif|thumb]]
[[File:value_of_example.png|alt=Value Of example code|thumb]]
<!--T:10-->
This model demonstrates the change in pH of a solution as base is added. Since each H+ agent represents one millionth of a mol of H+, so the [[Special:MyLanguage/Count Within Steps|‘count H+ within 200 steps’]] block is being multiplied by 0.000001. The [[Special:MyLanguage/Count Within Steps|‘count water within 200 steps’]] has been divided by 560 because each water molecule represents a tenth of a mole, of which there are approximately 56 in a one liter solution. (The solution is one liter at the start of the model, but gains volume as more acid is added to it.)
Variables have been utilized in this simulation to keep track of the amount of H+ in the solution and also the total liters of liquid in the solution. This increases the readability of the pH equation.
==Related Blocks== <!--T:11-->
<!--T:12-->
*[[Special:MyLanguage/Var is|Variable Block]]


<!--T:3-->
<!--T:3-->

Latest revision as of 19:31, 14 August 2023

Other languages:
The Value Of Block

Usage

Returns the value of a selected variable.

Syntax

Inputs in this block:

  1. a variable from the dropdown menu

Example

Value Of example code

This model demonstrates the change in pH of a solution as base is added. Since each H+ agent represents one millionth of a mol of H+, so the ‘count H+ within 200 steps’ block is being multiplied by 0.000001. The ‘count water within 200 steps’ has been divided by 560 because each water molecule represents a tenth of a mole, of which there are approximately 56 in a one liter solution. (The solution is one liter at the start of the model, but gains volume as more acid is added to it.) Variables have been utilized in this simulation to keep track of the amount of H+ in the solution and also the total liters of liquid in the solution. This increases the readability of the pH equation.

Related Blocks