Hi there,
I'm trying to create a vector with an if statement in it. However, it has a bunch of conditions as shown below:
if the pH is less than -4.5, then set the alkalinity to 0 mg/L, else use the alkalinity from the look up table.
The expression that I'm trying to define is:
vector(if(Vector1[H] < (1.008*10**-4.5) mg/L then Vector1[Alkalinity] = 0 mg/L else Vector1[Alkalinity] = Alkalinity_lookup))
This leads to an error; the vector type is a value not a condition. If I set the type to a condition, this returns a True and False statement. Really all I'm trying to do is replace the alkalinity value in the vector. The intention is to use the output of this expression to define the chemistry of a cell pathway (contaminant transport module).
If there are any suggestions out there, please reach out :)
Kind regards,
Jackson
Comments
3 comments