A VLE calculation, where P and H are known, and are used to find T and density yes
Exactly, H and P are specified, and T and density are extracted (after some iteration etc). However what I'm saying is that the thermo library takes care of this iteration for us. So all we have to do is supply the library with P and H, and it will do the iteration required to solve for T and density. This is useful because it means there are no large blocks of iteration code to be seen in the main script
So what I can do is replace our previous temperature function here:
View attachment 296093
With this new function:
View attachment 296094
The advantage of the second one is that it is analytic, so that single line allows us to take our known H and P values and convert them to T values
The same thing can be done for the mass holdup function, as the VLE calculation done in the thermo library also allows us to get density. I can just multiply by volume to give mass holdup
The final function to be replaced by an analytic one is the ## \frac{d\rho}{dH}## one. As shown in the earlier message above, are there any properties we can assume as constant (while density and enthalpy change)? We can multiply these derivatives together (chain rule) to get to the objective derivative ## \frac{d\rho}{dH}## I think
EDIT: The T(H,P) and density(H,P) functionality is now in place so we have analytic values for T and density at each H and P value. I think replacing the ## \frac{d\rho}{dH}## derivative is a natural next step as it is the only remaining non analytic function