conv_x
|
PHREEQC-BASIC |
conv_x(<str::unit>) |
|
MY-BASIC |
conv_x(<str::unit>) |
To convert the value of a parameter or variable to or from the units defined in the Geometry Information dialogue window of the HYDRUS GUI:
- conv_x() is used to convert the parameter value to the value for the units defined in the Geometry Information dialogue window of the HYDRUS GUI.
- 1/conv_x() is used to convert a variable value (with units defined in the Geometry Information dialogue window of the HYDRUS GUI) to other units.
Return value: conversion value
Arguments
|
unit |
str: variable defining the unit
|
Examples
For a parameter par with unit [L]:
par * conv_x("cmeters") will convert par that is defined in centimetres to the unit defined in the Geometry Information dialogue window of the HYDRUS GUI.
par * conv_x("cmeters") will convert par from the unit defined in the Geometry Information dialogue window of the HYDRUS GUI to centimetres.
|
[MyBASIC] D0 = 2.3E-9 * conv_x("meters") * conv_x("meters") / conv_t("seconds") |
The first line changes the diffusion coefficient with a value of 2.3 10-9 m2/s. If the unit defined in the Geometry Information dialogue window of the HYDRUS GUI is in centimetres, conv_x("meters")equals 100 and the value is multiplied by 100 * 100.
The second line gets the pressure head [L] which has the units defined in the Geometry Information dialogue window of the HYDRUS GUI and converts it to the unit of interest (meters). If centimetres is defined in the Geometry Information dialogue window of the HYDRUS GUI, conv_x("meters")has the value of 100.