Secondary Variables#

All other evaluators are secondary variable evaluators, and these are grouped by physics concept or process type.

Secondary variables, by definition, define functions that evaluate one or more variables as a function of one or more variables. Therefore all secondary evaluators provide at least one “Key,” which is the variable(s) computed, and at least one “Dependency.”

If the evaluator computes one and only one key, that key is provided by the name of the parameter list in the “evalutors” list of State_. If more than one Key is computed, then the second must either be guessed by the code (for instance if the provided key is “saturation_liquid”, it is likely that the other key is “saturation_gas”) or provided by the user. If more than one key is computed, all of the keys computed can be specified exactly via the input spec. Keys are provided in one of two parameters:

  • “my variable key[string] Specifically name the variable used as “my variable”

  • “my variable key suffix[string] Name a suffix, and the variable is given by DOMAIN-SUFFIX, where the DOMAIN is given by the prefix in the evaluator list’s name. This is particularly useful for collections of enumerated PKs, e.g. columnar PKs, where the DOMAIN might be computed on the fly based on a column ID.

Dependencies use the same approach – each dependency variable name may include a default, and looks for a “key” and “key suffix” as potential options.

As an example, a saturation evaluator may depend on pressure, and may detail all of its names via something like:

<ParameterList name="domain:1-saturation_liquid">
  <Parameter name="saturation gas key" type="string" value="domain:1-saturation_gas" />

  <Parameter name="pressure key suffix" type="string" value="pressure" />
  <!-- OR EQUIVALENTLY -->
  <Parameter name="pressure key" type="string" value="domain:1-pressure" />
</ParameterList>