-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration of Linux wrapper #1
Open
jowr
wants to merge
59
commits into
Heineken:master
Choose a base branch
from
jowr:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e shared library librefprop.so can be accessed from both C++ and Fortran. IMPORTANT: The wrapper classes for Modelica do not work, yet.
…from within Dymola.
…ary name to uppercase. Still no success with Dymola.
…nd mixtures. However, the C++ code in the wrapper could be a little cleaner...
…rted to use POCO library in test file.
…POCO framework. Now complete change yet because the Poco version is approximately 2.5 times slower. added a bash script to create function listings, just for convenience during development.
…the readme, extended the makefile
… now handled externally (check the readme), cleaned the makefile.
…on, remember to have all dependencies when compiling.
…rop wrapper. It seems to work with Dymola...
…5, added links to readme and a link to coolprop to the wrapper file
…fined. Unit conversion errors were removed as well.
…he "free" routines to enable parallel use, removed the tolerances in the state check
…n windows and linux, fixed array bug in flushing routines, updated description with link to Poco on GitHub.
… static library for Linux
…lpy at constant pressure and with respect to pressure at constant enthalpy to the wrapper. Major rewrite of the interface and the Refprop package. Should be easier to use now.
…dded some more, but tests are missing.
…see differences in numerical derivatives...
Included Henning's hint regarding the windows compiler console
Updated some instructions for Windows.
Removed Poco dependency and added instructions for Windows users.
Included an ammonia/water example for thomas and anish compiling from source is now default setting
Added link to releases
More description.
removed outdated folder references
Included Anish's suggestions
Small fixes
This reverts commit 368df8a.
This reverts commit b4a03bb.
Some testing.. (reverted from commit 368df8a)
Wrapper: Outcommented partial derivative and transport functions for speed testing..
(good in windows if old dll's are in environment variables :-)
…essure. Still missing density derivative wrt mass fraction... I have reduced the number of variables in ders[]. I also uploaded a Modelica Model that compares the analytical derivative and numerical ones...
…X, that includes dew and bubble properties. In C wrapper all sat variables are accompanied with sat in the variable name.. Made 2 choices on two-phase partial derivatives. Note that the numerical ones uses only one additional state, and that the more correct method would be to use 2 points, but increases CPU time. Also the analytical ones at constant concentration are pseudo, so they do not include the fact that liquid and vapor properties also depend on concentration. This should however be more quick. Made a choice on calculation of transport properties.
For setSat_pX I added an additional temperature input, if zero then sigma is zero, otherwise computed..
…t to computing partial derivatives, determined by "partialDersInputChoice": 1: none 2: partial derivatives of d wrt p,h,X In two-phase region: numerical differentiation for all derivatives In single phase region: dddX is numerical and others are analytical 3: partial derivatives of d wrt p,h,X In two-phase region: pseudo analytical (similar procedure as pure fluid - they give almost same result but with less CPU effort) In single phase region: dddX is numerical and others are analytical 4: partial derivatives of d and h wrt p,T,X In two-phase region: numerical differentiation for all derivatives In single phase region: dddX is numerical and others are analytical The fourth method is the only one that compares exactly with stepping forward in u,d,X (the baseline with most CPU effort) It is quicker in two-phase region compared to method 2, because T and P are equilibrium quantities.. Note that the dddX derivative is the difference in dddX1|X2=const-dddX2|X1=const
…tialDersInputChoice", an input the setState_phX and setState_pTX functions: 1: none (default) 2: partial derivatives of d wrt p,h,X In two-phase region: numerical differentiation for all derivatives In single phase region: dddX is numerical and others are analytical 3: partial derivatives of d wrt p,h,X In two-phase region: pseudo analytical (similar procedure as pure fluid - they give almost same result as method 2, and with less CPU effort). In single phase region: dddX is numerical and others are analytical 4: partial derivatives of d and h wrt p,T,X In two-phase region: numerical differentiation for all derivatives In single phase region: dddX is numerical and others are analytical The second and fourth methods compare exactly with stepping forward in u,d,X (the baseline with most CPU effort, due to tedious iteration in property functions at every time step, u,d,X -> T,p,h etc.). Method 4 is guicker in the two-phase region compared to method 2, because T and P are equilibrium quantities, and thus the most typical flash function.. Method 3 is fastest, but does not give correct dynamics and will cause mass convervation to fail. Note that the dddX derivative is the difference in dddX1|X2=const-dddX2|X1=const The partials have only been tested for binary mixtures..
…mations against d,u, states..
…er than that of gas.. included a saturation state to the setState calls, so all props are essentially output..
1. partial derivative, 2. transport properties
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Henning,
I cleaned the code and removed the compilation of Refprop itself. I guess the Linux wrapper can now be included in your release.
I did not change the Modelica part except for the PATH settings.
You are welcome to comment on the changes or to only include parts of it.
Regards
Jorrit