Survey calculation
In comparison to single-point calculation, survey calculation allows users to perform a series of calculations by varying one or more input variables.
JSON input (example)
Here two isothermal flash inputs are taken as examples to illustrate the survey calculation input.
type
description
variableField
string
values
array of numbers
series of survey variable values for calculation
The survey calculation runs the series of input JSON by overwriting the survey variable values.
When an input variable is specified as a survey variable, e.g. "/params/temperature/value", the source input JSON field, params.temperature.value, is optional as it will be overwritten by the survey calculation inputs. However, params.temperature.unit is still required.
When multiple survey variables are specified, the values in each params.surveyInputs[{}].values array are updated simultaneously. When the arrays are specified in different sizes, the last value of the shorter array(s) will be used to run the survey calculation until the longest array is completed.
Specific stream output can be shown in an array for user's convinience.
params.surveyOutputsByField
type
description
field
string
defaultValue
number
optional, default value if specified field in stream output does not exist in specific point
Response (status = PROCESSED)
result.surveyOutputs list an array of objects as the full stream output of each survey calculation result. result.surveyOutputsByField lists the specific output in one array along the survey calculations.
type
description
field
string
results
array of numbers
specific values in the stream outputs along the survey calculations
presence
array of boolean
presence of the specific output. False if the individual calculation inside the survey did not converge. Also false if the specific field does not exist in stream output, unless the "defaultValue" is provided in survey inputs.
Last updated