I'm currently using the python custom modeler to retrieve input stream information from DWSIM and call an API to run our custom solvent extraction model and return the data to DWSIM. I am able to get DWSIM to call the API and return data to into the flowsheet, but I am having issues saving the concentrations calculated by our solvent extraction model to outlet material streams.
I currently have an aqueous stream with nitric acid and dissolved metals and an organic stream which the metals are extracted to using our solvent extraction model. I am trying to save the concentrations of the aqueous and organic raffinates from our model to the outlet material streams from the python custom model, but, I am not having much success.
I.e. I want to save the final nitric acid concentration in the aqueous raffinate so I am trying to use SetProp to set molar flow:
I'm currently using the python custom modeler to retrieve input stream information from DWSIM and call an API to run our custom solvent extraction model and return the data to DWSIM. I am able to get DWSIM to call the API and return data to into the flowsheet, but I am having issues saving the concentrations calculated by our solvent extraction model to outlet material streams.
I currently have an aqueous stream with nitric acid and dissolved metals and an organic stream which the metals are extracted to using our solvent extraction model. I am trying to save the concentrations of the aqueous and organic raffinates from our model to the outlet material streams from the python custom model, but, I am not having much success.
I.e. I want to save the final nitric acid concentration in the aqueous raffinate so I am trying to use SetProp to set molar flow:
aq_raf = oms1
H_ID = ['Nitric acid']
aq_raf.SetProp("Flow","Overall",H_ID,"Mixture","mole",aq_H_out)
But nothing is showing up in the results tab for oms1, all values are zero, but aq_H_out is not.
Solved this by using SetOverallCompoundMolarFlow