Closed TimBartholomew closed 3 years ago
@andrewlee94 since you moved it to "in progress", are you starting to address this?
Another thing I've noticed for my RO model and other unit models that have an energy balance, I get the following warning:
fs.P1.control_volume.properties_in[0.0].flow_mass_comp[H2O] + fs.P1.control_volume.properties_in[0.0].flow_mass_comp[NaCl])*fs.P1.control_volume.properties_in[0.0].enth_mass
So it may just be an iscale.get_scaling_factor() on the enthalpy term, but I'm not sure.
No, I am not. However, I put it there so that it is part of the September release.
Also, what is the actually error/warning you got?
Oops. Its:
[WARNING] idaes.core.util.scaling: Accessing missing scaling factor for (fs.P1.control_volume.properties_in[0.0].flow_mass_comp[H2O] + fs.P1.control_volume.properties_in[0.0].flow_mass_comp[NaCl])*fs.P1.control_volume.properties_in[0.0].enth_mass
Weird. That would usually be a variable name but it's showing an expression. Seems like we are trying to pull a scale factor for an unnamed expression.
Given the amount of flexibility we have, I don't think we can make any assumptions about whether an object is a Var or Expression (except for maybe a few key cases).
Yeah. I guess it doesn't cause any problem. You can provide scaling factors for named expressions, but there is no way to store a scaling factor for an unnamed one. In fact it's weird that we have a pointer to an unnamed expression accessible.
Ok, I think I know what this is. See issue https://github.com/IDAES/idaes-dev/issues/1068. I closed it so I must have thought I caught all the property packages but I guess not. I'm 80% sure this is the problem (without actually looking into it).
Fixed in #55.
The control volume doesn't automatically scale the additional variables associated with
has_mass_transfer
andhas_enthalpy_transfer
.We probably should go through and double check all the options we provide to control volumes and also provide tests for them.