watertap-org / watertap

The WaterTAP development repository
https://watertap.readthedocs.io/en/latest
Other
59 stars 57 forks source link

NF270 Membrane Charge Density in NF DSPM-DE Model example #1137

Closed AARON683 closed 11 months ago

AARON683 commented 12 months ago

https://github.com/watertap-org/watertap/blob/b043b502cf6b87944d30ba800301da0bd13ede93/watertap/examples/flowsheets/nf_dspmde/nf.py#L259

Is there a reference for the NF270 properties used in this example. From literature, the values for pore radius, effective membrane thickness and the dielectric constant seem reasonable, however, the value for the charge density seems to be quite large. Typically in literature the charge density has a magnitude of -10 to -100 mol/m3 and this is replicated in the coding of the NF DSPM-DE 0D Block in which it is intialized at -50 mol/m3. However when I try to decrease the charge density from -680 mol/m3 (which is used in the example) to 50 mol/m3, the MCAS property package fails to solve. Is there a reason for this?

I also attempted to run the UI model with a charge density of -50 mol/m3 and this also failed.

Any tips on this issue would be greatly appreciated!

adam-a-a commented 11 months ago

Hi, @AARON683. Thanks for posting this issue.

Regarding the value of -680 for charge density, this hypothetical value is admittedly higher in magnitude than what is directly observed in the literature. The value originated from a preliminary estimation that was made for an internal analysis that our team was experimenting with; the estimated value was calculated using relationships that accounted for pH, ionic strength, and zeta potential (Ortiz-Albo et al. 2019 and Diop et al., 2011). Nevertheless, to avoid confusion in the future, we plan to update the NF example and change the charge density value to something closer to what is directly citable in the literature (e.g., -50). Additionally, you can find other examples in our test file for the NF DSPMDE unit here that include more nominal values for charge density and which may be of interest to you.

With regard to changing the charge density in the existing example(s) provided in the code and the UI, there are several reasons why the solve could've failed. After looking at the example and trying out a charge density of -50, one of the more immediate factors that need to be considered is the constraint on maximum hardness of the permeate. We had set the maximum hardness of the permeate to 200 (m.fs.product.max_hardness.fix(200)); relaxing that a bit to, say, 500 or higher, should enable you to solve. Furthermore, there are other things to consider in this example that would prevent you from successfully solving, such as the upper bound that was set for crossflow velocity (upper bound currently set to 25 cm/s) or the upper bound set for recovery rate (set to 95%). Overall, our initial suggestion is to try adjusting the maximum hardness of the permeate, and you can also try (1) tinkering with some of the settings of upper bounds and/or (2) fixing certain variables that are currently free variables during the optimization step (e.g., recovery).

We are considering revisions to this example to facilitate exploration of the model. Moreover, the DSPM-DE model is one of our more complex models, and we do have model enhancements planned for the near future.

Lastly, it would also be useful to know what operating system and version of Python you are using in your environment.

Please let us know how it goes and if you have any other questions or feedback!