I am using gekko to solve a system of equations. As an intermediate step I am using an intermediate that plugs the MV temperature into the following function:
def riedelVP(T, const):
'''Returns Vapor Pressure
INPUTS
:T - Temperature (K)
:const - A, B, C, D, E constants for eqn
OUTPUTS
:Y - Pressure in Pascals'''
# unpack constants
a, b, c, d, e = const
# plug into equation
Y = np.exp(a+b/T+c*np.log(T) + d*T**e)
return Y
When I do this, I get the following Error:
I have tried using T.value and T.value[0] as arguments into the function instead of T.
TypeError: loop of ufunc does not support argument 0 of type GKVariable which has no callable log method
How can I use a function with exp and log in a gekko intermediate