Use of REFPROP as a property package #1463
-
(TLDR near bottom) I have been reading through the IDAES-PSE documentation (which is quite well done, by the way, thank you for the effort put into that!) to determine if IDAES would be a good fit for my modeling project. It seems like a really great software with a lot of features that I've been trying to implement manually just using SciPy, so I am very glad to find that there is software that solves these problems for me. However, the one concern I have is the property package. Various sections of my modeling conditions include difficult to model thermodynamic conditions for certain components and complicated mixtures in other sections. The only thermodynamics package that resolves these conditions properly is REFPROP (or more accurately for the complicated mixtures, a pre-release beta version of REFPROP sent to me by the developers at NIST). However, REFPROP is distributed as Fortran code with a DLL and wrappers for various languages including python, making it a complete black box for modeling purposes. From what I gather reading the documentation and other discussions posted here about similar things (especially #1265), this poses a challenge for IDAES (or more accurately, Pyomo/IPOPT). If I was only calculating properties for pure fluids, I could simply use the Helmholtz property package and load in the coefficients manually. However, the mixtures I am working with are extremely non-ideal, meaning it is very important that I use the Helmholtz mixing rules used by REFPROP (and GERG and others like them), with the accurate coefficients used by REFPROP. Here are my initial ideas to solve this issue based on what I've read:
For a little context, the conditions/mixtures I am modeling that require this effort are cryogenic hydrogen and ammonia-containing mixtures, specifically ammonia, hydrogen, and nitrogen. The overall model is an ammonia synthesis process. Or rather, many ammonia synthesis processes requiring a large range of thermodynamic states. TLDR: I need to use REFPROP, or at least the Helmholtz EOS with REFPROP's coefficients, for some complex thermodynamic calculations including highly non-ideal mixtures, which appears problematic within the IDAES ecosystem. Are there better ways to resolve this problem that I am not aware of? Or is this issue enough of a non-starter that I will not be able to use IDAES with this restriction? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
@eric-hintz There are a few option for what you want to do, each with their own advantages and disadvantages. The biggest problem you face here is that the Helmholtz equations of state themselves are high-order polynomials which require specialized root finding routines to give the right answer, which is why IDAES packaged them as external function calls (it is impractical to implement these as true equation-oriented constraints).
|
Beta Was this translation helpful? Give feedback.
@eric-hintz There are a few option for what you want to do, each with their own advantages and disadvantages. The biggest problem you face here is that the Helmholtz equations of state themselves are high-order polynomials which require specialized root finding routines to give the right answer, which is why IDAES packaged them as external function calls (it is impractical to implement these as true equation-oriented constraints).