usnistgov / REFPROP-issues

A repository solely used for reporting issues with NIST REFPROP
26 stars 13 forks source link

Formulation of the ammonia/water mixture model in Refprop V.10 #213

Closed mww1990 closed 4 years ago

mww1990 commented 4 years ago

Ladies and Gentlemen,

within the scope of my doctoral thesis I am working on component models of absorption cycles, which will be used to perform dynamic simulation calculations.

Since I want to create representative simulation models, I tested several substance databases for the ammonia/water mixture to calculate the thermodynamic properties (including the new mixture model (Bell et al., 2018) in Refprop V.10).
In my investigation I calculated the power achieved in the absorption cycle from measured data on the basis of the various property databases and compared the results with the power achieved during the measurement in the external water circuits. I have come to the conclusion that your formulations (Bell et al., 2018) lead to good results.

I could already see the reasons for the change from Tillner-Roth & Friend (1998) to Bell et al. (2018) from your contribution (https://github.com/usnistgov/REFPROP-issues/issues/68). Since I would like to use the new formulation (Bell et al., 2018) for further project activities, I need more specific information on the formulation. The reason for this is that the main focus in my project is on simulation calculations, where speed is a central point, which is why an access to Refprop V.10 via a Refprop wrapper / dll's will not be possible from a current point of view.

For this reason I would like to ask you for support.

Thank you for your support in advance!

Michael Wernhart

ianhbell commented 4 years ago

Hi Michael,

I'm the Bell of Bell et al., and I'd like to mention that I have recently re-entered my work on ammonia+water mixtures, and hope to have some good news for you soon about the model. What information do you need? I assume, since you are looking at Kalina applications, that you are looking at applications where the composition is constantly changing? Otherwise, you could have used the tabular lookup tables in CoolProp (which can be built with REFPROP backend) if the composition is constant.

From what programming environment are you retrieving properties of ammonia+water mixtures? That will have some impact on what approach to take.

If speed is really important, you could do a 3D spline interpolation, with T, D, composition as independent variables. But that is a non-trivial amount of work.

What is your target computational time per thermophysical property evaluation?

Ian

mww1990 commented 4 years ago

Hello, Ian,

Thank you for your prompt response and support! You're right, I am investigating a process in which concentration is constantly changing. To be exact, the process I am investigating is an absorption chilling cycle. (However, some of the components are similar to the Kalina Cycle components.)

As simulation environment I use Dymola and model the components in Modelica. This allows me to set up programs (in the style of C++) as well as equation systems.

Exactly, creating working 3D splines to interpolate into these would really take a lot of time. Despite the advantage of much shorter computation times, I currently don't have enough time resources available to create the splines. The reason for this is that the main focus in the current project stage is on the creation of physically based component models.

To give an impression of the targeted computing time for a state variable: The absorption chiller cycle modelled by me consists of 10 components. If I would only calculate the properties of the material flows at the inlet and outlet, there would be 12 data per state variable (outlet of one component is the entry into another component, generator has two outlet points and absorber has two inlet points). Now the simulation time is 3000 seconds (not the calculation time) (which is not the upper time limit). If the dynamics are to be displayed at least every 3 seconds, 12000 data per state variable must be calculated for the described simulation calculation. This description does not yet cover the accuracy requirement (e.g. stratification in components).

As shown, the calculation time must be kept as short as possible due to the large amount of data to be calculated. Therefore I would like to integrate your functions directly into my simulation model. This way I could at least avoid time delays due to intermediate steps (e.g. calls of further programs) and keep flexibility until I have the possibility to create 3D splines.

Many thanks for your help! Michael

ianhbell commented 4 years ago

I've had my fingers into similar pies before I came to NIST (http://www.thermocycle.net/, www.coolprop.org, https://achp.readthedocs.io/en/latest/), so I'm well-versed in your challenges. What I can say (unfortunately) is that I very much doubt that the call overhead from Modelica->ExternalMedia(?)->REFPROP/CoolProp is going to be the limiting factor, I am quite sure that the evaluation of the mixture model is going to be the limiting factor.

Other options to investigate:

No matter what, I would be happy to provide you with the equations and the model, still warning you that I doubt you will necessarily be able to improve on the computational times that you don't like :)

mww1990 commented 4 years ago

Hello Ian,

thanks for the links to your previous work. I will take a closer look at them. Thanks also for your testimonials about the calculation time!

At the moment I am actually using the TIL. As far as I know their splines are based on Tillner-Roth & Friend (1998). I contacted them recently due to your new formulations

To calculate the transport properties during the simulation, I already created matrices from which the required values were interpolated. I see the advantages and disadvantages as they were described by you.

In the spirit of research and hands-on mentality, I still want to try my best (and implement the equations in Modelica). Therefore I would be grateful if you could send me the formulations. I will tell you how it turned out and I will not forget that you warned me ;-)

Thanks also for the link to HelmholtzMedia for Modelica. I will take a closer look at it as well. Will this help me implementing your equations?

Thank you for your detailled support! Michael.

EricLemmon commented 4 years ago

We don't have the equations documented yet, it will take more time to do that than it will for you to implement them! For now I am closing this issue, but you can still submit more comments if needed.