The salt dissolution is working and the Flowsheet MSTR-000 stream for the calculated mixture pH is displayed in the table properites. I would like to try and control pH.
In my Iron python script I can read most of the properites for all of the phases. However I cannot find out how to get the pH value for the Liquid 1 stream as shown in the Flowsheet properties table:
MSTR-000 is the Flowsheet Stream assigned to MSTR_000
MSTR_000_pH = MSTR_000.GetProp("pH","Liquid1","Water","Mixture",None)
exception trace gives:
85 11/9/2017 10:05:34 AM Message CapeOpen.CapeComputationException: Error in the application. ---> CapeOpen.CapeThrmPropertyNotAvailableException: Error in the application.
Hi,
New to DWSIM.
The salt dissolution is working and the Flowsheet MSTR-000 stream for the calculated mixture pH is displayed in the table properites. I would like to try and control pH.
In my Iron python script I can read most of the properites for all of the phases. However I cannot find out how to get the pH value for the Liquid 1 stream as shown in the Flowsheet properties table:
exception trace gives:
--- End of inner exception stack trace ---
at DWSIM.Thermodynamics.Streams.MaterialStream.ThrowCAPEException(Exception& ex, String name, String description, String interf, String moreinfo, String operation, String scope, Int32 code) in C:\Users\Daniel\Source\Repos\dwsim5\DWSIM.Thermodynamics\Material Stream\MaterialStream.vb:line 5669
at DWSIM.Thermodynamics.Streams.MaterialStream.GetProp(String property, String phase, Object compIds, String calcType, String basis) in C:\Users\Daniel\Source\Repos\dwsim5\DWSIM.Thermodynamics\Material Stream\MaterialStream.vb:line 3115
at Microsoft.Scripting.Interpreter.FuncCallInstruction`7.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run8[T0,T1,T2,T3,T4,T5,T6,T7,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4
Thanks,
Howard
pH is not exposed through the CAPE-OPEN 'GetProp' method. You can get its value directly from: