From 113bb2371fe37e151ff480e18503acddd13a0fdd Mon Sep 17 00:00:00 2001
From: jowr
Date: Tue, 18 Sep 2012 12:23:30 -0700
Subject: [PATCH 01/57] 2012:0918 21:20 - Added files to compile Refprop
library on Linux. The shared library librefprop.so can be accessed from both
C++ and Fortran. IMPORTANT: The wrapper classes for Modelica do not work,
yet.
---
_REFPROP-Wrapper/Version 0.5_linux/Makefile | 161 ++
.../Version 0.5_linux/doc/Doxyfile | 1749 +++++++++++++++++
.../Version 0.5_linux/refprop_wrapper.cpp | 812 ++++++++
.../Version 0.5_linux/refprop_wrapper.h | 44 +
.../Version 0.5_linux/refpropwrappertest.cpp | 71 +
.../Version 0.5_linux/src/PASS_FTN_LIN.FOR | 1364 +++++++++++++
.../Version 0.5_linux/src/librefprop.h | 331 ++++
.../Version 0.5_linux/src/refprop-ftn.cpp | 233 +++
package.mo | 4 +-
9 files changed, 4767 insertions(+), 2 deletions(-)
create mode 100644 _REFPROP-Wrapper/Version 0.5_linux/Makefile
create mode 100644 _REFPROP-Wrapper/Version 0.5_linux/doc/Doxyfile
create mode 100644 _REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
create mode 100644 _REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.h
create mode 100644 _REFPROP-Wrapper/Version 0.5_linux/refpropwrappertest.cpp
create mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/PASS_FTN_LIN.FOR
create mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/librefprop.h
create mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/refprop-ftn.cpp
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/Makefile b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
new file mode 100644
index 0000000..4fb8093
--- /dev/null
+++ b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
@@ -0,0 +1,161 @@
+# ============================================================================
+# Name : Makefile
+# Author : Jorrit Wronski (jowr@mek.dtu.dk)
+# Version : 0.2
+# Copyright : Use and modify at your own risk.
+# Description : Makefile for Refprop from Fortran and C++ tests.
+# ============================================================================
+
+# used for the output
+BINDIR =.
+THENAME =refprop
+
+THEWRAPPER =refprop_wrapper
+THETEST =refpropwrappertest
+
+###########################################################
+# Change these lines if you are using a different Fortran
+# compiler or if you would like to use other flags.
+###########################################################
+FC =gfortran
+FFLAGS =-Wall -ff2c -pedantic -ffloat-store# -fbounds-check
+FLINKFLAGS =$(FFLAGS)
+
+###########################################################
+# Change these lines if you are using a different C++
+# compiler or if you would like to use other flags.
+###########################################################
+CPPC =g++
+CPPFLAGS =-O2 -Wall -pedantic -fbounds-check -ansi -Wpadded -Wpacked -malign-double -mpreferred-stack-boundary=8
+
+###########################################################
+# Change these lines if you have other needs regarding
+# the library file.
+###########################################################
+LIBFLAGS =-rdynamic -fPIC -shared
+LIBDIR =/home/jowr/Documents/Fluids/refprop/v9.0
+LIBRARY =lib$(THENAME)
+LIBFILE =PASS_FTN_LIN
+DYNAMICLIBRARYEXTENSION =.so
+STATICLIBRARYEXTENSION =.a
+#ar -cvq $(LIBRARY)$(STATICLIBRARYEXTENSION) $(OBJECTFILES)
+HEADERFILE =lib$(THENAME)
+HEADEREXTENSION =.h
+### List of files to compile
+LIBOBJECTFILES = \
+ $(LIBDIR)/fortran/SETUP.o \
+ $(LIBDIR)/fortran/CORE_ANC.o \
+ $(LIBDIR)/fortran/CORE_BWR.o \
+ $(LIBDIR)/fortran/CORE_CPP.o \
+ $(LIBDIR)/fortran/CORE_DE.o \
+ $(LIBDIR)/fortran/CORE_ECS.o \
+ $(LIBDIR)/fortran/CORE_FEQ.o \
+ $(LIBDIR)/fortran/CORE_MLT.o \
+ $(LIBDIR)/fortran/CORE_PH0.o \
+ $(LIBDIR)/fortran/CORE_QUI.o \
+ $(LIBDIR)/fortran/CORE_STN.o \
+ $(LIBDIR)/fortran/CORE_PR.o \
+ $(LIBDIR)/fortran/FLASH2.o \
+ $(LIBDIR)/fortran/FLSH_SUB.o \
+ $(LIBDIR)/fortran/IDEALGAS.o \
+ $(LIBDIR)/fortran/MIX_AGA8.o \
+ $(LIBDIR)/fortran/MIX_HMX.o \
+ $(LIBDIR)/fortran/PROP_SUB.o \
+ $(LIBDIR)/fortran/REALGAS.o \
+ $(LIBDIR)/fortran/SAT_SUB.o \
+ $(LIBDIR)/fortran/SETUP2.o \
+ $(LIBDIR)/fortran/TRNS_ECS.o \
+ $(LIBDIR)/fortran/TRNS_TCX.o \
+ $(LIBDIR)/fortran/TRNS_VIS.o \
+ $(LIBDIR)/fortran/TRNSP.o \
+ $(LIBDIR)/fortran/UTILITY.o
+
+
+###########################################################
+# Compile the wrapper class and its tests.
+###########################################################
+.PHONY : wrapper
+wrapper : $(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION): $(THEWRAPPER).o
+ $(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(THEWRAPPER).o -l$(THENAME)
+
+.PHONY : test
+test : $(THETEST)
+$(THETEST) : $(THETEST).o $(THEWRAPPER).o $(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+ $(FC) $(FLINKFLAGS) -o $(THETEST) $(THETEST).o $(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+
+###########################################################
+# Compile the Fortran sources into a library file that can
+# be used as a shared object.
+###########################################################
+.PHONY : libinstall
+libinstall : library libheader
+ ln -sf $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION) /usr/include/$(HEADERFILE)$(HEADEREXTENSION)
+ ln -sf $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION) /usr/lib/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+
+.PHONY : libheader
+libheader : $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION)
+$(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION): src/$(HEADERFILE)$(HEADEREXTENSION)
+ cp src/$(HEADERFILE)$(HEADEREXTENSION) $(LIBDIR)
+
+.PHONY : library
+library : $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+$(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION): src/$(LIBFILE).o $(LIBOBJECTFILES)
+ $(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION) src/$(LIBFILE).o $(LIBOBJECTFILES)
+
+$(LIBDIR)/fortran/%.o: $(LIBDIR)/fortran/%.FOR
+ $(FC) $(FFLAGS) -o $(LIBDIR)/fortran/$*.o -c $<
+
+###########################################################
+# General rulesets for compilation.
+###########################################################
+src/%.o : src/%.FOR
+ $(FC) $(FFLAGS) -o src/$*.o -c $<
+
+src/%.o : src/%.cpp
+ $(CPPC) $(CPPFLAGS) -o src/$*.o -c $<
+
+%.o : %.FOR
+ $(FC) $(FFLAGS) -o $*.o -c $<
+
+%.o : %.cpp
+ $(CPPC) $(CPPFLAGS) -o $*.o -c $<
+
+.PHONY: clean
+clean:
+ $(RM) **.o **.so **.mod $(BINDIR)/RP-ftn
+
+###########################################################
+# Compile a simple example to illustrate the connection
+# between C++ and Fortran as well as the usage of the
+# created library with Fortran sources.
+###########################################################
+.PHONY : RP-ftn
+RP-ftn : $(BINDIR)/RP-ftn
+$(BINDIR)/RP-ftn : src/refprop-ftn.cpp libheader library
+ $(CPPC) $(CPPFLAGS) -o src/refprop-ftn.o -c src/refprop-ftn.cpp
+ $(FC) $(FLINKFLAGS) -o $(BINDIR)/RP-ftn src/refprop-ftn.o -l$(THENAME)
+
+.PHONY : f2f
+f2f : $(BINDIR)/f2f
+$(BINDIR)/f2f : example/ex-mix.for $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+ $(FC) $(FFLAGS) -o example/ex-mix.o -c example/ex-mix.for
+ $(FC) $(FLINKFLAGS) -o $(BINDIR)/f2f example/ex-mix.o $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+
+.PHONY : cpp2f
+cpp2f : $(BINDIR)/cpp2f
+$(BINDIR)/cpp2f : example/cpp2f.cpp example/easy_f.for
+ $(FC) $(FFLAGS) -o example/easy_f.o -c example/easy_f.for
+ $(CPPC) $(CPPFLAGS) -o example/cpp2f.o -c example/cpp2f.cpp
+ $(FC) $(FLINKFLAGS) -o $(BINDIR)/cpp2f example/cpp2f.o example/easy_f.o
+
+###########################################################
+# Create the documentation from annotations in the source
+# files with DOXYGEN, a configuration file is needed.
+###########################################################
+.PHONY : doc
+doc : doc/Doxyfile
+ doxygen doc/Doxyfile
+ cd doc/latex ; \
+ make all
+
\ No newline at end of file
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/doc/Doxyfile b/_REFPROP-Wrapper/Version 0.5_linux/doc/Doxyfile
new file mode 100644
index 0000000..7ec9879
--- /dev/null
+++ b/_REFPROP-Wrapper/Version 0.5_linux/doc/Doxyfile
@@ -0,0 +1,1749 @@
+# Doxyfile 1.7.4
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = "Refprop2Modelica - Linux"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER = 0.2
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer
+# a quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF = "Porting Henning Francke's Refprop2Modelica to Dymola on Linux"
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is
+# included in the documentation. The maximum height of the logo should not
+# exceed 55 pixels and the maximum width should not exceed 200 pixels.
+# Doxygen will copy the logo to the output directory.
+
+PROJECT_LOGO = /mnt/crypt/Software/modelica/Dymola/dymola-icon-small.png
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = "/home/jowr/Documents/Modelica_Libraries/REFPROP2Modelica/_REFPROP-Wrapper/Version 0.5_linux/doc"
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful if your file system
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this
+# tag. The format is ext=language, where ext is a file extension, and language
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also makes the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
+# unions are shown inside the group in which they are included (e.g. using
+# @ingroup) instead of on a separate page (for HTML and Man pages) or
+# section (for LaTeX and RTF).
+
+INLINE_GROUPED_CLASSES = NO
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penalty.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will roughly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespaces are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
+# do proper type resolution of all parameters of a function it will reject a
+# match between the prototype and the implementation of a member function even
+# if there is only one candidate or it is obvious which candidate to choose
+# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
+# will still accept a match between prototype and implementation in such cases.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or macro consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and macros in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page. This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command , where is the value of
+# the FILE_VERSION_FILTER tag, and is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. The create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# The WARN_NO_PARAMDOC option can be enabled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = "/home/jowr/Documents/Modelica_Libraries/REFPROP2Modelica/_REFPROP-Wrapper/Version 0.5_linux"
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
+# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
+# *.f90 *.f *.for *.vhd *.vhdl
+
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.d \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.idl \
+ *.odl \
+ *.cs \
+ *.php \
+ *.php3 \
+ *.inc \
+ *.m \
+ *.mm \
+ *.dox \
+ *.py \
+ *.f90 \
+ *.f \
+ *.for \
+ *.vhd \
+ *.vhdl
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command , where
+# is the value of the INPUT_FILTER tag, and is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty or if
+# non of the patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
+# and it is also possible to disable source filtering for a specific pattern
+# using *.ext= (so without naming a filter). This option only has effect when
+# FILTER_SOURCE_FILES is enabled.
+
+FILTER_SOURCE_PATTERNS =
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code. Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header. Note that when using a custom header you are responsible
+# for the proper inclusion of any scripts and style sheets that doxygen
+# needs, which is dependent on the configuration options used.
+# It is adviced to generate a default header using "doxygen -w html
+# header.html footer.html stylesheet.css YourConfigFile" and then modify
+# that header. Note that the header is subject to change so you typically
+# have to redo this when upgrading to a newer version of doxygen or when
+# changing the value of configuration settings such as GENERATE_TREEVIEW!
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that
+# the files will be copied as-is; there are no commands or markers available.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+# Doxygen will adjust the colors in the stylesheet and background images
+# according to this color. Hue is specified as an angle on a colorwheel,
+# see http://en.wikipedia.org/wiki/Hue for more information.
+# For instance the value 0 represents red, 60 is yellow, 120 is green,
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+# the colors in the HTML output. For a value of 0 the output will use
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+# the luminance component of the colors in the HTML output. Values below
+# 100 gradually make the output lighter, whereas values above 100 make
+# the output darker. The value divided by 100 is the actual gamma applied,
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+
+GENERATE_DOCSET = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+#
+# Qt Help Project / Custom Filters.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+#
+# Qt Help Project / Filter Attributes.
+
+QHP_SECT_FILTER_ATTRS =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+# will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+# the help appears.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
+# (range [0,1..20]) that doxygen will group on one line in the generated HTML
+# documentation. Note that a value of 0 will completely suppress the enum
+# values from appearing in the overview section.
+
+ENUM_VALUES_PER_LINE = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are
+# not supported properly for IE 6.0, but are supported on all modern browsers.
+# Note that when changing this option you need to delete any form_*.png files
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
+# (see http://www.mathjax.org) which uses client side Javascript for the
+# rendering instead of using prerendered bitmaps. Use this if you do not
+# have LaTeX installed or if you want to formulas look prettier in the HTML
+# output. When enabled you also need to install MathJax separately and
+# configure the path to it using the MATHJAX_RELPATH option.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you need to specify the location relative to the
+# HTML output directory using the MATHJAX_RELPATH option. The destination
+# directory should contain the MathJax.js script. For instance, if the mathjax
+# directory is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the
+# mathjax.org site, so you can quickly see the result without installing
+# MathJax, but it is strongly recommended to install a local copy of MathJax
+# before deployment.
+
+MATHJAX_RELPATH = http://www.mathjax.org/mathjax
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a PHP enabled web server instead of at the web client
+# using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server
+# based approach is that it scales better to large projects and allows
+# full text search. The disadvantages are that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
+# the generated latex document. The footer should contain everything after
+# the last chapter. If it is left blank doxygen will generate a
+# standard footer. Notice: only use this tag if you know what you are doing!
+
+LATEX_FOOTER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# pointed to by INCLUDE_PATH will be searched when a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition that
+# overrules the definition found in the source code.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all references to function-like macros
+# that are alone on a line, have an all uppercase name, and do not end with a
+# semicolon, because these will confuse the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option also works with HAVE_DOT disabled, but it is recommended to
+# install and use dot, since it yields more powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+# allowed to run in parallel. When set to 0 (the default) doxygen will
+# base this on the number of processors available in the system. You can set it
+# explicitly to a value larger than 0 to get control over the balance
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS = 0
+
+# By default doxygen will write a font called Helvetica to the output
+# directory and reference it in all dot files that doxygen generates.
+# When you want a differently looking font you can specify the font name
+# using DOT_FONTNAME. You need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will generate a graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are svg, png, jpg, or gif.
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the
+# \mscfile command).
+
+MSCFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
new file mode 100644
index 0000000..d2a7c92
--- /dev/null
+++ b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
@@ -0,0 +1,812 @@
+/*
+ wrapper code for a static library containing functions from the dynamic library refprop.dll
+ to be used from Modelica
+
+ This file is released under the Modelica License 2.
+
+ Coded in 2010 by
+ Henning Francke
+ francke@gfz-potsdam.de
+
+ Helmholtz Centre Potsdam
+ GFZ German Research Centre for Geosciences
+ Telegrafenberg, D-14473 Potsdam
+
+ Modified for Linux in 2012 by
+ Jorrit Wronski (jowr@mek.dtu.dk)
+ DTU Mechanical Engineering
+
+ needs
+ librefprop.h - header for librefprop.so, based on examples
+ refprop_wrapper.h - header for static REFPROP_wrapper.a, also needed by Dymola
+
+ Use the provided makefile to install the library file from source.
+*/
+
+//#define DEBUGMODE 1
+
+//#include
+#include
+#include
+#include
+#include
+#include // dlopen etc
+#include // tolower etc
+#include "refprop_wrapper.h"
+
+
+
+// Some constants...
+const long filepathlength=1024;
+const long errormessagelength=255+filepathlength;
+const long lengthofreference=3;
+const long refpropcharlength=255;
+const long ncmax=20; // Note: ncmax is the max number of components
+
+char *str_replace(char *str, char *search, char *replace, long *count) {
+ int i,n_ret;
+ int newlen = strlen(replace);
+ int oldlen = strlen(search);
+ char *ret;
+ *count = 0;
+
+ //count occurrences of searchstring
+ for (i = 0; oldlen && str[i]; ++i)
+ if (strstr(&str[i], search) == &str[i]){ // if walk through is at searchstr
+ ++*count, i+=oldlen - 1;
+ }
+ ret = (char *) calloc(n_ret = (strlen(str) + 1 + *count * (newlen - oldlen)), sizeof(char));
+ if (!ret){
+ printf("Could not allocate memory");
+ return "";
+ }
+
+ if (!*count){
+ strncpy(ret,str,n_ret);
+ //if (DEBUGMODE) printf("RET: %i %s\n",oldlen,str);
+ }else{
+ i = 0;
+ while (*str)
+ if (strstr(str, search) == str)
+ strncpy(&ret[i], replace,n_ret-i-1),
+ i += newlen,
+ str += oldlen;
+ else
+ ret[i++] = *str++;
+ ret[i] = '\0';
+ }
+ return ret;
+}
+
+int init_REFPROP(char* fluidnames, char* REFPROP_PATH, long* nX, char* herr, void* RefpropdllInstance, char* errormsg, int DEBUGMODE){
+// Sets up the interface to the REFPROP.DLL
+// is called by props_REFPROP and satprops_REFPROP
+ char DLL_PATH[filepathlength], FLD_PATH[filepathlength];
+ long ierr=0;
+
+ if (strlen(REFPROP_PATH)>filepathlength){
+ sprintf(errormsg,"REFPROP_PATH too long (%i > %i)\n",strlen(REFPROP_PATH),filepathlength);
+ return 0;
+ }
+
+ strcpy(FLD_PATH, REFPROP_PATH);
+ strcpy(DLL_PATH, REFPROP_PATH);
+ if (REFPROP_PATH[strlen(REFPROP_PATH)-1]=='\\'){ //if last char is backslash
+ strcat(DLL_PATH, "refprop.dll");
+ strcat(FLD_PATH, "fluids\\");
+ }else{//add missing backslash
+ strcat(DLL_PATH,"\\refprop.dll");
+ strcat(FLD_PATH, "\\fluids\\");
+ }
+
+ //*RefpropdllInstance = LoadLibrary(DLL_PATH);
+// RefpropdllInstance = dlopen(DLL_PATH, RTLD_LAZY);
+// if (!RefpropdllInstance){
+// sprintf(errormsg,"ERROR in opening librefprop.so at \"%s\"",DLL_PATH);
+// fputs (dlerror(), stderr);
+// return 100;
+// }
+
+
+ char hrf[lengthofreference+1],hfmix[filepathlength+1+7];
+ //char hf[refpropcharlength*ncmax];
+ char *hf;
+
+
+ //parse fluid composition string and insert absolute paths
+ char replace[filepathlength+6];
+ strcpy(replace,".fld|");
+ //if (DEBUGMODE) printf("REPLACE: %s\n",replace);
+ strncat(replace, FLD_PATH,filepathlength-strlen(replace));
+
+ int hf_len = strlen(fluidnames)+ncmax*(strlen(replace)-1)+4;
+ hf = (char*) calloc(hf_len, sizeof(char));
+
+ strncpy(hf,FLD_PATH,hf_len);
+ strncat(hf,str_replace(fluidnames, "|", replace, nX),hf_len-strlen(hf)); //str_replace returns the number of delimiters -> nX, but components are one more ...
+ if (++*nX>ncmax){ //...that's why nX is incremented
+ sprintf(errormsg,"Too many components (More than %i)\n",ncmax);
+ return 0;
+ }
+ (hf,".fld",hf_len-strlen(hf));
+ if (DEBUGMODE) printf("Fluid composition string: \"%s\"\n",hf);
+
+ strncpy(hfmix,FLD_PATH,filepathlength+1);//add absolute path
+ strncat(hfmix,"hmx.bnc",filepathlength+1+7-strlen(hfmix));
+ strcpy(hrf,"DEF");
+
+
+// //...Call SETUP to initialize the program
+// SETUPdll = (fp_SETUPdllTYPE) GetProcAddress(*RefpropdllInstance,"SETUPdll");
+// //printf("hf:%s\n hrf: %s\n hfmix: %s\n",hf,hrf,hfmix);
+// void (*SETUP)(void);
+// void (*SETUP)(void);
+// SETUP = dlsym(RefpropdllInstance, "SETUPdll");
+// if ((errormsg = dlerror()) != NULL) {
+// fputs(errormsg, stderr);
+// exit(1);
+// }
+
+
+ if (DEBUGMODE) printf("Running SETUPdll...\n");
+ SETUPdll(*nX, hf, hfmix, hrf, ierr, herr);
+ if (DEBUGMODE) printf("SETUPdll run complete (Error no: %i)\n",ierr);
+
+
+// if (DEBUGMODE) printf("Error code processing...\n");
+ switch(ierr){
+ case 101:
+ //strcpy(errormsg,"error in opening file");
+// if (DEBUGMODE) printf("Error 101\n");
+ sprintf(errormsg,"error in opening file %s",hf);
+ break;
+ case 102:
+// if (DEBUGMODE) printf("Error 102\n");
+ strcpy(errormsg,"error in file or premature end of file");
+ break;
+ case -103:
+// if (DEBUGMODE) printf("Error -103\n");
+ strcpy(errormsg,"unknown model encountered in file");
+ break;
+ case 104:
+// if (DEBUGMODE) printf("Error 104\n");
+ strcpy(errormsg,"error in setup of model");
+ break;
+ case 105:
+// if (DEBUGMODE) printf("Error 105\n");
+ strcpy(errormsg,"specified model not found");
+ break;
+ case 111:
+// if (DEBUGMODE) printf("Error 111\n");
+ strcpy(errormsg,"error in opening mixture file");
+ break;
+ case 112:
+// if (DEBUGMODE) printf("Error 112\n");
+ strcpy(errormsg,"mixture file of wrong type");
+ break;
+ case 114:
+// if (DEBUGMODE) printf("Error 114\n");
+ strcpy(errormsg,"nc<>nc from setmod");
+ break;
+ case 0:
+ break;
+ default:
+// if (DEBUGMODE) printf("Unknown error\n");
+ strcpy(errormsg,"Unknown error");
+ //strcpy(errormsg,"Setup was successful!");
+ strncpy(errormsg,herr,errormessagelength);
+ break;
+ }
+ free(hf);
+ return ierr;
+}
+
+
+double props_REFPROP(char* what, char* statevars_in, char* fluidnames, double *props, double statevar1, double statevar2, double* x, int phase, char* REFPROP_PATH, char* errormsg, int DEBUGMODE){
+/*Calculates thermodynamic properties of a pure substance/mixture, returns both single value and array containing all calculated values (because the are calculated anyway)
+INPUT:
+ what: character specifying return value (p,T,h,s,d,wm,q,e,w) - Explanation of variables at the end of this function
+ statevars: string of any combination of two variables out of p,T,h,s,d
+ fluidnames: string containing names of substances in mixtured separated by |, substance names are identical to those of *.fld-files in REFPROP program directory
+ statevar1,statevar2: values of the two variables specified in statevars
+ x: array containing the mass fractions of the components of the mixture
+ REFPROP_PATH: string defining the path of the refprop.dll
+OUTPUT
+ return value: value of variable specified by the input variable what
+ props: Array containing all calculated values (props[0] containing error number)
+ errormsg: string containing error message
+*/
+ char statevars[3];
+ double p, T, d, val, dl,dv,q,e,h,s,cv,cp,w,wm,wmliq,wmvap,eta,tcx;
+ long nX,ierr=0; //zero means no error
+ char herr[errormessagelength+1];
+// HINSTANCE RefpropdllInstance;// Then have windows load the library.
+ void* RefpropdllInstance;
+
+ if (DEBUGMODE) printf("\nStarting function props_REFPROP to calc %c...\n", what[0]);
+
+ //initialize interface to REFPROP.dll
+
+ if(props[0]=(double)init_REFPROP(fluidnames, REFPROP_PATH, &nX, herr, &RefpropdllInstance, errormsg, DEBUGMODE)){
+ printf("Error no. %g initializing REFPROP: \"%s\"\n", props[0], errormsg);
+ return 0;
+ }
+
+ //CALCULATE MOLAR MASS
+// WMOLdll = (fp_WMOLdllTYPE) GetProcAddress(RefpropdllInstance,"WMOLdll");
+ WMOLdll(x,wm);
+// sprintf(errormsg," %10.4f, %10.4f, %10.4f,",x[0],x[1],wm);
+ wm /= 1000; //g/mol -> kg/mol
+
+ //identify and assign passed state variables
+ statevars[0] = tolower(statevars_in[0]);
+ statevars[1] = tolower(statevars_in[1]);
+ statevars[2] = '\0';
+ if (statevars[0]!='\0'){
+ if (statevars[0]==statevars[1]){
+ props[0] = 3;
+ sprintf(errormsg,"State variable 1 is the same as state variable 2 (%c)",statevars[0]);
+ return 0;
+ }
+ for (int ii=0;ii<2;ii++){
+ val = (ii==0?statevar1:statevar2);
+ switch(statevars[ii]){
+ case 'p':
+ p = val/1000; //Pa->kPa
+ break;
+ case 't':
+ T = val;
+ break;
+ case 's':
+ s = val*wm; //J/(kg�K) -> kJ/(mol�K)
+ break;
+ case 'h':
+ h = val*wm; //J/kg --> kJ/mol
+ break;
+ case 'd':
+ d = val/wm/1000; //kg/m� -> mol/dm�
+ break;
+ case 'q': //vapor quality on a mass basis [mass vapor/total mass] (q=0 indicates saturated liquid, q=1 indicates saturated vapor)
+ q = val;
+ break;
+ default:
+ props[0] = 2;
+ sprintf(errormsg,"Unknown state variable %i: %c",ii+1 ,statevars[ii]);/**/
+ return 0;
+ }
+ }
+ }
+
+/*
+//...If phase j is known, call TPRHOdll:
+ long j=2; //phase definition(j=1: Liquid, j=2: Vapor)
+ long tmp_int=0;
+ TPRHOdll = (fp_TPRHOdllTYPE) GetProcAddress(RefpropdllInstance,"TPRHOdll");
+ TPRHOdll(t,p,x,j,tmp_int,d,ierr,herr,errormessagelength);
+*/
+//...If phase is not known, call TPFLSH
+ double xliq[ncmax],xvap[ncmax],f[ncmax];
+ long kq=2;/* additional input--only for TQFLSH and PQFLSH
+ kq--flag specifying units for input quality
+ kq = 1 quality on MOLAR basis [moles vapor/total moles]
+ kq = 2 quality on MASS basis [mass vapor/total mass]*/
+// sprintf(errormsg,"Huhu! %s %d", statevars, ierr);
+ if (ierr==0){
+ if (strcmp(statevars,"pt")==0 || strcmp(statevars,"tp")==0){
+// strcat(errormsg,"Bin in TP!");
+ if (phase==2){ //fluid state is known to be two phase
+// TPFL2dll = (fp_TPFL2dllTYPE) GetProcAddress(RefpropdllInstance,"TPFL2dll");
+ TPFL2dll(T,p,x,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
+ }else{
+// TPFLSHdll = (fp_TPFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TPFLSHdll");
+ TPFLSHdll(T,p,x,d,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ }
+ }else if (strcmp(statevars,"ph")==0 || strcmp(statevars,"hp")==0){
+/* if (phase==1){ //fluid state is known to be single phase
+ PHFL1dll = (fp_PHFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PHFL1dll");
+ PHFL1dll(p,h,x,liqvap,T,d,ierr,herr,errormessagelength);
+ if (liqvap==1) dl=d; else dv=d;
+ }else{*/
+// PHFLSHdll = (fp_PHFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PHFLSHdll");
+ PHFLSHdll(p,h,x,T,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
+// }
+ }else if (strcmp(statevars,"pd")==0 || strcmp(statevars,"dp")==0){
+ if (phase==1){ //fluid state is known to be single phase
+// PDFL1dll = (fp_PDFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PDFL1dll");
+ PDFL1dll(p,d,x,T,ierr,herr,errormessagelength);
+ }else{
+// PDFLSHdll = (fp_PDFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PDFLSHdll");
+ PDFLSHdll(p,d,x,T,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ }
+ }else if (strcmp(statevars,"ps")==0 || strcmp(statevars,"sp")==0){
+/* if (phase==1){ //fluid state is known to be single phase
+ PSFL1dll = (fp_PSFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PSFL1dll");
+ PSFL1dll(p,s,x,kph,T,d,ierr,herr,errormessagelength);
+ if (liqvap==1) dl=d; else dv=d;
+ }else{*/
+// PSFLSHdll = (fp_PSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PSFLSHdll");
+ PSFLSHdll(p,s,x,T,d,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
+// }
+ }else if (strcmp(statevars,"pq")==0 || strcmp(statevars,"qp")==0){
+// PQFLSHdll = (fp_PQFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PQFLSHdll");
+ PQFLSHdll(p,q,x,kq,T,d,dl,dv,xliq,xvap,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+// strcat(errormsg,"Bin in PQ!");
+ }else if (strcmp(statevars,"th")==0 || strcmp(statevars,"ht")==0){
+/* if (phase==1){ //fluid state is known to be single phase
+ THFL1dll = (fp_THFL1dllTYPE) GetProcAddress(RefpropdllInstance,"THFL1dll");
+ THFL1dll(T,h,x,Dmin,Dmax,d,ierr,herr,errormessagelength);
+ }else{*/
+// THFLSHdll = (fp_THFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"THFLSHdll");
+ long kr = 2;
+/* kr--phase flag: 1 = input state is liquid
+ 2 = input state is vapor in equilibrium with liq
+ 3 = input state is liquid in equilibrium with solid
+ 4 = input state is vapor in equilibrium with solid */
+ THFLSHdll (T,h,x,kr,p,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
+// }
+ }else if (strcmp(statevars,"td")==0 || strcmp(statevars,"dt")==0){
+// TDFLSHdll = (fp_TDFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TDFLSHdll");
+ TDFLSHdll(T,d,x,p,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ }else if (strcmp(statevars,"ts")==0 || strcmp(statevars,"st")==0){
+// TSFLSHdll = (fp_TSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TSFLSHdll");
+ long kr = 2;
+ TSFLSHdll (T,s,x,kr,p,d,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
+ }else if (strcmp(statevars,"tq")==0 || strcmp(statevars,"qt")==0){
+// TQFLSHdll = (fp_TQFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TQFLSHdll");
+ TQFLSHdll(T,q,x,kq,p,d,dl,dv,xliq,xvap,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ }else if (strcmp(statevars,"hd")==0 || strcmp(statevars,"dh")==0){
+ switch(phase){ //fluid state is known to be single phase
+ case 1:
+// DHFL1dll = (fp_DHFL1dllTYPE) GetProcAddress(RefpropdllInstance,"DHFL1dll");
+ DHFL1dll(d,h,x,T,ierr,herr,errormessagelength);
+ break;
+ case 2:
+// DHFL2dll = (fp_DHFL2dllTYPE) GetProcAddress(RefpropdllInstance,"DHFL2dll");
+ DHFL2dll(d,h,x,T,p,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
+ break;
+ default:
+// DHFLSHdll = (fp_DHFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"DHFLSHdll");
+ DHFLSHdll(d,h,x,T,p,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
+ }
+ }else if (strcmp(statevars,"hs")==0 || strcmp(statevars,"sh")==0){
+// HSFLSHdll = (fp_HSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"HSFLSHdll");
+ HSFLSHdll(h,s,x,T,p,d,dl,dv,xliq,xvap,q,e,cv,cp,w,ierr,herr,errormessagelength);
+ }else if (strcmp(statevars,"ds")==0 || strcmp(statevars,"sd")==0){
+ switch(phase){ //fluid state is known to be single phase
+ case 1:
+// DSFL1dll = (fp_DSFL1dllTYPE) GetProcAddress(RefpropdllInstance,"DSFL1dll");
+ DSFL1dll(d,s,x,T,ierr,herr,errormessagelength);
+ break;
+ case 2:
+// DSFL2dll = (fp_DSFL2dllTYPE) GetProcAddress(RefpropdllInstance,"DSFL2dll");
+ DSFL2dll(d,s,x,T,p,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
+ break;
+ default:
+// DSFLSHdll = (fp_DSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"DSFLSHdll");
+ DSFLSHdll(d,s,x,T,p,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
+ }
+ }else
+ sprintf(errormsg,"Unknown combination of state variables! %s", statevars);
+ }
+
+ switch(tolower(what[0])){ //CHOOSE RETURN VARIABLE
+ case 'v': //dynamic viscosity uPa.s
+ case 'l': //thermal conductivity W/m.K
+// TRNPRPdll = (fp_TRNPRPdllTYPE) GetProcAddress(RefpropdllInstance,"TRNPRPdll");
+ TRNPRPdll (T,d,x,eta,tcx,ierr,herr,errormessagelength);
+ }
+
+
+ switch(ierr){
+ case 1:
+ sprintf(errormsg,"T=%f < Tmin",T);
+ break;
+ case 4:
+ sprintf(errormsg,"P=%f < 0",p);
+ break;
+ case 5:
+ sprintf(errormsg,"T=%f and p=%f out of range",T,p);
+ break;
+ case 8:
+ strcpy(errormsg,"x out of range (component and/or sum < 0 or > 1)");
+ break;
+ case 9:
+ sprintf(errormsg,"x or T=%f out of range",T);
+ break;
+ case 12:
+ sprintf(errormsg,"x out of range and P=%f < 0",p);
+ break;
+ case 13:
+ sprintf(errormsg,"x, T=%f and p=%f out of range",T,p);
+ break;
+ case 16:
+ strcpy(errormsg,"TPFLSH error: p>melting pressure");
+ break;
+ case -31:
+ sprintf(errormsg,"Temperature T=%f out of range for conductivity",T);
+ break;
+ case -32:
+ sprintf(errormsg,"density d=%f out of range for conductivity",d);
+ break;
+ case -33:
+ sprintf(errormsg,"Temperature T=%f and density d=%f out of range for conductivity",T,d);
+ break;
+ case -41:
+ sprintf(errormsg,"Temperature T=%f out of range for viscosity",T);
+ break;
+ case -42:
+ sprintf(errormsg,"density d=%f out of range for viscosity",d);
+ break;
+ case -43:
+ sprintf(errormsg,"Temperature T=%f and density d=%f out of range for viscosity",T,d);
+ break;
+ case -51:
+ sprintf(errormsg,"Temperature T=%f out of range for conductivity and viscosity",T);
+ break;
+ case -52:
+ sprintf(errormsg,"density d=%f out of range for conductivity and viscosity",d);
+ break;
+ case -53:
+ sprintf(errormsg,"Temperature T=%f and density d=%f out of range for conductivity and viscosity",T,d);
+ break;
+ case 39:
+ sprintf(errormsg,"model not found for thermal conductivity");
+ break;
+ case 49:
+ sprintf(errormsg,"model not found for viscosity");
+ break;
+ case 50:
+ sprintf(errormsg,"ammonia/water mixture (no properties calculated)");
+ break;
+ case 51:
+ sprintf(errormsg,"exactly at T=%f, rhoc for a pure fluid; k is infinite",T);
+ break;
+ case -58:
+ case -59:
+ sprintf(errormsg,"ECS model did not converge");
+ break;
+ case 211:
+ sprintf(errormsg,"TPFLSH bubble point calculation did not converge: [SATTP error 1] iteration failed to converge");
+ case 239:
+ sprintf(errormsg,"THFLSH error: Input value of enthalpy (%f) is outside limits",h);
+ break;
+ case 248:
+ sprintf(errormsg,"DSFLSH error: Iteration did not converge with d=%f and s=%f",d,s);
+ break;
+ case 249:
+ sprintf(errormsg,"PHFLSH error: Input value of enthalpy (%f) is outside limits",h);
+ break;
+ case 271:
+ sprintf(errormsg,"TQFLSH error: T=%f > Tcrit, T-q calculation not possible",T);
+ break;
+ case 291:
+ sprintf(errormsg,"PQFLSH error: p=%f > pcrit, p-q calculation not possible",T);
+ break;
+ default:
+ strncpy(errormsg,herr,errormessagelength);
+ }
+
+
+ //CONVERT TO SI-UNITS
+ if (ierr==0){
+ WMOLdll(xliq,wmliq);
+ wmliq /= 1000; //g/mol -> kg/mol
+ WMOLdll(xvap,wmvap);
+ wmvap /= 1000; //g/mol -> kg/mol
+ //printf("%d,%s\n%s\nP,T,D,H,CP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",nX,hf,hfmix,p,t,d,h,wm);
+ d *= wm*1000; //mol/dm� -> kg/m�
+ dl *= wmliq*1000; //mol/dm� -> kg/m�
+ dv *= wmvap*1000; //mol/dm� -> kg/m�
+ e /= e/wm; //kJ/mol -> J/kg
+ h /= wm; //kJ/mol -> J/kg
+ s /= wm; //kJ/(mol�K) -> J/(kg�K)
+ cv /= wm;
+ cp /= wm;
+ p *= 1000; //kPa->Pa
+ if (nX>1 && abs(q)<990) q *= wmvap/wm; //molar bass -> mass basis
+ eta/=1e6; //uPa.s -> Pa.s
+ }
+
+ //ASSIGN VALUES TO RETURN ARRAY
+ props[0] = ierr;//error code
+ props[1] = p;//pressure in Pa
+ props[2] = T; //Temperature in K
+ props[3] = wm; //molecular weight
+ props[4] = d; //density
+ props[5] = dl; //density of liquid phase
+ props[6] = dv; //density of liquid phase
+ props[7] = q; //vapor quality on a mass basis [mass vapor/total mass] (q=0 indicates saturated liquid, q=1 indicates saturated vapor)
+ props[8] = e; //inner energy
+ props[9] = h; //specific enthalpy
+ props[10] = s;//specific entropy
+ props[11] = cv;
+ props[12] = cp;
+ props[13] = w; //speed of sound
+ props[14] = wmliq;
+ props[15] = wmvap;
+ for (int ii=0;ii kg/mol
+
+
+ //identify and assign passed state variables
+ statevar[0] = tolower(statevar[0]);
+ if (statevar[0]!='\0'){
+ switch(statevar[0]){
+ case 'p':
+ p = statevarval/1000; //Pa->kPa
+ break;
+ case 't':
+ T = statevarval;
+ break;
+ case 'd':
+ d = statevarval/wm/1000; //kg/m� -> mol/dm�
+ break;
+/* case 's':
+ s = statevarval*wm; //J/(kg�K) -> kJ/(mol�K)
+ break;
+ case 'h':
+ h = statevarval*wm; //J/kg --> kJ/mol
+ break;
+*/ default:
+ props[0] = 2;
+ sprintf(errormsg,"Unknown state variable: %c", statevarval);
+ return 0;
+ }
+ }
+ double xliq[ncmax],xvap[ncmax],f[ncmax];
+
+ long j=2,kr;
+/* j--phase flag: 1 = input x is liquid composition (bubble point)
+ 2 = input x is vapor composition (dew point)
+ 3 = input x is liquid composition (freezing point)
+ 4 = input x is vapor composition (sublimation point)
+*/
+ if (ierr==0)
+ if (~strcmp(statevar,"t")){
+// SATTdll = (fp_SATTdllTYPE) GetProcAddress(RefpropdllInstance,"SATTdll");
+ SATTdll(T,x,j,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
+ }else if (~strcmp(statevar,"p")){
+// SATPdll = (fp_SATPdllTYPE) GetProcAddress(RefpropdllInstance,"SATPdll");
+ SATPdll(p,x,j,T,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
+ switch(ierr){
+ case 2:
+ strcpy(errormsg,"P < Ptp");
+ break;
+ case 4:
+ strcpy(errormsg,"P < 0");
+ break;
+ }
+ //sprintf(errormsg,"p=%f, h=%f",p ,statevar2);
+ }else if (~strcmp(statevar,"d")){
+// SATDdll = (fp_SATDdllTYPE) GetProcAddress(RefpropdllInstance,"SATDdll");
+ SATDdll(d,x,j,kr,T,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
+ switch(ierr){
+ case 2:
+ strcpy(errormsg,"D > Dmax");
+ break;
+ }
+ }
+
+ switch(ierr){
+ case 0:
+ strcpy(errormsg,"Saturation routine successful");
+ break;
+ case 1:
+ sprintf(errormsg,"T=%f < Tmin",T);
+ break;
+ case 8:
+ strcpy(errormsg,"x out of range");
+ break;
+ case 9:
+ strcpy(errormsg,"T and x out of range");
+ break;
+ case 10:
+ strcpy(errormsg,"D and x out of range");
+ break;
+ case 12:
+ strcpy(errormsg,"P and x out of range");
+ break;
+ case 120:
+ strcpy(errormsg,"CRITP did not converge");
+ break;
+ case 121:
+ strcpy(errormsg,"T > Tcrit");
+ break;
+ case 122:
+ strcpy(errormsg,"TPRHO-liquid did not converge (pure fluid)");
+ break;
+ case 123:
+ strcpy(errormsg,"TPRHO-vapor did not converge (pure fluid)");
+ break;
+ case 124:
+ strcpy(errormsg,"pure fluid iteration did not converge");
+ break;
+ case -125:
+ strcpy(errormsg,"TPRHO did not converge for parent ph (mix)");
+ break;
+ case -126:
+ strcpy(errormsg,"TPRHO did not converge for incipient (mix)");
+ break;
+ case -127:
+ strcpy(errormsg,"composition iteration did not converge");
+ break;
+ case 128:
+ strcpy(errormsg,"mixture iteration did not converge");
+ break;
+ case 140:
+ strcpy(errormsg,"CRITP did not converge");
+ break;
+ case 141:
+ strcpy(errormsg,"P > Pcrit");
+ break;
+ case 142:
+ strcpy(errormsg,"TPRHO-liquid did not converge (pure fluid)");
+ break;
+ case 143:
+ strcpy(errormsg,"TPRHO-vapor did not converge (pure fluid)");
+ break;
+ case 144:
+ strcpy(errormsg,"pure fluid iteration did not converge");
+ break;
+ case -144:
+ strcpy(errormsg,"Raoult's law (mixture initial guess) did not converge");
+ break;
+ case -145:
+ strcpy(errormsg,"TPRHO did not converge for parent ph (mix)");
+ break;
+ case -146:
+ strcpy(errormsg,"TPRHO did not converge for incipient (mix)");
+ break;
+ case -147:
+ strcpy(errormsg,"composition iteration did not converge");
+ break;
+ case 148:
+ strcpy(errormsg,"mixture iteration did not converge");
+ break;
+ case 160:
+ strcpy(errormsg,"CRITP did not converge");
+ break;
+ case 161:
+ strcpy(errormsg,"SATD did not converge");
+ break;
+ default:
+ strncpy(errormsg,herr,errormessagelength);
+ }
+
+ /*SATHdll = (fp_SATHdllTYPE) GetProcAddress(RefpropdllInstance,"SATHdll");
+ SATEdll = (fp_SATEdllTYPE) GetProcAddress(RefpropdllInstance,"SATEdll");
+ SATSdll = (fp_SATSdllTYPE) GetProcAddress(RefpropdllInstance,"SATSdll");*/
+
+
+ //CONVERT TO SI-UNITS
+ if (ierr==0){
+ WMOLdll(xliq,wmliq);
+ wmliq /= 1000; //g/mol -> kg/mol
+ WMOLdll(xvap,wmvap);
+ wmvap /= 1000; //g/mol -> kg/mol
+ //printf("%d,%s\n%s\nP,T,D,H,CP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",nX,hf,hfmix,p,t,d,h,wm);
+ d *= wm*1000; //mol/dm� -> kg/m�
+ dl *= wmliq*1000; //mol/dm� -> kg/m�
+ dv *= wmvap*1000; //mol/dm� -> kg/m�
+/* e /= e/wm; //kJ/mol -> J/kg
+ h /= wm; //kJ/mol -> J/kg
+ s /= wm; //kJ/(mol�K) -> J/(kg�K)
+*/ p *= 1000; //kPa->Pa
+ }
+
+
+ //ASSIGN VALUES TO RETURN ARRAY
+ props[0] = ierr;//error code
+ props[1] = p;//pressure in kPa->Pa
+ props[2] = T; //Temperature in K
+ props[3] = wm; //molecular weight
+ props[4] = d; //density
+ props[5] = dl; //density of liquid phase
+ props[6] = dv; //density of liquid phase
+ props[7] = 0;
+ props[8] = 0; //inner energy
+ props[9] = 0; //specific enthalpy
+ props[10] = 0;//specific entropy
+ props[11] = 0;
+ props[12] = 0;
+ props[13] = 0; //speed of sound
+ props[14] = wmliq;
+ props[15] = wmvap;
+ for (int ii=0;ii
+#include
+#include
+#include "refprop_wrapper.h"
+
+//double density(char* fluidname_in, double p, double t, double* x, char* REFPROP_PATH);
+//double density(char* fluidname_in, double p, double t);
+//double density(double p, double t);
+//char *str_replace(char *str, char *search, char *replace, long *count);
+
+int main(int argc, char* argv[]){
+ double p,t,d;
+ char fluidname[255];
+ char errormsg[255+1024];
+ double* x;
+ double *props;
+ double sumx;
+ int i;
+ int nX = argc-5;
+ int DEBUG = 1;
+
+ if (argc<5){
+ printf("usage: refpropwrappertest.exe statevars fluidname1|fluidname2|... statevar1 statevar2 REFPROPdir massfractionComponent1 \nexample: refpropwrappertest \"pT\" \"isobutan|propane\" 1e5 293 \"d:\\Programme\\REFPROP\\\" .1");
+ return 1;
+ }
+
+ x = (double*) calloc(nX,sizeof(double));
+ props=(double*) calloc(16+2*nX,sizeof(double));
+
+
+ sumx = 0;
+ for (i=0;i
+#ifdef _CRAY
+# include
+# define RPVersion RPVERSION
+# define SETPATHdll SETPATHDLL
+# define ABFL1dll ABFL1DLL
+# define ABFL2dll ABFL2DLL
+# define ACTVYdll ACTVYDLL
+# define AGdll AGDLL
+# define CCRITdll CCRITDLL
+# define CP0dll CP0DLL
+# define CRITPdll CRITPDLL
+# define CSATKdll CSATKDLL
+# define CV2PKdll CV2PKDLL
+# define CVCPKdll CVCPKDLL
+# define CVCPdll CVCPDLL
+# define DBDTdll DBDTDLL
+# define DBFL1dll DBFL1DLL
+# define DBFL2dll DBFL2DLL
+# define DDDPdll DDDPDLL
+# define DDDTdll DDDTDLL
+# define DEFLSHdll DEFLSHDLL
+# define DHD1dll DHD1DLL
+# define DHFL1dll DHFL1DLL
+# define DHFL2dll DHFL2DLL
+# define DHFLSHdll DHFLSHDLL
+# define DIELECdll DIELECDLL
+# define DOTFILLdll DOTFILLDLL
+# define DPDD2dll DPDD2DLL
+# define DPDDKdll DPDDKDLL
+# define DPDDdll DPDDDLL
+# define DPDTKdll DPDTKDLL
+# define DPDTdll DPDTDLL
+# define DPTSATKdll DPTSATKDLL
+# define DSFLSHdll DSFLSHDLL
+# define DSFL1dll DSFL1DLL
+# define DSFL2dll DSFL2DLL
+# define ENTHALdll ENTHALDLL
+# define ENTROdll ENTRODLL
+# define ESFLSHdll ESFLSHDLL
+# define FGCTYdll FGCTYDLL
+# define FPVdll FPVDLL
+# define GERG04dll GERG04DLL
+# define GETFIJdll GETFIJDLL
+# define GETKTVdll GETKTVDLL
+# define GIBBSdll GIBBSDLL
+# define HSFLSHdll HSFLSHDLL
+# define INFOdll INFODLL
+# define LIMITKdll LIMITKDLL
+# define LIMITSdll LIMITSDLL
+# define LIMITXdll LIMITXDLL
+# define MELTPdll MELTPDLL
+# define MELTTdll MELTTDLL
+# define MLTH2Odll MLTH2ODLL
+# define NAMEdll NAMEDLL
+# define PDFL1dll PDFL1DLL
+# define PDFLSHdll PDFLSHDLL
+# define PEFLSHdll PEFLSHDLL
+# define PHFL1dll PHFL1DLL
+# define PHFLSHdll PHFLSHDLL
+# define PQFLSHdll PQFLSHDLL
+# define PREOSdll PREOSDLL
+# define PRESSdll PRESSDLL
+# define PSFL1dll PSFL1DLL
+# define PSFLSHdll PSFLSHDLL
+# define PUREFLDdll PUREFLDDLL
+# define QMASSdll QMASSDLL
+# define QMOLEdll QMOLEDLL
+# define SATDdll SATDDLL
+# define SATEdll SATEDLL
+# define SATHdll SATHDLL
+# define SATPdll SATPDLL
+# define SATSdll SATSDLL
+# define SATTdll SATTDLL
+# define SETAGAdll SETAGADLL
+# define SETKTVdll SETKTVDLL
+# define SETMIXdll SETMIXDLL
+# define SETMODdll SETMODDLL
+# define SETREFdll SETREFDLL
+# define SETUPdll SETUPDLL
+# define SPECGRdll SPECGRDLL
+# define SUBLPdll SUBLPDLL
+# define SUBLTdll SUBLTDLL
+# define SURFTdll SURFTDLL
+# define SURTENdll SURTENDLL
+# define TDFLSHdll TDFLSHDLL
+# define TEFLSHdll TEFLSHDLL
+# define THERM0dll THERM0DLL
+# define THERM2dll THERM2DLL
+# define THERM3dll THERM3DLL
+# define THERMdll THERMDLL
+# define THFLSHdll THFLSHDLL
+# define TPFLSHdll TPFLSHDLL
+# define TPFL2dll TPFL2DLL
+# define TPRHOdll TPRHODLL
+# define TQFLSHdll TQFLSHDLL
+# define TRNPRPdll TRNPRPDLL
+# define TSFLSHdll TSFLSHDLL
+# define VIRBdll VIRBDLL
+# define VIRCdll VIRCDLL
+# define WMOLdll WMOLDLL
+# define XMASSdll XMASSDLL
+# define XMOLEdll XMOLEdll
+#else
+# if !defined(_AIX) && !defined(__hpux)
+# define RPVersion rpversion_
+# define SETPATHdll setpathdll_
+# define ABFL1dll abfl1dll_
+# define ABFL2dll abfl2dll_
+# define ACTVYdll actvydll_
+# define AGdll agdll_
+# define CCRITdll ccritdll_
+# define CP0dll cp0dll_
+# define CRITPdll critpdll_
+# define CSATKdll csatkdll_
+# define CV2PKdll cv2pkdll_
+# define CVCPKdll cvcpkdll_
+# define CVCPdll cvcpdll_
+# define DBDTdll dbdtdll_
+# define DBFL1dll dbfl1dll_
+# define DBFL2dll dbfl2dll_
+# define DDDPdll dddpdll_
+# define DDDTdll dddtdll_
+# define DEFLSHdll deflshdll_
+# define DHD1dll dhd1dll_
+# define DHFL1dll dhfl1dll_
+# define DHFL2dll dhfl2dll_
+# define DHFLSHdll dhflshdll_
+# define DIELECdll dielecdll_
+# define DOTFILLdll dotfilldll_
+# define DPDD2dll dpdd2dll_
+# define DPDDKdll dpddkdll_
+# define DPDDdll dpdddll_
+# define DPDTKdll dpdtkdll_
+# define DPDTdll dpdtdll_
+# define DPTSATKdll dptsatkdll_
+# define DSFLSHdll dsflshdll_
+# define DSFL1dll dsfl1dll_
+# define DSFL2dll dsfl2dll_
+# define ENTHALdll enthaldll_
+# define ENTROdll entrodll_
+# define ESFLSHdll esflshdll_
+# define FGCTYdll fgctydll_
+# define FPVdll fpvdll_
+# define GERG04dll gerg04dll_
+# define GETFIJdll getfijdll_
+# define GETKTVdll getktvdll_
+# define GIBBSdll gibbsdll_
+# define HSFLSHdll hsflshdll_
+# define INFOdll infodll_
+# define LIMITKdll limitkdll_
+# define LIMITSdll limitsdll_
+# define LIMITXdll limitxdll_
+# define MELTPdll meltpdll_
+# define MELTTdll melttdll_
+# define MLTH2Odll mlth2odll_
+# define NAMEdll namedll_
+# define PDFL1dll pdfl1dll_
+# define PDFLSHdll pdflshdll_
+# define PEFLSHdll peflshdll_
+# define PHFL1dll phfl1dll_
+# define PHFLSHdll phflshdll_
+# define PQFLSHdll pqflshdll_
+# define PREOSdll preosdll_
+# define PRESSdll pressdll_
+# define PSFL1dll psfl1dll_
+# define PSFLSHdll psflshdll_
+# define PUREFLDdll pureflddll_
+# define QMASSdll qmassdll_
+# define QMOLEdll qmoledll_
+# define SATDdll satddll_
+# define SATEdll satedll_
+# define SATHdll sathdll_
+# define SATPdll satpdll_
+# define SATSdll satsdll_
+# define SATTdll sattdll_
+# define SETAGAdll setagadll_
+# define SETKTVdll setktvdll_
+# define SETMIXdll setmixdll_
+# define SETMODdll setmoddll_
+# define SETREFdll setrefdll_
+# define SETUPdll setupdll_
+# define SPECGRdll specgrdll_
+# define SUBLPdll sublpdll_
+# define SUBLTdll subltdll_
+# define SURFTdll surftdll_
+# define SURTENdll surtendll_
+# define TDFLSHdll tdflshdll_
+# define TEFLSHdll teflshdll_
+# define THERM0dll therm0dll_
+# define THERM2dll therm2dll_
+# define THERM3dll therm3dll_
+# define THERMdll thermdll_
+# define THFLSHdll thflshdll_
+# define TPFLSHdll tpflshdll_
+# define TPFL2dll tpfl2dll_
+# define TPRHOdll tprhodll_
+# define TQFLSHdll tqflshdll_
+# define TRNPRPdll trnprpdll_
+# define TSFLSHdll tsflshdll_
+# define VIRBdll virbdll_
+# define VIRCdll vircdll_
+# define WMOLdll wmoldll_
+# define XMASSdll xmassdll_
+# define XMOLEdll xmoledll_
+# endif
+# define _fcd char *
+# define _cptofcd(a,b) (a)
+# define _fcdlen(a) strlen(a)
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ // extra function for setup
+ void RPVersion ( char* );
+ void SETPATHdll( const char* );
+ //
+ void ABFL1dll(double &,double &,double *,long &,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void ABFL2dll(double &,double &,double *,long &,long &,double &,double &,double &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double *,double *,double &,long &,char*,long );
+ void ACTVYdll(double &,double &,double *,double &);
+ void AGdll(double &,double &,double *,double &,double &);
+ void CCRITdll(double &,double &,double &,double *,double &,double &,double &,double &,double &,long &,char*,long );
+ void CP0dll(double &,double *,double &);
+ void CRITPdll(double *,double &,double &,double &,long &,char*,long );
+ void CSATKdll(long &,double &,long &,double &,double &,double &,long &,char*,long );
+ void CV2PKdll(long &,double &,double &,double &,double &,long &,char*,long );
+ void CVCPKdll(long &,double &,double &,double &,double &);
+ void CVCPdll(double &,double &,double *,double &,double &);
+ void DBDTdll(double &,double *,double &);
+ void DBFL1dll(double &,double &,double *,double &,double &,double &,long &,char*,long );
+ void DBFL2dll(double &,double &,double *,long &,double &,double &,double &,double &,double &,double *,double *,double &,long &,char*,long );
+ void DDDPdll(double &,double &,double *,double &);
+ void DDDTdll(double &,double &,double *,double &);
+ void DEFLSHdll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void DHD1dll(double &,double &,double *,double &,double &,double &,double &,double &,double &);
+ void DHFL1dll(double &,double &,double *,double &,long &,char*,long );//added by henning francke
+ void DHFL2dll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,long &,char*,long );//added by henning francke
+ void DHFLSHdll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void DIELECdll(double &,double &,double *,double &);
+ void DOTFILLdll(long &,double *,double &,double &,long &,char*,long );
+ void DPDD2dll(double &,double &,double *,double &);
+ void DPDDKdll(long &,double &,double &,double &);
+ void DPDDdll(double &,double &,double *,double &);
+ void DPDTKdll(long &,double &,double &,double &);
+ void DPDTdll(double &,double &,double *,double &);
+ void DPTSATKdll(long &,double &,long &,double &,double &,double &,double &,long &,char*,long );
+ void DSFLSHdll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void DSFL1dll(double &,double &,double *,double &,long &,char*,long );//added by henning francke
+ void DSFL2dll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,long &,char*,long );//added by henning francke
+ void ENTHALdll(double &,double &,double *,double &);
+ void ENTROdll(double &,double &,double *,double &);
+ void ESFLSHdll(double &,double &,double *,double &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,long &,char*,long );
+ void FGCTYdll(double &,double &,double *,double *);
+ void FPVdll(double &,double &,double &,double *,double &);
+ void GERG04dll(long &,long &,long &,char*,long );
+ void GETFIJdll(char*,double *,char*,char*,long ,long ,long );
+ void GETKTVdll(long &,long &,char*,double *,char*,char*,char*,char*,long ,long ,long ,long ,long );
+ void GIBBSdll(double &,double &,double *,double &,double &);
+ void HSFLSHdll(double &,double &,double *,double &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,long &,char*,long );
+ void INFOdll(long &,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &);
+ void LIMITKdll(char*,long &,double &,double &,double &,double &,double &,double &,double &,long &,char*,long ,long );
+ void LIMITSdll(char*,double *,double &,double &,double &,double &,long );
+ void LIMITXdll(char*,double &,double &,double &,double *,double &,double &,double &,double &,long &,char*,long ,long );
+ void MELTPdll(double &,double *,double &,long &,char*,long );
+ void MELTTdll(double &,double *,double &,long &,char*,long );
+ void MLTH2Odll(double &,double &,double &);
+ void NAMEdll(long &,char*,char*,char*,long ,long ,long );
+ void PDFL1dll(double &,double &,double *,double &,long &,char*,long );
+ void PDFLSHdll(double &,double &,double *,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void PEFLSHdll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void PHFL1dll(double &,double &,double *,long &,double &,double &,long &,char*,long );
+ void PHFLSHdll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void PQFLSHdll(double &,double &,double *,long &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void PREOSdll(long &);
+ void PRESSdll(double &,double &,double *,double &);
+ void PSFL1dll(double &,double &,double *,long &,double &,double &,long &,char*,long );
+ void PSFLSHdll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void PUREFLDdll(long &);
+ void QMASSdll(double &,double *,double *,double &,double *,double *,double &,double &,long &,char*,long );
+ void QMOLEdll(double &,double *,double *,double &,double *,double *,double &,double &,long &,char*,long );
+ void SATDdll(double &,double *,long &,long &,double &,double &,double &,double &,double *,double *,long &,char*,long );
+ void SATEdll(double &,double *,long &,long &,long &,double &,double &,double &,long &,double &,double &,double &,long &,char*,long );
+ void SATHdll(double &,double *,long &,long &,long &,double &,double &,double &,long &,double &,double &,double &,long &,char*,long );
+ void SATPdll(double &,double *,long &,double &,double &,double &,double *,double *,long &,char*,long );
+ void SATSdll(double &,double *,long &,long &,long &,double &,double &,double &,long &,double &,double &,double &,long &,double &,double &,double &,long &,char*,long );
+ void SATTdll(double &,double *,long &,double &,double &,double &,double *,double *,long &,char*,long );
+ void SETAGAdll(long &,char*,long );
+ void SETKTVdll(long &,long &,char*,double *,char*,long &,char*,long ,long ,long );
+ void SETMIXdll(char*,char*,char*,long &,char*,double *,long &,char*,long ,long ,long ,long ,long );
+ void SETMODdll(long &,char*,char*,char*,long &,char*,long ,long ,long ,long );
+ void SETREFdll(char*,long &,double *,double &,double &,double &,double &,long &,char*,long ,long );
+ //void SETUPdll(long &,char*,char*,char*,long &,char*,long ,long ,long ,long );
+ void SETUPdll(long &,char*,char*,char*,long &,char*);
+ void SPECGRdll(double &,double &,double &,double &);
+ void SUBLPdll(double &,double *,double &,long &,char*,long );
+ void SUBLTdll(double &,double *,double &,long &,char*,long );
+ void SURFTdll(double &,double &,double *,double &,long &,char*,long );
+ void SURTENdll(double &,double &,double &,double *,double *,double &,long &,char*,long );
+ void TDFLSHdll(double &,double &,double *,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void TEFLSHdll(double &,double &,double *,long &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void THERM0dll(double &,double &,double *,double &,double &,double &,double &,double &,double &,double &,double &,double &);
+ void THERM2dll(double &,double &,double *,double &,double &,double &,double &,double &,double &,double &,double *,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &);
+ void THERM3dll(double &,double &,double *,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &);
+ void THERMdll(double &,double &,double *,double &,double &,double &,double &,double &,double &,double &,double &);
+ void THFLSHdll(double &,double &,double *,long &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void TPFLSHdll(double &,double &,double *,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void TPFL2dll(double &,double &,double *,double &,double &,double *,double *,double &,long &,char*,long );//added by henning francke
+ void TPRHOdll(double &,double &,double *,long &,long &,double &,long &,char*,long );
+ void TQFLSHdll(double &,double &,double *,long &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void TRNPRPdll(double &,double &,double *,double &,double &,long &,char*,long );
+ void TSFLSHdll(double &,double &,double *,long &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
+ void VIRBdll(double &,double *,double &);
+ void VIRCdll(double &,double *,double &);
+ void WMOLdll(double *,double &);
+ void XMASSdll(double *,double *,double &);
+ void XMOLEdll(double *,double *,double &);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+// REFPROP_H
+#endif
+// routines used in henning francke's wrapper
+// setup, wmol, tpflsh, phflsh, PDFL1, PDFLSH, PSFLSH, PQFLSH, THFLSH,
+// TDFLSH, TSFLSH, TQFLSH, DHFLSH, HSFLSH, DSFLSH, TRNPRP, SATT, SATP, SATD
+// TPFL2, DHFL1, DHFL2, DSFL1, DSFL2
+//
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop-ftn.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop-ftn.cpp
new file mode 100644
index 0000000..5441064
--- /dev/null
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop-ftn.cpp
@@ -0,0 +1,233 @@
+/*
+ * ============================================================================
+ * Name : refprop-ftn.cpp
+ * Author : Jorrit Wronski (jowr@mek.dtu.dk)
+ * Version : 0.1
+ * Copyright : Use and modify at your own risk.
+ * Description : example for Fortran and CPP interoperation. This file is
+ * based on EX_C1.CPP by Chris Muzny and EX_C2.c by Ian Bell.
+ * The example files can be obtained online from NIST
+ * http://www.boulder.nist.gov/div838/theory/refprop/Frequently_asked_questions.htm
+ * ============================================================================
+ */
+
+#include
+#include /* EXIT_SUCCESS */
+#include /* strlen, memset, memcpy, memchr */
+#include /* refprop header file */
+
+#ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
+#endif
+
+#define refpropcharlength 255
+#define filepathlength 255
+#define maxstringlength 10000
+#define lengthofreference 3
+#define errormessagelength 255
+#define ncmax 20 // Note: ncmax is the max number of components
+#define numparams 72
+#define maxcoefs 50
+
+void newline() {
+ printf("%s","\n");
+}
+
+
+int main(int argc, char* argv[]) {
+ static long i,ierr,info_index;
+ static double wm,ttp,tnbp,tc,pc,dc,zc,acf,dip,rgas;
+ static char hfld[maxstringlength+1],hrf[lengthofreference+1],herr[errormessagelength+1],hfm[refpropcharlength+1];
+ static char v[refpropcharlength+1],hpth[filepathlength+1];
+
+ static double x[ncmax],xliq[ncmax],xvap[ncmax],f[ncmax];
+
+ double t=100.0;
+ double p,dl,dv;
+
+ newline();
+
+ RPVersion(v);
+ printf("RPVersion(v) returned v = %s\n", v);
+
+ strcpy(hpth,"/home/jowr/Documents/Fluids/refprop/v9.0/");
+ SETPATHdll(hpth);
+ printf("SETPATHdll(hpth) called with hpth = %s\n", hpth);
+
+ i=1;
+ strcpy(hfld,"nitrogen.fld");
+ strcpy(hfm,"hmx.bnc");
+ strcpy(hrf,"DEF");
+ strcpy(herr,"Ok");
+ SETUPdll(i,hfld,hfm,hrf,ierr,herr);
+ if (ierr != 0) printf("%s\n",herr);
+ printf("SETUPdll(i,hfld,hfm,hrf,ierr,herr) called with hfld = %s\n", hfld);
+
+ info_index = 1;
+ INFOdll(info_index,wm,ttp,tnbp,tc,pc,dc,zc,acf,dip,rgas);
+ printf("INFOdll(info_index,wm,ttp,tnbp,tc,pc,dc,zc,acf,dip,rgas) called with index = %l\n", info_index);
+ printf("WM,ACF,DIP,TTP,TNBP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",wm,acf,dip,ttp,tnbp);
+ printf("TC,PC,DC,RGAS %10.4f,%10.4f,%10.4f,%10.4f\n",tc,pc,dc,rgas);
+
+ //...For a mixture, use the following setup instead of the lines above.
+ // Use "|" as the file name delimiter for mixtures
+ i=3;
+ strcpy(hfld,"nitrogen.fld");
+ strcat(hfld,"|argon.fld");
+ strcat(hfld,"|oxygen.fld");
+ strcpy(hfm,"hmx.bnc");
+ strcpy(hrf,"DEF");
+ strcpy(herr,"Ok");
+ x[0]=.7812; //Air composition
+ x[1]=.0092;
+ x[2]=.2096;
+ //...Call SETUP to initialize the program
+ SETUPdll(i,hfld,hfm,hrf,ierr,herr);
+ newline();
+ printf("SETUPdll(i,hfld,hfm,hrf,ierr,herr) called with hfld = %s\n", hfld);
+
+ INFOdll(info_index,wm,ttp,tnbp,tc,pc,dc,zc,acf,dip,rgas);
+ printf("WM,ACF,DIP,TTP,TNBP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",wm,acf,dip,ttp,tnbp);
+ printf("TC,PC,DC,RGAS %10.4f,%10.4f,%10.4f,%10.4f\n",tc,pc,dc,rgas);
+
+ //...Calculate molecular weight of a mixture
+ wm = 0.;
+ WMOLdll(x,wm);
+ newline();
+ printf("wm %10.4f\n",wm);
+
+ //...Get saturation properties given t,x; for i=1: x is liquid phase
+ //..... for i=2: x is vapor phase
+
+ SATTdll(t,x,i,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
+ printf("P,Dl,Dv,xl[0],xv[0] %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",p,dl,dv,xliq[0],xvap[0]);
+ i=2;
+ SATTdll(t,x,i,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
+ printf("P,Dl,Dv,xl[0],xv[0] %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",p,dl,dv,xliq[0],xvap[0]);
+
+ //...Calculate saturation properties at a given p. i is same as SATT
+ i=2;
+ SATPdll(p,x,i,t,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
+ printf("T,Dl,Dv,xl(1),xv(1) %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",t,dl,dv,xliq[0],xvap[0]);
+
+ //...Other saturation routines are given in SAT_SUB.FOR
+ t=300.0;
+ p=20000.0;
+
+ //...Calculate d from t,p,x
+ //...If phase is known: (j=1: Liquid, j=2: Vapor)
+ long j=1;
+ double d,q,e,h,s,cv,cp,w,b,c,
+ dpdrho,d2pdd2,dpdt,dhdt_d,dhdt_p,dhdp_t,dhdp_d,
+ sigma,dhdd_t,dhdd_p,eta,tcx,pp,tt,hjt,h1,dd;
+ long tmp_int=0;
+ TPRHOdll(t,p,x,j,tmp_int,d,ierr,herr,errormessagelength);
+ printf("T,P,D %10.4f,%10.4f,%10.4f\n",t,p,d);
+
+ //...If phase is not known, call TPFLSH
+ //...Calls to TPFLSH are much slower than TPRHO since SATT must be called first.
+ //.....(If two phase, quality is returned as q)
+ TPFLSHdll(t,p,x,d,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ printf("T,P,D,H,CP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",t,p,d,h,cp);
+
+ //...Calculate pressure (p), internal energy (e), enthalpy (h), entropy (s),
+ //.....isochoric (cv) and isobaric (cp) heat capacities, speed of sound (w),
+ //.....and Joule-Thomson coefficient (hjt) from t,d,x
+ //.....(subroutines THERM2 and THERM3 contain more properties, see PROP_SUB.FOR)
+ THERMdll(t,d,x,p,e,h,s,cv,cp,w,hjt);
+
+ //...Calculate pressure
+ PRESSdll(t,d,x,p);
+
+ //...Calculate fugacity
+ FGCTYdll(t,d,x,f);
+
+ //...Calculate second and third virial coefficients
+ VIRBdll (t,x,b);
+ VIRCdll (t,x,c);
+ printf("F,B,C %10.4f,%10.4f,%10.4f\n",f[0],b,c);
+
+ //...Calculate the derivatives: dP/dD, d^2P/dD^2, dP/dT (D indicates density)
+ //...(dD/dP, dD/dT, and dB/dT are also available, see PROP_SUB.FOR)
+ DPDDdll (t,d,x,dpdrho);
+ DPDD2dll (t,d,x,d2pdd2);
+ DPDTdll (t,d,x,dpdt);
+ printf("dP/dD,d2P/dD2,dP/dT %10.4f,%10.4f,%10.4f\n",dpdrho,d2pdd2,dpdt);
+
+
+ //...Calculate derivatives of enthalpy with respect to T, P, and D
+ DHD1dll(t,d,x,dhdt_d,dhdt_p,dhdd_t,dhdd_p,dhdp_t,dhdp_d);
+ printf("Enthalpy derivatives %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",
+ dhdt_d,dhdt_p,dhdd_t,dhdd_p/1000.0,dhdp_t);
+ //...Calculate surface tension
+ SURFTdll (t,dl,x,sigma,ierr,herr,errormessagelength);
+ printf("T,SURF. TN. %10.4f,%10.4f\n",t,sigma);
+
+ //...Calculate viscosity (eta) and thermal conductivity (tcx)
+ TRNPRPdll (t,d,x,eta,tcx,ierr,herr,errormessagelength);
+ printf("VIS.,TH.CND. %10.4f,%10.4f\n",eta,tcx*1000.0);
+
+ //...General property calculation with inputs of t,d,x
+ TDFLSHdll (t,d,x,pp,dl,dv,xliq,xvap,q,e,h1,s,cv,cp,w,ierr,herr,errormessagelength);
+ printf("T, D, P from TDFLSH %10.4f,%10.4f,%10.4f\n",t,d,pp/1000.0);
+
+ //...General property calculation with inputs of p,d,x
+ PDFLSHdll (p,d,x,tt,dl,dv,xliq,xvap,q,e,h1,s,cv,cp,w,ierr,herr,errormessagelength);
+ printf("T, D, P from PDFLSH %10.4f,%10.4f,%10.4f\n",tt,d,p/1000.0);
+
+ //...General property calculation with inputs of p,h,x
+ PHFLSHdll (p,h,x,tt,dd,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
+ printf("T, D, P from PHFLSH %10.4f,%10.4f,%10.4f\n",tt,dd,p/1000.0);
+
+ //...General property calculation with inputs of p,s,x
+ PSFLSHdll (p,s,x,tt,dd,dl,dv,xliq,xvap,q,e,h1,cv,cp,w,ierr,herr,errormessagelength);
+ printf("T, D, P from PSFLSH %10.4f,%10.4f,%10.4f\n",tt,dd,p/1000.0);
+
+ //...General property calculation with inputs of d,h,x
+ DHFLSHdll (d,h,x,tt,pp,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
+ printf("T, D, P from DHFLSH %10.4f,%10.4f,%10.4f\n",tt,d,pp/1000.0);
+
+ //...General property calculation with inputs of t,h,x
+ // kr--flag specifying desired root for multi-valued inputs:
+ // 1=return lower density root
+ // 2=return higher density root
+ long kr=1;
+ THFLSHdll (t,h,x,
+ kr,pp,dd,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
+ printf("T, D, P from THFLSH %10.4f,%10.4f,%10.4f\n",t,dd,pp/1000.0);
+
+ //...Other general property calculation routines are given in FLSH_SUB.FOR
+ //...and FLASH2.FOR
+
+ //...Calculate melting pressure
+ t=100.0;
+ MELTTdll (t,x,p,ierr,herr,errormessagelength);
+ printf("Melting pressure(MPa) %10.4f,%10.4f\n",p/1000.0,t);
+
+ //...Calculate melting temperature
+ MELTPdll (p,x,tt,ierr,herr,errormessagelength);
+ printf("Melting temperature(K)%10.4f,%10.4f\n",tt,p/1000.0);
+
+ //...Calculate sublimation pressure
+ t=200.0;
+ SUBLTdll (t,x,p,ierr,herr,errormessagelength);
+ printf("Sublimation pr.(kPa) %10.4f,%10.4f\n",p,t);
+
+ //...Calculate sublimation temperature
+ SUBLPdll (p,x,tt,ierr,herr,errormessagelength);
+ printf("Sublimation temp.(K) %10.4f,%10.4f\n",tt,p);
+
+ //...Get limits of the equations and check if t,d,p is a valid point
+ //...Equation of state
+ // call LIMITK ('EOS',1,t,d,p,tmin,tmax,Dmax,pmax,ierr,herr)
+ //...Viscosity equation
+ // call LIMITK ('ETA',1,t,d,p,tmin,tmax,Dmax,pmax,ierr,herr)
+ //...Thermal conductivity equation
+ // call LIMITK ('TCX',1,t,d,p,tmin,tmax,Dmax,pmax,ierr,herr)
+
+ //...Other routines are given in UTILITY.FOR
+
+
+return EXIT_SUCCESS;
+}
+
diff --git a/package.mo b/package.mo
index 1f78dfe..a773821 100644
--- a/package.mo
+++ b/package.mo
@@ -1,7 +1,7 @@
within ;
package MediaTwoPhaseMixture
- constant String REFPROP_PATH = "d:\\Program Files (x86)\\REFPROP\\";
-
+// constant String REFPROP_PATH = "d:\\Program Files (x86)\\REFPROP\\";
+ constant String REFPROP_PATH = "/home/jowr/Documents/Fluids/refprop/v9.0/";
annotation (version="0.2", uses(Modelica(version="3.2")),
Documentation(info="
From 689bd29962af7173b916850b07b3cfe8b1fac3bb Mon Sep 17 00:00:00 2001
From: jowr
Date: Wed, 19 Sep 2012 04:07:08 -0700
Subject: [PATCH 02/57] 2012:09:19 13:06 - Test file compiles and works, code
cannot be used from within Dymola.
---
_REFPROP-Wrapper/Version 0.5_linux/Makefile | 60 +-
.../Version 0.5_linux/refprop_wrapper.cpp | 48 +-
.../Version 0.5_linux/refpropwrappertest.cpp | 3 +-
.../Version 0.5_linux/src/PASS_FTN_LIN.FOR | 1364 -----------------
.../src/PASS_FTN_LIN.FOR.tpl | 68 +
5 files changed, 149 insertions(+), 1394 deletions(-)
delete mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/PASS_FTN_LIN.FOR
create mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/PASS_FTN_LIN.FOR.tpl
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/Makefile b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
index 4fb8093..d951e9d 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/Makefile
+++ b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
@@ -7,12 +7,20 @@
# ============================================================================
# used for the output
-BINDIR =.
THENAME =refprop
-
THEWRAPPER =refprop_wrapper
THETEST =refpropwrappertest
+###########################################################
+# Setting the directories for library, header and
+# binary files created in this makefile.
+###########################################################
+LIBDIR =/home/jowr/Documents/Fluids/refprop/v9.0
+DYMDIR =/opt/dymola
+LIBINST =$(DYMDIR)/bin/lib
+HEADINST =$(DYMDIR)/source
+BINDIR =.
+
###########################################################
# Change these lines if you are using a different Fortran
# compiler or if you would like to use other flags.
@@ -33,7 +41,6 @@ CPPFLAGS =-O2 -Wall -pedantic -fbounds-check -ansi -Wpadded -Wpacked -malign-d
# the library file.
###########################################################
LIBFLAGS =-rdynamic -fPIC -shared
-LIBDIR =/home/jowr/Documents/Fluids/refprop/v9.0
LIBRARY =lib$(THENAME)
LIBFILE =PASS_FTN_LIN
DYNAMICLIBRARYEXTENSION =.so
@@ -69,30 +76,46 @@ LIBOBJECTFILES = \
$(LIBDIR)/fortran/TRNS_VIS.o \
$(LIBDIR)/fortran/TRNSP.o \
$(LIBDIR)/fortran/UTILITY.o
-
+
+###########################################################
+# Link all files to places recognised by the system.
+###########################################################
+.PHONY : install
+install : all
+ ln -sf $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION) $(HEADINST)/$(HEADERFILE)$(HEADEREXTENSION)
+ ln -sf $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION) $(LIBINST)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+ ln -sf $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION) /usr/include/$(HEADERFILE)$(HEADEREXTENSION)
+ ln -sf $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION) /usr/lib/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+ ln -sf $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION) $(HEADINST)/$(THEWRAPPER)$(HEADEREXTENSION)
+ ln -sf $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(LIBINST)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+ ln -sf $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION) /usr/include/$(THEWRAPPER)$(HEADEREXTENSION)
+ ln -sf $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) /usr/lib/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+
+.PHONY : all
+all : library libheader wrapper wrapheader
###########################################################
# Compile the wrapper class and its tests.
###########################################################
+.PHONY : wrapheader
+wrapheader : $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION)
+$(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION): $(THEWRAPPER)$(HEADEREXTENSION)
+ cp $(THEWRAPPER)$(HEADEREXTENSION) $(LIBDIR)
+
.PHONY : wrapper
-wrapper : $(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
-$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION): $(THEWRAPPER).o
- $(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(THEWRAPPER).o -l$(THENAME)
+wrapper : $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+$(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION): $(THEWRAPPER).o library libheader
+ $(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(THEWRAPPER).o -l$(THENAME)
.PHONY : test
test : $(THETEST)
-$(THETEST) : $(THETEST).o $(THEWRAPPER).o $(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
- $(FC) $(FLINKFLAGS) -o $(THETEST) $(THETEST).o $(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+$(THETEST) : $(THETEST).o wrapper wrapheader
+ $(FC) $(FLINKFLAGS) -o $(THETEST) $(THETEST).o -l$(THEWRAPPER)
###########################################################
# Compile the Fortran sources into a library file that can
# be used as a shared object.
###########################################################
-.PHONY : libinstall
-libinstall : library libheader
- ln -sf $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION) /usr/include/$(HEADERFILE)$(HEADEREXTENSION)
- ln -sf $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION) /usr/lib/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
-
.PHONY : libheader
libheader : $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION)
$(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION): src/$(HEADERFILE)$(HEADEREXTENSION)
@@ -102,6 +125,13 @@ $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION): src/$(HEADERFILE)$(HEADEREXTENSION)
library : $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
$(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION): src/$(LIBFILE).o $(LIBOBJECTFILES)
$(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION) src/$(LIBFILE).o $(LIBOBJECTFILES)
+
+src/$(LIBFILE).FOR: $(LIBDIR)/fortran/PASS_FTN.FOR
+ sed 's/dll_export/!dll_export/g' $(LIBDIR)/fortran/PASS_FTN.FOR > src/$(LIBFILE).FOR
+ cat src/$(LIBFILE).FOR.tpl >> src/$(LIBFILE).FOR
+
+# sed -i 's/*10000/(10000)/g' src/$(LIBFILE).FOR
+# sed -i 's/*255/(255)/g' src/$(LIBFILE).FOR
$(LIBDIR)/fortran/%.o: $(LIBDIR)/fortran/%.FOR
$(FC) $(FFLAGS) -o $(LIBDIR)/fortran/$*.o -c $<
@@ -123,7 +153,7 @@ src/%.o : src/%.cpp
.PHONY: clean
clean:
- $(RM) **.o **.so **.mod $(BINDIR)/RP-ftn
+ $(RM) **.o **.so **.mod $(BINDIR)/RP-ftn src/$(LIBFILE).FOR $(THETEST)
###########################################################
# Compile a simple example to illustrate the connection
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
index d2a7c92..31def50 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
@@ -25,17 +25,21 @@
//#define DEBUGMODE 1
-//#include
#include
-#include
-#include
-#include
-#include // dlopen etc
-#include // tolower etc
+#if defined(WIN32) || defined(_WIN32)
+# include
+# include "REFPROP_dll.h"
+#else // assuming Linux system
+# include
+# include
+# include
+//# include // dlopen etc
+# include // tolower etc
+#endif
+//# error "Could not determine system."
#include "refprop_wrapper.h"
-
// Some constants...
const long filepathlength=1024;
const long errormessagelength=255+filepathlength;
@@ -43,6 +47,19 @@ const long lengthofreference=3;
const long refpropcharlength=255;
const long ncmax=20; // Note: ncmax is the max number of components
+static char const GB_optId = '-' ; // - under UNIX
+static char const GB_altOptId = '+' ; // + under UNIX
+static char const GB_asciiEsc = '\\' ; // under UNIX
+static char* const GB_preferredPathSep = "/" ; // / under UNIX
+static char const GB_allowedPathSep[] = "/" ;
+static bool const GB_ignoreCase = false ; // in filenames only.
+static char const GB_stdinName[] = "-" ;
+static int const GB_exitSuccess = 0 ;
+static int const GB_exitWarning = 1 ;
+static int const GB_exitError = 2 ;
+static int const GB_exitFatal = 3 ;
+static int const GB_exitInternal = 4 ;
+
char *str_replace(char *str, char *search, char *replace, long *count) {
int i,n_ret;
int newlen = strlen(replace);
@@ -91,12 +108,15 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH, long* nX, char* herr, voi
strcpy(FLD_PATH, REFPROP_PATH);
strcpy(DLL_PATH, REFPROP_PATH);
- if (REFPROP_PATH[strlen(REFPROP_PATH)-1]=='\\'){ //if last char is backslash
- strcat(DLL_PATH, "refprop.dll");
- strcat(FLD_PATH, "fluids\\");
+ if (REFPROP_PATH[strlen(REFPROP_PATH)-1]==*GB_preferredPathSep){ //if last char is backslash
+// strcat(DLL_PATH, "refprop.dll");
+ strcat(FLD_PATH, "fluids");
+ strcat(FLD_PATH, GB_preferredPathSep);
}else{//add missing backslash
- strcat(DLL_PATH,"\\refprop.dll");
- strcat(FLD_PATH, "\\fluids\\");
+// strcat(DLL_PATH,"\\refprop.dll");
+ strcat(FLD_PATH, GB_preferredPathSep);
+ strcat(FLD_PATH, "fluids");
+ strcat(FLD_PATH, GB_preferredPathSep);
}
//*RefpropdllInstance = LoadLibrary(DLL_PATH);
@@ -115,7 +135,7 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH, long* nX, char* herr, voi
//parse fluid composition string and insert absolute paths
char replace[filepathlength+6];
- strcpy(replace,".fld|");
+ strcpy(replace,".FLD|");
//if (DEBUGMODE) printf("REPLACE: %s\n",replace);
strncat(replace, FLD_PATH,filepathlength-strlen(replace));
@@ -128,7 +148,7 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH, long* nX, char* herr, voi
sprintf(errormsg,"Too many components (More than %i)\n",ncmax);
return 0;
}
- (hf,".fld",hf_len-strlen(hf));
+ strncat(hf,".FLD",hf_len-strlen(hf));
if (DEBUGMODE) printf("Fluid composition string: \"%s\"\n",hf);
strncpy(hfmix,FLD_PATH,filepathlength+1);//add absolute path
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refpropwrappertest.cpp b/_REFPROP-Wrapper/Version 0.5_linux/refpropwrappertest.cpp
index b726bbf..377b89e 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/refpropwrappertest.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/refpropwrappertest.cpp
@@ -20,7 +20,8 @@ int main(int argc, char* argv[]){
int DEBUG = 1;
if (argc<5){
- printf("usage: refpropwrappertest.exe statevars fluidname1|fluidname2|... statevar1 statevar2 REFPROPdir massfractionComponent1 \nexample: refpropwrappertest \"pT\" \"isobutan|propane\" 1e5 293 \"d:\\Programme\\REFPROP\\\" .1");
+// printf("usage: refpropwrappertest.exe statevars fluidname1|fluidname2|... statevar1 statevar2 REFPROPdir massfractionComponent1 \nexample: refpropwrappertest \"pT\" \"isobutan|propane\" 1e5 293 \"d:\\Programme\\REFPROP\\\" .1");
+ printf("usage: refpropwrappertest statevars fluidname1|fluidname2|... statevar1 statevar2 REFPROPdir massfractionComponent1 \nexample: refpropwrappertest \"pT\" \"ISOBUTAN|PROPANE\" 1e5 293 \"/home/jowr/Documents/Fluids/refprop/v9.0/\" .1\n");
return 1;
}
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/PASS_FTN_LIN.FOR b/_REFPROP-Wrapper/Version 0.5_linux/src/PASS_FTN_LIN.FOR
deleted file mode 100644
index 0ff5953..0000000
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/PASS_FTN_LIN.FOR
+++ /dev/null
@@ -1,1364 +0,0 @@
- subroutine RPVersion (v)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_RPVersion"::RPVersion
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::RPVersion
- !dll_export RPVersion
- character v*255
- v='8.01c'
- end
-c ======================================================================
-c subroutine WRTREFdll(fxname)
-c implicit double precision (a-h,o-z)
-c implicit integer (i-n)
-c character*255 fxname
-c !dll_export WRTREFdll
-c call WRTREF (fxname,-1,1,0,0,0)
-c end
-c
-c subroutine MINIMIZEdll(fxname,idfile,mn,i)
-c implicit double precision (a-h,o-z)
-c implicit integer (i-n)
-c character*255 fxname,idfile
-c double precision mn(200)
-c !dll_export MINIMIZEdll
-c call minimize(fxname,idfile,mn,i)
-c end
-c
-c subroutine FOFXdll(mn,i,fofxx,ierr,herr)
-c implicit double precision (a-h,o-z)
-c implicit integer (i-n)
-c character*255 herr
-c double precision mn(200)
-c !dll_export FOFXdll
-c call fofx(mn,i,fofxx,ierr,herr)
-c end
-c ======================================================================
-
-c ======================================================================
-c begin file pass_ftn.for
-c
-c This file defines the DLL-callable routines which would be used by
-c Visual Basic, Excel, and other applications to access the main
-c Fortran code. It is not needed when compiling Fortran applications.
-c It is only used when compiling the DLL and contains commands specific
-c to the Lahey/Fujitsu Fortran 95 Compiler. When using other compilers,
-c the lines with '!dll_export' should be commented out.
-c
-c The calling sequence is identical (except for the SETUPdll routine) to
-c the main Fortran routines, with the letters 'dll' appended to the routine
-c name. See the Excel sample file or the Visual Basic 'SAMPLE.BAS'
-c file for usage information.
-c
-c ======================================================================
-c
- subroutine SETUPdll (i,hfld,hfm,hrf,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-k,m,n)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SETUPdll"::SETUPdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SETUPdll
- !dll_export SETUPdll
- character hfld*10000,hfm*255,hrf*3,herr*255
- call SETUP0 (i,hfld,hfm,hrf,ierr,herr)
- end
-c ======================================================================
- subroutine SETREFdll (hrf,ixflag,x0,h0,s0,t0,p0,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
- character*3 hrf
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SETREFdll"::SETREFdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SETREFdll
- !dll_export SETREFdll
- dimension x0(ncmax)
- call SETREF (hrf,ixflag,x0,h0,s0,t0,p0,ierr,herr)
- end
-c ======================================================================
- subroutine SETMIXdll (hmxnme,hfmix,hrf,ncc,hfile,x,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 hmxnme,hfmix,hfiles(ncmax),herr
- character hfile*10000,hrf*3
- dimension x(ncmax)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SETMIXdll"::SETMIXdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SETMIXdll
- !dll_export SETMIXdll
- call SETMIX (hmxnme,hfmix,hrf,ncc,hfiles,x,ierr,herr)
- hfile=hfiles(1)
- j=index(hfile,' ')
- hfile=hfile(1:j-1)//'|'
- do i=2,ncc
- j=index(hfile,' ')
- hfile=hfile(1:j-1)//hfiles(i)
- j=index(hfile,' ')
- hfile=hfile(1:j-1)//'|'
- enddo
- end
-c ======================================================================
- subroutine SETMODdll (nc,htype,hmix,hcomp2,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
- character*60 hcomp2
- character*3 htype,hmix,hcomp(1:ncmax)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SETMODdll"::SETMODdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SETMODdll
- !dll_export SETMODdll
- do i=1,ncmax
- hcomp(i)=hcomp2(i*3-2:i*3)
- enddo
- call SETMOD (nc,htype,hmix,hcomp,ierr,herr)
- end
-c ======================================================================
- subroutine PUREFLDdll (icomp)
- implicit integer (i-n)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_PUREFLDdll"::PUREFLDdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::PUREFLDdll
- !dll_export PUREFLDdll
- call PUREFLD (icomp)
- end
-c ======================================================================
- subroutine SETNCdll (ncomp)
- implicit integer (i-n)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SETNCdll"::SETNCdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SETNCdll
- !dll_export SETNCdll
- call SETNC (ncomp)
- end
-c ======================================================================
- subroutine SETPATHdll (hpth)
- character hpth*255
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SETPATHdll"::SETPATHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SETPATHdll
- !dll_export SETPATHdll
- call SETPATH (hpth)
- end
-c ======================================================================
- subroutine UNSETAGAdll
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_UNSETAGAdll"::UNSETAGAdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::UNSETAGAdll
- !dll_export UNSETAGAdll
- call UNSETAGA
- end
-c ======================================================================
- subroutine CRITPdll (x,tcrit,pcrit,Dcrit,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_CRITPdll"::CRITPdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::CRITPdll
- !dll_export CRITPdll
- dimension x(ncmax)
- call CRITP (x,tcrit,pcrit,Dcrit,ierr,herr)
- end
-c ======================================================================
- subroutine THERMdll (t,rho,x,p,e,h,s,cv,cp,w,hjt)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_THERMdll"::THERMdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::THERMdll
- !dll_export THERMdll
- dimension x(ncmax)
- call THERM (t,rho,x,p,e,h,s,cv,cp,w,hjt)
- end
-c ======================================================================
- subroutine THERM0dll (t,rho,x,p,e,h,s,cv,cp,w,a,g)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_THERM0dll"::THERM0dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::THERM0dll
- !dll_export THERM0dll
- dimension x(ncmax)
- call THERM0 (t,rho,x,p,e,h,s,cv,cp,w,a,g)
- end
-c ======================================================================
- subroutine THERM2dll (t,rho,x,p,e,h,s,cv,cp,w,Z,hjt,A,G,xkappa,
- & beta,dPdD,d2PdD2,dPdT,dDdT,dDdP,
- & d2PT2,d2PdTD,spare3,spare4)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_THERM2dll"::THERM2dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::THERM2dll
- !dll_export THERM2dll
- dimension x(ncmax)
- call THERM2 (t,rho,x,p,e,h,s,cv,cp,w,Z,hjt,A,G,xkappa,beta,
- & dPdD,d2PdD2,dPdT,dDdT,dDdP,
- & d2PT2,d2PdTD,spare3,spare4)
- end
-c ======================================================================
- subroutine THERM3dll (t,rho,x,
- & xkappa,beta,xisenk,xkt,betas,bs,xkkt,thrott,pi,spht)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_THERM3dll"::THERM3dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::THERM3dll
- !dll_export THERM3dll
- dimension x(ncmax)
- call THERM3 (t,rho,x,
- & xkappa,beta,xisenk,xkt,betas,bs,xkkt,thrott,pi,spht)
- end
-c ======================================================================
- subroutine RESIDUALdll (t,rho,x,pr,er,hr,sr,cvr,cpr,Ar,Gr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_RESIDUALdll"::RESIDUALdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::RESIDUALdll
- !dll_export RESIDUALdll
- dimension x(ncmax)
- call RESIDUAL (t,rho,x,pr,er,hr,sr,cvr,cpr,Ar,Gr)
- end
-c ======================================================================
- subroutine ENTROdll (t,rho,x,s)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_ENTROdll"::ENTROdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::ENTROdll
- !dll_export ENTROdll
- dimension x(ncmax)
- call ENTRO (t,rho,x,s)
- end
-c ======================================================================
- subroutine ENTHALdll (t,rho,x,h)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_ENTHALdll"::ENTHALdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::ENTHALdll
- !dll_export ENTHALdll
- dimension x(ncmax)
- call ENTHAL (t,rho,x,h)
- end
-c ======================================================================
- subroutine CVCPdll (t,rho,x,cv,cp)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_CVCPdll"::CVCPdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::CVCPdll
- !dll_export CVCPdll
- dimension x(ncmax)
- call CVCP (t,rho,x,cv,cp)
- end
-c ======================================================================
- subroutine CVCPKdll (icomp,t,rho,cv,cp)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_CVCPKdll"::CVCPKdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::CVCPKdll
- !dll_export CVCPKdll
- call CVCPK (icomp,t,rho,cv,cp)
- end
-c ======================================================================
- subroutine GIBBSdll (t,rho,x,Ar,Gr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_GIBBSdll"::GIBBSdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::GIBBSdll
- !dll_export GIBBSdll
- dimension x(ncmax)
- call GIBBS (t,rho,x,Ar,Gr)
- end
-c ======================================================================
- subroutine AGdll (t,rho,x,a,g)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_AGdll"::AGdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::AGdll
- !dll_export AGdll
- dimension x(ncmax)
- call AG (t,rho,x,a,g)
- end
-c ======================================================================
- subroutine PRESSdll (t,rho,x,p)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_PRESSdll"::PRESSdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::PRESSdll
- !dll_export PRESSdll
- dimension x(ncmax)
- call PRESS (t,rho,x,p)
- end
-c ======================================================================
- subroutine DPDDdll (t,rho,x,dpdrho)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DPDDdll"::DPDDdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DPDDdll
- !dll_export DPDDdll
- dimension x(ncmax)
- call DPDD (t,rho,x,dpdrho)
- end
-c ======================================================================
- subroutine DPDDKdll (icomp,t,rho,dpdrho)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DPDDKdll"::DPDDKdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DPDDKdll
- !dll_export DPDDKdll
- call DPDDK (icomp,t,rho,dpdrho)
- end
-c ======================================================================
- subroutine DPDD2dll (t,rho,x,d2PdD2)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DPDD2dll"::DPDD2dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DPDD2dll
- !dll_export DPDD2dll
- dimension x(ncmax)
- call DPDD2 (t,rho,x,d2PdD2)
- end
-c ======================================================================
- subroutine DPDTdll (t,rho,x,dpt)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DPDTdll"::DPDTdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DPDTdll
- !dll_export DPDTdll
- dimension x(ncmax)
- call DPDT (t,rho,x,dpt)
- end
-c ======================================================================
- subroutine DPDTKdll (icomp,t,rho,dpt)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DPDTKdll"::DPDTKdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DPDTKdll
- !dll_export DPDTKdll
- call DPDTK (icomp,t,rho,dpt)
- end
-c ======================================================================
- subroutine DDDPdll (t,rho,x,drhodp)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DDDPdll"::DDDPdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DDDPdll
- !dll_export DDDPdll
- dimension x(ncmax)
- call DDDP (t,rho,x,drhodp)
- end
-c ======================================================================
- subroutine DDDTdll (t,rho,x,drhodt)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DDDTdll"::DDDTdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DDDTdll
- !dll_export DDDTdll
- dimension x(ncmax)
- call DDDT (t,rho,x,drhodt)
- end
-c ======================================================================
- subroutine DHD1dll (t,rho,x,dhdt_d,dhdt_p,dhdd_t,dhdd_p,dhdp_t,
- & dhdp_d)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DHD1dll"::DHD1dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DHD1dll
- !dll_export DHD1dll
- dimension x(ncmax)
- call DHD1 (t,rho,x,dhdt_d,dhdt_p,dhdd_t,dhdd_p,dhdp_t,dhdp_d)
- end
-c ======================================================================
- subroutine FGCTYdll (t,rho,x,f)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_FGCTYdll"::FGCTYdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::FGCTYdll
- !dll_export FGCTYdll
- dimension x(ncmax),f(ncmax)
- call FGCTY (t,rho,x,f)
- end
-c ======================================================================
- subroutine FGCTY2dll (t,rho,x,f,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_FGCTY2dll"::FGCTY2dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::FGCTY2dll
- !dll_export FGCTY2dll
- dimension x(ncmax),f(ncmax)
- call FGCTY2 (t,rho,x,f,ierr,herr)
- end
-c ======================================================================
- subroutine FUGCOFdll (t,rho,x,f,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_FUGCOFdll"::FUGCOFdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::FUGCOFdll
- !dll_export FUGCOFdll
- dimension x(ncmax),f(ncmax)
- call FUGCOF (t,rho,x,f,ierr,herr)
- end
-c ======================================================================
- subroutine CHEMPOTdll (t,rho,x,u,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_CHEMPOTdll"::CHEMPOTdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::CHEMPOTdll
- !dll_export CHEMPOTdll
- dimension x(ncmax),u(ncmax)
- call CHEMPOT (t,rho,x,u,ierr,herr)
- end
-c ======================================================================
- subroutine ACTVYdll (t,rho,x,actv,gamma,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_ACTVYdll"::ACTVYdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::ACTVYdll
- !dll_export ACTVYdll
- dimension x(ncmax),actv(ncmax),gamma(ncmax)
- call ACTVY (t,rho,x,actv,gamma,ierr,herr)
- end
-c ======================================================================
- subroutine VIRBdll (t,x,b)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_VIRBdll"::VIRBdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::VIRBdll
- !dll_export VIRBdll
- dimension x(ncmax)
- call VIRB (t,x,b)
- end
-c ======================================================================
- subroutine B12dll (t,x,b)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_B12dll"::B12dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::B12dll
- !dll_export B12dll
- dimension x(ncmax)
- call B12 (t,x,b)
- end
-c ======================================================================
- subroutine DBDTdll (t,x,b)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DBDTdll"::DBDTdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DBDTdll
- !dll_export DBDTdll
- dimension x(ncmax)
- call DBDT (t,x,b)
- end
-c ======================================================================
- subroutine VIRCdll (t,x,c)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_VIRCdll"::VIRCdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::VIRCdll
- !dll_export VIRCdll
- dimension x(ncmax)
- call VIRC (t,x,c)
- end
-c ======================================================================
- subroutine VIRBAdll (t,x,b)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_VIRBAdll"::VIRBAdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::VIRBAdll
- !dll_export VIRBAdll
- dimension x(ncmax)
- call VIRBA (t,x,b)
- end
-c ======================================================================
- subroutine VIRCAdll (t,x,c)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_VIRCAdll"::VIRCAdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::VIRCAdll
- !dll_export VIRCAdll
- dimension x(ncmax)
- call VIRCA (t,x,c)
- end
-c ======================================================================
- subroutine HEATdll (t,rho,x,hg,hn,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_HEATdll"::HEATdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::HEATdll
- !dll_export HEATdll
- dimension x(ncmax)
- CALL HEAT (t,rho,x,hg,hn,ierr,herr)
- end
-c ======================================================================
- subroutine SATTPdll (t,p,x,kph,iGuess,d,rhol,rhov,xliq,xvap,q,
- & ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SATTPdll"::SATTPdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SATTPdll
- !dll_export SATTPdll
- dimension x(ncmax),xliq(ncmax),xvap(ncmax)
- call SATTP (t,p,x,kph,iGuess,d,rhol,rhov,xliq,xvap,q,ierr,herr)
- end
-c ======================================================================
- subroutine SATTdll (t,x,kph,p,rhol,rhov,xliq,xvap,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SATTdll"::SATTdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SATTdll
- !dll_export SATTdll
- dimension x(ncmax),xliq(ncmax),xvap(ncmax)
- call SATT (t,x,kph,p,rhol,rhov,xliq,xvap,ierr,herr)
- end
-c ======================================================================
- subroutine SATPdll (p,x,kph,t,rhol,rhov,xliq,xvap,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SATPdll"::SATPdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SATPdll
- !dll_export SATPdll
- dimension x(ncmax),xliq(ncmax),xvap(ncmax)
- call SATP (p,x,kph,t,rhol,rhov,xliq,xvap,ierr,herr)
- end
-c ======================================================================
- subroutine SATDdll (rho,x,kph,kr,t,p,rhol,rhov,xliq,xvap,i,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SATDdll"::SATDdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SATDdll
- !dll_export SATDdll
- dimension x(ncmax),xliq(ncmax),xvap(ncmax)
- call SATD (rho,x,kph,kr,t,p,rhol,rhov,xliq,xvap,i,herr)
- end
-c ======================================================================
- subroutine SATHdll (h,x,kph,nroot,k1,t1,p1,d1,k2,t2,p2,d2,i,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SATHdll"::SATHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SATHdll
- !dll_export SATHdll
- dimension x(ncmax)
- call SATH (h,x,kph,nroot,k1,t1,p1,d1,k2,t2,p2,d2,i,herr)
- end
-c ======================================================================
- subroutine SATEdll (e,x,kph,nroot,k1,t1,p1,d1,k2,t2,p2,d2,i,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SATEdll"::SATEdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SATEdll
- !dll_export SATEdll
- dimension x(ncmax)
- call SATE (e,x,kph,nroot,k1,t1,p1,d1,k2,t2,p2,d2,i,herr)
- end
-c ======================================================================
- subroutine SATSdll (s,x,kph,nroot,k1,t1,p1,d1,k2,t2,p2,d2,
- & k3,t3,p3,d3,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SATSdll"::SATSdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SATSdll
- !dll_export SATSdll
- dimension x(ncmax)
- call SATS (s,x,kph,nroot,k1,t1,p1,d1,k2,t2,p2,d2,
- & k3,t3,p3,d3,ierr,herr)
- end
-c ======================================================================
- subroutine SATTESTdll (t,x,kph,p,x2,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SATTESTdll"::SATTESTdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SATTESTdll
- !dll_export SATTESTdll
- dimension x(ncmax),x2(ncmax)
- call SATTEST (t,x,kph,p,x2,ierr,herr)
- end
-c ======================================================================
- subroutine SATPESTdll (p,x,kph,t,x2,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SATPESTdll"::SATPESTdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SATPESTdll
- !dll_export SATPESTdll
- dimension x(ncmax),x2(ncmax)
- call SATPEST (p,x,kph,t,x2,ierr,herr)
- end
-c ======================================================================
- subroutine CSATKdll (icomp,t,kph,p,rho,csat,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_CSATKdll"::CSATKdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::CSATKdll
- !dll_export CSATKdll
- call CSATK (icomp,t,kph,p,rho,csat,ierr,herr)
- end
-c ======================================================================
- subroutine DPTSATKdll (icomp,t,kph,p,rho,csat,dpt,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DPTSATKdll"::DPTSATKdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DPTSATKdll
- !dll_export DPTSATKdll
- call DPTSATK (icomp,t,kph,p,rho,csat,dpt,ierr,herr)
- end
-c ======================================================================
- subroutine CV2PKdll (icomp,t,rho,cv2p,csat,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_CV2PKdll"::CV2PKdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::CV2PKdll
- !dll_export CV2PKdll
- call CV2PK (icomp,t,rho,cv2p,csat,ierr,herr)
- end
-c ======================================================================
- subroutine PSATKdll (icomp,t,p,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_PSATKdll"::PSATKdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::PSATKdll
- !dll_export PSATKdll
- call PSATK (icomp,t,p,ierr,herr)
- end
-c ======================================================================
- subroutine DLSATKdll (icomp,t,d,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DLSATKdll"::DLSATKdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DLSATKdll
- !dll_export DLSATKdll
- call DLSATK (icomp,t,d,ierr,herr)
- end
-c ======================================================================
- subroutine DVSATKdll (icomp,t,d,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DVSATKdll"::DVSATKdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DVSATKdll
- !dll_export DVSATKdll
- call DVSATK (icomp,t,d,ierr,herr)
- end
-c ======================================================================
- subroutine SPNDLdll (t,x,rhol,rhov,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SPNDLdll"::SPNDLdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SPNDLdll
- !dll_export SPNDLdll
- dimension x(ncmax)
- call SPNDL (t,x,rhol,rhov,ierr,herr)
- end
-c ======================================================================
- subroutine TPRHOdll (t,p,x,j,i,rho,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_TPRHOdll"::TPRHOdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::TPRHOdll
- !dll_export TPRHOdll
- dimension x(ncmax)
- call TPRHO (t,p,x,j,i,rho,ierr,herr)
- end
-c ======================================================================
- subroutine TPRHOPRdll (t,p,x,rho1,rho2)
- implicit double precision (a-h,o-z)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_TPRHOPRdll"::TPRHOPRdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::TPRHOPRdll
- !dll_export TPRHOPRdll
- dimension x(ncmax)
- call TPRHOPR (t,p,x,rho1,rho2)
- end
-c ======================================================================
- subroutine TPFLSHdll (t,p,z,D,Dl,Dv,x,y,q,e,h,s,cv,cp,w,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_TPFLSHdll"::TPFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::TPFLSHdll
- !dll_export TPFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- if (t.gt.0.d0)
- & call TPFLSH (t,p,z,D,Dl,Dv,x,y,q,e,h,s,cv,cp,w,ierr,herr)
- end
-c ======================================================================
- subroutine TDFLSHdll (t,D,x,p,Dl,Dv,xl,xv,q,e,h,s,cv,cp,w,i,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_TDFLSHdll"::TDFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::TDFLSHdll
- !dll_export TDFLSHdll
- dimension x(ncmax),xl(ncmax),xv(ncmax)
- call TDFLSH (t,D,x,p,Dl,Dv,xl,xv,q,e,h,s,cv,cp,w,i,herr)
- end
-c ======================================================================
- subroutine PDFLSHdll (p,D,z,t,Dl,Dv,x,y,q,e,h,s,cv,cp,w,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_PDFLSHdll"::PDFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::PDFLSHdll
- !dll_export PDFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call PDFLSH (p,D,z,t,Dl,Dv,x,y,q,e,h,s,cv,cp,w,ierr,herr)
- end
-c ======================================================================
- subroutine PHFLSHdll (p,h,z,t,D,Dl,Dv,x,y,q,e,s,cv,cp,w,i,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_PHFLSHdll"::PHFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::PHFLSHdll
- !dll_export PHFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call PHFLSH (p,h,z,t,D,Dl,Dv,x,y,q,e,s,cv,cp,w,i,herr)
- end
-c ======================================================================
- subroutine PSFLSHdll (p,s,z,t,D,Dl,Dv,x,y,q,e,h,cv,cp,w,i,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_PSFLSHdll"::PSFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::PSFLSHdll
- !dll_export PSFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call PSFLSH (p,s,z,t,D,Dl,Dv,x,y,q,e,h,cv,cp,w,i,herr)
- end
-c ======================================================================
- subroutine PEFLSHdll (p,e,z,t,D,Dl,Dv,x,y,q,h,s,cv,cp,w,i,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_PEFLSHdll"::PEFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::PEFLSHdll
- !dll_export PEFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call PEFLSH (p,e,z,t,D,Dl,Dv,x,y,q,h,s,cv,cp,w,i,herr)
- end
-c ======================================================================
- subroutine THFLSHdll (t,h,z,kr,p,D,Dl,Dv,x,y,q,e,s,cv,cp,w,i,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_THFLSHdll"::THFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::THFLSHdll
- !dll_export THFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call THFLSH (t,h,z,kr,p,D,Dl,Dv,x,y,q,e,s,cv,cp,w,i,herr)
- end
-c ======================================================================
- subroutine TSFLSHdll (t,s,z,kr,p,D,Dl,Dv,x,y,q,e,h,cv,cp,w,i,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_TSFLSHdll"::TSFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::TSFLSHdll
- !dll_export TSFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call TSFLSH (t,s,z,kr,p,D,Dl,Dv,x,y,q,e,h,cv,cp,w,i,herr)
- end
-c ======================================================================
- subroutine TEFLSHdll (t,e,z,kr,p,D,Dl,Dv,x,y,q,h,s,cv,cp,w,i,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_TEFLSHdll"::TEFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::TEFLSHdll
- !dll_export TEFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call TEFLSH (t,e,z,kr,p,D,Dl,Dv,x,y,q,h,s,cv,cp,w,i,herr)
- end
-c ======================================================================
- subroutine DHFLSHdll (D,h,z,t,p,Dl,Dv,x,y,q,e,s,cv,cp,w,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DHFLSHdll"::DHFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DHFLSHdll
- !dll_export DHFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call DHFLSH (D,h,z,t,p,Dl,Dv,x,y,q,e,s,cv,cp,w,ierr,herr)
- end
-c ======================================================================
- subroutine DSFLSHdll (D,s,z,t,p,Dl,Dv,x,y,q,e,h,cv,cp,w,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DSFLSHdll"::DSFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DSFLSHdll
- !dll_export DSFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call DSFLSH (D,s,z,t,p,Dl,Dv,x,y,q,e,h,cv,cp,w,ierr,herr)
- end
-c ======================================================================
- subroutine DEFLSHdll (D,e,z,t,p,Dl,Dv,x,y,q,h,s,cv,cp,w,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DEFLSHdll"::DEFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DEFLSHdll
- !dll_export DEFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call DEFLSH (D,e,z,t,p,Dl,Dv,x,y,q,h,s,cv,cp,w,ierr,herr)
- end
-c ======================================================================
- subroutine HSFLSHdll (h,s,z,t,p,D,Dl,Dv,x,y,q,e,cv,cp,w,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_HSFLSHdll"::HSFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::HSFLSHdll
- !dll_export HSFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call HSFLSH (h,s,z,t,p,D,Dl,Dv,x,y,q,e,cv,cp,w,ierr,herr)
- end
-c ======================================================================
- subroutine ESFLSHdll (e,s,z,t,p,D,Dl,Dv,x,y,q,h,cv,cp,w,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_ESFLSHdll"::ESFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::ESFLSHdll
- !dll_export ESFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call ESFLSH (e,s,z,t,p,D,Dl,Dv,x,y,q,h,cv,cp,w,ierr,herr)
- end
-c ======================================================================
- subroutine ABFL1dll (a,b,x,kph,ab,dmin,dmax,t,p,D,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*2 ab
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_ABFL1dll"::ABFL1dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::ABFL1dll
- !dll_export ABFL1dll
- dimension x(ncmax)
- call ABFL1 (a,b,x,kph,ab,dmin,dmax,t,p,D,ierr,herr)
- end
-c ======================================================================
- subroutine DBFL1dll (d,b,x,ab,t,p,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*2 ab
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DBFL1dll"::DBFL1dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DBFL1dll
- !dll_export DBFL1dll
- dimension x(ncmax)
- call DBFL1 (d,b,x,ab,t,p,ierr,herr)
- end
-c ======================================================================
- subroutine ABFL2dll (a,b,z,kq,ksat,ab,
- & tbub,tdew,pbub,pdew,Dlbub,Dvdew,ybub,xdew,
- & t,p,Dl,Dv,x,y,q,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*2 ab
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_ABFL2dll"::ABFL2dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::ABFL2dll
- !dll_export ABFL2dll
- dimension z(ncmax),ybub(ncmax),xdew(ncmax),x(ncmax),y(ncmax)
- call ABFL2 (a,b,z,kq,ksat,ab,
- & tbub,tdew,pbub,pdew,Dlbub,Dvdew,ybub,xdew,
- & t,p,Dl,Dv,x,y,q,ierr,herr)
- end
-c ======================================================================
- subroutine DBFL2dll (d,b,z,kq,ab,t,p,Dl,Dv,x,y,q,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*2 ab
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DBFL2dll"::DBFL2dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DBFL2dll
- !dll_export DBFL2dll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call DBFL2 (d,b,z,kq,ab,t,p,Dl,Dv,x,y,q,ierr,herr)
- end
-c ======================================================================
- subroutine TQFLSHdll (t,q,z,kq,p,D,Dl,Dv,x,y,e,h,s,cv,cp,w,i,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_TQFLSHdll"::TQFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::TQFLSHdll
- !dll_export TQFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call TQFLSH (t,q,z,kq,p,D,Dl,Dv,x,y,e,h,s,cv,cp,w,i,herr)
- end
-c ======================================================================
- subroutine PQFLSHdll (p,q,z,kq,t,D,Dl,Dv,x,y,e,h,s,cv,cp,w,i,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_PQFLSHdll"::PQFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::PQFLSHdll
- !dll_export PQFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call PQFLSH (p,q,z,kq,t,D,Dl,Dv,x,y,e,h,s,cv,cp,w,i,herr)
- end
-c ======================================================================
- subroutine CSTARdll (t,p,v,x,cs,ts,Ds,ps,ws,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_CSTARdll"::CSTARdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::CSTARdll
- !dll_export CSTARdll
- dimension x(ncmax)
- call CSTAR (t,p,v,x,cs,ts,Ds,ps,ws,ierr,herr)
- end
-c ======================================================================
- subroutine CCRITdll (t,p,v,x,cs,ts,Ds,ps,ws,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_CCRITdll"::CCRITdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::CCRITdll
- !dll_export CCRITdll
- dimension x(ncmax)
- call CSTAR (t,p,v,x,cs,ts,Ds,ps,ws,ierr,herr)
- end
-c ======================================================================
- subroutine FPVdll (t,rho,p,x,f)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_FPVdll"::FPVdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::FPVdll
- !dll_export FPVdll
- dimension x(ncmax)
- call FPV (t,rho,p,x,f)
- end
-c ======================================================================
- subroutine CP0dll (t,x,cp)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_CP0dll"::CP0dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::CP0dll
- !dll_export CP0dll
- dimension x(ncmax)
- cp=CP0(t,x)
- end
-c ======================================================================
- subroutine TRNPRPdll (t,rho,x,eta,tcx,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_TRNPRPdll"::TRNPRPdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::TRNPRPdll
- !dll_export TRNPRPdll
- dimension x(ncmax)
- call TRNPRP (t,rho,x,eta,tcx,ierr,herr)
- if (tcx.gt.1.d50) tcx=0 !Avoid NaN (not a number)
- if (eta.gt.1.d50) eta=0 !Avoid NaN (not a number)
- end
-c ======================================================================
- subroutine INFOdll (icomp,wmm,ttrp,tnbpt,tc,pc,Dc,Zc,acf,dip,Rgas)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_INFOdll"::INFOdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::INFOdll
- !dll_export INFOdll
- call INFO (icomp,wmm,ttrp,tnbpt,tc,pc,Dc,Zc,acf,dip,Rgas)
- end
-c ======================================================================
- subroutine NAMEdll (icomp,hname,hn80,hcas)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- character*12 hcas,hname
- character*80 hn80
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_NAMEdll"::NAMEdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::NAMEdll
- !dll_export NAMEdll
- call NAME (icomp,hname,hn80,hcas)
- end
-c ======================================================================
- subroutine XMASSdll (xmol,xkg,wmix)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_XMASSdll"::XMASSdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::XMASSdll
- !dll_export XMASSdll
- dimension xmol(ncmax),xkg(ncmax)
- call XMASS (xmol,xkg,wmix)
- end
-c ======================================================================
- subroutine XMOLEdll (xkg,xmol,wmix)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_XMOLEdll"::XMOLEdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::XMOLEdll
- !dll_export XMOLEdll
- dimension xmol(ncmax),xkg(ncmax)
- call XMOLE (xkg,xmol,wmix)
- end
-c ======================================================================
- subroutine LIMITXdll (htyp,t,D,p,x,tmin,tmax,Dmax,pmax,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*3 htyp
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_LIMITXdll"::LIMITXdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::LIMITXdll
- !dll_export LIMITXdll
- dimension x(ncmax)
- call LIMITX (htyp,t,D,p,x,tmin,tmax,Dmax,pmax,ierr,herr)
- end
-c ======================================================================
- subroutine LIMITKdll (htyp,icomp,t,D,p,tmin,tmax,Dmax,pmax,i,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- character*3 htyp
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_LIMITKdll"::LIMITKdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::LIMITKdll
- !dll_export LIMITKdll
- call LIMITK (htyp,icomp,t,D,p,tmin,tmax,Dmax,pmax,i,herr)
- end
-c ======================================================================
- subroutine LIMITSdll (htyp,x,tmin,tmax,Dmax,pmax)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*3 htyp
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_LIMITSdll"::LIMITSdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::LIMITSdll
- !dll_export LIMITSdll
- dimension x(ncmax)
- call LIMITS (htyp,x,tmin,tmax,Dmax,pmax)
- end
-c ======================================================================
- subroutine QMASSdll (qmol,xl,xv,qkg,xlkg,xvkg,wliq,wvap,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_QMASSdll"::QMASSdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::QMASSdll
- !dll_export QMASSdll
- dimension xl(ncmax),xv(ncmax),xlkg(ncmax),xvkg(ncmax)
- call QMASS (qmol,xl,xv,qkg,xlkg,xvkg,wliq,wvap,ierr,herr)
- end
-c ======================================================================
- subroutine QMOLEdll (qkg,xlkg,xvkg,qmol,xl,xv,wliq,wvap,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_QMOLEdll"::QMOLEdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::QMOLEdll
- !dll_export QMOLEdll
- dimension xl(ncmax),xv(ncmax),xlkg(ncmax),xvkg(ncmax)
- call QMOLE (qkg,xlkg,xvkg,qmol,xl,xv,wliq,wvap,ierr,herr)
- end
-c ======================================================================
- subroutine WMOLdll (x, wm)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_WMOLdll"::WMOLdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::WMOLdll
- !dll_export WMOLdll
- dimension x(ncmax)
- wm=WMOL(x)
- end
-c ======================================================================
- subroutine DIELECdll (t,rho,x,de)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DIELECdll"::DIELECdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DIELECdll
- !dll_export DIELECdll
- dimension x(ncmax)
- call DIELEC (t,rho,x,de)
- end
-c ======================================================================
- subroutine SURFTdll (t,rho,x,sigma,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SURFTdll"::SURFTdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SURFTdll
- !dll_export SURFTdll
- dimension x(ncmax)
- call SURFT (t,rho,x,sigma,ierr,herr)
- end
-c ======================================================================
- subroutine EXCESSdll (t,p,x,kph,rho,vE,eE,hE,sE,aE,gE,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_EXCESSdll"::EXCESSdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::EXCESSdll
- !dll_export EXCESSdll
- dimension x(ncmax)
- call EXCESS (t,p,x,kph,rho,vE,eE,hE,sE,aE,gE,ierr,herr)
- end
-c ======================================================================
- subroutine SURTENdll (t,rhol,rhov,xl,xv,sigma,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SURTENdll"::SURTENdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SURTENdll
- !dll_export SURTENdll
- dimension xl(ncmax),xv(ncmax)
- call SURTEN (t,rhol,rhov,xl,xv,sigma,ierr,herr)
- end
-c ======================================================================
- subroutine PDFL1dll (p,rho,x,t,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_PDFL1dll"::PDFL1dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::PDFL1dll
- !dll_export PDFL1dll
- dimension x(ncmax)
- call PDFL1 (p,rho,x,t,ierr,herr)
- end
-c ======================================================================
- subroutine PHFL1dll (p,h,x,kph,t,D,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_PHFL1dll"::PHFL1dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::PHFL1dll
- !dll_export PHFL1dll
- dimension x(ncmax)
- call PHFL1 (p,h,x,kph,t,D,ierr,herr)
- end
-c ======================================================================
- subroutine PSFL1dll (p,s,x,kph,t,D,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_PSFL1dll"::PSFL1dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::PSFL1dll
- !dll_export PSFL1dll
- dimension x(ncmax)
- call PSFL1 (p,s,x,kph,t,D,ierr,herr)
- end
-c ======================================================================
- subroutine SETKTVdll (icomp,jcomp,hmodij,fij,hfmix,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (nmxpar=6)
- character*3 hmodij
- character*255 hfmix,herr
- dimension fij(nmxpar)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SETKTVdll"::SETKTVdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SETKTVdll
- !dll_export SETKTVdll
- call SETKTV (icomp,jcomp,hmodij,fij,hfmix,ierr,herr)
- end
-c ======================================================================
- subroutine GETKTVdll (icomp,jcomp,hmodij,fij,hfmix,hfij2,hbinp,
- & hmxrul)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (nmxpar=6)
- character*3 hmodij
- character*8 hfij(nmxpar)
- character*255 hfmix,hmxrul,hbinp,hfij2
- dimension fij(nmxpar)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_GETKTVdll"::GETKTVdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::GETKTVdll
- !dll_export GETKTVdll
- call GETKTV (icomp,jcomp,hmodij,fij,hfmix,hfij,hbinp,hmxrul)
- hfij2=hfij(1)//hfij(2)//hfij(3)//hfij(4)//hfij(5)//hfij(6)
- end
-c ======================================================================
- subroutine GETFIJdll (hmodij,fij,hfij2,hmxrul)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (nmxpar=6)
- character*3 hmodij
- character*8 hfij(nmxpar)
- character*255 hmxrul,hfij2
- dimension fij(nmxpar)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_GETFIJdll"::GETFIJdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::GETFIJdll
- !dll_export GETFIJdll
- call GETFIJ (hmodij,fij,hfij,hmxrul)
- hfij2=hfij(1)//hfij(2)//hfij(3)//hfij(4)//hfij(5)//hfij(6)
- end
-c ======================================================================
- subroutine MELTTdll (t,x,p,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_MELTTdll"::MELTTdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::MELTTdll
- !dll_export MELTTdll
- dimension x(ncmax)
- call MELTT (t,x,p,ierr,herr)
- end
-c ======================================================================
- subroutine MLTH2Odll (t,p1,p2)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_MLTH2Odll"::MLTH2Odll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::MLTH2Odll
- !dll_export MLTH2Odll
- call MLTH2O (t,p1,p2)
- end
-c ======================================================================
- subroutine MELTPdll (p,x,t,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_MELTPdll"::MELTPdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::MELTPdll
- !dll_export MELTPdll
- dimension x(ncmax)
- call MELTP (p,x,t,ierr,herr)
- end
-c ======================================================================
- subroutine SUBLTdll (t,x,p,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SUBLTdll"::SUBLTdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SUBLTdll
- !dll_export SUBLTdll
- dimension x(ncmax)
- call SUBLT (t,x,p,ierr,herr)
- end
-c ======================================================================
- subroutine SUBLPdll (p,x,t,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SUBLPdll"::SUBLPdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SUBLPdll
- !dll_export SUBLPdll
- dimension x(ncmax)
- call SUBLP (p,x,t,ierr,herr)
- end
-c ======================================================================
- subroutine PREOSdll (i)
- implicit integer (i-n)
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_PREOSdll"::PREOSdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::PREOSdll
- !dll_export PREOSdll
- call PREOS (i)
- end
-c ======================================================================
- subroutine SETAGAdll (ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_SETAGAdll"::SETAGAdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::SETAGAdll
- !dll_export SETAGAdll
- call SETAGA (ierr,herr)
- end
-c ======================================================================
- subroutine GERG04dll (nc,iflag,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_GERG04dll"::GERG04dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::GERG04dll
- !dll_export GERG04dll
- call GERG04 (nc,iflag,ierr,herr)
- end
-c ======================================================================
- subroutine DOTFILLdll (x,ptest,filrat,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DOTFILLdll"::DOTFILLdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DOTFILLdll
- !dll_export DOTFILLdll
- dimension x(ncmax)
- call DOTFILL (x,ptest,filrat,ierr,herr)
- end
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/PASS_FTN_LIN.FOR.tpl b/_REFPROP-Wrapper/Version 0.5_linux/src/PASS_FTN_LIN.FOR.tpl
new file mode 100644
index 0000000..edc83be
--- /dev/null
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/PASS_FTN_LIN.FOR.tpl
@@ -0,0 +1,68 @@
+c ======================================================================
+c Adding new routines used in the Modelica interface.
+c subroutine DHFL1 (rho,h,x,t,ierr,herr)
+c subroutine DHFL2 (D,h,z,t,p,Dl,Dv,x,y,q,ierr,herr)
+c subroutine DSFL1 (rho,s,x,t,ierr,herr)
+c subroutine DSFL2 (d,s,z,t,p,Dl,Dv,x,y,q,ierr,herr)
+c subroutine TPFL2 (t,p,z,Dl,Dv,x,y,q,ierr,herr)
+c ======================================================================
+ subroutine DHFL1dll (rho,h,x,t,ierr,herr)
+ implicit double precision (a-h,o-z)
+ implicit integer (i-n)
+ parameter (ncmax=20)
+ character*255 herr
+cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DHFLSHdll"::DHFLSHdll
+cDEC$ ATTRIBUTES STDCALL, REFERENCE::DHFLSHdll
+ !dll_export DHFLSHdll
+ dimension x(ncmax)
+ call DHFL1 (rho,h,x,t,ierr,herr)
+ end
+c ======================================================================
+ subroutine DHFL2dll (D,h,z,t,p,Dl,Dv,x,y,q,ierr,herr)
+ implicit double precision (a-h,o-z)
+ implicit integer (i-n)
+ parameter (ncmax=20)
+ character*255 herr
+cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DHFLSHdll"::DHFLSHdll
+cDEC$ ATTRIBUTES STDCALL, REFERENCE::DHFLSHdll
+ !dll_export DHFLSHdll
+ dimension z(ncmax),x(ncmax),y(ncmax)
+ call DHFL2 (D,h,z,t,p,Dl,Dv,x,y,q,ierr,herr)
+ end
+c ======================================================================
+ subroutine DSFL1dll (rho,s,x,t,ierr,herr)
+ implicit double precision (a-h,o-z)
+ implicit integer (i-n)
+ parameter (ncmax=20)
+ character*255 herr
+cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DSFL1dll"::DSFL1dll
+cDEC$ ATTRIBUTES STDCALL, REFERENCE::DSFL1dll
+ !dll_export DSFL1dll
+ dimension x(ncmax)
+ call DSFL1 (rho,s,x,t,ierr,herr)
+ end
+c ======================================================================
+ subroutine DSFL2dll (d,s,z,t,p,Dl,Dv,x,y,q,ierr,herr)
+ implicit double precision (a-h,o-z)
+ implicit integer (i-n)
+ parameter (ncmax=20)
+ character*255 herr
+cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DSFL2dll"::DSFL2dll
+cDEC$ ATTRIBUTES STDCALL, REFERENCE::DSFL2dll
+ !dll_export DSFL2dll
+ dimension z(ncmax),x(ncmax),y(ncmax)
+ call DSFL2 (d,s,z,t,p,Dl,Dv,x,y,q,ierr,herr)
+ end
+c ======================================================================
+ subroutine TPFL2dll (t,p,z,Dl,Dv,x,y,q,ierr,herr)
+ implicit double precision (a-h,o-z)
+ implicit integer (i-n)
+ parameter (ncmax=20)
+ character*255 herr
+cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_TPFL2dll"::TPFL2dll
+cDEC$ ATTRIBUTES STDCALL, REFERENCE::TPFL2dll
+ !dll_export TPFL2dll
+ dimension z(ncmax),x(ncmax),y(ncmax)
+ call TPFL2 (t,p,z,Dl,Dv,x,y,q,ierr,herr)
+ end
+c ======================================================================
\ No newline at end of file
From 19adf5863770c6e1b6d58fd9551c3c57b0b85208 Mon Sep 17 00:00:00 2001
From: jowr
Date: Wed, 19 Sep 2012 07:27:18 -0700
Subject: [PATCH 03/57] 2012:09:19 16:26 - Included instructions to change the
lowercase library name to uppercase. Still no success with Dymola.
---
_REFPROP-Wrapper/Version 0.5_linux/Makefile | 54 +++++++++++++++++++--
1 file changed, 49 insertions(+), 5 deletions(-)
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/Makefile b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
index d951e9d..0026793 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/Makefile
+++ b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
@@ -5,6 +5,13 @@
# Copyright : Use and modify at your own risk.
# Description : Makefile for Refprop from Fortran and C++ tests.
# ============================================================================
+# The installation procedure should be as follows:
+# 1) make libheader library
+# 2) sudo make installlib
+# 3) make wrapheader wrapper
+# 4) sudo make installwrap
+# 5) sudo make fixit
+# ============================================================================
# used for the output
THENAME =refprop
@@ -81,18 +88,55 @@ LIBOBJECTFILES = \
# Link all files to places recognised by the system.
###########################################################
.PHONY : install
-install : all
+install : installlib installwrap
+
+.PHONY : installlib
+installlib : libheader library
ln -sf $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION) $(HEADINST)/$(HEADERFILE)$(HEADEREXTENSION)
ln -sf $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION) $(LIBINST)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
ln -sf $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION) /usr/include/$(HEADERFILE)$(HEADEREXTENSION)
ln -sf $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION) /usr/lib/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+
+.PHONY : installwrap
+installwrap: wrapheader wrapper
ln -sf $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION) $(HEADINST)/$(THEWRAPPER)$(HEADEREXTENSION)
ln -sf $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(LIBINST)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
ln -sf $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION) /usr/include/$(THEWRAPPER)$(HEADEREXTENSION)
ln -sf $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) /usr/lib/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
-.PHONY : all
-all : library libheader wrapper wrapheader
+.PHONY : uninstall
+uninstall :
+ $(RM) $(HEADINST)/$(HEADERFILE)$(HEADEREXTENSION)
+ $(RM) $(LIBINST)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+ $(RM) /usr/include/$(HEADERFILE)$(HEADEREXTENSION)
+ $(RM) /usr/lib/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+ $(RM) $(HEADINST)/$(THEWRAPPER)$(HEADEREXTENSION)
+ $(RM) $(LIBINST)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+ $(RM) /usr/include/$(THEWRAPPER)$(HEADEREXTENSION)
+ $(RM) /usr/lib/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+
+.PHONY : purge
+purge :
+ $(RM) $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION)
+ $(RM) $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+ $(RM) $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION)
+ $(RM) $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+
+.PHONY : fixit
+fixit : install
+ ln -sf $(LIBINST)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(LIBINST)/libREFPROP_wrapper$(DYNAMICLIBRARYEXTENSION)
+ ln -sf /usr/lib/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) /usr/lib/libREFPROP_wrapper$(DYNAMICLIBRARYEXTENSION)
+
+.PHONY : unfixit
+unfixit :
+ $(RM) $(LIBINST)/libREFPROP_wrapper$(DYNAMICLIBRARYEXTENSION)
+ $(RM) /usr/lib/libREFPROP_wrapper$(DYNAMICLIBRARYEXTENSION)
+
+.PHONY : removeall
+removeall : uninstall purge unfixit
+
+#.PHONY : all
+#all : install fixit
###########################################################
# Compile the wrapper class and its tests.
@@ -104,12 +148,12 @@ $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION): $(THEWRAPPER)$(HEADEREXTENSION)
.PHONY : wrapper
wrapper : $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
-$(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION): $(THEWRAPPER).o library libheader
+$(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION): $(THEWRAPPER).o wrapheader libheader library
$(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(THEWRAPPER).o -l$(THENAME)
.PHONY : test
test : $(THETEST)
-$(THETEST) : $(THETEST).o wrapper wrapheader
+$(THETEST) : $(THETEST).o wrapheader wrapper
$(FC) $(FLINKFLAGS) -o $(THETEST) $(THETEST).o -l$(THEWRAPPER)
###########################################################
From 674452c40ffb1cef514387949fc57d5d848b9d88 Mon Sep 17 00:00:00 2001
From: jowr
Date: Thu, 20 Sep 2012 06:23:45 -0700
Subject: [PATCH 04/57] 2012:09:20 15:22 - The Modelica examples work, both for
pure fluids and mixtures. However, the C++ code in the wrapper could be a
little cleaner...
---
.../Version 0.5_linux/refprop_wrapper.cpp | 24 ++++++++++++--
.../Version 0.5_linux/refpropwrappertest.cpp | 31 +++++++++++++++++++
2 files changed, 52 insertions(+), 3 deletions(-)
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
index 31def50..2fc02d6 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
@@ -60,6 +60,7 @@ static int const GB_exitError = 2 ;
static int const GB_exitFatal = 3 ;
static int const GB_exitInternal = 4 ;
+
char *str_replace(char *str, char *search, char *replace, long *count) {
int i,n_ret;
int newlen = strlen(replace);
@@ -583,7 +584,7 @@ OUTPUT
//---------------------------------------------------------------------------
-double satprops_REFPROP(char* what, char* statevar, char* fluidnames, double *props, double statevarval, double* x, char* REFPROP_PATH, char* errormsg, int DEBUGMODE){
+double satprops_REFPROP(char* what, char* statevar_in, char* fluidnames, double *props, double statevarval, double* x, char* REFPROP_PATH, char* errormsg, int DEBUGMODE){
/*Calculates thermodynamic saturation properties of a pure substance/mixture, returns both single value and array containing all calculated values (because the are calculated anyway)
INPUT:
what: character specifying return value (p,T,h,s,d,wm,q,e,w) - Explanation of variables at the end of this function
@@ -611,17 +612,31 @@ OUTPUT
return 0;
}
+ if (DEBUGMODE) printf("\nFunction init_REFPROP was called\n");
//CALCULATE MOLAR MASS
// WMOLdll = (fp_WMOLdllTYPE) GetProcAddress(RefpropdllInstance,"WMOLdll");
WMOLdll(x,wm);
// sprintf(errormsg," %10.4f, %10.4f, %10.4f,",x[0],x[1],wm);
+ if (DEBUGMODE) printf("\nFunction WMOLdll was called\n");
+
wm /= 1000; //g/mol -> kg/mol
+ if (DEBUGMODE) printf("\nwm converted.\n");
- //identify and assign passed state variables
- statevar[0] = tolower(statevar[0]);
+ if (DEBUGMODE) printf("\statevar is %s \n",statevar_in);
+ //identify and assign passed state variables
+ // char tmpstr[1];
+ // strcpy(tmpstr,statevar[0]);
+ // statevar = toLowerCase(tmpstr);
+ //statevar[0] = tolower(statevar[0]);
+ char statevar[1];
+ statevar[0] = tolower(statevar_in[0]);
+ if (DEBUGMODE) printf("\nstatevar lowercase.\n");
if (statevar[0]!='\0'){
+// if (strcmp(statevar[0],"")){
+// if (statevar[0] != NULL){
+ if (DEBUGMODE) printf("\nentering statevar switch.\n");
switch(statevar[0]){
case 'p':
p = statevarval/1000; //Pa->kPa
@@ -644,6 +659,9 @@ OUTPUT
return 0;
}
}
+
+ if (DEBUGMODE) printf("\nstatevar checked.\n");
+
double xliq[ncmax],xvap[ncmax],f[ncmax];
long j=2,kr;
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refpropwrappertest.cpp b/_REFPROP-Wrapper/Version 0.5_linux/refpropwrappertest.cpp
index 377b89e..9fb00fc 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/refpropwrappertest.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/refpropwrappertest.cpp
@@ -68,5 +68,36 @@ int main(int argc, char* argv[]){
printf("Xliq[%i]=%f\t",ii+1, props[16+ii]);
printf("Xvap[%i]=%f\n",ii+1, props[16+nX+ii]);
}
+
+ // INPUT:
+ // what: character specifying return value (p,T,h,s,d,wm,q,e,w) - Explanation of variables at the end of this function
+ // statevar: string of 1 variable out of p,T,h,s,d
+ // fluidnames: string containing names of substances in mixtured separated by |, substance names are identical to those of *.fld-files in REFPROP program directory
+ // statevarval: values of the variable specified in statevar
+ // x: array containing the mass fractions of the components of the mixture
+ // REFPROP_PATH: string defining the path of the refprop.dll
+ // OUTPUT
+ // return value: value of variable specified by the input variable what
+ // props: Array containing all calculated values
+ // errormsg: string containing error message
+ //
+ char what[255];
+ strcpy(what, "T");
+ char statevar[255];
+ strcpy(statevar, "p");
+ // fluidname defined above
+ //strcpy(fluidname,argv[2]);
+ strcpy(fluidname,"BUTANE");
+ //props is defined
+ double statevarval = 1e5; // 1 bar
+ // x is defined
+ char REFPROP_PATH[255];
+ strcpy(REFPROP_PATH,argv[5]);
+
+ double T;
+ T = satprops_REFPROP (what, statevar, fluidname, props, statevarval, x, REFPROP_PATH, errormsg, DEBUG);
+ printf("Saturation conditions for %s\t",fluidname);
+ printf("Saturation temperature =%f\t",T);
+
return 0;
}
From 7c61a6a5b4fc90fc452241a062b55af973d055a8 Mon Sep 17 00:00:00 2001
From: jowr
Date: Fri, 21 Sep 2012 01:22:39 -0700
Subject: [PATCH 05/57] 2012:09:21 10:22 - Added text for the Linux version to
the readme.txt.
---
readme.txt | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/readme.txt b/readme.txt
index 5444151..5d4435f 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,6 +1,24 @@
+Welcome to REFPROP2Modelica!
+
+This piece of software enables the user to access the Refprop fluid property database from within Modelica. The aim is to develop wrapper classes and integrate them with the "Media" framework inside Modelica. It has only been tested with Dymola sofar.
+
+For Windows, please follow these instructions
1. After downloading and unzipping rename folder containing these files to "MediaTwoPhaseMixture".
2. Copy \_REFPROP-Wrapper\Version x.x\REFPROP_WRAPPER.LIB to %DYMOLADIR%\\BIN\\LIB\ (%DYMOLADIR% is DYMOLA's program directory)
3. Copy \_REFPROP-Wrapper\Version x.x\REFPROP_WRAPPER.H to %DYMOLADIR%\\SOURCE\\
+
+For installing on a Linux machine, please follow the instructions in the Makefile provided in the directory containing the Linux version of the wrapper class. You only have to type in the right directories and install all the compilers / libraries required.
+1. Change the paths in _REFPROP-Wrapper/Version x.x_linux/Makefile to your needs.
+2. Call "make libheader library" and "sudo make installlib" to compile and install refprop.
+3. Call "make wrapheader wrapper" and "sudo make installwrap" as well as "sudo make fixit" to compile and install the wrapper.
+
+For both versions, the last step is the same:
+
4. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the package).
Make sure you mask the backslashes. It should look something like
- constant String REFPROP_PATH = "C:\\Program Files\\REFPROP\\\";
+ constant String REFPROP_PATH = "C:\\Program Files\\REFPROP\\";
+ or
+ constant String REFPROP_PATH = "/home/user/Refprop/";
+
+
+Please note that you need a working and licensed copy of Refprop in order to use the software provided here. This is not a replacement for Refprop.
\ No newline at end of file
From 4ca40d625722703b5673ecc3aab472692bd27666 Mon Sep 17 00:00:00 2001
From: jowr
Date: Mon, 1 Oct 2012 15:57:58 -0700
Subject: [PATCH 06/57] 2012:10:01 00:09 - Changed header file for increased
portability, started to use POCO library in test file.
---
_REFPROP-Wrapper/Version 0.5_linux/Makefile | 24 +-
.../Version 0.5_linux/refprop_wrapper.cpp | 5 +-
.../Version 0.5_linux/src/librefprop.h | 331 --------
.../Version 0.5_linux/src/refprop-ftn.cpp | 34 +-
.../Version 0.5_linux/src/refprop_lib.h | 795 ++++++++++++++++++
5 files changed, 848 insertions(+), 341 deletions(-)
delete mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/librefprop.h
create mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/refprop_lib.h
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/Makefile b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
index 0026793..c90d5d6 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/Makefile
+++ b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
@@ -28,12 +28,13 @@ LIBINST =$(DYMDIR)/bin/lib
HEADINST =$(DYMDIR)/source
BINDIR =.
+OPTFLAGS = -O3 -ffast-math# -ffloat-store # optimisation, remove for debugging
###########################################################
# Change these lines if you are using a different Fortran
# compiler or if you would like to use other flags.
###########################################################
FC =gfortran
-FFLAGS =-Wall -ff2c -pedantic -ffloat-store# -fbounds-check
+FFLAGS =$(OPTFLAGS) -Wall -pedantic# -ff2c -fbounds-check
FLINKFLAGS =$(FFLAGS)
###########################################################
@@ -41,7 +42,7 @@ FLINKFLAGS =$(FFLAGS)
# compiler or if you would like to use other flags.
###########################################################
CPPC =g++
-CPPFLAGS =-O2 -Wall -pedantic -fbounds-check -ansi -Wpadded -Wpacked -malign-double -mpreferred-stack-boundary=8
+CPPFLAGS =$(OPTFLAGS) -Wall -pedantic -fbounds-check -ansi -Wpadded -Wpacked -malign-double -mpreferred-stack-boundary=8
###########################################################
# Change these lines if you have other needs regarding
@@ -53,7 +54,7 @@ LIBFILE =PASS_FTN_LIN
DYNAMICLIBRARYEXTENSION =.so
STATICLIBRARYEXTENSION =.a
#ar -cvq $(LIBRARY)$(STATICLIBRARYEXTENSION) $(OBJECTFILES)
-HEADERFILE =lib$(THENAME)
+HEADERFILE =$(THENAME)_lib
HEADEREXTENSION =.h
### List of files to compile
LIBOBJECTFILES = \
@@ -116,7 +117,7 @@ uninstall :
$(RM) /usr/lib/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
.PHONY : purge
-purge :
+purge : cleanlib
$(RM) $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION)
$(RM) $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
$(RM) $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION)
@@ -135,8 +136,13 @@ unfixit :
.PHONY : removeall
removeall : uninstall purge unfixit
-#.PHONY : all
-#all : install fixit
+.PHONY : all
+all :
+ make libheader library
+ sudo make installlib
+ make wrapheader wrapper
+ sudo make installwrap
+ sudo make fixit
###########################################################
# Compile the wrapper class and its tests.
@@ -198,6 +204,10 @@ src/%.o : src/%.cpp
.PHONY: clean
clean:
$(RM) **.o **.so **.mod $(BINDIR)/RP-ftn src/$(LIBFILE).FOR $(THETEST)
+
+.PHONY : cleanlib
+cleanlib :
+ $(RM) $(LIBDIR)/fortran/**.o
###########################################################
# Compile a simple example to illustrate the connection
@@ -208,7 +218,7 @@ clean:
RP-ftn : $(BINDIR)/RP-ftn
$(BINDIR)/RP-ftn : src/refprop-ftn.cpp libheader library
$(CPPC) $(CPPFLAGS) -o src/refprop-ftn.o -c src/refprop-ftn.cpp
- $(FC) $(FLINKFLAGS) -o $(BINDIR)/RP-ftn src/refprop-ftn.o -l$(THENAME)
+ $(FC) $(FLINKFLAGS) -o $(BINDIR)/RP-ftn src/refprop-ftn.o -l$(THENAME) -lPocoFoundation
.PHONY : f2f
f2f : $(BINDIR)/f2f
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
index 2fc02d6..74c03ed 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
@@ -12,7 +12,8 @@
GFZ German Research Centre for Geosciences
Telegrafenberg, D-14473 Potsdam
- Modified for Linux in 2012 by
+ Modified for portability to Linux and
+ introduction of POCO library in 2012 by
Jorrit Wronski (jowr@mek.dtu.dk)
DTU Mechanical Engineering
@@ -32,7 +33,7 @@
#else // assuming Linux system
# include
# include
-# include
+# include
//# include // dlopen etc
# include // tolower etc
#endif
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/librefprop.h b/_REFPROP-Wrapper/Version 0.5_linux/src/librefprop.h
deleted file mode 100644
index 01e909d..0000000
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/librefprop.h
+++ /dev/null
@@ -1,331 +0,0 @@
-#ifndef REFPROP_H
-#define REFPROP_H
-//
-#include
-#ifdef _CRAY
-# include
-# define RPVersion RPVERSION
-# define SETPATHdll SETPATHDLL
-# define ABFL1dll ABFL1DLL
-# define ABFL2dll ABFL2DLL
-# define ACTVYdll ACTVYDLL
-# define AGdll AGDLL
-# define CCRITdll CCRITDLL
-# define CP0dll CP0DLL
-# define CRITPdll CRITPDLL
-# define CSATKdll CSATKDLL
-# define CV2PKdll CV2PKDLL
-# define CVCPKdll CVCPKDLL
-# define CVCPdll CVCPDLL
-# define DBDTdll DBDTDLL
-# define DBFL1dll DBFL1DLL
-# define DBFL2dll DBFL2DLL
-# define DDDPdll DDDPDLL
-# define DDDTdll DDDTDLL
-# define DEFLSHdll DEFLSHDLL
-# define DHD1dll DHD1DLL
-# define DHFL1dll DHFL1DLL
-# define DHFL2dll DHFL2DLL
-# define DHFLSHdll DHFLSHDLL
-# define DIELECdll DIELECDLL
-# define DOTFILLdll DOTFILLDLL
-# define DPDD2dll DPDD2DLL
-# define DPDDKdll DPDDKDLL
-# define DPDDdll DPDDDLL
-# define DPDTKdll DPDTKDLL
-# define DPDTdll DPDTDLL
-# define DPTSATKdll DPTSATKDLL
-# define DSFLSHdll DSFLSHDLL
-# define DSFL1dll DSFL1DLL
-# define DSFL2dll DSFL2DLL
-# define ENTHALdll ENTHALDLL
-# define ENTROdll ENTRODLL
-# define ESFLSHdll ESFLSHDLL
-# define FGCTYdll FGCTYDLL
-# define FPVdll FPVDLL
-# define GERG04dll GERG04DLL
-# define GETFIJdll GETFIJDLL
-# define GETKTVdll GETKTVDLL
-# define GIBBSdll GIBBSDLL
-# define HSFLSHdll HSFLSHDLL
-# define INFOdll INFODLL
-# define LIMITKdll LIMITKDLL
-# define LIMITSdll LIMITSDLL
-# define LIMITXdll LIMITXDLL
-# define MELTPdll MELTPDLL
-# define MELTTdll MELTTDLL
-# define MLTH2Odll MLTH2ODLL
-# define NAMEdll NAMEDLL
-# define PDFL1dll PDFL1DLL
-# define PDFLSHdll PDFLSHDLL
-# define PEFLSHdll PEFLSHDLL
-# define PHFL1dll PHFL1DLL
-# define PHFLSHdll PHFLSHDLL
-# define PQFLSHdll PQFLSHDLL
-# define PREOSdll PREOSDLL
-# define PRESSdll PRESSDLL
-# define PSFL1dll PSFL1DLL
-# define PSFLSHdll PSFLSHDLL
-# define PUREFLDdll PUREFLDDLL
-# define QMASSdll QMASSDLL
-# define QMOLEdll QMOLEDLL
-# define SATDdll SATDDLL
-# define SATEdll SATEDLL
-# define SATHdll SATHDLL
-# define SATPdll SATPDLL
-# define SATSdll SATSDLL
-# define SATTdll SATTDLL
-# define SETAGAdll SETAGADLL
-# define SETKTVdll SETKTVDLL
-# define SETMIXdll SETMIXDLL
-# define SETMODdll SETMODDLL
-# define SETREFdll SETREFDLL
-# define SETUPdll SETUPDLL
-# define SPECGRdll SPECGRDLL
-# define SUBLPdll SUBLPDLL
-# define SUBLTdll SUBLTDLL
-# define SURFTdll SURFTDLL
-# define SURTENdll SURTENDLL
-# define TDFLSHdll TDFLSHDLL
-# define TEFLSHdll TEFLSHDLL
-# define THERM0dll THERM0DLL
-# define THERM2dll THERM2DLL
-# define THERM3dll THERM3DLL
-# define THERMdll THERMDLL
-# define THFLSHdll THFLSHDLL
-# define TPFLSHdll TPFLSHDLL
-# define TPFL2dll TPFL2DLL
-# define TPRHOdll TPRHODLL
-# define TQFLSHdll TQFLSHDLL
-# define TRNPRPdll TRNPRPDLL
-# define TSFLSHdll TSFLSHDLL
-# define VIRBdll VIRBDLL
-# define VIRCdll VIRCDLL
-# define WMOLdll WMOLDLL
-# define XMASSdll XMASSDLL
-# define XMOLEdll XMOLEdll
-#else
-# if !defined(_AIX) && !defined(__hpux)
-# define RPVersion rpversion_
-# define SETPATHdll setpathdll_
-# define ABFL1dll abfl1dll_
-# define ABFL2dll abfl2dll_
-# define ACTVYdll actvydll_
-# define AGdll agdll_
-# define CCRITdll ccritdll_
-# define CP0dll cp0dll_
-# define CRITPdll critpdll_
-# define CSATKdll csatkdll_
-# define CV2PKdll cv2pkdll_
-# define CVCPKdll cvcpkdll_
-# define CVCPdll cvcpdll_
-# define DBDTdll dbdtdll_
-# define DBFL1dll dbfl1dll_
-# define DBFL2dll dbfl2dll_
-# define DDDPdll dddpdll_
-# define DDDTdll dddtdll_
-# define DEFLSHdll deflshdll_
-# define DHD1dll dhd1dll_
-# define DHFL1dll dhfl1dll_
-# define DHFL2dll dhfl2dll_
-# define DHFLSHdll dhflshdll_
-# define DIELECdll dielecdll_
-# define DOTFILLdll dotfilldll_
-# define DPDD2dll dpdd2dll_
-# define DPDDKdll dpddkdll_
-# define DPDDdll dpdddll_
-# define DPDTKdll dpdtkdll_
-# define DPDTdll dpdtdll_
-# define DPTSATKdll dptsatkdll_
-# define DSFLSHdll dsflshdll_
-# define DSFL1dll dsfl1dll_
-# define DSFL2dll dsfl2dll_
-# define ENTHALdll enthaldll_
-# define ENTROdll entrodll_
-# define ESFLSHdll esflshdll_
-# define FGCTYdll fgctydll_
-# define FPVdll fpvdll_
-# define GERG04dll gerg04dll_
-# define GETFIJdll getfijdll_
-# define GETKTVdll getktvdll_
-# define GIBBSdll gibbsdll_
-# define HSFLSHdll hsflshdll_
-# define INFOdll infodll_
-# define LIMITKdll limitkdll_
-# define LIMITSdll limitsdll_
-# define LIMITXdll limitxdll_
-# define MELTPdll meltpdll_
-# define MELTTdll melttdll_
-# define MLTH2Odll mlth2odll_
-# define NAMEdll namedll_
-# define PDFL1dll pdfl1dll_
-# define PDFLSHdll pdflshdll_
-# define PEFLSHdll peflshdll_
-# define PHFL1dll phfl1dll_
-# define PHFLSHdll phflshdll_
-# define PQFLSHdll pqflshdll_
-# define PREOSdll preosdll_
-# define PRESSdll pressdll_
-# define PSFL1dll psfl1dll_
-# define PSFLSHdll psflshdll_
-# define PUREFLDdll pureflddll_
-# define QMASSdll qmassdll_
-# define QMOLEdll qmoledll_
-# define SATDdll satddll_
-# define SATEdll satedll_
-# define SATHdll sathdll_
-# define SATPdll satpdll_
-# define SATSdll satsdll_
-# define SATTdll sattdll_
-# define SETAGAdll setagadll_
-# define SETKTVdll setktvdll_
-# define SETMIXdll setmixdll_
-# define SETMODdll setmoddll_
-# define SETREFdll setrefdll_
-# define SETUPdll setupdll_
-# define SPECGRdll specgrdll_
-# define SUBLPdll sublpdll_
-# define SUBLTdll subltdll_
-# define SURFTdll surftdll_
-# define SURTENdll surtendll_
-# define TDFLSHdll tdflshdll_
-# define TEFLSHdll teflshdll_
-# define THERM0dll therm0dll_
-# define THERM2dll therm2dll_
-# define THERM3dll therm3dll_
-# define THERMdll thermdll_
-# define THFLSHdll thflshdll_
-# define TPFLSHdll tpflshdll_
-# define TPFL2dll tpfl2dll_
-# define TPRHOdll tprhodll_
-# define TQFLSHdll tqflshdll_
-# define TRNPRPdll trnprpdll_
-# define TSFLSHdll tsflshdll_
-# define VIRBdll virbdll_
-# define VIRCdll vircdll_
-# define WMOLdll wmoldll_
-# define XMASSdll xmassdll_
-# define XMOLEdll xmoledll_
-# endif
-# define _fcd char *
-# define _cptofcd(a,b) (a)
-# define _fcdlen(a) strlen(a)
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
- // extra function for setup
- void RPVersion ( char* );
- void SETPATHdll( const char* );
- //
- void ABFL1dll(double &,double &,double *,long &,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void ABFL2dll(double &,double &,double *,long &,long &,double &,double &,double &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double *,double *,double &,long &,char*,long );
- void ACTVYdll(double &,double &,double *,double &);
- void AGdll(double &,double &,double *,double &,double &);
- void CCRITdll(double &,double &,double &,double *,double &,double &,double &,double &,double &,long &,char*,long );
- void CP0dll(double &,double *,double &);
- void CRITPdll(double *,double &,double &,double &,long &,char*,long );
- void CSATKdll(long &,double &,long &,double &,double &,double &,long &,char*,long );
- void CV2PKdll(long &,double &,double &,double &,double &,long &,char*,long );
- void CVCPKdll(long &,double &,double &,double &,double &);
- void CVCPdll(double &,double &,double *,double &,double &);
- void DBDTdll(double &,double *,double &);
- void DBFL1dll(double &,double &,double *,double &,double &,double &,long &,char*,long );
- void DBFL2dll(double &,double &,double *,long &,double &,double &,double &,double &,double &,double *,double *,double &,long &,char*,long );
- void DDDPdll(double &,double &,double *,double &);
- void DDDTdll(double &,double &,double *,double &);
- void DEFLSHdll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void DHD1dll(double &,double &,double *,double &,double &,double &,double &,double &,double &);
- void DHFL1dll(double &,double &,double *,double &,long &,char*,long );//added by henning francke
- void DHFL2dll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,long &,char*,long );//added by henning francke
- void DHFLSHdll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void DIELECdll(double &,double &,double *,double &);
- void DOTFILLdll(long &,double *,double &,double &,long &,char*,long );
- void DPDD2dll(double &,double &,double *,double &);
- void DPDDKdll(long &,double &,double &,double &);
- void DPDDdll(double &,double &,double *,double &);
- void DPDTKdll(long &,double &,double &,double &);
- void DPDTdll(double &,double &,double *,double &);
- void DPTSATKdll(long &,double &,long &,double &,double &,double &,double &,long &,char*,long );
- void DSFLSHdll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void DSFL1dll(double &,double &,double *,double &,long &,char*,long );//added by henning francke
- void DSFL2dll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,long &,char*,long );//added by henning francke
- void ENTHALdll(double &,double &,double *,double &);
- void ENTROdll(double &,double &,double *,double &);
- void ESFLSHdll(double &,double &,double *,double &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,long &,char*,long );
- void FGCTYdll(double &,double &,double *,double *);
- void FPVdll(double &,double &,double &,double *,double &);
- void GERG04dll(long &,long &,long &,char*,long );
- void GETFIJdll(char*,double *,char*,char*,long ,long ,long );
- void GETKTVdll(long &,long &,char*,double *,char*,char*,char*,char*,long ,long ,long ,long ,long );
- void GIBBSdll(double &,double &,double *,double &,double &);
- void HSFLSHdll(double &,double &,double *,double &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,long &,char*,long );
- void INFOdll(long &,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &);
- void LIMITKdll(char*,long &,double &,double &,double &,double &,double &,double &,double &,long &,char*,long ,long );
- void LIMITSdll(char*,double *,double &,double &,double &,double &,long );
- void LIMITXdll(char*,double &,double &,double &,double *,double &,double &,double &,double &,long &,char*,long ,long );
- void MELTPdll(double &,double *,double &,long &,char*,long );
- void MELTTdll(double &,double *,double &,long &,char*,long );
- void MLTH2Odll(double &,double &,double &);
- void NAMEdll(long &,char*,char*,char*,long ,long ,long );
- void PDFL1dll(double &,double &,double *,double &,long &,char*,long );
- void PDFLSHdll(double &,double &,double *,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void PEFLSHdll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void PHFL1dll(double &,double &,double *,long &,double &,double &,long &,char*,long );
- void PHFLSHdll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void PQFLSHdll(double &,double &,double *,long &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void PREOSdll(long &);
- void PRESSdll(double &,double &,double *,double &);
- void PSFL1dll(double &,double &,double *,long &,double &,double &,long &,char*,long );
- void PSFLSHdll(double &,double &,double *,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void PUREFLDdll(long &);
- void QMASSdll(double &,double *,double *,double &,double *,double *,double &,double &,long &,char*,long );
- void QMOLEdll(double &,double *,double *,double &,double *,double *,double &,double &,long &,char*,long );
- void SATDdll(double &,double *,long &,long &,double &,double &,double &,double &,double *,double *,long &,char*,long );
- void SATEdll(double &,double *,long &,long &,long &,double &,double &,double &,long &,double &,double &,double &,long &,char*,long );
- void SATHdll(double &,double *,long &,long &,long &,double &,double &,double &,long &,double &,double &,double &,long &,char*,long );
- void SATPdll(double &,double *,long &,double &,double &,double &,double *,double *,long &,char*,long );
- void SATSdll(double &,double *,long &,long &,long &,double &,double &,double &,long &,double &,double &,double &,long &,double &,double &,double &,long &,char*,long );
- void SATTdll(double &,double *,long &,double &,double &,double &,double *,double *,long &,char*,long );
- void SETAGAdll(long &,char*,long );
- void SETKTVdll(long &,long &,char*,double *,char*,long &,char*,long ,long ,long );
- void SETMIXdll(char*,char*,char*,long &,char*,double *,long &,char*,long ,long ,long ,long ,long );
- void SETMODdll(long &,char*,char*,char*,long &,char*,long ,long ,long ,long );
- void SETREFdll(char*,long &,double *,double &,double &,double &,double &,long &,char*,long ,long );
- //void SETUPdll(long &,char*,char*,char*,long &,char*,long ,long ,long ,long );
- void SETUPdll(long &,char*,char*,char*,long &,char*);
- void SPECGRdll(double &,double &,double &,double &);
- void SUBLPdll(double &,double *,double &,long &,char*,long );
- void SUBLTdll(double &,double *,double &,long &,char*,long );
- void SURFTdll(double &,double &,double *,double &,long &,char*,long );
- void SURTENdll(double &,double &,double &,double *,double *,double &,long &,char*,long );
- void TDFLSHdll(double &,double &,double *,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void TEFLSHdll(double &,double &,double *,long &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void THERM0dll(double &,double &,double *,double &,double &,double &,double &,double &,double &,double &,double &,double &);
- void THERM2dll(double &,double &,double *,double &,double &,double &,double &,double &,double &,double &,double *,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &);
- void THERM3dll(double &,double &,double *,double &,double &,double &,double &,double &,double &,double &,double &,double &,double &);
- void THERMdll(double &,double &,double *,double &,double &,double &,double &,double &,double &,double &,double &);
- void THFLSHdll(double &,double &,double *,long &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void TPFLSHdll(double &,double &,double *,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void TPFL2dll(double &,double &,double *,double &,double &,double *,double *,double &,long &,char*,long );//added by henning francke
- void TPRHOdll(double &,double &,double *,long &,long &,double &,long &,char*,long );
- void TQFLSHdll(double &,double &,double *,long &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void TRNPRPdll(double &,double &,double *,double &,double &,long &,char*,long );
- void TSFLSHdll(double &,double &,double *,long &,double &,double &,double &,double &,double *,double *,double &,double &,double &,double &,double &,double &,long &,char*,long );
- void VIRBdll(double &,double *,double &);
- void VIRCdll(double &,double *,double &);
- void WMOLdll(double *,double &);
- void XMASSdll(double *,double *,double &);
- void XMOLEdll(double *,double *,double &);
-#ifdef __cplusplus
-} // extern "C"
-#endif
-// REFPROP_H
-#endif
-// routines used in henning francke's wrapper
-// setup, wmol, tpflsh, phflsh, PDFL1, PDFLSH, PSFLSH, PQFLSH, THFLSH,
-// TDFLSH, TSFLSH, TQFLSH, DHFLSH, HSFLSH, DSFLSH, TRNPRP, SATT, SATP, SATD
-// TPFL2, DHFL1, DHFL2, DSFL1, DSFL2
-//
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop-ftn.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop-ftn.cpp
index 5441064..cef9502 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop-ftn.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop-ftn.cpp
@@ -14,7 +14,7 @@
#include
#include /* EXIT_SUCCESS */
#include /* strlen, memset, memcpy, memchr */
-#include /* refprop header file */
+#include /* refprop header file */
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
@@ -29,10 +29,24 @@
#define numparams 72
#define maxcoefs 50
+// define new macros for function names
+// http://stackoverflow.com/questions/195975/how-to-make-a-char-string-from-a-c-macros-value
+#define STR_VALUE(arg) #arg
+#define FUNCTION_NAME(name) STR_VALUE(name)
+
+//#define TEST_FUNC test_func
+//#define TEST_FUNC_NAME FUNCTION_NAME(TEST_FUNC)
+
+//#define TEST_FUNC test_func // done in header
+#define RPVersion_NAME FUNCTION_NAME(RPVersion)
+
+
void newline() {
printf("%s","\n");
}
+#include "Poco/SharedLibrary.h"
+using Poco::SharedLibrary;
int main(int argc, char* argv[]) {
static long i,ierr,info_index;
@@ -47,6 +61,24 @@ int main(int argc, char* argv[]) {
newline();
+// HINSTANCE dll = LoadLibrary("mydll.dll");
+//
+// func_t * f = (func_t *)GetProcAddress(dll, "func");
+//
+// f(1, 1.2f);
+
+// std::string path("/usr/lib/librefprop");
+ std::string path("librefprop");
+ path.append(SharedLibrary::suffix()); // adds ".dll" or ".so"
+ SharedLibrary library(path); // will also load the library
+ //RPVersion_t * func = (RPVersion_t *) library.getSymbol("rpversion_");
+ RPVersion_t * func = (RPVersion_t *) library.getSymbol(RPVersion_NAME);
+ func(v);
+ printf("func(v) returned v = %s\n", v);
+ library.unload();
+
+ newline();
+
RPVersion(v);
printf("RPVersion(v) returned v = %s\n", v);
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_lib.h b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_lib.h
new file mode 100644
index 0000000..91e0796
--- /dev/null
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_lib.h
@@ -0,0 +1,795 @@
+#ifndef REFPROP_H
+#define REFPROP_H
+//
+#include
+
+// Define data types that match the Fortran definitions. This is also
+// a possible starting point to introduce platform independence.
+// Partly taken from: http://arnholm.org/software/cppf77/cppf77.htm#Section5
+// An issue with characters still needs to be solved.
+//#include
+// The other data types can be handled:
+typedef long INTEGER;
+typedef float REAL;
+typedef double DOUBLE_PRECISION;
+typedef int LOGICAL;
+
+#if defined(WIN32) || defined(_WIN32)
+//# define LIBRARY_API __declspec(dllexport)
+# define LIBRARY_API __stdcall
+#else
+# define LIBRARY_API
+#ifdef _CRAY
+# include
+# define RPVersion RPVERSION
+# define SETPATHdll SETPATHDLL
+# define ABFL1dll ABFL1DLL
+# define ABFL2dll ABFL2DLL
+# define ACTVYdll ACTVYDLL
+# define AGdll AGDLL
+# define CCRITdll CCRITDLL
+# define CP0dll CP0DLL
+# define CRITPdll CRITPDLL
+# define CSATKdll CSATKDLL
+# define CV2PKdll CV2PKDLL
+# define CVCPKdll CVCPKDLL
+# define CVCPdll CVCPDLL
+# define DBDTdll DBDTDLL
+# define DBFL1dll DBFL1DLL
+# define DBFL2dll DBFL2DLL
+# define DDDPdll DDDPDLL
+# define DDDTdll DDDTDLL
+# define DEFLSHdll DEFLSHDLL
+# define DHD1dll DHD1DLL
+# define DHFL1dll DHFL1DLL
+# define DHFL2dll DHFL2DLL
+# define DHFLSHdll DHFLSHDLL
+# define DIELECdll DIELECDLL
+# define DOTFILLdll DOTFILLDLL
+# define DPDD2dll DPDD2DLL
+# define DPDDKdll DPDDKDLL
+# define DPDDdll DPDDDLL
+# define DPDTKdll DPDTKDLL
+# define DPDTdll DPDTDLL
+# define DPTSATKdll DPTSATKDLL
+# define DSFLSHdll DSFLSHDLL
+# define DSFL1dll DSFL1DLL
+# define DSFL2dll DSFL2DLL
+# define ENTHALdll ENTHALDLL
+# define ENTROdll ENTRODLL
+# define ESFLSHdll ESFLSHDLL
+# define FGCTYdll FGCTYDLL
+# define FPVdll FPVDLL
+# define GERG04dll GERG04DLL
+# define GETFIJdll GETFIJDLL
+# define GETKTVdll GETKTVDLL
+# define GIBBSdll GIBBSDLL
+# define HSFLSHdll HSFLSHDLL
+# define INFOdll INFODLL
+# define LIMITKdll LIMITKDLL
+# define LIMITSdll LIMITSDLL
+# define LIMITXdll LIMITXDLL
+# define MELTPdll MELTPDLL
+# define MELTTdll MELTTDLL
+# define MLTH2Odll MLTH2ODLL
+# define NAMEdll NAMEDLL
+# define PDFL1dll PDFL1DLL
+# define PDFLSHdll PDFLSHDLL
+# define PEFLSHdll PEFLSHDLL
+# define PHFL1dll PHFL1DLL
+# define PHFLSHdll PHFLSHDLL
+# define PQFLSHdll PQFLSHDLL
+# define PREOSdll PREOSDLL
+# define PRESSdll PRESSDLL
+# define PSFL1dll PSFL1DLL
+# define PSFLSHdll PSFLSHDLL
+# define PUREFLDdll PUREFLDDLL
+# define QMASSdll QMASSDLL
+# define QMOLEdll QMOLEDLL
+# define SATDdll SATDDLL
+# define SATEdll SATEDLL
+# define SATHdll SATHDLL
+# define SATPdll SATPDLL
+# define SATSdll SATSDLL
+# define SATTdll SATTDLL
+# define SETAGAdll SETAGADLL
+# define SETKTVdll SETKTVDLL
+# define SETMIXdll SETMIXDLL
+# define SETMODdll SETMODDLL
+# define SETREFdll SETREFDLL
+# define SETUPdll SETUPDLL
+# define SPECGRdll SPECGRDLL
+# define SUBLPdll SUBLPDLL
+# define SUBLTdll SUBLTDLL
+# define SURFTdll SURFTDLL
+# define SURTENdll SURTENDLL
+# define TDFLSHdll TDFLSHDLL
+# define TEFLSHdll TEFLSHDLL
+# define THERM0dll THERM0DLL
+# define THERM2dll THERM2DLL
+# define THERM3dll THERM3DLL
+# define THERMdll THERMDLL
+# define THFLSHdll THFLSHDLL
+# define TPFLSHdll TPFLSHDLL
+# define TPFL2dll TPFL2DLL
+# define TPRHOdll TPRHODLL
+# define TQFLSHdll TQFLSHDLL
+# define TRNPRPdll TRNPRPDLL
+# define TSFLSHdll TSFLSHDLL
+# define VIRBdll VIRBDLL
+# define VIRCdll VIRCDLL
+# define WMOLdll WMOLDLL
+# define XMASSdll XMASSDLL
+# define XMOLEdll XMOLEdll
+#else
+# if !defined(_AIX) && !defined(__hpux)
+# define RPVersion rpversion_
+# define SETPATHdll setpathdll_
+# define ABFL1dll abfl1dll_
+# define ABFL2dll abfl2dll_
+# define ACTVYdll actvydll_
+# define AGdll agdll_
+# define CCRITdll ccritdll_
+# define CP0dll cp0dll_
+# define CRITPdll critpdll_
+# define CSATKdll csatkdll_
+# define CV2PKdll cv2pkdll_
+# define CVCPKdll cvcpkdll_
+# define CVCPdll cvcpdll_
+# define DBDTdll dbdtdll_
+# define DBFL1dll dbfl1dll_
+# define DBFL2dll dbfl2dll_
+# define DDDPdll dddpdll_
+# define DDDTdll dddtdll_
+# define DEFLSHdll deflshdll_
+# define DHD1dll dhd1dll_
+# define DHFL1dll dhfl1dll_
+# define DHFL2dll dhfl2dll_
+# define DHFLSHdll dhflshdll_
+# define DIELECdll dielecdll_
+# define DOTFILLdll dotfilldll_
+# define DPDD2dll dpdd2dll_
+# define DPDDKdll dpddkdll_
+# define DPDDdll dpdddll_
+# define DPDTKdll dpdtkdll_
+# define DPDTdll dpdtdll_
+# define DPTSATKdll dptsatkdll_
+# define DSFLSHdll dsflshdll_
+# define DSFL1dll dsfl1dll_
+# define DSFL2dll dsfl2dll_
+# define ENTHALdll enthaldll_
+# define ENTROdll entrodll_
+# define ESFLSHdll esflshdll_
+# define FGCTYdll fgctydll_
+# define FPVdll fpvdll_
+# define GERG04dll gerg04dll_
+# define GETFIJdll getfijdll_
+# define GETKTVdll getktvdll_
+# define GIBBSdll gibbsdll_
+# define HSFLSHdll hsflshdll_
+# define INFOdll infodll_
+# define LIMITKdll limitkdll_
+# define LIMITSdll limitsdll_
+# define LIMITXdll limitxdll_
+# define MELTPdll meltpdll_
+# define MELTTdll melttdll_
+# define MLTH2Odll mlth2odll_
+# define NAMEdll namedll_
+# define PDFL1dll pdfl1dll_
+# define PDFLSHdll pdflshdll_
+# define PEFLSHdll peflshdll_
+# define PHFL1dll phfl1dll_
+# define PHFLSHdll phflshdll_
+# define PQFLSHdll pqflshdll_
+# define PREOSdll preosdll_
+# define PRESSdll pressdll_
+# define PSFL1dll psfl1dll_
+# define PSFLSHdll psflshdll_
+# define PUREFLDdll pureflddll_
+# define QMASSdll qmassdll_
+# define QMOLEdll qmoledll_
+# define SATDdll satddll_
+# define SATEdll satedll_
+# define SATHdll sathdll_
+# define SATPdll satpdll_
+# define SATSdll satsdll_
+# define SATTdll sattdll_
+# define SETAGAdll setagadll_
+# define SETKTVdll setktvdll_
+# define SETMIXdll setmixdll_
+# define SETMODdll setmoddll_
+# define SETREFdll setrefdll_
+# define SETUPdll setupdll_
+# define SPECGRdll specgrdll_
+# define SUBLPdll sublpdll_
+# define SUBLTdll subltdll_
+# define SURFTdll surftdll_
+# define SURTENdll surtendll_
+# define TDFLSHdll tdflshdll_
+# define TEFLSHdll teflshdll_
+# define THERM0dll therm0dll_
+# define THERM2dll therm2dll_
+# define THERM3dll therm3dll_
+# define THERMdll thermdll_
+# define THFLSHdll thflshdll_
+# define TPFLSHdll tpflshdll_
+# define TPFL2dll tpfl2dll_
+# define TPRHOdll tprhodll_
+# define TQFLSHdll tqflshdll_
+# define TRNPRPdll trnprpdll_
+# define TSFLSHdll tsflshdll_
+# define VIRBdll virbdll_
+# define VIRCdll vircdll_
+# define WMOLdll wmoldll_
+# define XMASSdll xmassdll_
+# define XMOLEdll xmoledll_
+# endif
+# define _fcd char *
+# define _cptofcd(a,b) (a)
+# define _fcdlen(a) strlen(a)
+#endif
+#endif
+
+// I'll try to follow this example from:
+// http://www.gershnik.com/tips/cpp.asp
+////not a pointer but function type
+//typedef void [compiler specific stuff] func_t(int, float);
+//
+////this is the function declaration
+//func_t func;
+//
+////and this is the pointer type just for convenience
+//typedef func_t * func_ptr;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ // pattern to follow: typedef void [compiler specific stuff] func_t(int, float);
+
+ // extra function for setup
+ typedef void (LIBRARY_API RPVersion_t )( char* );
+ typedef void (LIBRARY_API SETPATHdll_t)( const char* );
+ //
+ typedef void (LIBRARY_API ABFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API ABFL2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API ACTVYdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API AGdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API CCRITdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API CP0dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API CRITPdll_t)(DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API CSATKdll_t)(INTEGER &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API CV2PKdll_t)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API CVCPKdll_t)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API CVCPdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DBDTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DBFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DBFL2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DDDPdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DDDTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DEFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DHD1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DHFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+ typedef void (LIBRARY_API DHFL2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+ typedef void (LIBRARY_API DHFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DIELECdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DOTFILLdll_t)(INTEGER &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DPDD2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DPDDKdll_t)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DPDDdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DPDTKdll_t)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DPDTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DPTSATKdll_t)(INTEGER &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DSFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DSFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+ typedef void (LIBRARY_API DSFL2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+ typedef void (LIBRARY_API ENTHALdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API ENTROdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API ESFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API FGCTYdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *);
+ typedef void (LIBRARY_API FPVdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API GERG04dll_t)(INTEGER &,INTEGER &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API GETFIJdll_t)(char*,DOUBLE_PRECISION *,char*,char*,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API GETKTVdll_t)(INTEGER &,INTEGER &,char*,DOUBLE_PRECISION *,char*,char*,char*,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API GIBBSdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API HSFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API INFOdll_t)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API LIMITKdll_t)(char*,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API LIMITSdll_t)(char*,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER );
+ typedef void (LIBRARY_API LIMITXdll_t)(char*,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API MELTPdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API MELTTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API MLTH2Odll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API NAMEdll_t)(INTEGER &,char*,char*,char*,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API PDFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PDFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PEFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PHFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PHFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PQFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PREOSdll_t)(INTEGER &);
+ typedef void (LIBRARY_API PRESSdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API PSFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PSFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PUREFLDdll_t)(INTEGER &);
+ typedef void (LIBRARY_API QMASSdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API QMOLEdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SATDdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SATEdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SATHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SATPdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SATSdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SATTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SETAGAdll_t)(INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SETKTVdll_t)(INTEGER &,INTEGER &,char*,DOUBLE_PRECISION *,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API SETMIXdll_t)(char*,char*,char*,INTEGER &,char*,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API SETMODdll_t)(INTEGER &,char*,char*,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API SETREFdll_t)(char*,INTEGER &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
+ //typedef void (LIBRARY_API SETUPdll_t)(INTEGER &,char*,char*,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API SETUPdll_t)(INTEGER &,char*,char*,char*,INTEGER &,char*);
+ typedef void (LIBRARY_API SPECGRdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API SUBLPdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SUBLTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SURFTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SURTENdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TDFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TEFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API THERM0dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API THERM2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API THERM3dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API THERMdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API THFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TPFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TPFL2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+ typedef void (LIBRARY_API TPRHOdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TQFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TRNPRPdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TSFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API VIRBdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API VIRCdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API WMOLdll_t)(DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API XMASSdll_t)(DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API XMOLEdll_t)(DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+
+
+ //Declare the functions
+ RPVersion_t RPVersion;
+ SETPATHdll_t SETPATHdll;
+ ABFL1dll_t ABFL1dll;
+ ABFL2dll_t ABFL2dll;
+ ACTVYdll_t ACTVYdll;
+ AGdll_t AGdll;
+ CCRITdll_t CCRITdll;
+ CP0dll_t CP0dll;
+ CRITPdll_t CRITPdll;
+ CSATKdll_t CSATKdll;
+ CV2PKdll_t CV2PKdll;
+ CVCPKdll_t CVCPKdll;
+ CVCPdll_t CVCPdll;
+ DBDTdll_t DBDTdll;
+ DBFL1dll_t DBFL1dll;
+ DBFL2dll_t DBFL2dll;
+ DDDPdll_t DDDPdll;
+ DDDTdll_t DDDTdll;
+ DEFLSHdll_t DEFLSHdll;
+ DHD1dll_t DHD1dll;
+ DHFLSHdll_t DHFLSHdll;
+ DHFL1dll_t DHFL1dll;
+ DHFL2dll_t DHFL2dll;
+ DIELECdll_t DIELECdll;
+ DOTFILLdll_t DOTFILLdll;
+ DPDD2dll_t DPDD2dll;
+ DPDDKdll_t DPDDKdll;
+ DPDDdll_t DPDDdll;
+ DPDTKdll_t DPDTKdll;
+ DPDTdll_t DPDTdll;
+ DPTSATKdll_t DPTSATKdll;
+ DSFLSHdll_t DSFLSHdll;
+ DSFL1dll_t DSFL1dll;
+ DSFL2dll_t DSFL2dll;
+ ENTHALdll_t ENTHALdll;
+ ENTROdll_t ENTROdll;
+ ESFLSHdll_t ESFLSHdll;
+ FGCTYdll_t FGCTYdll;
+ FPVdll_t FPVdll;
+ GERG04dll_t GERG04dll;
+ GETFIJdll_t GETFIJdll;
+ GETKTVdll_t GETKTVdll;
+ GIBBSdll_t GIBBSdll;
+ HSFLSHdll_t HSFLSHdll;
+ INFOdll_t INFOdll;
+ LIMITKdll_t LIMITKdll;
+ LIMITSdll_t LIMITSdll;
+ LIMITXdll_t LIMITXdll;
+ MELTPdll_t MELTPdll;
+ MELTTdll_t MELTTdll;
+ MLTH2Odll_t MLTH2Odll;
+ NAMEdll_t NAMEdll;
+ PDFL1dll_t PDFL1dll;
+ PDFLSHdll_t PDFLSHdll;
+ PEFLSHdll_t PEFLSHdll;
+ PHFL1dll_t PHFL1dll;
+ PHFLSHdll_t PHFLSHdll;
+ PQFLSHdll_t PQFLSHdll;
+ PREOSdll_t PREOSdll;
+ PRESSdll_t PRESSdll;
+ PSFL1dll_t PSFL1dll;
+ PSFLSHdll_t PSFLSHdll;
+ PUREFLDdll_t PUREFLDdll;
+ QMASSdll_t QMASSdll;
+ QMOLEdll_t QMOLEdll;
+ SATDdll_t SATDdll;
+ SATEdll_t SATEdll;
+ SATHdll_t SATHdll;
+ SATPdll_t SATPdll;
+ SATSdll_t SATSdll;
+ SATTdll_t SATTdll;
+ SETAGAdll_t SETAGAdll;
+ SETKTVdll_t SETKTVdll;
+ SETMIXdll_t SETMIXdll;
+ SETMODdll_t SETMODdll;
+ SETREFdll_t SETREFdll;
+ SETUPdll_t SETUPdll;
+ SPECGRdll_t SPECGRdll;
+ SUBLPdll_t SUBLPdll;
+ SUBLTdll_t SUBLTdll;
+ SURFTdll_t SURFTdll;
+ SURTENdll_t SURTENdll;
+ TDFLSHdll_t TDFLSHdll;
+ TEFLSHdll_t TEFLSHdll;
+ THERM0dll_t THERM0dll;
+ THERM2dll_t THERM2dll;
+ THERM3dll_t THERM3dll;
+ THERMdll_t THERMdll;
+ THFLSHdll_t THFLSHdll;
+ TPFLSHdll_t TPFLSHdll;
+ TPFL2dll_t TPFL2dll;
+ TPRHOdll_t TPRHOdll;
+ TQFLSHdll_t TQFLSHdll;
+ TRNPRPdll_t TRNPRPdll;
+ TSFLSHdll_t TSFLSHdll;
+ VIRBdll_t VIRBdll;
+ VIRCdll_t VIRCdll;
+ WMOLdll_t WMOLdll;
+ XMASSdll_t XMASSdll;
+ XMOLEdll_t XMOLEdll;
+
+ //Define explicit function pointers
+ typedef RPVersion_t * RPVersion_ptr;
+ typedef SETPATHdll_t * SETPATHdll_ptr;
+ typedef ABFL1dll_t * ABFL1dll_ptr;
+ typedef ABFL2dll_t * ABFL2dll_ptr;
+ typedef ACTVYdll_t * ACTVYdll_ptr;
+ typedef AGdll_t * AGdll_ptr;
+ typedef CCRITdll_t * CCRITdll_ptr;
+ typedef CP0dll_t * CP0dll_ptr;
+ typedef CRITPdll_t * CRITPdll_ptr;
+ typedef CSATKdll_t * CSATKdll_ptr;
+ typedef CV2PKdll_t * CV2PKdll_ptr;
+ typedef CVCPKdll_t * CVCPKdll_ptr;
+ typedef CVCPdll_t * CVCPdll_ptr;
+ typedef DBDTdll_t * DBDTdll_ptr;
+ typedef DBFL1dll_t * DBFL1dll_ptr;
+ typedef DBFL2dll_t * DBFL2dll_ptr;
+ typedef DDDPdll_t * DDDPdll_ptr;
+ typedef DDDTdll_t * DDDTdll_ptr;
+ typedef DEFLSHdll_t * DEFLSHdll_ptr;
+ typedef DHD1dll_t * DHD1dll_ptr;
+ typedef DHFLSHdll_t * DHFLSHdll_ptr;
+ typedef DHFL1dll_t * DHFL1dll_ptr;
+ typedef DHFL2dll_t * DHFL2dll_ptr;
+ typedef DIELECdll_t * DIELECdll_ptr;
+ typedef DOTFILLdll_t * DOTFILLdll_ptr;
+ typedef DPDD2dll_t * DPDD2dll_ptr;
+ typedef DPDDKdll_t * DPDDKdll_ptr;
+ typedef DPDDdll_t * DPDDdll_ptr;
+ typedef DPDTKdll_t * DPDTKdll_ptr;
+ typedef DPDTdll_t * DPDTdll_ptr;
+ typedef DPTSATKdll_t * DPTSATKdll_ptr;
+ typedef DSFLSHdll_t * DSFLSHdll_ptr;
+ typedef DSFL1dll_t * DSFL1dll_ptr;
+ typedef DSFL2dll_t * DSFL2dll_ptr;
+ typedef ENTHALdll_t * ENTHALdll_ptr;
+ typedef ENTROdll_t * ENTROdll_ptr;
+ typedef ESFLSHdll_t * ESFLSHdll_ptr;
+ typedef FGCTYdll_t * FGCTYdll_ptr;
+ typedef FPVdll_t * FPVdll_ptr;
+ typedef GERG04dll_t * GERG04dll_ptr;
+ typedef GETFIJdll_t * GETFIJdll_ptr;
+ typedef GETKTVdll_t * GETKTVdll_ptr;
+ typedef GIBBSdll_t * GIBBSdll_ptr;
+ typedef HSFLSHdll_t * HSFLSHdll_ptr;
+ typedef INFOdll_t * INFOdll_ptr;
+ typedef LIMITKdll_t * LIMITKdll_ptr;
+ typedef LIMITSdll_t * LIMITSdll_ptr;
+ typedef LIMITXdll_t * LIMITXdll_ptr;
+ typedef MELTPdll_t * MELTPdll_ptr;
+ typedef MELTTdll_t * MELTTdll_ptr;
+ typedef MLTH2Odll_t * MLTH2Odll_ptr;
+ typedef NAMEdll_t * NAMEdll_ptr;
+ typedef PDFL1dll_t * PDFL1dll_ptr;
+ typedef PDFLSHdll_t * PDFLSHdll_ptr;
+ typedef PEFLSHdll_t * PEFLSHdll_ptr;
+ typedef PHFL1dll_t * PHFL1dll_ptr;
+ typedef PHFLSHdll_t * PHFLSHdll_ptr;
+ typedef PQFLSHdll_t * PQFLSHdll_ptr;
+ typedef PREOSdll_t * PREOSdll_ptr;
+ typedef PRESSdll_t * PRESSdll_ptr;
+ typedef PSFL1dll_t * PSFL1dll_ptr;
+ typedef PSFLSHdll_t * PSFLSHdll_ptr;
+ typedef PUREFLDdll_t * PUREFLDdll_ptr;
+ typedef QMASSdll_t * QMASSdll_ptr;
+ typedef QMOLEdll_t * QMOLEdll_ptr;
+ typedef SATDdll_t * SATDdll_ptr;
+ typedef SATEdll_t * SATEdll_ptr;
+ typedef SATHdll_t * SATHdll_ptr;
+ typedef SATPdll_t * SATPdll_ptr;
+ typedef SATSdll_t * SATSdll_ptr;
+ typedef SATTdll_t * SATTdll_ptr;
+ typedef SETAGAdll_t * SETAGAdll_ptr;
+ typedef SETKTVdll_t * SETKTVdll_ptr;
+ typedef SETMIXdll_t * SETMIXdll_ptr;
+ typedef SETMODdll_t * SETMODdll_ptr;
+ typedef SETREFdll_t * SETREFdll_ptr;
+ typedef SETUPdll_t * SETUPdll_ptr;
+ typedef SPECGRdll_t * SPECGRdll_ptr;
+ typedef SUBLPdll_t * SUBLPdll_ptr;
+ typedef SUBLTdll_t * SUBLTdll_ptr;
+ typedef SURFTdll_t * SURFTdll_ptr;
+ typedef SURTENdll_t * SURTENdll_ptr;
+ typedef TDFLSHdll_t * TDFLSHdll_ptr;
+ typedef TEFLSHdll_t * TEFLSHdll_ptr;
+ typedef THERM0dll_t * THERM0dll_ptr;
+ typedef THERM2dll_t * THERM2dll_ptr;
+ typedef THERM3dll_t * THERM3dll_ptr;
+ typedef THERMdll_t * THERMdll_ptr;
+ typedef THFLSHdll_t * THFLSHdll_ptr;
+ typedef TPFLSHdll_t * TPFLSHdll_ptr;
+ typedef TPFL2dll_t * TPFL2dll_ptr;
+ typedef TPRHOdll_t * TPRHOdll_ptr;
+ typedef TQFLSHdll_t * TQFLSHdll_ptr;
+ typedef TRNPRPdll_t * TRNPRPdll_ptr;
+ typedef TSFLSHdll_t * TSFLSHdll_ptr;
+ typedef VIRBdll_t * VIRBdll_ptr;
+ typedef VIRCdll_t * VIRCdll_ptr;
+ typedef WMOLdll_t * WMOLdll_ptr;
+ typedef XMASSdll_t * XMASSdll_ptr;
+ typedef XMOLEdll_t * XMOLEdll_ptr;
+
+
+ #ifdef __cplusplus
+ } // extern "C"
+ #endif
+
+//#ifdef __cplusplus
+//extern "C" {
+//#endif
+// routines used in henning francke's wrapper
+// setup, wmol, tpflsh, phflsh, PDFL1, PDFLSH, PSFLSH, PQFLSH, THFLSH,
+// TDFLSH, TSFLSH, TQFLSH, DHFLSH, HSFLSH, DSFLSH, TRNPRP, SATT, SATP, SATD
+// TPFL2, DHFL1, DHFL2, DSFL1, DSFL2
+//
+////Define explicit function pointers
+//fp_RPVersion RPVersion;
+//fp_SETPATHdll SETPATHdll;
+////Define explicit function pointers
+//fp_ABFL1dll ABFL1dll;
+//fp_ABFL2dll ABFL2dll;
+//fp_ACTVYdll ACTVYdll;
+//fp_AGdll AGdll;
+//fp_CCRITdll CCRITdll;
+//fp_CP0dll CP0dll;
+//fp_CRITPdll CRITPdll;
+//fp_CSATKdll CSATKdll;
+//fp_CV2PKdll CV2PKdll;
+//fp_CVCPKdll CVCPKdll;
+//fp_CVCPdll CVCPdll;
+//fp_DBDTdll DBDTdll;
+//fp_DBFL1dll DBFL1dll;
+//fp_DBFL2dll DBFL2dll;
+//fp_DDDPdll DDDPdll;
+//fp_DDDTdll DDDTdll;
+//fp_DEFLSHdll DEFLSHdll;
+//fp_DHD1dll DHD1dll;
+//fp_DHFLSHdll DHFLSHdll;
+//fp_DHFL1dll DHFL1dll;
+//fp_DHFL2dll DHFL2dll;
+//fp_DIELECdll DIELECdll;
+//fp_DOTFILLdll DOTFILLdll;
+//fp_DPDD2dll DPDD2dll;
+//fp_DPDDKdll DPDDKdll;
+//fp_DPDDdll DPDDdll;
+//fp_DPDTKdll DPDTKdll;
+//fp_DPDTdll DPDTdll;
+//fp_DPTSATKdll DPTSATKdll;
+//fp_DSFLSHdll DSFLSHdll;
+//fp_DSFL1dll DSFL1dll;
+//fp_DSFL2dll DSFL2dll;
+//fp_ENTHALdll ENTHALdll;
+//fp_ENTROdll ENTROdll;
+//fp_ESFLSHdll ESFLSHdll;
+//fp_FGCTYdll FGCTYdll;
+//fp_FPVdll FPVdll;
+//fp_GERG04dll GERG04dll;
+//fp_GETFIJdll GETFIJdll;
+//fp_GETKTVdll GETKTVdll;
+//fp_GIBBSdll GIBBSdll;
+//fp_HSFLSHdll HSFLSHdll;
+//fp_INFOdll INFOdll;
+//fp_LIMITKdll LIMITKdll;
+//fp_LIMITSdll LIMITSdll;
+//fp_LIMITXdll LIMITXdll;
+//fp_MELTPdll MELTPdll;
+//fp_MELTTdll MELTTdll;
+//fp_MLTH2Odll MLTH2Odll;
+//fp_NAMEdll NAMEdll;
+//fp_PDFL1dll PDFL1dll;
+//fp_PDFLSHdll PDFLSHdll;
+//fp_PEFLSHdll PEFLSHdll;
+//fp_PHFL1dll PHFL1dll;
+//fp_PHFLSHdll PHFLSHdll;
+//fp_PQFLSHdll PQFLSHdll;
+//fp_PREOSdll PREOSdll;
+//fp_PRESSdll PRESSdll;
+//fp_PSFL1dll PSFL1dll;
+//fp_PSFLSHdll PSFLSHdll;
+//fp_PUREFLDdll PUREFLDdll;
+//fp_QMASSdll QMASSdll;
+//fp_QMOLEdll QMOLEdll;
+//fp_SATDdll SATDdll;
+//fp_SATEdll SATEdll;
+//fp_SATHdll SATHdll;
+//fp_SATPdll SATPdll;
+//fp_SATSdll SATSdll;
+//fp_SATTdll SATTdll;
+//fp_SETAGAdll SETAGAdll;
+//fp_SETKTVdll SETKTVdll;
+//fp_SETMIXdll SETMIXdll;
+//fp_SETMODdll SETMODdll;
+//fp_SETREFdll SETREFdll;
+//fp_SETUPdll SETUPdll;
+//fp_SPECGRdll SPECGRdll;
+//fp_SUBLPdll SUBLPdll;
+//fp_SUBLTdll SUBLTdll;
+//fp_SURFTdll SURFTdll;
+//fp_SURTENdll SURTENdll;
+//fp_TDFLSHdll TDFLSHdll;
+//fp_TEFLSHdll TEFLSHdll;
+//fp_THERM0dll THERM0dll;
+//fp_THERM2dll THERM2dll;
+//fp_THERM3dll THERM3dll;
+//fp_THERMdll THERMdll;
+//fp_THFLSHdll THFLSHdll;
+//fp_TPFLSHdll TPFLSHdll;
+//fp_TPFL2dll TPFL2dll;
+//fp_TPRHOdll TPRHOdll;
+//fp_TQFLSHdll TQFLSHdll;
+//fp_TRNPRPdll TRNPRPdll;
+//fp_TSFLSHdll TSFLSHdll;
+//fp_VIRBdll VIRBdll;
+//fp_VIRCdll VIRCdll;
+//fp_WMOLdll WMOLdll;
+//fp_XMASSdll XMASSdll;
+//fp_XMOLEdll XMOLEdll;
+
+//#ifdef __cplusplus
+//} // extern "C"
+//#endif
+
+
+//#ifdef __cplusplus
+//extern "C" {
+//#endif
+// // extra function for setup
+// void RPVersion ( char* );
+// void SETPATHdll( const char* );
+// //
+// void ABFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void ABFL2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void ACTVYdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void AGdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void CCRITdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void CP0dll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void CRITPdll(DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void CSATKdll(INTEGER &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void CV2PKdll(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void CVCPKdll(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void CVCPdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void DBDTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void DBFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void DBFL2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void DDDPdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void DDDTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void DEFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void DHD1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void DHFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+// void DHFL2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+// void DHFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void DIELECdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void DOTFILLdll(INTEGER &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void DPDD2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void DPDDKdll(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void DPDDdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void DPDTKdll(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void DPDTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void DPTSATKdll(INTEGER &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void DSFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void DSFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+// void DSFL2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+// void ENTHALdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void ENTROdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void ESFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void FGCTYdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *);
+// void FPVdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void GERG04dll(INTEGER &,INTEGER &,INTEGER &,char*,INTEGER );
+// void GETFIJdll(char*,DOUBLE_PRECISION *,char*,char*,INTEGER ,INTEGER ,INTEGER );
+// void GETKTVdll(INTEGER &,INTEGER &,char*,DOUBLE_PRECISION *,char*,char*,char*,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER ,INTEGER );
+// void GIBBSdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void HSFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void INFOdll(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void LIMITKdll(char*,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
+// void LIMITSdll(char*,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER );
+// void LIMITXdll(char*,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
+// void MELTPdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void MELTTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void MLTH2Odll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void NAMEdll(INTEGER &,char*,char*,char*,INTEGER ,INTEGER ,INTEGER );
+// void PDFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void PDFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void PEFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void PHFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void PHFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void PQFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void PREOSdll(INTEGER &);
+// void PRESSdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void PSFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void PSFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void PUREFLDdll(INTEGER &);
+// void QMASSdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void QMOLEdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void SATDdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
+// void SATEdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void SATHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void SATPdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
+// void SATSdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void SATTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
+// void SETAGAdll(INTEGER &,char*,INTEGER );
+// void SETKTVdll(INTEGER &,INTEGER &,char*,DOUBLE_PRECISION *,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER );
+// void SETMIXdll(char*,char*,char*,INTEGER &,char*,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER ,INTEGER );
+// void SETMODdll(INTEGER &,char*,char*,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER );
+// void SETREFdll(char*,INTEGER &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
+// //void SETUPdll(INTEGER &,char*,char*,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER );
+// void SETUPdll(INTEGER &,char*,char*,char*,INTEGER &,char*);
+// void SPECGRdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void SUBLPdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void SUBLTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void SURFTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void SURTENdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void TDFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void TEFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void THERM0dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void THERM2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void THERM3dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void THERMdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+// void THFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void TPFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void TPFL2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+// void TPRHOdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void TQFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void TRNPRPdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void TSFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+// void VIRBdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void VIRCdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void WMOLdll(DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void XMASSdll(DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+// void XMOLEdll(DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+//#ifdef __cplusplus
+//} // extern "C"
+//#endif
+// REFPROP_H
+#endif
+// routines used in henning francke's wrapper
+// setup, wmol, tpflsh, phflsh, PDFL1, PDFLSH, PSFLSH, PQFLSH, THFLSH,
+// TDFLSH, TSFLSH, TQFLSH, DHFLSH, HSFLSH, DSFLSH, TRNPRP, SATT, SATP, SATD
+// TPFL2, DHFL1, DHFL2, DSFL1, DSFL2
+//
From b2ef510ef50d41cb293b3ce86cfca3e4879b2161 Mon Sep 17 00:00:00 2001
From: jowr
Date: Mon, 1 Oct 2012 15:58:41 -0700
Subject: [PATCH 07/57] 2012:10:02 00:53 - Updated the readme, started on a
wrapper with the 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.
---
_REFPROP-Wrapper/Version 0.5_linux/Makefile | 7 +-
_REFPROP-Wrapper/Version 0.5_linux/list.bsh | 17 +
.../Version 0.5_linux/refprop_wrapper.cpp | 50 +-
.../refprop_wrapper.poco.cpp | 954 +++++++++++
.../Version 0.5_linux/src/refprop-ftn.cpp | 191 ++-
.../Version 0.5_linux/src/refprop_lib.h | 1498 ++++++++---------
readme.txt => readme.md | 45 +-
7 files changed, 1942 insertions(+), 820 deletions(-)
create mode 100644 _REFPROP-Wrapper/Version 0.5_linux/list.bsh
create mode 100644 _REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.poco.cpp
rename readme.txt => readme.md (60%)
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/Makefile b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
index c90d5d6..5bb6255 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/Makefile
+++ b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
@@ -155,7 +155,12 @@ $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION): $(THEWRAPPER)$(HEADEREXTENSION)
.PHONY : wrapper
wrapper : $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
$(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION): $(THEWRAPPER).o wrapheader libheader library
- $(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(THEWRAPPER).o -l$(THENAME)
+ $(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(THEWRAPPER).o -l$(THENAME) -lPocoFoundation
+
+#.PHONY : wrapper
+#wrapper : $(LIBDIR)/lib$(THEWRAPPER)$(STATICLIBRARYEXTENSION)
+#$(LIBDIR)/lib$(THEWRAPPER)$(STATICLIBRARYEXTENSION): $(THEWRAPPER).o wrapheader libheader library
+# ar -cvq $(LIBDIR)/lib$(THEWRAPPER)$(STATICLIBRARYEXTENSION) $(THEWRAPPER).o
.PHONY : test
test : $(THETEST)
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/list.bsh b/_REFPROP-Wrapper/Version 0.5_linux/list.bsh
new file mode 100644
index 0000000..b334bc6
--- /dev/null
+++ b/_REFPROP-Wrapper/Version 0.5_linux/list.bsh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+function defineFunction {
+ echo "$1_TYPE * $1 = ($1_TYPE *) library.getSymbol($1_NAME);"
+}
+#
+## declare an array variable
+# declare -a arr=(RPVersion SETPATHdll ABFL1dll ABFL2dll ACTVYdll AGdll CCRITdll CP0dll CRITPdll CSATKdll CV2PKdll CVCPKdll CVCPdll DBDTdll DBFL1dll DBFL2dll DDDPdll DDDTdll DEFLSHdll DHD1dll DHFLSHdll DHFL1dll DHFL2dll DIELECdll DOTFILLdll DPDD2dll DPDDKdll DPDDdll DPDTKdll DPDTdll DPTSATKdll DSFLSHdll DSFL1dll DSFL2dll ENTHALdll ENTROdll ESFLSHdll FGCTYdll FPVdll GERG04dll GETFIJdll GETKTVdll GIBBSdll HSFLSHdll INFOdll LIMITKdll LIMITSdll LIMITXdll MELTPdll MELTTdll MLTH2Odll NAMEdll PDFL1dll PDFLSHdll PEFLSHdll PHFL1dll PHFLSHdll PQFLSHdll PREOSdll PRESSdll PSFL1dll PSFLSHdll PUREFLDdll QMASSdll QMOLEdll SATDdll SATEdll SATHdll SATPdll SATSdll SATTdll SETAGAdll SETKTVdll SETMIXdll SETMODdll SETREFdll SETUPdll SPECGRdll SUBLPdll SUBLTdll SURFTdll SURTENdll TDFLSHdll TEFLSHdll THERM0dll THERM2dll THERM3dll THERMdll THFLSHdll TPFLSHdll TPFL2dll TPRHOdll TQFLSHdll TRNPRPdll TSFLSHdll VIRBdll VIRCdll WMOLdll XMASSdll XMOLEdll)
+# These ones are used in the wrapper
+declare -a arr=(WMOLdll TPFL2dll TPFLSHdll PHFL1dll PHFLSHdll PDFL1dll PDFLSHdll PSFLSHdll PQFLSHdll THFLSHdll TDFLSHdll TSFLSHdll TQFLSHdll DHFL1dll DHFL2dll DHFLSHdll HSFLSHdll DSFL1dll DSFL2dll DSFLSHdll TRNPRPdll SATTdll SATPdll SATDdll)
+#
+## now loop through the above array
+for i in ${arr[@]}
+do
+ defineFunction $i # or do whatever with individual element of the array
+done
+
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
index 74c03ed..94d5262 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
@@ -1,6 +1,6 @@
/*
- wrapper code for a static library containing functions from the dynamic library refprop.dll
- to be used from Modelica
+ wrapper code for a static library containing functions from the dynamic
+ library librefprop.so to be used from Modelica
This file is released under the Modelica License 2.
@@ -12,32 +12,56 @@
GFZ German Research Centre for Geosciences
Telegrafenberg, D-14473 Potsdam
- Modified for portability to Linux and
- introduction of POCO library in 2012 by
+ Modified for Linux in 2012 by
Jorrit Wronski (jowr@mek.dtu.dk)
DTU Mechanical Engineering
needs
- librefprop.h - header for librefprop.so, based on examples
- refprop_wrapper.h - header for static REFPROP_wrapper.a, also needed by Dymola
+ refprop.h - header for librefprop.so, based on examples
+ refprop_wrapper.h - header for REFPROP_wrapper.so, also needed by Dymola
Use the provided makefile to install the library file from source.
*/
//#define DEBUGMODE 1
+//
+//#include "Poco/SharedLibrary.h"
+//using Poco::SharedLibrary;
+//
+//typedef void (*HelloFunc)(); // function pointer type
+//
+//
+//
+//
+//typedef void (__stdcall *fp_XMOLEdllTYPE)(double *,double *,double &);
+//
+////Define explicit function pointers
+//fp_ABFL1dllTYPE ABFL1dll;
+//
+//
+//int main(int argc, char** argv)
+//{
+//std::string path("TestLibrary");
+//path.append(SharedLibrary::suffix()); // adds ".dll" or ".so"
+//SharedLibrary library(path); // will also load the library
+//HelloFunc func = (HelloFunc) library.getSymbol("hello");
+//func();
+//library.unload();
+//}
+//return 0;
+
+
#include
#if defined(WIN32) || defined(_WIN32)
# include
-# include "REFPROP_dll.h"
#else // assuming Linux system
# include
# include
-# include
-//# include // dlopen etc
# include // tolower etc
#endif
//# error "Could not determine system."
+#include
#include "refprop_wrapper.h"
@@ -48,6 +72,7 @@ const long lengthofreference=3;
const long refpropcharlength=255;
const long ncmax=20; // Note: ncmax is the max number of components
+//static const char RP_
static char const GB_optId = '-' ; // - under UNIX
static char const GB_altOptId = '+' ; // + under UNIX
static char const GB_asciiEsc = '\\' ; // under UNIX
@@ -121,6 +146,13 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH, long* nX, char* herr, voi
strcat(FLD_PATH, GB_preferredPathSep);
}
+ //std::string path("TestLibrary");
+ //path.append(SharedLibrary::suffix()); // adds ".dll" or ".so"
+ //SharedLibrary library(path); // will also load the library
+ //HelloFunc func = (HelloFunc) library.getSymbol("hello");
+ //func();
+ //library.unload();
+
//*RefpropdllInstance = LoadLibrary(DLL_PATH);
// RefpropdllInstance = dlopen(DLL_PATH, RTLD_LAZY);
// if (!RefpropdllInstance){
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.poco.cpp b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.poco.cpp
new file mode 100644
index 0000000..548d4e5
--- /dev/null
+++ b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.poco.cpp
@@ -0,0 +1,954 @@
+/*
+ wrapper code for a static library containing functions from the dynamic library refprop.dll
+ to be used from Modelica
+
+ This file is released under the Modelica License 2.
+
+ Coded in 2010 by
+ Henning Francke
+ francke@gfz-potsdam.de
+
+ Helmholtz Centre Potsdam
+ GFZ German Research Centre for Geosciences
+ Telegrafenberg, D-14473 Potsdam
+
+ Modified for portability to Linux and
+ introduction of POCO library in 2012 by
+ Jorrit Wronski (jowr@mek.dtu.dk)
+ DTU Mechanical Engineering
+
+ needs
+ librefprop.h - header for librefprop.so, based on examples
+ refprop_wrapper.h - header for static REFPROP_wrapper.a, also needed by Dymola
+
+ Use the provided makefile to install the library file from source.
+*/
+
+//#define DEBUGMODE 1
+
+#include
+#if defined(WIN32) || defined(_WIN32)
+# include
+# include "REFPROP_dll.h"
+#else // assuming Linux system
+# include
+# include
+# include
+//# include // dlopen etc
+# include // tolower etc
+#endif
+//# error "Could not determine system."
+#include "refprop_wrapper.h"
+
+// get the POCO classes
+#include "Poco/SharedLibrary.h"
+#include "Poco/Path.h"
+#include "Poco/File.h"
+#include "Poco/Environment.h"
+#include "Poco/String.h"
+
+// Some constants...
+const long filepathlength=1024;
+const long errormessagelength=255+filepathlength;
+const long lengthofreference=3;
+const long refpropcharlength=255;
+const long ncmax=20; // Note: ncmax is the max number of components
+
+//Poco::SharedLibrary RefpropdllInstance;
+char loadedfluids[refpropcharlength];
+
+//// Define the functions either by their pointers or type.
+//WMOLdll_POINTER WMOLdll;
+//TPFL2dll_POINTER TPFL2dll;
+//TPFLSHdll_POINTER TPFLSHdll;
+//PHFL1dll_POINTER PHFL1dll;
+//PHFLSHdll_POINTER PHFLSHdll;
+//PDFL1dll_POINTER PDFL1dll;
+//PDFLSHdll_POINTER PDFLSHdll;
+//PSFLSHdll_POINTER PSFLSHdll;
+//PQFLSHdll_POINTER PQFLSHdll;
+//THFLSHdll_POINTER THFLSHdll;
+//TDFLSHdll_POINTER TDFLSHdll;
+//TSFLSHdll_POINTER TSFLSHdll;
+//TQFLSHdll_POINTER TQFLSHdll;
+//DHFL1dll_POINTER DHFL1dll;
+//DHFL2dll_POINTER DHFL2dll;
+//DHFLSHdll_POINTER DHFLSHdll;
+//HSFLSHdll_POINTER HSFLSHdll;
+//DSFL1dll_POINTER DSFL1dll;
+//DSFL2dll_POINTER DSFL2dll;
+//DSFLSHdll_POINTER DSFLSHdll;
+//TRNPRPdll_POINTER TRNPRPdll;
+//SATTdll_POINTER SATTdll;
+//SATPdll_POINTER SATPdll;
+//SATDdll_POINTER SATDdll;
+
+
+char *str_replace(char *str, char *search, char *replace, long *count) {
+ int i,n_ret;
+ int newlen = strlen(replace);
+ int oldlen = strlen(search);
+ char *ret;
+ *count = 0;
+
+ //count occurrences of searchstring
+ for (i = 0; oldlen && str[i]; ++i)
+ if (strstr(&str[i], search) == &str[i]){ // if walk through is at searchstr
+ ++*count, i+=oldlen - 1;
+ }
+ ret = (char *) calloc(n_ret = (strlen(str) + 1 + *count * (newlen - oldlen)), sizeof(char));
+ if (!ret){
+ printf("Could not allocate memory");
+ return "";
+ }
+
+ if (!*count){
+ strncpy(ret,str,n_ret);
+ //if (DEBUGMODE) printf("RET: %i %s\n",oldlen,str);
+ }else{
+ i = 0;
+ while (*str)
+ if (strstr(str, search) == str)
+ strncpy(&ret[i], replace,n_ret-i-1),
+ i += newlen,
+ str += oldlen;
+ else
+ ret[i++] = *str++;
+ ret[i] = '\0';
+ }
+ return ret;
+}
+
+int init_REFPROP(char* fluidnames, char* REFPROP_PATH, long* nX, char* herr, char* errormsg, int DEBUGMODE){
+// Sets up the interface to the REFPROP.DLL
+// is called by props_REFPROP and satprops_REFPROP
+// char DLL_PATH[filepathlength], FLD_PATH[filepathlength];
+
+ long ierr=0;
+
+ if (strlen(REFPROP_PATH)>filepathlength){
+ sprintf(errormsg,"REFPROP_PATH too long (%i > %i)\n",strlen(REFPROP_PATH),filepathlength);
+ return 0;
+ }
+
+ char* REFPROP_PATH_CHAR = REFPROP_PATH;
+ char* FLUIDS_CHAR = "fluids";
+ char* LIBRARY_CHAR;
+
+
+ Poco::Path REF_PATH(true),FLD_PATH(true),LIB_PATH(true); // all paths will be absolute
+
+ REF_PATH.parse(REFPROP_PATH_CHAR, Poco::Path::PATH_NATIVE);
+ if (!REF_PATH.isDirectory()) REF_PATH.append(REF_PATH.separator());
+ Poco::File theFile(REF_PATH);
+ if ( !theFile.isDirectory() || !theFile.canRead() ){
+ sprintf (errormsg,"REF_PATH is not a readable directory: %s \n", REF_PATH.toString().c_str());
+ return 0;
+ }
+
+ FLD_PATH.parse(REF_PATH.toString());
+ FLD_PATH.pushDirectory(FLUIDS_CHAR);
+
+ LIB_PATH.parse(REF_PATH.toString());
+ bool is_linux = ( 0 == Poco::icompare(Poco::Environment::osName(), "linux") );
+ if (is_linux){
+ LIBRARY_CHAR = "librefprop.so";
+ } else {
+ LIBRARY_CHAR = "refprop.dll";
+ }
+ LIB_PATH.setFileName(LIBRARY_CHAR);
+
+ if (DEBUGMODE) printf ("Comparison of fluids : %i \n", strcmp(fluidnames,loadedfluids) );
+// if (DEBUGMODE) printf ("Comparison of library: %i \n", LIB_PATH.toString().compare(RefpropdllInstance.getPath()) );
+// if (strcmp(fluidnames,loadedfluids)==0) {
+//// if ( LIB_PATH.toString().compare(RefpropdllInstance.getPath())==0 ) {
+//// sprintf(errormsg,"Library is already loaded: %s \n",LIB_PATH.toString().c_str());
+// if (DEBUGMODE) printf ("Returning: %s and %s \n", RefpropdllInstance.getPath().c_str(),fluidnames );
+// return 0;
+//// }
+// }
+
+ if (DEBUGMODE) {
+ printf ("REF_PATH as string: %s \n", REF_PATH.toString().c_str());
+ printf ("FLD_PATH as string: %s \n", FLD_PATH.toString().c_str());
+ printf ("LIB_PATH as string: %s \n", LIB_PATH.toString().c_str());
+ printf ("Running on: %s \n", Poco::Environment::osName().c_str());
+ }
+
+ theFile = Poco::File(LIB_PATH);
+ if ( !theFile.isFile() || !theFile.canExecute() ){
+ sprintf (errormsg,"LIB_PATH is not an executable file: %s \n", LIB_PATH.toString().c_str());
+ return 0;
+ }
+ char LIB_PATH_CHAR[filepathlength];
+ strcpy(LIB_PATH_CHAR,LIB_PATH.toString().c_str());
+
+ theFile = Poco::File(FLD_PATH);
+ if ( !theFile.isDirectory() || !theFile.canRead() ){
+ sprintf (errormsg,"FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
+ return 0;
+ }
+ char FLD_PATH_CHAR[filepathlength];
+ strcpy(FLD_PATH_CHAR,FLD_PATH.toString().c_str());
+
+//// First we load the library with the POCO foundation
+//// classes and then define all the needed functions
+//// by their names and a cast to the correct type.
+// if (DEBUGMODE) printf ("RefpropdllInstance loaded path: %s \n", RefpropdllInstance.getPath().c_str());
+// if (DEBUGMODE) printf ("New path for loading the library: %s \n", LIB_PATH.toString().c_str());
+// if (DEBUGMODE) printf ("Comparison: %i \n", LIB_PATH.toString().compare(RefpropdllInstance.getPath()) );
+// if ( LIB_PATH.toString().compare(RefpropdllInstance.getPath())!=0 ) {
+// RefpropdllInstance.unload();
+// if (DEBUGMODE) printf ("RefpropdllInstance unloaded: %s \n", "true");
+// RefpropdllInstance.load(LIB_PATH_CHAR);
+// }
+//
+// if (!RefpropdllInstance.isLoaded()){
+// sprintf(errormsg,"ERROR in opening library at \"%s\"",LIB_PATH_CHAR);
+// return 100;
+// }
+
+
+ char hrf[lengthofreference+1],hfmix[filepathlength+1+7];
+ char *hf;
+
+ strcpy(loadedfluids,fluidnames);
+ //parse fluid composition string and insert absolute paths
+ char replace[filepathlength+6];
+ strcpy(replace,".FLD|");
+ //if (DEBUGMODE) printf("REPLACE: %s\n",replace);
+ strncat(replace, FLD_PATH_CHAR,filepathlength-strlen(replace));
+
+ int hf_len = strlen(fluidnames)+ncmax*(strlen(replace)-1)+4;
+ hf = (char*) calloc(hf_len, sizeof(char));
+
+ strncpy(hf,FLD_PATH_CHAR,hf_len);
+ strncat(hf,str_replace(fluidnames, "|", replace, nX),hf_len-strlen(hf)); //str_replace returns the number of delimiters -> nX, but components are one more ...
+ if (++*nX>ncmax){ //...that's why nX is incremented
+ sprintf(errormsg,"Too many components (More than %i)\n",ncmax);
+ return 0;
+ }
+ strncat(hf,".FLD",hf_len-strlen(hf));
+ if (DEBUGMODE) printf("Fluid composition string: \"%s\"\n",hf);
+
+ strncpy(hfmix,FLD_PATH_CHAR,filepathlength+1);//add absolute path
+ strncat(hfmix,"hmx.bnc",filepathlength+1+7-strlen(hfmix));
+ strcpy(hrf,"DEF");
+
+
+// SETUPdll_TYPE * SETUPdll = (SETUPdll_TYPE * ) RefpropdllInstance.getSymbol(SETUPdll_NAME);
+ if (DEBUGMODE) printf("Running SETUPdll...\n");
+ SETUPdll(*nX, hf, hfmix, hrf, ierr, herr);
+ if (DEBUGMODE) printf("SETUPdll run complete (Error no: %i)\n",ierr);
+
+// WMOLdll = (WMOLdll_POINTER) RefpropdllInstance.getSymbol(WMOLdll_NAME);
+// TPFL2dll = (TPFL2dll_POINTER) RefpropdllInstance.getSymbol(TPFL2dll_NAME);
+// TPFLSHdll = (TPFLSHdll_POINTER) RefpropdllInstance.getSymbol(TPFLSHdll_NAME);
+// PHFL1dll = (PHFL1dll_POINTER) RefpropdllInstance.getSymbol(PHFL1dll_NAME);
+// PHFLSHdll = (PHFLSHdll_POINTER) RefpropdllInstance.getSymbol(PHFLSHdll_NAME);
+// PDFL1dll = (PDFL1dll_POINTER) RefpropdllInstance.getSymbol(PDFL1dll_NAME);
+// PDFLSHdll = (PDFLSHdll_POINTER) RefpropdllInstance.getSymbol(PDFLSHdll_NAME);
+// PSFLSHdll = (PSFLSHdll_POINTER) RefpropdllInstance.getSymbol(PSFLSHdll_NAME);
+// PQFLSHdll = (PQFLSHdll_POINTER) RefpropdllInstance.getSymbol(PQFLSHdll_NAME);
+// THFLSHdll = (THFLSHdll_POINTER) RefpropdllInstance.getSymbol(THFLSHdll_NAME);
+// TDFLSHdll = (TDFLSHdll_POINTER) RefpropdllInstance.getSymbol(TDFLSHdll_NAME);
+// TSFLSHdll = (TSFLSHdll_POINTER) RefpropdllInstance.getSymbol(TSFLSHdll_NAME);
+// TQFLSHdll = (TQFLSHdll_POINTER) RefpropdllInstance.getSymbol(TQFLSHdll_NAME);
+// DHFL1dll = (DHFL1dll_POINTER) RefpropdllInstance.getSymbol(DHFL1dll_NAME);
+// DHFL2dll = (DHFL2dll_POINTER) RefpropdllInstance.getSymbol(DHFL2dll_NAME);
+// DHFLSHdll = (DHFLSHdll_POINTER) RefpropdllInstance.getSymbol(DHFLSHdll_NAME);
+// HSFLSHdll = (HSFLSHdll_POINTER) RefpropdllInstance.getSymbol(HSFLSHdll_NAME);
+// DSFL1dll = (DSFL1dll_POINTER) RefpropdllInstance.getSymbol(DSFL1dll_NAME);
+// DSFL2dll = (DSFL2dll_POINTER) RefpropdllInstance.getSymbol(DSFL2dll_NAME);
+// DSFLSHdll = (DSFLSHdll_POINTER) RefpropdllInstance.getSymbol(DSFLSHdll_NAME);
+// TRNPRPdll = (TRNPRPdll_POINTER) RefpropdllInstance.getSymbol(TRNPRPdll_NAME);
+// SATTdll = (SATTdll_POINTER) RefpropdllInstance.getSymbol(SATTdll_NAME);
+// SATPdll = (SATPdll_POINTER) RefpropdllInstance.getSymbol(SATPdll_NAME);
+// SATDdll = (SATDdll_POINTER) RefpropdllInstance.getSymbol(SATDdll_NAME);
+
+
+// if (DEBUGMODE) printf("Error code processing...\n");
+ switch(ierr){
+ case 101:
+ //strcpy(errormsg,"error in opening file");
+// if (DEBUGMODE) printf("Error 101\n");
+ sprintf(errormsg,"error in opening file %s",hf);
+ break;
+ case 102:
+// if (DEBUGMODE) printf("Error 102\n");
+ strcpy(errormsg,"error in file or premature end of file");
+ break;
+ case -103:
+// if (DEBUGMODE) printf("Error -103\n");
+ strcpy(errormsg,"unknown model encountered in file");
+ break;
+ case 104:
+// if (DEBUGMODE) printf("Error 104\n");
+ strcpy(errormsg,"error in setup of model");
+ break;
+ case 105:
+// if (DEBUGMODE) printf("Error 105\n");
+ strcpy(errormsg,"specified model not found");
+ break;
+ case 111:
+// if (DEBUGMODE) printf("Error 111\n");
+ strcpy(errormsg,"error in opening mixture file");
+ break;
+ case 112:
+// if (DEBUGMODE) printf("Error 112\n");
+ strcpy(errormsg,"mixture file of wrong type");
+ break;
+ case 114:
+// if (DEBUGMODE) printf("Error 114\n");
+ strcpy(errormsg,"nc<>nc from setmod");
+ break;
+ case 0:
+ break;
+ default:
+// if (DEBUGMODE) printf("Unknown error\n");
+ strcpy(errormsg,"Unknown error");
+ //strcpy(errormsg,"Setup was successful!");
+ strncpy(errormsg,herr,errormessagelength);
+ break;
+ }
+ free(hf);
+ return ierr;
+}
+
+
+double props_REFPROP(char* what, char* statevars_in, char* fluidnames, double *props, double statevar1, double statevar2, double* x, int phase, char* REFPROP_PATH, char* errormsg, int DEBUGMODE){
+/*Calculates thermodynamic properties of a pure substance/mixture, returns both single value and array containing all calculated values (because the are calculated anyway)
+INPUT:
+ what: character specifying return value (p,T,h,s,d,wm,q,e,w) - Explanation of variables at the end of this function
+ statevars: string of any combination of two variables out of p,T,h,s,d
+ fluidnames: string containing names of substances in mixtured separated by |, substance names are identical to those of *.fld-files in REFPROP program directory
+ statevar1,statevar2: values of the two variables specified in statevars
+ x: array containing the mass fractions of the components of the mixture
+ REFPROP_PATH: string defining the path of the refprop.dll
+OUTPUT
+ return value: value of variable specified by the input variable what
+ props: Array containing all calculated values (props[0] containing error number)
+ errormsg: string containing error message
+*/
+ char statevars[3];
+ double p, T, d, val, dl,dv,q,e,h,s,cv,cp,w,wm,wmliq,wmvap,eta,tcx;
+ long nX,ierr=0; //zero means no error
+ char herr[errormessagelength+1];
+// HINSTANCE RefpropdllInstance;// Then have windows load the library.
+// Poco::SharedLibrary RefpropdllInstance("");
+
+ if (DEBUGMODE) printf("\nStarting function props_REFPROP to calc %c...\n", what[0]);
+
+ //initialize interface to REFPROP.dll
+// if(props[0]=(double)init_REFPROP(fluidnames, REFPROP_PATH, &nX, herr, &RefpropdllInstance, errormsg, DEBUGMODE)){
+// printf("Error no. %g initializing REFPROP: \"%s\"\n", props[0], errormsg);
+// return 0;
+// }
+ if(props[0]=(double)init_REFPROP(fluidnames, REFPROP_PATH, &nX, herr, errormsg, DEBUGMODE)){
+ printf("Error no. %g initializing REFPROP: \"%s\"\n", props[0], errormsg);
+ return 0;
+ }
+
+ //CALCULATE MOLAR MASS
+// WMOLdll = (fp_WMOLdllTYPE) GetProcAddress(RefpropdllInstance,"WMOLdll");
+// WMOLdll_TYPE * WMOLdll = (WMOLdll_TYPE * ) RefpropdllInstance.getSymbol(WMOLdll_NAME);
+ WMOLdll(x,wm);
+// sprintf(errormsg," %10.4f, %10.4f, %10.4f,",x[0],x[1],wm);
+ wm /= 1000; //g/mol -> kg/mol
+
+ //identify and assign passed state variables
+ statevars[0] = tolower(statevars_in[0]);
+ statevars[1] = tolower(statevars_in[1]);
+ statevars[2] = '\0';
+ if (statevars[0]!='\0'){
+ if (statevars[0]==statevars[1]){
+ props[0] = 3;
+ sprintf(errormsg,"State variable 1 is the same as state variable 2 (%c)",statevars[0]);
+ return 0;
+ }
+ for (int ii=0;ii<2;ii++){
+ val = (ii==0?statevar1:statevar2);
+ switch(statevars[ii]){
+ case 'p':
+ p = val/1000; //Pa->kPa
+ break;
+ case 't':
+ T = val;
+ break;
+ case 's':
+ s = val*wm; //J/(kg�K) -> kJ/(mol�K)
+ break;
+ case 'h':
+ h = val*wm; //J/kg --> kJ/mol
+ break;
+ case 'd':
+ d = val/wm/1000; //kg/m� -> mol/dm�
+ break;
+ case 'q': //vapor quality on a mass basis [mass vapor/total mass] (q=0 indicates saturated liquid, q=1 indicates saturated vapor)
+ q = val;
+ break;
+ default:
+ props[0] = 2;
+ sprintf(errormsg,"Unknown state variable %i: %c",ii+1 ,statevars[ii]);/**/
+ return 0;
+ }
+ }
+ }
+
+/*
+//...If phase j is known, call TPRHOdll:
+ long j=2; //phase definition(j=1: Liquid, j=2: Vapor)
+ long tmp_int=0;
+ TPRHOdll = (fp_TPRHOdllTYPE) GetProcAddress(RefpropdllInstance,"TPRHOdll");
+ TPRHOdll(t,p,x,j,tmp_int,d,ierr,herr,errormessagelength);
+*/
+//...If phase is not known, call TPFLSH
+ double xliq[ncmax],xvap[ncmax],f[ncmax];
+ long kq=2;/* additional input--only for TQFLSH and PQFLSH
+ kq--flag specifying units for input quality
+ kq = 1 quality on MOLAR basis [moles vapor/total moles]
+ kq = 2 quality on MASS basis [mass vapor/total mass]*/
+// sprintf(errormsg,"Huhu! %s %d", statevars, ierr);
+ if (ierr==0){
+ if (strcmp(statevars,"pt")==0 || strcmp(statevars,"tp")==0){
+// strcat(errormsg,"Bin in TP!");
+ if (phase==2){ //fluid state is known to be two phase
+// TPFL2dll = (fp_TPFL2dllTYPE) GetProcAddress(RefpropdllInstance,"TPFL2dll");
+ TPFL2dll(T,p,x,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
+ }else{
+// TPFLSHdll = (fp_TPFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TPFLSHdll");
+ TPFLSHdll(T,p,x,d,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ }
+ }else if (strcmp(statevars,"ph")==0 || strcmp(statevars,"hp")==0){
+/* if (phase==1){ //fluid state is known to be single phase
+ PHFL1dll = (fp_PHFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PHFL1dll");
+ PHFL1dll(p,h,x,liqvap,T,d,ierr,herr,errormessagelength);
+ if (liqvap==1) dl=d; else dv=d;
+ }else{*/
+// PHFLSHdll = (fp_PHFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PHFLSHdll");
+ PHFLSHdll(p,h,x,T,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
+// }
+ }else if (strcmp(statevars,"pd")==0 || strcmp(statevars,"dp")==0){
+ if (phase==1){ //fluid state is known to be single phase
+// PDFL1dll = (fp_PDFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PDFL1dll");
+ PDFL1dll(p,d,x,T,ierr,herr,errormessagelength);
+ }else{
+// PDFLSHdll = (fp_PDFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PDFLSHdll");
+ PDFLSHdll(p,d,x,T,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ }
+ }else if (strcmp(statevars,"ps")==0 || strcmp(statevars,"sp")==0){
+/* if (phase==1){ //fluid state is known to be single phase
+ PSFL1dll = (fp_PSFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PSFL1dll");
+ PSFL1dll(p,s,x,kph,T,d,ierr,herr,errormessagelength);
+ if (liqvap==1) dl=d; else dv=d;
+ }else{*/
+// PSFLSHdll = (fp_PSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PSFLSHdll");
+ PSFLSHdll(p,s,x,T,d,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
+// }
+ }else if (strcmp(statevars,"pq")==0 || strcmp(statevars,"qp")==0){
+// PQFLSHdll = (fp_PQFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PQFLSHdll");
+ PQFLSHdll(p,q,x,kq,T,d,dl,dv,xliq,xvap,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+// strcat(errormsg,"Bin in PQ!");
+ }else if (strcmp(statevars,"th")==0 || strcmp(statevars,"ht")==0){
+/* if (phase==1){ //fluid state is known to be single phase
+ THFL1dll = (fp_THFL1dllTYPE) GetProcAddress(RefpropdllInstance,"THFL1dll");
+ THFL1dll(T,h,x,Dmin,Dmax,d,ierr,herr,errormessagelength);
+ }else{*/
+// THFLSHdll = (fp_THFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"THFLSHdll");
+ long kr = 2;
+/* kr--phase flag: 1 = input state is liquid
+ 2 = input state is vapor in equilibrium with liq
+ 3 = input state is liquid in equilibrium with solid
+ 4 = input state is vapor in equilibrium with solid */
+ THFLSHdll (T,h,x,kr,p,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
+// }
+ }else if (strcmp(statevars,"td")==0 || strcmp(statevars,"dt")==0){
+// TDFLSHdll = (fp_TDFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TDFLSHdll");
+ TDFLSHdll(T,d,x,p,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ }else if (strcmp(statevars,"ts")==0 || strcmp(statevars,"st")==0){
+// TSFLSHdll = (fp_TSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TSFLSHdll");
+ long kr = 2;
+ TSFLSHdll (T,s,x,kr,p,d,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
+ }else if (strcmp(statevars,"tq")==0 || strcmp(statevars,"qt")==0){
+// TQFLSHdll = (fp_TQFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TQFLSHdll");
+ TQFLSHdll(T,q,x,kq,p,d,dl,dv,xliq,xvap,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ }else if (strcmp(statevars,"hd")==0 || strcmp(statevars,"dh")==0){
+ switch(phase){ //fluid state is known to be single phase
+ case 1:
+// DHFL1dll = (fp_DHFL1dllTYPE) GetProcAddress(RefpropdllInstance,"DHFL1dll");
+ DHFL1dll(d,h,x,T,ierr,herr,errormessagelength);
+ break;
+ case 2:
+// DHFL2dll = (fp_DHFL2dllTYPE) GetProcAddress(RefpropdllInstance,"DHFL2dll");
+ DHFL2dll(d,h,x,T,p,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
+ break;
+ default:
+// DHFLSHdll = (fp_DHFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"DHFLSHdll");
+ DHFLSHdll(d,h,x,T,p,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
+ break;
+ }
+ }else if (strcmp(statevars,"hs")==0 || strcmp(statevars,"sh")==0){
+// HSFLSHdll = (fp_HSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"HSFLSHdll");
+ HSFLSHdll(h,s,x,T,p,d,dl,dv,xliq,xvap,q,e,cv,cp,w,ierr,herr,errormessagelength);
+ }else if (strcmp(statevars,"ds")==0 || strcmp(statevars,"sd")==0){
+ switch(phase){ //fluid state is known to be single phase
+ case 1:
+// DSFL1dll = (fp_DSFL1dllTYPE) GetProcAddress(RefpropdllInstance,"DSFL1dll");
+ DSFL1dll(d,s,x,T,ierr,herr,errormessagelength);
+ break;
+ case 2:
+// DSFL2dll = (fp_DSFL2dllTYPE) GetProcAddress(RefpropdllInstance,"DSFL2dll");
+ DSFL2dll(d,s,x,T,p,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
+ break;
+ default:
+// DSFLSHdll = (fp_DSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"DSFLSHdll");
+ DSFLSHdll(d,s,x,T,p,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
+ break;
+ }
+ }else
+ sprintf(errormsg,"Unknown combination of state variables! %s", statevars);
+ }
+
+ switch(tolower(what[0])){ //CHOOSE RETURN VARIABLE
+ case 'v': //dynamic viscosity uPa.s
+ case 'l': //thermal conductivity W/m.K
+// TRNPRPdll = (fp_TRNPRPdllTYPE) GetProcAddress(RefpropdllInstance,"TRNPRPdll");
+ TRNPRPdll (T,d,x,eta,tcx,ierr,herr,errormessagelength);
+ break;
+ }
+
+
+ switch(ierr){
+ case 1:
+ sprintf(errormsg,"T=%f < Tmin",T);
+ break;
+ case 4:
+ sprintf(errormsg,"P=%f < 0",p);
+ break;
+ case 5:
+ sprintf(errormsg,"T=%f and p=%f out of range",T,p);
+ break;
+ case 8:
+ strcpy(errormsg,"x out of range (component and/or sum < 0 or > 1)");
+ break;
+ case 9:
+ sprintf(errormsg,"x or T=%f out of range",T);
+ break;
+ case 12:
+ sprintf(errormsg,"x out of range and P=%f < 0",p);
+ break;
+ case 13:
+ sprintf(errormsg,"x, T=%f and p=%f out of range",T,p);
+ break;
+ case 16:
+ strcpy(errormsg,"TPFLSH error: p>melting pressure");
+ break;
+ case -31:
+ sprintf(errormsg,"Temperature T=%f out of range for conductivity",T);
+ break;
+ case -32:
+ sprintf(errormsg,"density d=%f out of range for conductivity",d);
+ break;
+ case -33:
+ sprintf(errormsg,"Temperature T=%f and density d=%f out of range for conductivity",T,d);
+ break;
+ case -41:
+ sprintf(errormsg,"Temperature T=%f out of range for viscosity",T);
+ break;
+ case -42:
+ sprintf(errormsg,"density d=%f out of range for viscosity",d);
+ break;
+ case -43:
+ sprintf(errormsg,"Temperature T=%f and density d=%f out of range for viscosity",T,d);
+ break;
+ case -51:
+ sprintf(errormsg,"Temperature T=%f out of range for conductivity and viscosity",T);
+ break;
+ case -52:
+ sprintf(errormsg,"density d=%f out of range for conductivity and viscosity",d);
+ break;
+ case -53:
+ sprintf(errormsg,"Temperature T=%f and density d=%f out of range for conductivity and viscosity",T,d);
+ break;
+ case 39:
+ sprintf(errormsg,"model not found for thermal conductivity");
+ break;
+ case 49:
+ sprintf(errormsg,"model not found for viscosity");
+ break;
+ case 50:
+ sprintf(errormsg,"ammonia/water mixture (no properties calculated)");
+ break;
+ case 51:
+ sprintf(errormsg,"exactly at T=%f, rhoc for a pure fluid; k is infinite",T);
+ break;
+ case -58:
+ case -59:
+ sprintf(errormsg,"ECS model did not converge");
+ break;
+ case 211:
+ sprintf(errormsg,"TPFLSH bubble point calculation did not converge: [SATTP error 1] iteration failed to converge");
+ case 239:
+ sprintf(errormsg,"THFLSH error: Input value of enthalpy (%f) is outside limits",h);
+ break;
+ case 248:
+ sprintf(errormsg,"DSFLSH error: Iteration did not converge with d=%f and s=%f",d,s);
+ break;
+ case 249:
+ sprintf(errormsg,"PHFLSH error: Input value of enthalpy (%f) is outside limits",h);
+ break;
+ case 271:
+ sprintf(errormsg,"TQFLSH error: T=%f > Tcrit, T-q calculation not possible",T);
+ break;
+ case 291:
+ sprintf(errormsg,"PQFLSH error: p=%f > pcrit, p-q calculation not possible",T);
+ break;
+ default:
+ strncpy(errormsg,herr,errormessagelength);
+ break;
+ }
+
+
+ //CONVERT TO SI-UNITS
+ if (ierr==0){
+ WMOLdll(xliq,wmliq);
+ wmliq /= 1000; //g/mol -> kg/mol
+ WMOLdll(xvap,wmvap);
+ wmvap /= 1000; //g/mol -> kg/mol
+ //printf("%d,%s\n%s\nP,T,D,H,CP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",nX,hf,hfmix,p,t,d,h,wm);
+ d *= wm*1000; //mol/dm� -> kg/m�
+ dl *= wmliq*1000; //mol/dm� -> kg/m�
+ dv *= wmvap*1000; //mol/dm� -> kg/m�
+ e /= e/wm; //kJ/mol -> J/kg
+ h /= wm; //kJ/mol -> J/kg
+ s /= wm; //kJ/(mol�K) -> J/(kg�K)
+ cv /= wm;
+ cp /= wm;
+ p *= 1000; //kPa->Pa
+ if (nX>1 && abs(q)<990) q *= wmvap/wm; //molar bass -> mass basis
+ eta/=1e6; //uPa.s -> Pa.s
+ }
+
+ //ASSIGN VALUES TO RETURN ARRAY
+ props[0] = ierr;//error code
+ props[1] = p;//pressure in Pa
+ props[2] = T; //Temperature in K
+ props[3] = wm; //molecular weight
+ props[4] = d; //density
+ props[5] = dl; //density of liquid phase
+ props[6] = dv; //density of liquid phase
+ props[7] = q; //vapor quality on a mass basis [mass vapor/total mass] (q=0 indicates saturated liquid, q=1 indicates saturated vapor)
+ props[8] = e; //inner energy
+ props[9] = h; //specific enthalpy
+ props[10] = s;//specific entropy
+ props[11] = cv;
+ props[12] = cp;
+ props[13] = w; //speed of sound
+ props[14] = wmliq;
+ props[15] = wmvap;
+ for (int ii=0;ii kg/mol
+
+ if (DEBUGMODE) printf("\nwm converted.\n");
+
+ if (DEBUGMODE) printf("\statevar is %s \n",statevar_in);
+ //identify and assign passed state variables
+ // char tmpstr[1];
+ // strcpy(tmpstr,statevar[0]);
+ // statevar = toLowerCase(tmpstr);
+ //statevar[0] = tolower(statevar[0]);
+ char statevar[1];
+ statevar[0] = tolower(statevar_in[0]);
+ if (DEBUGMODE) printf("\nstatevar lowercase.\n");
+ if (statevar[0]!='\0'){
+// if (strcmp(statevar[0],"")){
+// if (statevar[0] != NULL){
+ if (DEBUGMODE) printf("\nentering statevar switch.\n");
+ switch(statevar[0]){
+ case 'p':
+ p = statevarval/1000; //Pa->kPa
+ break;
+ case 't':
+ T = statevarval;
+ break;
+ case 'd':
+ d = statevarval/wm/1000; //kg/m� -> mol/dm�
+ break;
+/* case 's':
+ s = statevarval*wm; //J/(kg�K) -> kJ/(mol�K)
+ break;
+ case 'h':
+ h = statevarval*wm; //J/kg --> kJ/mol
+ break;
+*/ default:
+ props[0] = 2;
+ sprintf(errormsg,"Unknown state variable: %c", statevarval);
+ return 0;
+ }
+ }
+
+ if (DEBUGMODE) printf("\nstatevar checked.\n");
+
+ double xliq[ncmax],xvap[ncmax],f[ncmax];
+
+ long j=2,kr;
+/* j--phase flag: 1 = input x is liquid composition (bubble point)
+ 2 = input x is vapor composition (dew point)
+ 3 = input x is liquid composition (freezing point)
+ 4 = input x is vapor composition (sublimation point)
+*/
+ if (ierr==0)
+ if (~strcmp(statevar,"t")){
+// SATTdll = (fp_SATTdllTYPE) GetProcAddress(RefpropdllInstance,"SATTdll");
+ SATTdll(T,x,j,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
+ }else if (~strcmp(statevar,"p")){
+// SATPdll = (fp_SATPdllTYPE) GetProcAddress(RefpropdllInstance,"SATPdll");
+ SATPdll(p,x,j,T,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
+ switch(ierr){
+ case 2:
+ strcpy(errormsg,"P < Ptp");
+ break;
+ case 4:
+ strcpy(errormsg,"P < 0");
+ break;
+ }
+ //sprintf(errormsg,"p=%f, h=%f",p ,statevar2);
+ }else if (~strcmp(statevar,"d")){
+// SATDdll = (fp_SATDdllTYPE) GetProcAddress(RefpropdllInstance,"SATDdll");
+ SATDdll(d,x,j,kr,T,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
+ switch(ierr){
+ case 2:
+ strcpy(errormsg,"D > Dmax");
+ break;
+ }
+ }
+
+ switch(ierr){
+ case 0:
+ strcpy(errormsg,"Saturation routine successful");
+ break;
+ case 1:
+ sprintf(errormsg,"T=%f < Tmin",T);
+ break;
+ case 8:
+ strcpy(errormsg,"x out of range");
+ break;
+ case 9:
+ strcpy(errormsg,"T and x out of range");
+ break;
+ case 10:
+ strcpy(errormsg,"D and x out of range");
+ break;
+ case 12:
+ strcpy(errormsg,"P and x out of range");
+ break;
+ case 120:
+ strcpy(errormsg,"CRITP did not converge");
+ break;
+ case 121:
+ strcpy(errormsg,"T > Tcrit");
+ break;
+ case 122:
+ strcpy(errormsg,"TPRHO-liquid did not converge (pure fluid)");
+ break;
+ case 123:
+ strcpy(errormsg,"TPRHO-vapor did not converge (pure fluid)");
+ break;
+ case 124:
+ strcpy(errormsg,"pure fluid iteration did not converge");
+ break;
+ case -125:
+ strcpy(errormsg,"TPRHO did not converge for parent ph (mix)");
+ break;
+ case -126:
+ strcpy(errormsg,"TPRHO did not converge for incipient (mix)");
+ break;
+ case -127:
+ strcpy(errormsg,"composition iteration did not converge");
+ break;
+ case 128:
+ strcpy(errormsg,"mixture iteration did not converge");
+ break;
+ case 140:
+ strcpy(errormsg,"CRITP did not converge");
+ break;
+ case 141:
+ strcpy(errormsg,"P > Pcrit");
+ break;
+ case 142:
+ strcpy(errormsg,"TPRHO-liquid did not converge (pure fluid)");
+ break;
+ case 143:
+ strcpy(errormsg,"TPRHO-vapor did not converge (pure fluid)");
+ break;
+ case 144:
+ strcpy(errormsg,"pure fluid iteration did not converge");
+ break;
+ case -144:
+ strcpy(errormsg,"Raoult's law (mixture initial guess) did not converge");
+ break;
+ case -145:
+ strcpy(errormsg,"TPRHO did not converge for parent ph (mix)");
+ break;
+ case -146:
+ strcpy(errormsg,"TPRHO did not converge for incipient (mix)");
+ break;
+ case -147:
+ strcpy(errormsg,"composition iteration did not converge");
+ break;
+ case 148:
+ strcpy(errormsg,"mixture iteration did not converge");
+ break;
+ case 160:
+ strcpy(errormsg,"CRITP did not converge");
+ break;
+ case 161:
+ strcpy(errormsg,"SATD did not converge");
+ break;
+ default:
+ strncpy(errormsg,herr,errormessagelength);
+ break;
+ }
+
+ /*SATHdll = (fp_SATHdllTYPE) GetProcAddress(RefpropdllInstance,"SATHdll");
+ SATEdll = (fp_SATEdllTYPE) GetProcAddress(RefpropdllInstance,"SATEdll");
+ SATSdll = (fp_SATSdllTYPE) GetProcAddress(RefpropdllInstance,"SATSdll");*/
+
+
+ //CONVERT TO SI-UNITS
+ if (ierr==0){
+ WMOLdll(xliq,wmliq);
+ wmliq /= 1000; //g/mol -> kg/mol
+ WMOLdll(xvap,wmvap);
+ wmvap /= 1000; //g/mol -> kg/mol
+ //printf("%d,%s\n%s\nP,T,D,H,CP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",nX,hf,hfmix,p,t,d,h,wm);
+ d *= wm*1000; //mol/dm� -> kg/m�
+ dl *= wmliq*1000; //mol/dm� -> kg/m�
+ dv *= wmvap*1000; //mol/dm� -> kg/m�
+/* e /= e/wm; //kJ/mol -> J/kg
+ h /= wm; //kJ/mol -> J/kg
+ s /= wm; //kJ/(mol�K) -> J/(kg�K)
+*/ p *= 1000; //kPa->Pa
+ }
+
+
+ //ASSIGN VALUES TO RETURN ARRAY
+ props[0] = ierr;//error code
+ props[1] = p;//pressure in kPa->Pa
+ props[2] = T; //Temperature in K
+ props[3] = wm; //molecular weight
+ props[4] = d; //density
+ props[5] = dl; //density of liquid phase
+ props[6] = dv; //density of liquid phase
+ props[7] = 0;
+ props[8] = 0; //inner energy
+ props[9] = 0; //specific enthalpy
+ props[10] = 0;//specific entropy
+ props[11] = 0;
+ props[12] = 0;
+ props[13] = 0; //speed of sound
+ props[14] = wmliq;
+ props[15] = wmvap;
+ for (int ii=0;ii
-# define RPVersion RPVERSION
-# define SETPATHdll SETPATHDLL
-# define ABFL1dll ABFL1DLL
-# define ABFL2dll ABFL2DLL
-# define ACTVYdll ACTVYDLL
-# define AGdll AGDLL
-# define CCRITdll CCRITDLL
-# define CP0dll CP0DLL
-# define CRITPdll CRITPDLL
-# define CSATKdll CSATKDLL
-# define CV2PKdll CV2PKDLL
-# define CVCPKdll CVCPKDLL
-# define CVCPdll CVCPDLL
-# define DBDTdll DBDTDLL
-# define DBFL1dll DBFL1DLL
-# define DBFL2dll DBFL2DLL
-# define DDDPdll DDDPDLL
-# define DDDTdll DDDTDLL
-# define DEFLSHdll DEFLSHDLL
-# define DHD1dll DHD1DLL
-# define DHFL1dll DHFL1DLL
-# define DHFL2dll DHFL2DLL
-# define DHFLSHdll DHFLSHDLL
-# define DIELECdll DIELECDLL
-# define DOTFILLdll DOTFILLDLL
-# define DPDD2dll DPDD2DLL
-# define DPDDKdll DPDDKDLL
-# define DPDDdll DPDDDLL
-# define DPDTKdll DPDTKDLL
-# define DPDTdll DPDTDLL
-# define DPTSATKdll DPTSATKDLL
-# define DSFLSHdll DSFLSHDLL
-# define DSFL1dll DSFL1DLL
-# define DSFL2dll DSFL2DLL
-# define ENTHALdll ENTHALDLL
-# define ENTROdll ENTRODLL
-# define ESFLSHdll ESFLSHDLL
-# define FGCTYdll FGCTYDLL
-# define FPVdll FPVDLL
-# define GERG04dll GERG04DLL
-# define GETFIJdll GETFIJDLL
-# define GETKTVdll GETKTVDLL
-# define GIBBSdll GIBBSDLL
-# define HSFLSHdll HSFLSHDLL
-# define INFOdll INFODLL
-# define LIMITKdll LIMITKDLL
-# define LIMITSdll LIMITSDLL
-# define LIMITXdll LIMITXDLL
-# define MELTPdll MELTPDLL
-# define MELTTdll MELTTDLL
-# define MLTH2Odll MLTH2ODLL
-# define NAMEdll NAMEDLL
-# define PDFL1dll PDFL1DLL
-# define PDFLSHdll PDFLSHDLL
-# define PEFLSHdll PEFLSHDLL
-# define PHFL1dll PHFL1DLL
-# define PHFLSHdll PHFLSHDLL
-# define PQFLSHdll PQFLSHDLL
-# define PREOSdll PREOSDLL
-# define PRESSdll PRESSDLL
-# define PSFL1dll PSFL1DLL
-# define PSFLSHdll PSFLSHDLL
-# define PUREFLDdll PUREFLDDLL
-# define QMASSdll QMASSDLL
-# define QMOLEdll QMOLEDLL
-# define SATDdll SATDDLL
-# define SATEdll SATEDLL
-# define SATHdll SATHDLL
-# define SATPdll SATPDLL
-# define SATSdll SATSDLL
-# define SATTdll SATTDLL
-# define SETAGAdll SETAGADLL
-# define SETKTVdll SETKTVDLL
-# define SETMIXdll SETMIXDLL
-# define SETMODdll SETMODDLL
-# define SETREFdll SETREFDLL
-# define SETUPdll SETUPDLL
-# define SPECGRdll SPECGRDLL
-# define SUBLPdll SUBLPDLL
-# define SUBLTdll SUBLTDLL
-# define SURFTdll SURFTDLL
-# define SURTENdll SURTENDLL
-# define TDFLSHdll TDFLSHDLL
-# define TEFLSHdll TEFLSHDLL
-# define THERM0dll THERM0DLL
-# define THERM2dll THERM2DLL
-# define THERM3dll THERM3DLL
-# define THERMdll THERMDLL
-# define THFLSHdll THFLSHDLL
-# define TPFLSHdll TPFLSHDLL
-# define TPFL2dll TPFL2DLL
-# define TPRHOdll TPRHODLL
-# define TQFLSHdll TQFLSHDLL
-# define TRNPRPdll TRNPRPDLL
-# define TSFLSHdll TSFLSHDLL
-# define VIRBdll VIRBDLL
-# define VIRCdll VIRCDLL
-# define WMOLdll WMOLDLL
-# define XMASSdll XMASSDLL
+// Define compiler specific calling conventions
+// for the shared library.
+# define LIBRARY_API __stdcall // __declspec(dllexport)
+// Do not define function names for the shared library,
+// in this case it is the REFPROP.dll and no special
+// names are needed.
+# define RPVersion RPVersion
+# define SETPATHdll SETPATHdll
+# define ABFL1dll ABFL1dll
+# define ABFL2dll ABFL2dll
+# define ACTVYdll ACTVYdll
+# define AGdll AGdll
+# define CCRITdll CCRITdll
+# define CP0dll CP0dll
+# define CRITPdll CRITPdll
+# define CSATKdll CSATKdll
+# define CV2PKdll CV2PKdll
+# define CVCPKdll CVCPKdll
+# define CVCPdll CVCPdll
+# define DBDTdll DBDTdll
+# define DBFL1dll DBFL1dll
+# define DBFL2dll DBFL2dll
+# define DDDPdll DDDPdll
+# define DDDTdll DDDTdll
+# define DEFLSHdll DEFLSHdll
+# define DHD1dll DHD1dll
+# define DHFL1dll DHFL1dll
+# define DHFL2dll DHFL2dll
+# define DHFLSHdll DHFLSHdll
+# define DIELECdll DIELECdll
+# define DOTFILLdll DOTFILLdll
+# define DPDD2dll DPDD2dll
+# define DPDDKdll DPDDKdll
+# define DPDDdll DPDDdll
+# define DPDTKdll DPDTKdll
+# define DPDTdll DPDTdll
+# define DPTSATKdll DPTSATKdll
+# define DSFLSHdll DSFLSHdll
+# define DSFL1dll DSFL1dll
+# define DSFL2dll DSFL2dll
+# define ENTHALdll ENTHALdll
+# define ENTROdll ENTROdll
+# define ESFLSHdll ESFLSHdll
+# define FGCTYdll FGCTYdll
+# define FPVdll FPVdll
+# define GERG04dll GERG04dll
+# define GETFIJdll GETFIJdll
+# define GETKTVdll GETKTVdll
+# define GIBBSdll GIBBSdll
+# define HSFLSHdll HSFLSHdll
+# define INFOdll INFOdll
+# define LIMITKdll LIMITKdll
+# define LIMITSdll LIMITSdll
+# define LIMITXdll LIMITXdll
+# define MELTPdll MELTPdll
+# define MELTTdll MELTTdll
+# define MLTH2Odll MLTH2Odll
+# define NAMEdll NAMEdll
+# define PDFL1dll PDFL1dll
+# define PDFLSHdll PDFLSHdll
+# define PEFLSHdll PEFLSHdll
+# define PHFL1dll PHFL1dll
+# define PHFLSHdll PHFLSHdll
+# define PQFLSHdll PQFLSHdll
+# define PREOSdll PREOSdll
+# define PRESSdll PRESSdll
+# define PSFL1dll PSFL1dll
+# define PSFLSHdll PSFLSHdll
+# define PUREFLDdll PUREFLDdll
+# define QMASSdll QMASSdll
+# define QMOLEdll QMOLEdll
+# define SATDdll SATDdll
+# define SATEdll SATEdll
+# define SATHdll SATHdll
+# define SATPdll SATPdll
+# define SATSdll SATSdll
+# define SATTdll SATTdll
+# define SETAGAdll SETAGAdll
+# define SETKTVdll SETKTVdll
+# define SETMIXdll SETMIXdll
+# define SETMODdll SETMODdll
+# define SETREFdll SETREFdll
+# define SETUPdll SETUPdll
+# define SPECGRdll SPECGRdll
+# define SUBLPdll SUBLPdll
+# define SUBLTdll SUBLTdll
+# define SURFTdll SURFTdll
+# define SURTENdll SURTENdll
+# define TDFLSHdll TDFLSHdll
+# define TEFLSHdll TEFLSHdll
+# define THERM0dll THERM0dll
+# define THERM2dll THERM2dll
+# define THERM3dll THERM3dll
+# define THERMdll THERMdll
+# define THFLSHdll THFLSHdll
+# define TPFLSHdll TPFLSHdll
+# define TPFL2dll TPFL2dll
+# define TPRHOdll TPRHOdll
+# define TQFLSHdll TQFLSHdll
+# define TRNPRPdll TRNPRPdll
+# define TSFLSHdll TSFLSHdll
+# define VIRBdll VIRBdll
+# define VIRCdll VIRCdll
+# define WMOLdll WMOLdll
+# define XMASSdll XMASSdll
# define XMOLEdll XMOLEdll
-#else
-# if !defined(_AIX) && !defined(__hpux)
-# define RPVersion rpversion_
-# define SETPATHdll setpathdll_
-# define ABFL1dll abfl1dll_
-# define ABFL2dll abfl2dll_
-# define ACTVYdll actvydll_
-# define AGdll agdll_
-# define CCRITdll ccritdll_
-# define CP0dll cp0dll_
-# define CRITPdll critpdll_
-# define CSATKdll csatkdll_
-# define CV2PKdll cv2pkdll_
-# define CVCPKdll cvcpkdll_
-# define CVCPdll cvcpdll_
-# define DBDTdll dbdtdll_
-# define DBFL1dll dbfl1dll_
-# define DBFL2dll dbfl2dll_
-# define DDDPdll dddpdll_
-# define DDDTdll dddtdll_
-# define DEFLSHdll deflshdll_
-# define DHD1dll dhd1dll_
-# define DHFL1dll dhfl1dll_
-# define DHFL2dll dhfl2dll_
-# define DHFLSHdll dhflshdll_
-# define DIELECdll dielecdll_
-# define DOTFILLdll dotfilldll_
-# define DPDD2dll dpdd2dll_
-# define DPDDKdll dpddkdll_
-# define DPDDdll dpdddll_
-# define DPDTKdll dpdtkdll_
-# define DPDTdll dpdtdll_
-# define DPTSATKdll dptsatkdll_
-# define DSFLSHdll dsflshdll_
-# define DSFL1dll dsfl1dll_
-# define DSFL2dll dsfl2dll_
-# define ENTHALdll enthaldll_
-# define ENTROdll entrodll_
-# define ESFLSHdll esflshdll_
-# define FGCTYdll fgctydll_
-# define FPVdll fpvdll_
-# define GERG04dll gerg04dll_
-# define GETFIJdll getfijdll_
-# define GETKTVdll getktvdll_
-# define GIBBSdll gibbsdll_
-# define HSFLSHdll hsflshdll_
-# define INFOdll infodll_
-# define LIMITKdll limitkdll_
-# define LIMITSdll limitsdll_
-# define LIMITXdll limitxdll_
-# define MELTPdll meltpdll_
-# define MELTTdll melttdll_
-# define MLTH2Odll mlth2odll_
-# define NAMEdll namedll_
-# define PDFL1dll pdfl1dll_
-# define PDFLSHdll pdflshdll_
-# define PEFLSHdll peflshdll_
-# define PHFL1dll phfl1dll_
-# define PHFLSHdll phflshdll_
-# define PQFLSHdll pqflshdll_
-# define PREOSdll preosdll_
-# define PRESSdll pressdll_
-# define PSFL1dll psfl1dll_
-# define PSFLSHdll psflshdll_
-# define PUREFLDdll pureflddll_
-# define QMASSdll qmassdll_
-# define QMOLEdll qmoledll_
-# define SATDdll satddll_
-# define SATEdll satedll_
-# define SATHdll sathdll_
-# define SATPdll satpdll_
-# define SATSdll satsdll_
-# define SATTdll sattdll_
-# define SETAGAdll setagadll_
-# define SETKTVdll setktvdll_
-# define SETMIXdll setmixdll_
-# define SETMODdll setmoddll_
-# define SETREFdll setrefdll_
-# define SETUPdll setupdll_
-# define SPECGRdll specgrdll_
-# define SUBLPdll sublpdll_
-# define SUBLTdll subltdll_
-# define SURFTdll surftdll_
-# define SURTENdll surtendll_
-# define TDFLSHdll tdflshdll_
-# define TEFLSHdll teflshdll_
-# define THERM0dll therm0dll_
-# define THERM2dll therm2dll_
-# define THERM3dll therm3dll_
-# define THERMdll thermdll_
-# define THFLSHdll thflshdll_
-# define TPFLSHdll tpflshdll_
-# define TPFL2dll tpfl2dll_
-# define TPRHOdll tprhodll_
-# define TQFLSHdll tqflshdll_
-# define TRNPRPdll trnprpdll_
-# define TSFLSHdll tsflshdll_
-# define VIRBdll virbdll_
-# define VIRCdll vircdll_
-# define WMOLdll wmoldll_
-# define XMASSdll xmassdll_
-# define XMOLEdll xmoledll_
-# endif
-# define _fcd char *
-# define _cptofcd(a,b) (a)
-# define _fcdlen(a) strlen(a)
-#endif
-#endif
+#else // defined(WIN32) || defined(_WIN32)
+// Define compiler specific calling conventions
+// for the shared library.
+# define LIBRARY_API
+// Define function names for the shared library,
+// in this case it is the librefprop.so and the
+// names might change on some systems during
+// the compilation of the Fortran files.
+# ifdef _CRAY
+# include
+# define RPVersion RPVERSION
+# define SETPATHdll SETPATHDLL
+# define ABFL1dll ABFL1DLL
+# define ABFL2dll ABFL2DLL
+# define ACTVYdll ACTVYDLL
+# define AGdll AGDLL
+# define CCRITdll CCRITDLL
+# define CP0dll CP0DLL
+# define CRITPdll CRITPDLL
+# define CSATKdll CSATKDLL
+# define CV2PKdll CV2PKDLL
+# define CVCPKdll CVCPKDLL
+# define CVCPdll CVCPDLL
+# define DBDTdll DBDTDLL
+# define DBFL1dll DBFL1DLL
+# define DBFL2dll DBFL2DLL
+# define DDDPdll DDDPDLL
+# define DDDTdll DDDTDLL
+# define DEFLSHdll DEFLSHDLL
+# define DHD1dll DHD1DLL
+# define DHFL1dll DHFL1DLL
+# define DHFL2dll DHFL2DLL
+# define DHFLSHdll DHFLSHDLL
+# define DIELECdll DIELECDLL
+# define DOTFILLdll DOTFILLDLL
+# define DPDD2dll DPDD2DLL
+# define DPDDKdll DPDDKDLL
+# define DPDDdll DPDDDLL
+# define DPDTKdll DPDTKDLL
+# define DPDTdll DPDTDLL
+# define DPTSATKdll DPTSATKDLL
+# define DSFLSHdll DSFLSHDLL
+# define DSFL1dll DSFL1DLL
+# define DSFL2dll DSFL2DLL
+# define ENTHALdll ENTHALDLL
+# define ENTROdll ENTRODLL
+# define ESFLSHdll ESFLSHDLL
+# define FGCTYdll FGCTYDLL
+# define FPVdll FPVDLL
+# define GERG04dll GERG04DLL
+# define GETFIJdll GETFIJDLL
+# define GETKTVdll GETKTVDLL
+# define GIBBSdll GIBBSDLL
+# define HSFLSHdll HSFLSHDLL
+# define INFOdll INFODLL
+# define LIMITKdll LIMITKDLL
+# define LIMITSdll LIMITSDLL
+# define LIMITXdll LIMITXDLL
+# define MELTPdll MELTPDLL
+# define MELTTdll MELTTDLL
+# define MLTH2Odll MLTH2ODLL
+# define NAMEdll NAMEDLL
+# define PDFL1dll PDFL1DLL
+# define PDFLSHdll PDFLSHDLL
+# define PEFLSHdll PEFLSHDLL
+# define PHFL1dll PHFL1DLL
+# define PHFLSHdll PHFLSHDLL
+# define PQFLSHdll PQFLSHDLL
+# define PREOSdll PREOSDLL
+# define PRESSdll PRESSDLL
+# define PSFL1dll PSFL1DLL
+# define PSFLSHdll PSFLSHDLL
+# define PUREFLDdll PUREFLDDLL
+# define QMASSdll QMASSDLL
+# define QMOLEdll QMOLEDLL
+# define SATDdll SATDDLL
+# define SATEdll SATEDLL
+# define SATHdll SATHDLL
+# define SATPdll SATPDLL
+# define SATSdll SATSDLL
+# define SATTdll SATTDLL
+# define SETAGAdll SETAGADLL
+# define SETKTVdll SETKTVDLL
+# define SETMIXdll SETMIXDLL
+# define SETMODdll SETMODDLL
+# define SETREFdll SETREFDLL
+# define SETUPdll SETUPDLL
+# define SPECGRdll SPECGRDLL
+# define SUBLPdll SUBLPDLL
+# define SUBLTdll SUBLTDLL
+# define SURFTdll SURFTDLL
+# define SURTENdll SURTENDLL
+# define TDFLSHdll TDFLSHDLL
+# define TEFLSHdll TEFLSHDLL
+# define THERM0dll THERM0DLL
+# define THERM2dll THERM2DLL
+# define THERM3dll THERM3DLL
+# define THERMdll THERMDLL
+# define THFLSHdll THFLSHDLL
+# define TPFLSHdll TPFLSHDLL
+# define TPFL2dll TPFL2DLL
+# define TPRHOdll TPRHODLL
+# define TQFLSHdll TQFLSHDLL
+# define TRNPRPdll TRNPRPDLL
+# define TSFLSHdll TSFLSHDLL
+# define VIRBdll VIRBDLL
+# define VIRCdll VIRCDLL
+# define WMOLdll WMOLDLL
+# define XMASSdll XMASSDLL
+# define XMOLEdll XMOLEDLL
+# else // _CRAY not defined
+# if !defined(_AIX) && !defined(__hpux)
+# define RPVersion rpversion_
+# define SETPATHdll setpathdll_
+# define ABFL1dll abfl1dll_
+# define ABFL2dll abfl2dll_
+# define ACTVYdll actvydll_
+# define AGdll agdll_
+# define CCRITdll ccritdll_
+# define CP0dll cp0dll_
+# define CRITPdll critpdll_
+# define CSATKdll csatkdll_
+# define CV2PKdll cv2pkdll_
+# define CVCPKdll cvcpkdll_
+# define CVCPdll cvcpdll_
+# define DBDTdll dbdtdll_
+# define DBFL1dll dbfl1dll_
+# define DBFL2dll dbfl2dll_
+# define DDDPdll dddpdll_
+# define DDDTdll dddtdll_
+# define DEFLSHdll deflshdll_
+# define DHD1dll dhd1dll_
+# define DHFL1dll dhfl1dll_
+# define DHFL2dll dhfl2dll_
+# define DHFLSHdll dhflshdll_
+# define DIELECdll dielecdll_
+# define DOTFILLdll dotfilldll_
+# define DPDD2dll dpdd2dll_
+# define DPDDKdll dpddkdll_
+# define DPDDdll dpdddll_
+# define DPDTKdll dpdtkdll_
+# define DPDTdll dpdtdll_
+# define DPTSATKdll dptsatkdll_
+# define DSFLSHdll dsflshdll_
+# define DSFL1dll dsfl1dll_
+# define DSFL2dll dsfl2dll_
+# define ENTHALdll enthaldll_
+# define ENTROdll entrodll_
+# define ESFLSHdll esflshdll_
+# define FGCTYdll fgctydll_
+# define FPVdll fpvdll_
+# define GERG04dll gerg04dll_
+# define GETFIJdll getfijdll_
+# define GETKTVdll getktvdll_
+# define GIBBSdll gibbsdll_
+# define HSFLSHdll hsflshdll_
+# define INFOdll infodll_
+# define LIMITKdll limitkdll_
+# define LIMITSdll limitsdll_
+# define LIMITXdll limitxdll_
+# define MELTPdll meltpdll_
+# define MELTTdll melttdll_
+# define MLTH2Odll mlth2odll_
+# define NAMEdll namedll_
+# define PDFL1dll pdfl1dll_
+# define PDFLSHdll pdflshdll_
+# define PEFLSHdll peflshdll_
+# define PHFL1dll phfl1dll_
+# define PHFLSHdll phflshdll_
+# define PQFLSHdll pqflshdll_
+# define PREOSdll preosdll_
+# define PRESSdll pressdll_
+# define PSFL1dll psfl1dll_
+# define PSFLSHdll psflshdll_
+# define PUREFLDdll pureflddll_
+# define QMASSdll qmassdll_
+# define QMOLEdll qmoledll_
+# define SATDdll satddll_
+# define SATEdll satedll_
+# define SATHdll sathdll_
+# define SATPdll satpdll_
+# define SATSdll satsdll_
+# define SATTdll sattdll_
+# define SETAGAdll setagadll_
+# define SETKTVdll setktvdll_
+# define SETMIXdll setmixdll_
+# define SETMODdll setmoddll_
+# define SETREFdll setrefdll_
+# define SETUPdll setupdll_
+# define SPECGRdll specgrdll_
+# define SUBLPdll sublpdll_
+# define SUBLTdll subltdll_
+# define SURFTdll surftdll_
+# define SURTENdll surtendll_
+# define TDFLSHdll tdflshdll_
+# define TEFLSHdll teflshdll_
+# define THERM0dll therm0dll_
+# define THERM2dll therm2dll_
+# define THERM3dll therm3dll_
+# define THERMdll thermdll_
+# define THFLSHdll thflshdll_
+# define TPFLSHdll tpflshdll_
+# define TPFL2dll tpfl2dll_
+# define TPRHOdll tprhodll_
+# define TQFLSHdll tqflshdll_
+# define TRNPRPdll trnprpdll_
+# define TSFLSHdll tsflshdll_
+# define VIRBdll virbdll_
+# define VIRCdll vircdll_
+# define WMOLdll wmoldll_
+# define XMASSdll xmassdll_
+# define XMOLEdll xmoledll_
+# endif // !defined(_AIX) && !defined(__hpux)
+# endif // _CRAY not defined, else branch
+#endif // defined(WIN32) || defined(_WIN32), else branch
+
+
+// define new macros for function names
+// http://stackoverflow.com/questions/195975/how-to-make-a-char-string-from-a-c-macros-value
+#define STR_VALUE(arg) #arg
+#define FUNCTION_NAME(name) STR_VALUE(name)
+//#define TEST_FUNC test_func
+//#define TEST_FUNC_NAME FUNCTION_NAME(TEST_FUNC)
+
+#define RPVersion_NAME FUNCTION_NAME(RPVersion)
+#define SETPATHdll_NAME FUNCTION_NAME(SETPATHdll)
+#define ABFL1dll_NAME FUNCTION_NAME(ABFL1dll)
+#define ABFL2dll_NAME FUNCTION_NAME(ABFL2dll)
+#define ACTVYdll_NAME FUNCTION_NAME(ACTVYdll)
+#define AGdll_NAME FUNCTION_NAME(AGdll)
+#define CCRITdll_NAME FUNCTION_NAME(CCRITdll)
+#define CP0dll_NAME FUNCTION_NAME(CP0dll)
+#define CRITPdll_NAME FUNCTION_NAME(CRITPdll)
+#define CSATKdll_NAME FUNCTION_NAME(CSATKdll)
+#define CV2PKdll_NAME FUNCTION_NAME(CV2PKdll)
+#define CVCPKdll_NAME FUNCTION_NAME(CVCPKdll)
+#define CVCPdll_NAME FUNCTION_NAME(CVCPdll)
+#define DBDTdll_NAME FUNCTION_NAME(DBDTdll)
+#define DBFL1dll_NAME FUNCTION_NAME(DBFL1dll)
+#define DBFL2dll_NAME FUNCTION_NAME(DBFL2dll)
+#define DDDPdll_NAME FUNCTION_NAME(DDDPdll)
+#define DDDTdll_NAME FUNCTION_NAME(DDDTdll)
+#define DEFLSHdll_NAME FUNCTION_NAME(DEFLSHdll)
+#define DHD1dll_NAME FUNCTION_NAME(DHD1dll)
+#define DHFL1dll_NAME FUNCTION_NAME(DHFL1dll)
+#define DHFL2dll_NAME FUNCTION_NAME(DHFL2dll)
+#define DHFLSHdll_NAME FUNCTION_NAME(DHFLSHdll)
+#define DIELECdll_NAME FUNCTION_NAME(DIELECdll)
+#define DOTFILLdll_NAME FUNCTION_NAME(DOTFILLdll)
+#define DPDD2dll_NAME FUNCTION_NAME(DPDD2dll)
+#define DPDDKdll_NAME FUNCTION_NAME(DPDDKdll)
+#define DPDDdll_NAME FUNCTION_NAME(DPDDdll)
+#define DPDTKdll_NAME FUNCTION_NAME(DPDTKdll)
+#define DPDTdll_NAME FUNCTION_NAME(DPDTdll)
+#define DPTSATKdll_NAME FUNCTION_NAME(DPTSATKdll)
+#define DSFLSHdll_NAME FUNCTION_NAME(DSFLSHdll)
+#define DSFL1dll_NAME FUNCTION_NAME(DSFL1dll)
+#define DSFL2dll_NAME FUNCTION_NAME(DSFL2dll)
+#define ENTHALdll_NAME FUNCTION_NAME(ENTHALdll)
+#define ENTROdll_NAME FUNCTION_NAME(ENTROdll)
+#define ESFLSHdll_NAME FUNCTION_NAME(ESFLSHdll)
+#define FGCTYdll_NAME FUNCTION_NAME(FGCTYdll)
+#define FPVdll_NAME FUNCTION_NAME(FPVdll)
+#define GERG04dll_NAME FUNCTION_NAME(GERG04dll)
+#define GETFIJdll_NAME FUNCTION_NAME(GETFIJdll)
+#define GETKTVdll_NAME FUNCTION_NAME(GETKTVdll)
+#define GIBBSdll_NAME FUNCTION_NAME(GIBBSdll)
+#define HSFLSHdll_NAME FUNCTION_NAME(HSFLSHdll)
+#define INFOdll_NAME FUNCTION_NAME(INFOdll)
+#define LIMITKdll_NAME FUNCTION_NAME(LIMITKdll)
+#define LIMITSdll_NAME FUNCTION_NAME(LIMITSdll)
+#define LIMITXdll_NAME FUNCTION_NAME(LIMITXdll)
+#define MELTPdll_NAME FUNCTION_NAME(MELTPdll)
+#define MELTTdll_NAME FUNCTION_NAME(MELTTdll)
+#define MLTH2Odll_NAME FUNCTION_NAME(MLTH2Odll)
+#define NAMEdll_NAME FUNCTION_NAME(NAMEdll)
+#define PDFL1dll_NAME FUNCTION_NAME(PDFL1dll)
+#define PDFLSHdll_NAME FUNCTION_NAME(PDFLSHdll)
+#define PEFLSHdll_NAME FUNCTION_NAME(PEFLSHdll)
+#define PHFL1dll_NAME FUNCTION_NAME(PHFL1dll)
+#define PHFLSHdll_NAME FUNCTION_NAME(PHFLSHdll)
+#define PQFLSHdll_NAME FUNCTION_NAME(PQFLSHdll)
+#define PREOSdll_NAME FUNCTION_NAME(PREOSdll)
+#define PRESSdll_NAME FUNCTION_NAME(PRESSdll)
+#define PSFL1dll_NAME FUNCTION_NAME(PSFL1dll)
+#define PSFLSHdll_NAME FUNCTION_NAME(PSFLSHdll)
+#define PUREFLDdll_NAME FUNCTION_NAME(PUREFLDdll)
+#define QMASSdll_NAME FUNCTION_NAME(QMASSdll)
+#define QMOLEdll_NAME FUNCTION_NAME(QMOLEdll)
+#define SATDdll_NAME FUNCTION_NAME(SATDdll)
+#define SATEdll_NAME FUNCTION_NAME(SATEdll)
+#define SATHdll_NAME FUNCTION_NAME(SATHdll)
+#define SATPdll_NAME FUNCTION_NAME(SATPdll)
+#define SATSdll_NAME FUNCTION_NAME(SATSdll)
+#define SATTdll_NAME FUNCTION_NAME(SATTdll)
+#define SETAGAdll_NAME FUNCTION_NAME(SETAGAdll)
+#define SETKTVdll_NAME FUNCTION_NAME(SETKTVdll)
+#define SETMIXdll_NAME FUNCTION_NAME(SETMIXdll)
+#define SETMODdll_NAME FUNCTION_NAME(SETMODdll)
+#define SETREFdll_NAME FUNCTION_NAME(SETREFdll)
+#define SETUPdll_NAME FUNCTION_NAME(SETUPdll)
+#define SPECGRdll_NAME FUNCTION_NAME(SPECGRdll)
+#define SUBLPdll_NAME FUNCTION_NAME(SUBLPdll)
+#define SUBLTdll_NAME FUNCTION_NAME(SUBLTdll)
+#define SURFTdll_NAME FUNCTION_NAME(SURFTdll)
+#define SURTENdll_NAME FUNCTION_NAME(SURTENdll)
+#define TDFLSHdll_NAME FUNCTION_NAME(TDFLSHdll)
+#define TEFLSHdll_NAME FUNCTION_NAME(TEFLSHdll)
+#define THERM0dll_NAME FUNCTION_NAME(THERM0dll)
+#define THERM2dll_NAME FUNCTION_NAME(THERM2dll)
+#define THERM3dll_NAME FUNCTION_NAME(THERM3dll)
+#define THERMdll_NAME FUNCTION_NAME(THERMdll)
+#define THFLSHdll_NAME FUNCTION_NAME(THFLSHdll)
+#define TPFLSHdll_NAME FUNCTION_NAME(TPFLSHdll)
+#define TPFL2dll_NAME FUNCTION_NAME(TPFL2dll)
+#define TPRHOdll_NAME FUNCTION_NAME(TPRHOdll)
+#define TQFLSHdll_NAME FUNCTION_NAME(TQFLSHdll)
+#define TRNPRPdll_NAME FUNCTION_NAME(TRNPRPdll)
+#define TSFLSHdll_NAME FUNCTION_NAME(TSFLSHdll)
+#define VIRBdll_NAME FUNCTION_NAME(VIRBdll)
+#define VIRCdll_NAME FUNCTION_NAME(VIRCdll)
+#define WMOLdll_NAME FUNCTION_NAME(WMOLdll)
+#define XMASSdll_NAME FUNCTION_NAME(XMASSdll)
+#define XMOLEdll_NAME FUNCTION_NAME(XMOLEdll)
+
// I'll try to follow this example from:
// http://www.gershnik.com/tips/cpp.asp
@@ -244,552 +463,317 @@ typedef int LOGICAL;
#ifdef __cplusplus
extern "C" {
#endif
+ // extra function for setup
+ typedef void (LIBRARY_API RPVersion_TYPE )( char* );
+ typedef void (LIBRARY_API SETPATHdll_TYPE)( const char* );
+ //
+ typedef void (LIBRARY_API ABFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API ABFL2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API ACTVYdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API AGdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API CCRITdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API CP0dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API CRITPdll_TYPE)(DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API CSATKdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API CV2PKdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API CVCPKdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API CVCPdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DBDTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DBFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DBFL2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DDDPdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DDDTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DEFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DHD1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DHFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+ typedef void (LIBRARY_API DHFL2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+ typedef void (LIBRARY_API DHFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DIELECdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DOTFILLdll_TYPE)(INTEGER &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DPDD2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DPDDKdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DPDDdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DPDTKdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DPDTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API DPTSATKdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DSFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API DSFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+ typedef void (LIBRARY_API DSFL2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+ typedef void (LIBRARY_API ENTHALdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API ENTROdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API ESFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API FGCTYdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *);
+ typedef void (LIBRARY_API FPVdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API GERG04dll_TYPE)(INTEGER &,INTEGER &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API GETFIJdll_TYPE)(char*,DOUBLE_PRECISION *,char*,char*,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API GETKTVdll_TYPE)(INTEGER &,INTEGER &,char*,DOUBLE_PRECISION *,char*,char*,char*,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API GIBBSdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API HSFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API INFOdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API LIMITKdll_TYPE)(char*,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API LIMITSdll_TYPE)(char*,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER );
+ typedef void (LIBRARY_API LIMITXdll_TYPE)(char*,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API MELTPdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API MELTTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API MLTH2Odll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API NAMEdll_TYPE)(INTEGER &,char*,char*,char*,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API PDFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PDFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PEFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PHFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PHFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PQFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PREOSdll_TYPE)(INTEGER &);
+ typedef void (LIBRARY_API PRESSdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API PSFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PSFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API PUREFLDdll_TYPE)(INTEGER &);
+ typedef void (LIBRARY_API QMASSdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API QMOLEdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SATDdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SATEdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SATHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SATPdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SATSdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SATTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SETAGAdll_TYPE)(INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SETKTVdll_TYPE)(INTEGER &,INTEGER &,char*,DOUBLE_PRECISION *,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API SETMIXdll_TYPE)(char*,char*,char*,INTEGER &,char*,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API SETMODdll_TYPE)(INTEGER &,char*,char*,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API SETREFdll_TYPE)(char*,INTEGER &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
+ //typedef void (LIBRARY_API SETUPdll_TYPE)(INTEGER &,char*,char*,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER );
+ typedef void (LIBRARY_API SETUPdll_TYPE)(INTEGER &,char*,char*,char*,INTEGER &,char*);
+ typedef void (LIBRARY_API SPECGRdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API SUBLPdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SUBLTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SURFTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API SURTENdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TDFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TEFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API THERM0dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API THERM2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API THERM3dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API THERMdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API THFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TPFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TPFL2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
+ typedef void (LIBRARY_API TPRHOdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TQFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TRNPRPdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API TSFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
+ typedef void (LIBRARY_API VIRBdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API VIRCdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API WMOLdll_TYPE)(DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API XMASSdll_TYPE)(DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
+ typedef void (LIBRARY_API XMOLEdll_TYPE)(DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- // pattern to follow: typedef void [compiler specific stuff] func_t(int, float);
-
- // extra function for setup
- typedef void (LIBRARY_API RPVersion_t )( char* );
- typedef void (LIBRARY_API SETPATHdll_t)( const char* );
- //
- typedef void (LIBRARY_API ABFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API ABFL2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API ACTVYdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API AGdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API CCRITdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API CP0dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API CRITPdll_t)(DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API CSATKdll_t)(INTEGER &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API CV2PKdll_t)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API CVCPKdll_t)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API CVCPdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DBDTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DBFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DBFL2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DDDPdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DDDTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DEFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DHD1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DHFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
- typedef void (LIBRARY_API DHFL2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
- typedef void (LIBRARY_API DHFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DIELECdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DOTFILLdll_t)(INTEGER &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DPDD2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DPDDKdll_t)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DPDDdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DPDTKdll_t)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DPDTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DPTSATKdll_t)(INTEGER &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DSFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DSFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
- typedef void (LIBRARY_API DSFL2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
- typedef void (LIBRARY_API ENTHALdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API ENTROdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API ESFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API FGCTYdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *);
- typedef void (LIBRARY_API FPVdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API GERG04dll_t)(INTEGER &,INTEGER &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API GETFIJdll_t)(char*,DOUBLE_PRECISION *,char*,char*,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API GETKTVdll_t)(INTEGER &,INTEGER &,char*,DOUBLE_PRECISION *,char*,char*,char*,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API GIBBSdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API HSFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API INFOdll_t)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API LIMITKdll_t)(char*,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
- typedef void (LIBRARY_API LIMITSdll_t)(char*,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER );
- typedef void (LIBRARY_API LIMITXdll_t)(char*,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
- typedef void (LIBRARY_API MELTPdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API MELTTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API MLTH2Odll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API NAMEdll_t)(INTEGER &,char*,char*,char*,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API PDFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PDFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PEFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PHFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PHFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PQFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PREOSdll_t)(INTEGER &);
- typedef void (LIBRARY_API PRESSdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API PSFL1dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PSFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PUREFLDdll_t)(INTEGER &);
- typedef void (LIBRARY_API QMASSdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API QMOLEdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SATDdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SATEdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SATHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SATPdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SATSdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SATTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SETAGAdll_t)(INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SETKTVdll_t)(INTEGER &,INTEGER &,char*,DOUBLE_PRECISION *,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API SETMIXdll_t)(char*,char*,char*,INTEGER &,char*,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API SETMODdll_t)(INTEGER &,char*,char*,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API SETREFdll_t)(char*,INTEGER &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
- //typedef void (LIBRARY_API SETUPdll_t)(INTEGER &,char*,char*,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API SETUPdll_t)(INTEGER &,char*,char*,char*,INTEGER &,char*);
- typedef void (LIBRARY_API SPECGRdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API SUBLPdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SUBLTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SURFTdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SURTENdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TDFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TEFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API THERM0dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API THERM2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API THERM3dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API THERMdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API THFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TPFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TPFL2dll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
- typedef void (LIBRARY_API TPRHOdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TQFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TRNPRPdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TSFLSHdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API VIRBdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API VIRCdll_t)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API WMOLdll_t)(DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API XMASSdll_t)(DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API XMOLEdll_t)(DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-
-
- //Declare the functions
- RPVersion_t RPVersion;
- SETPATHdll_t SETPATHdll;
- ABFL1dll_t ABFL1dll;
- ABFL2dll_t ABFL2dll;
- ACTVYdll_t ACTVYdll;
- AGdll_t AGdll;
- CCRITdll_t CCRITdll;
- CP0dll_t CP0dll;
- CRITPdll_t CRITPdll;
- CSATKdll_t CSATKdll;
- CV2PKdll_t CV2PKdll;
- CVCPKdll_t CVCPKdll;
- CVCPdll_t CVCPdll;
- DBDTdll_t DBDTdll;
- DBFL1dll_t DBFL1dll;
- DBFL2dll_t DBFL2dll;
- DDDPdll_t DDDPdll;
- DDDTdll_t DDDTdll;
- DEFLSHdll_t DEFLSHdll;
- DHD1dll_t DHD1dll;
- DHFLSHdll_t DHFLSHdll;
- DHFL1dll_t DHFL1dll;
- DHFL2dll_t DHFL2dll;
- DIELECdll_t DIELECdll;
- DOTFILLdll_t DOTFILLdll;
- DPDD2dll_t DPDD2dll;
- DPDDKdll_t DPDDKdll;
- DPDDdll_t DPDDdll;
- DPDTKdll_t DPDTKdll;
- DPDTdll_t DPDTdll;
- DPTSATKdll_t DPTSATKdll;
- DSFLSHdll_t DSFLSHdll;
- DSFL1dll_t DSFL1dll;
- DSFL2dll_t DSFL2dll;
- ENTHALdll_t ENTHALdll;
- ENTROdll_t ENTROdll;
- ESFLSHdll_t ESFLSHdll;
- FGCTYdll_t FGCTYdll;
- FPVdll_t FPVdll;
- GERG04dll_t GERG04dll;
- GETFIJdll_t GETFIJdll;
- GETKTVdll_t GETKTVdll;
- GIBBSdll_t GIBBSdll;
- HSFLSHdll_t HSFLSHdll;
- INFOdll_t INFOdll;
- LIMITKdll_t LIMITKdll;
- LIMITSdll_t LIMITSdll;
- LIMITXdll_t LIMITXdll;
- MELTPdll_t MELTPdll;
- MELTTdll_t MELTTdll;
- MLTH2Odll_t MLTH2Odll;
- NAMEdll_t NAMEdll;
- PDFL1dll_t PDFL1dll;
- PDFLSHdll_t PDFLSHdll;
- PEFLSHdll_t PEFLSHdll;
- PHFL1dll_t PHFL1dll;
- PHFLSHdll_t PHFLSHdll;
- PQFLSHdll_t PQFLSHdll;
- PREOSdll_t PREOSdll;
- PRESSdll_t PRESSdll;
- PSFL1dll_t PSFL1dll;
- PSFLSHdll_t PSFLSHdll;
- PUREFLDdll_t PUREFLDdll;
- QMASSdll_t QMASSdll;
- QMOLEdll_t QMOLEdll;
- SATDdll_t SATDdll;
- SATEdll_t SATEdll;
- SATHdll_t SATHdll;
- SATPdll_t SATPdll;
- SATSdll_t SATSdll;
- SATTdll_t SATTdll;
- SETAGAdll_t SETAGAdll;
- SETKTVdll_t SETKTVdll;
- SETMIXdll_t SETMIXdll;
- SETMODdll_t SETMODdll;
- SETREFdll_t SETREFdll;
- SETUPdll_t SETUPdll;
- SPECGRdll_t SPECGRdll;
- SUBLPdll_t SUBLPdll;
- SUBLTdll_t SUBLTdll;
- SURFTdll_t SURFTdll;
- SURTENdll_t SURTENdll;
- TDFLSHdll_t TDFLSHdll;
- TEFLSHdll_t TEFLSHdll;
- THERM0dll_t THERM0dll;
- THERM2dll_t THERM2dll;
- THERM3dll_t THERM3dll;
- THERMdll_t THERMdll;
- THFLSHdll_t THFLSHdll;
- TPFLSHdll_t TPFLSHdll;
- TPFL2dll_t TPFL2dll;
- TPRHOdll_t TPRHOdll;
- TQFLSHdll_t TQFLSHdll;
- TRNPRPdll_t TRNPRPdll;
- TSFLSHdll_t TSFLSHdll;
- VIRBdll_t VIRBdll;
- VIRCdll_t VIRCdll;
- WMOLdll_t WMOLdll;
- XMASSdll_t XMASSdll;
- XMOLEdll_t XMOLEdll;
+ //Declare the functions for direct access
+ RPVersion_TYPE RPVersion;
+ SETPATHdll_TYPE SETPATHdll;
+ ABFL1dll_TYPE ABFL1dll;
+ ABFL2dll_TYPE ABFL2dll;
+ ACTVYdll_TYPE ACTVYdll;
+ AGdll_TYPE AGdll;
+ CCRITdll_TYPE CCRITdll;
+ CP0dll_TYPE CP0dll;
+ CRITPdll_TYPE CRITPdll;
+ CSATKdll_TYPE CSATKdll;
+ CV2PKdll_TYPE CV2PKdll;
+ CVCPKdll_TYPE CVCPKdll;
+ CVCPdll_TYPE CVCPdll;
+ DBDTdll_TYPE DBDTdll;
+ DBFL1dll_TYPE DBFL1dll;
+ DBFL2dll_TYPE DBFL2dll;
+ DDDPdll_TYPE DDDPdll;
+ DDDTdll_TYPE DDDTdll;
+ DEFLSHdll_TYPE DEFLSHdll;
+ DHD1dll_TYPE DHD1dll;
+ DHFLSHdll_TYPE DHFLSHdll;
+ DHFL1dll_TYPE DHFL1dll;
+ DHFL2dll_TYPE DHFL2dll;
+ DIELECdll_TYPE DIELECdll;
+ DOTFILLdll_TYPE DOTFILLdll;
+ DPDD2dll_TYPE DPDD2dll;
+ DPDDKdll_TYPE DPDDKdll;
+ DPDDdll_TYPE DPDDdll;
+ DPDTKdll_TYPE DPDTKdll;
+ DPDTdll_TYPE DPDTdll;
+ DPTSATKdll_TYPE DPTSATKdll;
+ DSFLSHdll_TYPE DSFLSHdll;
+ DSFL1dll_TYPE DSFL1dll;
+ DSFL2dll_TYPE DSFL2dll;
+ ENTHALdll_TYPE ENTHALdll;
+ ENTROdll_TYPE ENTROdll;
+ ESFLSHdll_TYPE ESFLSHdll;
+ FGCTYdll_TYPE FGCTYdll;
+ FPVdll_TYPE FPVdll;
+ GERG04dll_TYPE GERG04dll;
+ GETFIJdll_TYPE GETFIJdll;
+ GETKTVdll_TYPE GETKTVdll;
+ GIBBSdll_TYPE GIBBSdll;
+ HSFLSHdll_TYPE HSFLSHdll;
+ INFOdll_TYPE INFOdll;
+ LIMITKdll_TYPE LIMITKdll;
+ LIMITSdll_TYPE LIMITSdll;
+ LIMITXdll_TYPE LIMITXdll;
+ MELTPdll_TYPE MELTPdll;
+ MELTTdll_TYPE MELTTdll;
+ MLTH2Odll_TYPE MLTH2Odll;
+ NAMEdll_TYPE NAMEdll;
+ PDFL1dll_TYPE PDFL1dll;
+ PDFLSHdll_TYPE PDFLSHdll;
+ PEFLSHdll_TYPE PEFLSHdll;
+ PHFL1dll_TYPE PHFL1dll;
+ PHFLSHdll_TYPE PHFLSHdll;
+ PQFLSHdll_TYPE PQFLSHdll;
+ PREOSdll_TYPE PREOSdll;
+ PRESSdll_TYPE PRESSdll;
+ PSFL1dll_TYPE PSFL1dll;
+ PSFLSHdll_TYPE PSFLSHdll;
+ PUREFLDdll_TYPE PUREFLDdll;
+ QMASSdll_TYPE QMASSdll;
+ QMOLEdll_TYPE QMOLEdll;
+ SATDdll_TYPE SATDdll;
+ SATEdll_TYPE SATEdll;
+ SATHdll_TYPE SATHdll;
+ SATPdll_TYPE SATPdll;
+ SATSdll_TYPE SATSdll;
+ SATTdll_TYPE SATTdll;
+ SETAGAdll_TYPE SETAGAdll;
+ SETKTVdll_TYPE SETKTVdll;
+ SETMIXdll_TYPE SETMIXdll;
+ SETMODdll_TYPE SETMODdll;
+ SETREFdll_TYPE SETREFdll;
+ SETUPdll_TYPE SETUPdll;
+ SPECGRdll_TYPE SPECGRdll;
+ SUBLPdll_TYPE SUBLPdll;
+ SUBLTdll_TYPE SUBLTdll;
+ SURFTdll_TYPE SURFTdll;
+ SURTENdll_TYPE SURTENdll;
+ TDFLSHdll_TYPE TDFLSHdll;
+ TEFLSHdll_TYPE TEFLSHdll;
+ THERM0dll_TYPE THERM0dll;
+ THERM2dll_TYPE THERM2dll;
+ THERM3dll_TYPE THERM3dll;
+ THERMdll_TYPE THERMdll;
+ THFLSHdll_TYPE THFLSHdll;
+ TPFLSHdll_TYPE TPFLSHdll;
+ TPFL2dll_TYPE TPFL2dll;
+ TPRHOdll_TYPE TPRHOdll;
+ TQFLSHdll_TYPE TQFLSHdll;
+ TRNPRPdll_TYPE TRNPRPdll;
+ TSFLSHdll_TYPE TSFLSHdll;
+ VIRBdll_TYPE VIRBdll;
+ VIRCdll_TYPE VIRCdll;
+ WMOLdll_TYPE WMOLdll;
+ XMASSdll_TYPE XMASSdll;
+ XMOLEdll_TYPE XMOLEdll;
- //Define explicit function pointers
- typedef RPVersion_t * RPVersion_ptr;
- typedef SETPATHdll_t * SETPATHdll_ptr;
- typedef ABFL1dll_t * ABFL1dll_ptr;
- typedef ABFL2dll_t * ABFL2dll_ptr;
- typedef ACTVYdll_t * ACTVYdll_ptr;
- typedef AGdll_t * AGdll_ptr;
- typedef CCRITdll_t * CCRITdll_ptr;
- typedef CP0dll_t * CP0dll_ptr;
- typedef CRITPdll_t * CRITPdll_ptr;
- typedef CSATKdll_t * CSATKdll_ptr;
- typedef CV2PKdll_t * CV2PKdll_ptr;
- typedef CVCPKdll_t * CVCPKdll_ptr;
- typedef CVCPdll_t * CVCPdll_ptr;
- typedef DBDTdll_t * DBDTdll_ptr;
- typedef DBFL1dll_t * DBFL1dll_ptr;
- typedef DBFL2dll_t * DBFL2dll_ptr;
- typedef DDDPdll_t * DDDPdll_ptr;
- typedef DDDTdll_t * DDDTdll_ptr;
- typedef DEFLSHdll_t * DEFLSHdll_ptr;
- typedef DHD1dll_t * DHD1dll_ptr;
- typedef DHFLSHdll_t * DHFLSHdll_ptr;
- typedef DHFL1dll_t * DHFL1dll_ptr;
- typedef DHFL2dll_t * DHFL2dll_ptr;
- typedef DIELECdll_t * DIELECdll_ptr;
- typedef DOTFILLdll_t * DOTFILLdll_ptr;
- typedef DPDD2dll_t * DPDD2dll_ptr;
- typedef DPDDKdll_t * DPDDKdll_ptr;
- typedef DPDDdll_t * DPDDdll_ptr;
- typedef DPDTKdll_t * DPDTKdll_ptr;
- typedef DPDTdll_t * DPDTdll_ptr;
- typedef DPTSATKdll_t * DPTSATKdll_ptr;
- typedef DSFLSHdll_t * DSFLSHdll_ptr;
- typedef DSFL1dll_t * DSFL1dll_ptr;
- typedef DSFL2dll_t * DSFL2dll_ptr;
- typedef ENTHALdll_t * ENTHALdll_ptr;
- typedef ENTROdll_t * ENTROdll_ptr;
- typedef ESFLSHdll_t * ESFLSHdll_ptr;
- typedef FGCTYdll_t * FGCTYdll_ptr;
- typedef FPVdll_t * FPVdll_ptr;
- typedef GERG04dll_t * GERG04dll_ptr;
- typedef GETFIJdll_t * GETFIJdll_ptr;
- typedef GETKTVdll_t * GETKTVdll_ptr;
- typedef GIBBSdll_t * GIBBSdll_ptr;
- typedef HSFLSHdll_t * HSFLSHdll_ptr;
- typedef INFOdll_t * INFOdll_ptr;
- typedef LIMITKdll_t * LIMITKdll_ptr;
- typedef LIMITSdll_t * LIMITSdll_ptr;
- typedef LIMITXdll_t * LIMITXdll_ptr;
- typedef MELTPdll_t * MELTPdll_ptr;
- typedef MELTTdll_t * MELTTdll_ptr;
- typedef MLTH2Odll_t * MLTH2Odll_ptr;
- typedef NAMEdll_t * NAMEdll_ptr;
- typedef PDFL1dll_t * PDFL1dll_ptr;
- typedef PDFLSHdll_t * PDFLSHdll_ptr;
- typedef PEFLSHdll_t * PEFLSHdll_ptr;
- typedef PHFL1dll_t * PHFL1dll_ptr;
- typedef PHFLSHdll_t * PHFLSHdll_ptr;
- typedef PQFLSHdll_t * PQFLSHdll_ptr;
- typedef PREOSdll_t * PREOSdll_ptr;
- typedef PRESSdll_t * PRESSdll_ptr;
- typedef PSFL1dll_t * PSFL1dll_ptr;
- typedef PSFLSHdll_t * PSFLSHdll_ptr;
- typedef PUREFLDdll_t * PUREFLDdll_ptr;
- typedef QMASSdll_t * QMASSdll_ptr;
- typedef QMOLEdll_t * QMOLEdll_ptr;
- typedef SATDdll_t * SATDdll_ptr;
- typedef SATEdll_t * SATEdll_ptr;
- typedef SATHdll_t * SATHdll_ptr;
- typedef SATPdll_t * SATPdll_ptr;
- typedef SATSdll_t * SATSdll_ptr;
- typedef SATTdll_t * SATTdll_ptr;
- typedef SETAGAdll_t * SETAGAdll_ptr;
- typedef SETKTVdll_t * SETKTVdll_ptr;
- typedef SETMIXdll_t * SETMIXdll_ptr;
- typedef SETMODdll_t * SETMODdll_ptr;
- typedef SETREFdll_t * SETREFdll_ptr;
- typedef SETUPdll_t * SETUPdll_ptr;
- typedef SPECGRdll_t * SPECGRdll_ptr;
- typedef SUBLPdll_t * SUBLPdll_ptr;
- typedef SUBLTdll_t * SUBLTdll_ptr;
- typedef SURFTdll_t * SURFTdll_ptr;
- typedef SURTENdll_t * SURTENdll_ptr;
- typedef TDFLSHdll_t * TDFLSHdll_ptr;
- typedef TEFLSHdll_t * TEFLSHdll_ptr;
- typedef THERM0dll_t * THERM0dll_ptr;
- typedef THERM2dll_t * THERM2dll_ptr;
- typedef THERM3dll_t * THERM3dll_ptr;
- typedef THERMdll_t * THERMdll_ptr;
- typedef THFLSHdll_t * THFLSHdll_ptr;
- typedef TPFLSHdll_t * TPFLSHdll_ptr;
- typedef TPFL2dll_t * TPFL2dll_ptr;
- typedef TPRHOdll_t * TPRHOdll_ptr;
- typedef TQFLSHdll_t * TQFLSHdll_ptr;
- typedef TRNPRPdll_t * TRNPRPdll_ptr;
- typedef TSFLSHdll_t * TSFLSHdll_ptr;
- typedef VIRBdll_t * VIRBdll_ptr;
- typedef VIRCdll_t * VIRCdll_ptr;
- typedef WMOLdll_t * WMOLdll_ptr;
- typedef XMASSdll_t * XMASSdll_ptr;
- typedef XMOLEdll_t * XMOLEdll_ptr;
+ //Define explicit function pointers
+ typedef RPVersion_TYPE * RPVersion_POINTER;
+ typedef SETPATHdll_TYPE * SETPATHdll_POINTER;
+ typedef ABFL1dll_TYPE * ABFL1dll_POINTER;
+ typedef ABFL2dll_TYPE * ABFL2dll_POINTER;
+ typedef ACTVYdll_TYPE * ACTVYdll_POINTER;
+ typedef AGdll_TYPE * AGdll_POINTER;
+ typedef CCRITdll_TYPE * CCRITdll_POINTER;
+ typedef CP0dll_TYPE * CP0dll_POINTER;
+ typedef CRITPdll_TYPE * CRITPdll_POINTER;
+ typedef CSATKdll_TYPE * CSATKdll_POINTER;
+ typedef CV2PKdll_TYPE * CV2PKdll_POINTER;
+ typedef CVCPKdll_TYPE * CVCPKdll_POINTER;
+ typedef CVCPdll_TYPE * CVCPdll_POINTER;
+ typedef DBDTdll_TYPE * DBDTdll_POINTER;
+ typedef DBFL1dll_TYPE * DBFL1dll_POINTER;
+ typedef DBFL2dll_TYPE * DBFL2dll_POINTER;
+ typedef DDDPdll_TYPE * DDDPdll_POINTER;
+ typedef DDDTdll_TYPE * DDDTdll_POINTER;
+ typedef DEFLSHdll_TYPE * DEFLSHdll_POINTER;
+ typedef DHD1dll_TYPE * DHD1dll_POINTER;
+ typedef DHFLSHdll_TYPE * DHFLSHdll_POINTER;
+ typedef DHFL1dll_TYPE * DHFL1dll_POINTER;
+ typedef DHFL2dll_TYPE * DHFL2dll_POINTER;
+ typedef DIELECdll_TYPE * DIELECdll_POINTER;
+ typedef DOTFILLdll_TYPE * DOTFILLdll_POINTER;
+ typedef DPDD2dll_TYPE * DPDD2dll_POINTER;
+ typedef DPDDKdll_TYPE * DPDDKdll_POINTER;
+ typedef DPDDdll_TYPE * DPDDdll_POINTER;
+ typedef DPDTKdll_TYPE * DPDTKdll_POINTER;
+ typedef DPDTdll_TYPE * DPDTdll_POINTER;
+ typedef DPTSATKdll_TYPE * DPTSATKdll_POINTER;
+ typedef DSFLSHdll_TYPE * DSFLSHdll_POINTER;
+ typedef DSFL1dll_TYPE * DSFL1dll_POINTER;
+ typedef DSFL2dll_TYPE * DSFL2dll_POINTER;
+ typedef ENTHALdll_TYPE * ENTHALdll_POINTER;
+ typedef ENTROdll_TYPE * ENTROdll_POINTER;
+ typedef ESFLSHdll_TYPE * ESFLSHdll_POINTER;
+ typedef FGCTYdll_TYPE * FGCTYdll_POINTER;
+ typedef FPVdll_TYPE * FPVdll_POINTER;
+ typedef GERG04dll_TYPE * GERG04dll_POINTER;
+ typedef GETFIJdll_TYPE * GETFIJdll_POINTER;
+ typedef GETKTVdll_TYPE * GETKTVdll_POINTER;
+ typedef GIBBSdll_TYPE * GIBBSdll_POINTER;
+ typedef HSFLSHdll_TYPE * HSFLSHdll_POINTER;
+ typedef INFOdll_TYPE * INFOdll_POINTER;
+ typedef LIMITKdll_TYPE * LIMITKdll_POINTER;
+ typedef LIMITSdll_TYPE * LIMITSdll_POINTER;
+ typedef LIMITXdll_TYPE * LIMITXdll_POINTER;
+ typedef MELTPdll_TYPE * MELTPdll_POINTER;
+ typedef MELTTdll_TYPE * MELTTdll_POINTER;
+ typedef MLTH2Odll_TYPE * MLTH2Odll_POINTER;
+ typedef NAMEdll_TYPE * NAMEdll_POINTER;
+ typedef PDFL1dll_TYPE * PDFL1dll_POINTER;
+ typedef PDFLSHdll_TYPE * PDFLSHdll_POINTER;
+ typedef PEFLSHdll_TYPE * PEFLSHdll_POINTER;
+ typedef PHFL1dll_TYPE * PHFL1dll_POINTER;
+ typedef PHFLSHdll_TYPE * PHFLSHdll_POINTER;
+ typedef PQFLSHdll_TYPE * PQFLSHdll_POINTER;
+ typedef PREOSdll_TYPE * PREOSdll_POINTER;
+ typedef PRESSdll_TYPE * PRESSdll_POINTER;
+ typedef PSFL1dll_TYPE * PSFL1dll_POINTER;
+ typedef PSFLSHdll_TYPE * PSFLSHdll_POINTER;
+ typedef PUREFLDdll_TYPE * PUREFLDdll_POINTER;
+ typedef QMASSdll_TYPE * QMASSdll_POINTER;
+ typedef QMOLEdll_TYPE * QMOLEdll_POINTER;
+ typedef SATDdll_TYPE * SATDdll_POINTER;
+ typedef SATEdll_TYPE * SATEdll_POINTER;
+ typedef SATHdll_TYPE * SATHdll_POINTER;
+ typedef SATPdll_TYPE * SATPdll_POINTER;
+ typedef SATSdll_TYPE * SATSdll_POINTER;
+ typedef SATTdll_TYPE * SATTdll_POINTER;
+ typedef SETAGAdll_TYPE * SETAGAdll_POINTER;
+ typedef SETKTVdll_TYPE * SETKTVdll_POINTER;
+ typedef SETMIXdll_TYPE * SETMIXdll_POINTER;
+ typedef SETMODdll_TYPE * SETMODdll_POINTER;
+ typedef SETREFdll_TYPE * SETREFdll_POINTER;
+ typedef SETUPdll_TYPE * SETUPdll_POINTER;
+ typedef SPECGRdll_TYPE * SPECGRdll_POINTER;
+ typedef SUBLPdll_TYPE * SUBLPdll_POINTER;
+ typedef SUBLTdll_TYPE * SUBLTdll_POINTER;
+ typedef SURFTdll_TYPE * SURFTdll_POINTER;
+ typedef SURTENdll_TYPE * SURTENdll_POINTER;
+ typedef TDFLSHdll_TYPE * TDFLSHdll_POINTER;
+ typedef TEFLSHdll_TYPE * TEFLSHdll_POINTER;
+ typedef THERM0dll_TYPE * THERM0dll_POINTER;
+ typedef THERM2dll_TYPE * THERM2dll_POINTER;
+ typedef THERM3dll_TYPE * THERM3dll_POINTER;
+ typedef THERMdll_TYPE * THERMdll_POINTER;
+ typedef THFLSHdll_TYPE * THFLSHdll_POINTER;
+ typedef TPFLSHdll_TYPE * TPFLSHdll_POINTER;
+ typedef TPFL2dll_TYPE * TPFL2dll_POINTER;
+ typedef TPRHOdll_TYPE * TPRHOdll_POINTER;
+ typedef TQFLSHdll_TYPE * TQFLSHdll_POINTER;
+ typedef TRNPRPdll_TYPE * TRNPRPdll_POINTER;
+ typedef TSFLSHdll_TYPE * TSFLSHdll_POINTER;
+ typedef VIRBdll_TYPE * VIRBdll_POINTER;
+ typedef VIRCdll_TYPE * VIRCdll_POINTER;
+ typedef WMOLdll_TYPE * WMOLdll_POINTER;
+ typedef XMASSdll_TYPE * XMASSdll_POINTER;
+ typedef XMOLEdll_TYPE * XMOLEdll_POINTER;
-
- #ifdef __cplusplus
- } // extern "C"
- #endif
-
-//#ifdef __cplusplus
-//extern "C" {
-//#endif
-// routines used in henning francke's wrapper
-// setup, wmol, tpflsh, phflsh, PDFL1, PDFLSH, PSFLSH, PQFLSH, THFLSH,
-// TDFLSH, TSFLSH, TQFLSH, DHFLSH, HSFLSH, DSFLSH, TRNPRP, SATT, SATP, SATD
-// TPFL2, DHFL1, DHFL2, DSFL1, DSFL2
-//
-////Define explicit function pointers
-//fp_RPVersion RPVersion;
-//fp_SETPATHdll SETPATHdll;
-////Define explicit function pointers
-//fp_ABFL1dll ABFL1dll;
-//fp_ABFL2dll ABFL2dll;
-//fp_ACTVYdll ACTVYdll;
-//fp_AGdll AGdll;
-//fp_CCRITdll CCRITdll;
-//fp_CP0dll CP0dll;
-//fp_CRITPdll CRITPdll;
-//fp_CSATKdll CSATKdll;
-//fp_CV2PKdll CV2PKdll;
-//fp_CVCPKdll CVCPKdll;
-//fp_CVCPdll CVCPdll;
-//fp_DBDTdll DBDTdll;
-//fp_DBFL1dll DBFL1dll;
-//fp_DBFL2dll DBFL2dll;
-//fp_DDDPdll DDDPdll;
-//fp_DDDTdll DDDTdll;
-//fp_DEFLSHdll DEFLSHdll;
-//fp_DHD1dll DHD1dll;
-//fp_DHFLSHdll DHFLSHdll;
-//fp_DHFL1dll DHFL1dll;
-//fp_DHFL2dll DHFL2dll;
-//fp_DIELECdll DIELECdll;
-//fp_DOTFILLdll DOTFILLdll;
-//fp_DPDD2dll DPDD2dll;
-//fp_DPDDKdll DPDDKdll;
-//fp_DPDDdll DPDDdll;
-//fp_DPDTKdll DPDTKdll;
-//fp_DPDTdll DPDTdll;
-//fp_DPTSATKdll DPTSATKdll;
-//fp_DSFLSHdll DSFLSHdll;
-//fp_DSFL1dll DSFL1dll;
-//fp_DSFL2dll DSFL2dll;
-//fp_ENTHALdll ENTHALdll;
-//fp_ENTROdll ENTROdll;
-//fp_ESFLSHdll ESFLSHdll;
-//fp_FGCTYdll FGCTYdll;
-//fp_FPVdll FPVdll;
-//fp_GERG04dll GERG04dll;
-//fp_GETFIJdll GETFIJdll;
-//fp_GETKTVdll GETKTVdll;
-//fp_GIBBSdll GIBBSdll;
-//fp_HSFLSHdll HSFLSHdll;
-//fp_INFOdll INFOdll;
-//fp_LIMITKdll LIMITKdll;
-//fp_LIMITSdll LIMITSdll;
-//fp_LIMITXdll LIMITXdll;
-//fp_MELTPdll MELTPdll;
-//fp_MELTTdll MELTTdll;
-//fp_MLTH2Odll MLTH2Odll;
-//fp_NAMEdll NAMEdll;
-//fp_PDFL1dll PDFL1dll;
-//fp_PDFLSHdll PDFLSHdll;
-//fp_PEFLSHdll PEFLSHdll;
-//fp_PHFL1dll PHFL1dll;
-//fp_PHFLSHdll PHFLSHdll;
-//fp_PQFLSHdll PQFLSHdll;
-//fp_PREOSdll PREOSdll;
-//fp_PRESSdll PRESSdll;
-//fp_PSFL1dll PSFL1dll;
-//fp_PSFLSHdll PSFLSHdll;
-//fp_PUREFLDdll PUREFLDdll;
-//fp_QMASSdll QMASSdll;
-//fp_QMOLEdll QMOLEdll;
-//fp_SATDdll SATDdll;
-//fp_SATEdll SATEdll;
-//fp_SATHdll SATHdll;
-//fp_SATPdll SATPdll;
-//fp_SATSdll SATSdll;
-//fp_SATTdll SATTdll;
-//fp_SETAGAdll SETAGAdll;
-//fp_SETKTVdll SETKTVdll;
-//fp_SETMIXdll SETMIXdll;
-//fp_SETMODdll SETMODdll;
-//fp_SETREFdll SETREFdll;
-//fp_SETUPdll SETUPdll;
-//fp_SPECGRdll SPECGRdll;
-//fp_SUBLPdll SUBLPdll;
-//fp_SUBLTdll SUBLTdll;
-//fp_SURFTdll SURFTdll;
-//fp_SURTENdll SURTENdll;
-//fp_TDFLSHdll TDFLSHdll;
-//fp_TEFLSHdll TEFLSHdll;
-//fp_THERM0dll THERM0dll;
-//fp_THERM2dll THERM2dll;
-//fp_THERM3dll THERM3dll;
-//fp_THERMdll THERMdll;
-//fp_THFLSHdll THFLSHdll;
-//fp_TPFLSHdll TPFLSHdll;
-//fp_TPFL2dll TPFL2dll;
-//fp_TPRHOdll TPRHOdll;
-//fp_TQFLSHdll TQFLSHdll;
-//fp_TRNPRPdll TRNPRPdll;
-//fp_TSFLSHdll TSFLSHdll;
-//fp_VIRBdll VIRBdll;
-//fp_VIRCdll VIRCdll;
-//fp_WMOLdll WMOLdll;
-//fp_XMASSdll XMASSdll;
-//fp_XMOLEdll XMOLEdll;
-
-//#ifdef __cplusplus
-//} // extern "C"
-//#endif
-
-
-//#ifdef __cplusplus
-//extern "C" {
-//#endif
-// // extra function for setup
-// void RPVersion ( char* );
-// void SETPATHdll( const char* );
-// //
-// void ABFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void ABFL2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void ACTVYdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void AGdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void CCRITdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void CP0dll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void CRITPdll(DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void CSATKdll(INTEGER &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void CV2PKdll(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void CVCPKdll(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void CVCPdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void DBDTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void DBFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void DBFL2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void DDDPdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void DDDTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void DEFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void DHD1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void DHFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
-// void DHFL2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
-// void DHFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void DIELECdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void DOTFILLdll(INTEGER &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void DPDD2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void DPDDKdll(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void DPDDdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void DPDTKdll(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void DPDTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void DPTSATKdll(INTEGER &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void DSFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void DSFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
-// void DSFL2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
-// void ENTHALdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void ENTROdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void ESFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void FGCTYdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *);
-// void FPVdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void GERG04dll(INTEGER &,INTEGER &,INTEGER &,char*,INTEGER );
-// void GETFIJdll(char*,DOUBLE_PRECISION *,char*,char*,INTEGER ,INTEGER ,INTEGER );
-// void GETKTVdll(INTEGER &,INTEGER &,char*,DOUBLE_PRECISION *,char*,char*,char*,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER ,INTEGER );
-// void GIBBSdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void HSFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void INFOdll(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void LIMITKdll(char*,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
-// void LIMITSdll(char*,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER );
-// void LIMITXdll(char*,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
-// void MELTPdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void MELTTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void MLTH2Odll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void NAMEdll(INTEGER &,char*,char*,char*,INTEGER ,INTEGER ,INTEGER );
-// void PDFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void PDFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void PEFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void PHFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void PHFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void PQFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void PREOSdll(INTEGER &);
-// void PRESSdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void PSFL1dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void PSFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void PUREFLDdll(INTEGER &);
-// void QMASSdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void QMOLEdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void SATDdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
-// void SATEdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void SATHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void SATPdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
-// void SATSdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void SATTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
-// void SETAGAdll(INTEGER &,char*,INTEGER );
-// void SETKTVdll(INTEGER &,INTEGER &,char*,DOUBLE_PRECISION *,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER );
-// void SETMIXdll(char*,char*,char*,INTEGER &,char*,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER ,INTEGER );
-// void SETMODdll(INTEGER &,char*,char*,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER );
-// void SETREFdll(char*,INTEGER &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
-// //void SETUPdll(INTEGER &,char*,char*,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER );
-// void SETUPdll(INTEGER &,char*,char*,char*,INTEGER &,char*);
-// void SPECGRdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void SUBLPdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void SUBLTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void SURFTdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void SURTENdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void TDFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void TEFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void THERM0dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void THERM2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void THERM3dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void THERMdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
-// void THFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void TPFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void TPFL2dll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
-// void TPRHOdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void TQFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void TRNPRPdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void TSFLSHdll(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
-// void VIRBdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void VIRCdll(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void WMOLdll(DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void XMASSdll(DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-// void XMOLEdll(DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-//#ifdef __cplusplus
-//} // extern "C"
-//#endif
+#ifdef __cplusplus
+} // extern "C"
+#endif
// REFPROP_H
#endif
-// routines used in henning francke's wrapper
-// setup, wmol, tpflsh, phflsh, PDFL1, PDFLSH, PSFLSH, PQFLSH, THFLSH,
-// TDFLSH, TSFLSH, TQFLSH, DHFLSH, HSFLSH, DSFLSH, TRNPRP, SATT, SATP, SATD
-// TPFL2, DHFL1, DHFL2, DSFL1, DSFL2
-//
+
diff --git a/readme.txt b/readme.md
similarity index 60%
rename from readme.txt
rename to readme.md
index 5d4435f..e94be43 100644
--- a/readme.txt
+++ b/readme.md
@@ -1,24 +1,23 @@
-Welcome to REFPROP2Modelica!
-
-This piece of software enables the user to access the Refprop fluid property database from within Modelica. The aim is to develop wrapper classes and integrate them with the "Media" framework inside Modelica. It has only been tested with Dymola sofar.
-
-For Windows, please follow these instructions
-1. After downloading and unzipping rename folder containing these files to "MediaTwoPhaseMixture".
-2. Copy \_REFPROP-Wrapper\Version x.x\REFPROP_WRAPPER.LIB to %DYMOLADIR%\\BIN\\LIB\ (%DYMOLADIR% is DYMOLA's program directory)
-3. Copy \_REFPROP-Wrapper\Version x.x\REFPROP_WRAPPER.H to %DYMOLADIR%\\SOURCE\\
-
-For installing on a Linux machine, please follow the instructions in the Makefile provided in the directory containing the Linux version of the wrapper class. You only have to type in the right directories and install all the compilers / libraries required.
-1. Change the paths in _REFPROP-Wrapper/Version x.x_linux/Makefile to your needs.
-2. Call "make libheader library" and "sudo make installlib" to compile and install refprop.
-3. Call "make wrapheader wrapper" and "sudo make installwrap" as well as "sudo make fixit" to compile and install the wrapper.
-
-For both versions, the last step is the same:
-
-4. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the package).
- Make sure you mask the backslashes. It should look something like
- constant String REFPROP_PATH = "C:\\Program Files\\REFPROP\\";
- or
- constant String REFPROP_PATH = "/home/user/Refprop/";
-
-
+
+#Welcome to REFPROP2Modelica!
+This piece of software enables the user to access the Refprop fluid property database from within Modelica. The aim is to develop wrapper classes and integrate them with the "Media" framework inside Modelica. It has only been tested with Dymola sofar.
+
+## Installation Instructions
+
+### Windows
+For Windows, please follow these instructions
+1. After downloading and unzipping rename folder containing these files to "MediaTwoPhaseMixture".
+2. Copy \_REFPROP-Wrapper\Version x.x\REFPROP_WRAPPER.LIB to %DYMOLADIR%\\BIN\\LIB\ (%DYMOLADIR% is DYMOLA's program directory)
+3. Copy \_REFPROP-Wrapper\Version x.x\REFPROP_WRAPPER.H to %DYMOLADIR%\\SOURCE\\
+4. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the package). Make sure you mask the backslashes. It should look something like: constant String REFPROP_PATH = "C:\\Program Files\\REFPROP\\";
+
+### Linux
+For installing on a Linux machine, please follow the instructions in the Makefile provided in the directory containing the Linux version of the wrapper class. You only have to type in the right directories and install all the compilers / libraries required.
+2. After downloading and unzipping rename folder containing these files to "MediaTwoPhaseMixture".
+2. Change the paths in _REFPROP-Wrapper/Version x.x_linux/Makefile to your needs.
+3. Call "make libheader library" and "sudo make installlib" to compile and install refprop.
+4. Call "make wrapheader wrapper" and "sudo make installwrap" as well as "sudo make fixit" to compile and install the wrapper.
+5. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the package). It should look something like: constant String REFPROP_PATH = "/home/user/Refprop/";
+
+## General Remarks
Please note that you need a working and licensed copy of Refprop in order to use the software provided here. This is not a replacement for Refprop.
\ No newline at end of file
From 8c150013829cf57e859e9bb5a14b1138c998fc78 Mon Sep 17 00:00:00 2001
From: jowr
Date: Tue, 2 Oct 2012 09:23:21 -0700
Subject: [PATCH 08/57] 2012:10:02 18:17 - Added Poco-framework in standard
version, changed the readme, extended the makefile
---
_REFPROP-Wrapper/Version 0.5_linux/Makefile | 62 ++++---
...op_wrapper.cpp => refprop_wrapper.org.cpp} | 0
.../refprop_wrapper.poco.cpp | 160 +++++++++++++-----
readme.md | 22 ++-
4 files changed, 166 insertions(+), 78 deletions(-)
rename _REFPROP-Wrapper/Version 0.5_linux/{refprop_wrapper.cpp => refprop_wrapper.org.cpp} (100%)
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/Makefile b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
index 5bb6255..d49d08b 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/Makefile
+++ b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
@@ -14,9 +14,11 @@
# ============================================================================
# used for the output
-THENAME =refprop
-THEWRAPPER =refprop_wrapper
-THETEST =refpropwrappertest
+THENAME =refprop
+THEWRAPPER =refprop_wrapper
+THETEST =refpropwrappertest
+LIBRARYEXTENSION =$(DYNAMICLIBRARYEXTENSION)
+WRAPPEREXTENSION =$(DYNAMICLIBRARYEXTENSION)
###########################################################
# Setting the directories for library, header and
@@ -94,44 +96,44 @@ install : installlib installwrap
.PHONY : installlib
installlib : libheader library
ln -sf $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION) $(HEADINST)/$(HEADERFILE)$(HEADEREXTENSION)
- ln -sf $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION) $(LIBINST)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+ ln -sf $(LIBDIR)/$(LIBRARY)$(LIBRARYEXTENSION) $(LIBINST)/$(LIBRARY)$(LIBRARYEXTENSION)
ln -sf $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION) /usr/include/$(HEADERFILE)$(HEADEREXTENSION)
- ln -sf $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION) /usr/lib/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+ ln -sf $(LIBDIR)/$(LIBRARY)$(LIBRARYEXTENSION) /usr/lib/$(LIBRARY)$(LIBRARYEXTENSION)
.PHONY : installwrap
installwrap: wrapheader wrapper
ln -sf $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION) $(HEADINST)/$(THEWRAPPER)$(HEADEREXTENSION)
- ln -sf $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(LIBINST)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+ ln -sf $(LIBDIR)/lib$(THEWRAPPER)$(WRAPPEREXTENSION) $(LIBINST)/lib$(THEWRAPPER)$(WRAPPEREXTENSION)
ln -sf $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION) /usr/include/$(THEWRAPPER)$(HEADEREXTENSION)
- ln -sf $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) /usr/lib/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+ ln -sf $(LIBDIR)/lib$(THEWRAPPER)$(WRAPPEREXTENSION) /usr/lib/lib$(THEWRAPPER)$(WRAPPEREXTENSION)
.PHONY : uninstall
uninstall :
$(RM) $(HEADINST)/$(HEADERFILE)$(HEADEREXTENSION)
- $(RM) $(LIBINST)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+ $(RM) $(LIBINST)/$(LIBRARY)$(LIBRARYEXTENSION)
$(RM) /usr/include/$(HEADERFILE)$(HEADEREXTENSION)
- $(RM) /usr/lib/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+ $(RM) /usr/lib/$(LIBRARY)$(LIBRARYEXTENSION)
$(RM) $(HEADINST)/$(THEWRAPPER)$(HEADEREXTENSION)
- $(RM) $(LIBINST)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+ $(RM) $(LIBINST)/lib$(THEWRAPPER)$(WRAPPEREXTENSION)
$(RM) /usr/include/$(THEWRAPPER)$(HEADEREXTENSION)
- $(RM) /usr/lib/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+ $(RM) /usr/lib/lib$(THEWRAPPER)$(WRAPPEREXTENSION)
.PHONY : purge
purge : cleanlib
$(RM) $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION)
- $(RM) $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+ $(RM) $(LIBDIR)/$(LIBRARY)$(LIBRARYEXTENSION)
$(RM) $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION)
- $(RM) $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
+ $(RM) $(LIBDIR)/lib$(THEWRAPPER)$(WRAPPEREXTENSION)
.PHONY : fixit
fixit : install
- ln -sf $(LIBINST)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(LIBINST)/libREFPROP_wrapper$(DYNAMICLIBRARYEXTENSION)
- ln -sf /usr/lib/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) /usr/lib/libREFPROP_wrapper$(DYNAMICLIBRARYEXTENSION)
+ ln -sf $(LIBINST)/lib$(THEWRAPPER)$(WRAPPEREXTENSION) $(LIBINST)/libREFPROP_wrapper$(WRAPPEREXTENSION)
+ ln -sf /usr/lib/lib$(THEWRAPPER)$(WRAPPEREXTENSION) /usr/lib/libREFPROP_wrapper$(WRAPPEREXTENSION)
.PHONY : unfixit
unfixit :
- $(RM) $(LIBINST)/libREFPROP_wrapper$(DYNAMICLIBRARYEXTENSION)
- $(RM) /usr/lib/libREFPROP_wrapper$(DYNAMICLIBRARYEXTENSION)
+ $(RM) $(LIBINST)/libREFPROP_wrapper$(WRAPPEREXTENSION)
+ $(RM) /usr/lib/libREFPROP_wrapper$(WRAPPEREXTENSION)
.PHONY : removeall
removeall : uninstall purge unfixit
@@ -153,19 +155,24 @@ $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION): $(THEWRAPPER)$(HEADEREXTENSION)
cp $(THEWRAPPER)$(HEADEREXTENSION) $(LIBDIR)
.PHONY : wrapper
-wrapper : $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION)
-$(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION): $(THEWRAPPER).o wrapheader libheader library
- $(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(THEWRAPPER).o -l$(THENAME) -lPocoFoundation
+wrapper : poco
+#wrapper : $(LIBDIR)/lib$(THEWRAPPER)$(WRAPPEREXTENSION)
+
+.PHONY : nopoco
+nopoco : $(THEWRAPPER).o wrapheader libheader library
+ $(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(THEWRAPPER).org.o -l$(THENAME) -lPocoFoundation
+
+.PHONY : poco
+poco : $(THEWRAPPER).poco.o wrapheader libheader library
+ $(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(THEWRAPPER).poco.o -l$(THENAME) -lPocoFoundation
-#.PHONY : wrapper
-#wrapper : $(LIBDIR)/lib$(THEWRAPPER)$(STATICLIBRARYEXTENSION)
-#$(LIBDIR)/lib$(THEWRAPPER)$(STATICLIBRARYEXTENSION): $(THEWRAPPER).o wrapheader libheader library
-# ar -cvq $(LIBDIR)/lib$(THEWRAPPER)$(STATICLIBRARYEXTENSION) $(THEWRAPPER).o
+#$(LIBDIR)/lib$(THEWRAPPER)$(STATICLIBRARYEXTENSION): $(THEWRAPPER).o wrapheader libheader
+# ar -cvq $(LIBDIR)/lib$(THEWRAPPER)$(STATICLIBRARYEXTENSION) $(THEWRAPPER).o src/$(LIBFILE).o $(LIBOBJECTFILES)
.PHONY : test
test : $(THETEST)
$(THETEST) : $(THETEST).o wrapheader wrapper
- $(FC) $(FLINKFLAGS) -o $(THETEST) $(THETEST).o -l$(THEWRAPPER)
+ $(FC) $(FLINKFLAGS) -o $(THETEST) $(THETEST).o -l$(THEWRAPPER) -lPocoFoundation
###########################################################
# Compile the Fortran sources into a library file that can
@@ -177,7 +184,8 @@ $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION): src/$(HEADERFILE)$(HEADEREXTENSION)
cp src/$(HEADERFILE)$(HEADEREXTENSION) $(LIBDIR)
.PHONY : library
-library : $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+library : $(LIBDIR)/$(LIBRARY)$(LIBRARYEXTENSION)
+
$(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION): src/$(LIBFILE).o $(LIBOBJECTFILES)
$(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION) src/$(LIBFILE).o $(LIBOBJECTFILES)
@@ -227,7 +235,7 @@ $(BINDIR)/RP-ftn : src/refprop-ftn.cpp libheader library
.PHONY : f2f
f2f : $(BINDIR)/f2f
-$(BINDIR)/f2f : example/ex-mix.for $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+$(BINDIR)/f2f : example/ex-mix.for $(LIBDIR)/$(LIBRARY)$(LIBRARYEXTENSION)
$(FC) $(FFLAGS) -o example/ex-mix.o -c example/ex-mix.for
$(FC) $(FLINKFLAGS) -o $(BINDIR)/f2f example/ex-mix.o $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.org.cpp
similarity index 100%
rename from _REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.cpp
rename to _REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.org.cpp
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.poco.cpp b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.poco.cpp
index 548d4e5..d0ce770 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.poco.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.poco.cpp
@@ -45,6 +45,7 @@
#include "Poco/Path.h"
#include "Poco/File.h"
#include "Poco/Environment.h"
+#include "Poco/StringTokenizer.h"
#include "Poco/String.h"
// Some constants...
@@ -56,6 +57,7 @@ const long ncmax=20; // Note: ncmax is the max number of components
//Poco::SharedLibrary RefpropdllInstance;
char loadedfluids[refpropcharlength];
+char loadedpath[filepathlength];
//// Define the functions either by their pointers or type.
//WMOLdll_POINTER WMOLdll;
@@ -83,20 +85,26 @@ char loadedfluids[refpropcharlength];
//SATPdll_POINTER SATPdll;
//SATDdll_POINTER SATDdll;
-
-char *str_replace(char *str, char *search, char *replace, long *count) {
+//str_replace (fluidnames, "|", replace, nX)
+char *str_replace(char *str, char *search, char *replace, long *count) {
int i,n_ret;
int newlen = strlen(replace);
int oldlen = strlen(search);
char *ret;
*count = 0;
-
+
//count occurrences of searchstring
for (i = 0; oldlen && str[i]; ++i)
if (strstr(&str[i], search) == &str[i]){ // if walk through is at searchstr
++*count, i+=oldlen - 1;
}
- ret = (char *) calloc(n_ret = (strlen(str) + 1 + *count * (newlen - oldlen)), sizeof(char));
+ ret = (char *) calloc(n_ret = (strlen(str) + 1 + *count * (newlen - oldlen)), sizeof(char));
+// std::string stri (&str);
+// std::string sear (&search);
+// Poco::StringTokenizer StrTok(stri,sear,Poco::StringTokenizer::TOK_TRIM);
+// *count = StrTok.count();
+// ret = (char *) calloc(n_ret = (strlen(str) + 1 + *count * (newlen - oldlen)), sizeof(char));
+
if (!ret){
printf("Could not allocate memory");
return "";
@@ -118,76 +126,140 @@ char *str_replace(char *str, char *search, char *replace, long *count) {
}
return ret;
}
+//char *str_replace(char *str, char *search, char *replace, long *count) {
+// int i,n_ret;
+// int newlen = strlen(replace);
+// int oldlen = strlen(search);
+// char *ret;
+// *count = 0;
+//
+// //count occurrences of searchstring
+// for (i = 0; oldlen && str[i]; ++i)
+// if (strstr(&str[i], search) == &str[i]){ // if walk through is at searchstr
+// ++*count, i+=oldlen - 1;
+// }
+// ret = (char *) calloc(n_ret = (strlen(str) + 1 + *count * (newlen - oldlen)), sizeof(char));
+// if (!ret){
+// printf("Could not allocate memory");
+// return "";
+// }
+//
+// if (!*count){
+// strncpy(ret,str,n_ret);
+// //if (DEBUGMODE) printf("RET: %i %s\n",oldlen,str);
+// }else{
+// i = 0;
+// while (*str)
+// if (strstr(str, search) == str)
+// strncpy(&ret[i], replace,n_ret-i-1),
+// i += newlen,
+// str += oldlen;
+// else
+// ret[i++] = *str++;
+// ret[i] = '\0';
+// }
+// return ret;
+//}
-int init_REFPROP(char* fluidnames, char* REFPROP_PATH, long* nX, char* herr, char* errormsg, int DEBUGMODE){
+int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr, char* errormsg, int DEBUGMODE){
// Sets up the interface to the REFPROP.DLL
// is called by props_REFPROP and satprops_REFPROP
// char DLL_PATH[filepathlength], FLD_PATH[filepathlength];
long ierr=0;
+// DEBUGMODE = 1;
- if (strlen(REFPROP_PATH)>filepathlength){
- sprintf(errormsg,"REFPROP_PATH too long (%i > %i)\n",strlen(REFPROP_PATH),filepathlength);
+ if (strlen(REFPROP_PATH_CHAR)>filepathlength){
+ sprintf(errormsg,"REFPROP_PATH_CHAR too long (%i > %i)\n",strlen(REFPROP_PATH_CHAR),filepathlength);
return 0;
}
-
- char* REFPROP_PATH_CHAR = REFPROP_PATH;
- char* FLUIDS_CHAR = "fluids";
- char* LIBRARY_CHAR;
-
-
- Poco::Path REF_PATH(true),FLD_PATH(true),LIB_PATH(true); // all paths will be absolute
-
+ // Define temporary objects for checks.
+ char REF_PATH_CHAR[filepathlength];
+ Poco::Path REF_PATH(true);
+ char FLUIDS_CHAR[filepathlength] = "fluids";
+ Poco::Path FLD_PATH(true);
+ char LIBRARY_CHAR[filepathlength];
+ Poco::Path LIB_PATH(true);
+ Poco::File theFile;
+
+ // Parse the string and append a path separator if necessary.
REF_PATH.parse(REFPROP_PATH_CHAR, Poco::Path::PATH_NATIVE);
if (!REF_PATH.isDirectory()) REF_PATH.append(REF_PATH.separator());
- Poco::File theFile(REF_PATH);
- if ( !theFile.isDirectory() || !theFile.canRead() ){
+ // Overwrite the provided path
+ strcpy(REF_PATH_CHAR,REF_PATH.toString().c_str());
+
+ // Check the path if running in debugmode
+ if (DEBUGMODE) {
+ theFile = Poco::File(REF_PATH);
+ if ( !theFile.isDirectory() || !theFile.canRead() ){
sprintf (errormsg,"REF_PATH is not a readable directory: %s \n", REF_PATH.toString().c_str());
return 0;
+ }
}
- FLD_PATH.parse(REF_PATH.toString());
+ // The fluid files are in the Refprop directory, append "fluids".
+ FLD_PATH.parse(REF_PATH_CHAR);
FLD_PATH.pushDirectory(FLUIDS_CHAR);
- LIB_PATH.parse(REF_PATH.toString());
- bool is_linux = ( 0 == Poco::icompare(Poco::Environment::osName(), "linux") );
- if (is_linux){
- LIBRARY_CHAR = "librefprop.so";
+ if (DEBUGMODE) {
+ // Determine which library file should be loaded
+ bool is_linux = ( 0 == Poco::icompare(Poco::Environment::osName(), "linux") );
+ if (is_linux){
+ strcpy(LIBRARY_CHAR,"librefprop.so");
+ } else {
+ strcpy(LIBRARY_CHAR,"refprop.dll");
+ }
+ std::string path(REF_PATH_CHAR); // This is not fail-safe, the OS might look somewhere else, e.g. /usr/lib ...
+ //std::string path(Poco::Environment::get("PATH"));
+ bool found_lib = Poco::Path::find(path, LIBRARY_CHAR, LIB_PATH);
+ if (found_lib) {
+ printf ("Found library %s in path %s \n", LIBRARY_CHAR, path.c_str());
+ } else {
+ printf ("Cannot find library %s in path %s \n", LIBRARY_CHAR, path.c_str());
+ }
} else {
- LIBRARY_CHAR = "refprop.dll";
+ LIB_PATH.parse(REF_PATH_CHAR);
}
- LIB_PATH.setFileName(LIBRARY_CHAR);
- if (DEBUGMODE) printf ("Comparison of fluids : %i \n", strcmp(fluidnames,loadedfluids) );
-// if (DEBUGMODE) printf ("Comparison of library: %i \n", LIB_PATH.toString().compare(RefpropdllInstance.getPath()) );
+ // Check for new fluids and if the library has to be loaded again.
+ if (DEBUGMODE) printf ("Comparison of fluids : %i \n", strcmp(fluidnames,loadedfluids) );
+ if (DEBUGMODE) printf ("Comparison of path : %i \n", strcmp(REF_PATH_CHAR,loadedpath) );
+ if (DEBUGMODE) printf ("Checking setup : %s and %s \n\n", REF_PATH_CHAR,loadedpath );
+
// if (strcmp(fluidnames,loadedfluids)==0) {
-//// if ( LIB_PATH.toString().compare(RefpropdllInstance.getPath())==0 ) {
-//// sprintf(errormsg,"Library is already loaded: %s \n",LIB_PATH.toString().c_str());
-// if (DEBUGMODE) printf ("Returning: %s and %s \n", RefpropdllInstance.getPath().c_str(),fluidnames );
+// if ( strcmp(REF_PATH_CHAR,loadedpath)==0 ) {
+// sprintf(errormsg,"Library is already loaded: %s \n",LIB_PATH.toString().c_str());
+// if (DEBUGMODE) printf ("No setup needed: %s and %s \n", REF_PATH_CHAR,loadedpath );
// return 0;
-//// }
+// }
// }
+ strcpy(loadedpath,REF_PATH_CHAR);
+
if (DEBUGMODE) {
printf ("REF_PATH as string: %s \n", REF_PATH.toString().c_str());
printf ("FLD_PATH as string: %s \n", FLD_PATH.toString().c_str());
printf ("LIB_PATH as string: %s \n", LIB_PATH.toString().c_str());
- printf ("Running on: %s \n", Poco::Environment::osName().c_str());
+ printf ("Running OS family : %s \n\n", Poco::Environment::osName().c_str());
}
- theFile = Poco::File(LIB_PATH);
- if ( !theFile.isFile() || !theFile.canExecute() ){
- sprintf (errormsg,"LIB_PATH is not an executable file: %s \n", LIB_PATH.toString().c_str());
- return 0;
+ if (DEBUGMODE) {
+ theFile = Poco::File(LIB_PATH);
+ if ( !theFile.isFile() || !theFile.canExecute() ){
+ sprintf (errormsg,"LIB_PATH is not an executable file: %s \n", LIB_PATH.toString().c_str());
+ return 0;
+ }
}
char LIB_PATH_CHAR[filepathlength];
strcpy(LIB_PATH_CHAR,LIB_PATH.toString().c_str());
+ if (DEBUGMODE) {
theFile = Poco::File(FLD_PATH);
if ( !theFile.isDirectory() || !theFile.canRead() ){
sprintf (errormsg,"FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
return 0;
}
+ }
char FLD_PATH_CHAR[filepathlength];
strcpy(FLD_PATH_CHAR,FLD_PATH.toString().c_str());
@@ -212,7 +284,6 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH, long* nX, char* herr, cha
char hrf[lengthofreference+1],hfmix[filepathlength+1+7];
char *hf;
- strcpy(loadedfluids,fluidnames);
//parse fluid composition string and insert absolute paths
char replace[filepathlength+6];
strcpy(replace,".FLD|");
@@ -239,6 +310,7 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH, long* nX, char* herr, cha
// SETUPdll_TYPE * SETUPdll = (SETUPdll_TYPE * ) RefpropdllInstance.getSymbol(SETUPdll_NAME);
if (DEBUGMODE) printf("Running SETUPdll...\n");
SETUPdll(*nX, hf, hfmix, hrf, ierr, herr);
+ strcpy(loadedfluids,fluidnames);
if (DEBUGMODE) printf("SETUPdll run complete (Error no: %i)\n",ierr);
// WMOLdll = (WMOLdll_POINTER) RefpropdllInstance.getSymbol(WMOLdll_NAME);
@@ -337,6 +409,8 @@ OUTPUT
// HINSTANCE RefpropdllInstance;// Then have windows load the library.
// Poco::SharedLibrary RefpropdllInstance("");
+// DEBUGMODE = 1;
+
if (DEBUGMODE) printf("\nStarting function props_REFPROP to calc %c...\n", what[0]);
//initialize interface to REFPROP.dll
@@ -420,12 +494,12 @@ OUTPUT
TPFLSHdll(T,p,x,d,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
}
}else if (strcmp(statevars,"ph")==0 || strcmp(statevars,"hp")==0){
-/* if (phase==1){ //fluid state is known to be single phase
- PHFL1dll = (fp_PHFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PHFL1dll");
- PHFL1dll(p,h,x,liqvap,T,d,ierr,herr,errormessagelength);
- if (liqvap==1) dl=d; else dv=d;
- }else{*/
-// PHFLSHdll = (fp_PHFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PHFLSHdll");
+// if (phase==1){ //fluid state is known to be single phase
+//// PHFL1dll = (fp_PHFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PHFL1dll");
+// PHFL1dll(p,h,x,liqvap,T,d,ierr,herr,errormessagelength);
+//// if (liqvap==1) dl=d; else dv=d;
+// }else{
+//// PHFLSHdll = (fp_PHFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PHFLSHdll");
PHFLSHdll(p,h,x,T,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
// }
}else if (strcmp(statevars,"pd")==0 || strcmp(statevars,"dp")==0){
@@ -588,6 +662,7 @@ OUTPUT
break;
case 211:
sprintf(errormsg,"TPFLSH bubble point calculation did not converge: [SATTP error 1] iteration failed to converge");
+ break;
case 239:
sprintf(errormsg,"THFLSH error: Input value of enthalpy (%f) is outside limits",h);
break;
@@ -706,6 +781,7 @@ OUTPUT
// void* RefpropdllInstance;
// Poco::SharedLibrary RefpropdllInstance("");
+// DEBUGMODE = 1;
if (DEBUGMODE) printf("\nStarting function satprops_REFPROP...\n");
diff --git a/readme.md b/readme.md
index e94be43..3e833ac 100644
--- a/readme.md
+++ b/readme.md
@@ -2,22 +2,26 @@
#Welcome to REFPROP2Modelica!
This piece of software enables the user to access the Refprop fluid property database from within Modelica. The aim is to develop wrapper classes and integrate them with the "Media" framework inside Modelica. It has only been tested with Dymola sofar.
+Please be aware that you might need a copy of the Poco C++ framework to compile the wrapper files yourself. You can find it at: http://pocoproject.org/. The general idea is to use this framework to implement platform independent library loading and caching, but it is still a long way to go.
+
## Installation Instructions
### Windows
For Windows, please follow these instructions
-1. After downloading and unzipping rename folder containing these files to "MediaTwoPhaseMixture".
-2. Copy \_REFPROP-Wrapper\Version x.x\REFPROP_WRAPPER.LIB to %DYMOLADIR%\\BIN\\LIB\ (%DYMOLADIR% is DYMOLA's program directory)
-3. Copy \_REFPROP-Wrapper\Version x.x\REFPROP_WRAPPER.H to %DYMOLADIR%\\SOURCE\\
-4. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the package). Make sure you mask the backslashes. It should look something like: constant String REFPROP_PATH = "C:\\Program Files\\REFPROP\\";
+
+1. After downloading and unzipping rename folder containing these files to "MediaTwoPhaseMixture".
+2. Copy \_REFPROP-Wrapper\Version x.x\REFPROP_WRAPPER.LIB to %DYMOLADIR%\\BIN\\LIB\ (%DYMOLADIR% is DYMOLA's program directory)
+3. Copy \_REFPROP-Wrapper\Version x.x\REFPROP_WRAPPER.H to %DYMOLADIR%\\SOURCE\\
+4. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the package). Make sure you mask the backslashes. It should look something like: constant String REFPROP_PATH = "C:\\Program Files\\REFPROP\\";
### Linux
For installing on a Linux machine, please follow the instructions in the Makefile provided in the directory containing the Linux version of the wrapper class. You only have to type in the right directories and install all the compilers / libraries required.
-2. After downloading and unzipping rename folder containing these files to "MediaTwoPhaseMixture".
-2. Change the paths in _REFPROP-Wrapper/Version x.x_linux/Makefile to your needs.
-3. Call "make libheader library" and "sudo make installlib" to compile and install refprop.
-4. Call "make wrapheader wrapper" and "sudo make installwrap" as well as "sudo make fixit" to compile and install the wrapper.
-5. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the package). It should look something like: constant String REFPROP_PATH = "/home/user/Refprop/";
+
+1. After downloading and unzipping rename folder containing these files to "MediaTwoPhaseMixture".
+2. Change the paths in _REFPROP-Wrapper/Version x.x_linux/Makefile to your needs.
+3. Call "make libheader library" and "sudo make installlib" to compile and install refprop.
+4. Call "make wrapheader wrapper" and "sudo make installwrap" as well as "sudo make fixit" to compile and install the wrapper.
+5. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the package). It should look something like: constant String REFPROP_PATH = "/home/user/Refprop/";
## General Remarks
Please note that you need a working and licensed copy of Refprop in order to use the software provided here. This is not a replacement for Refprop.
\ No newline at end of file
From a9995e5c67b1ba41f800cfd0aed5f8a748680fcf Mon Sep 17 00:00:00 2001
From: jowr
Date: Wed, 24 Oct 2012 07:13:07 -0700
Subject: [PATCH 09/57] 2012:10:24 16:11 - Changed the folder structure,
compiling Refprop is now handled externally (check the readme), cleaned the
makefile.
---
_REFPROP-Wrapper/Version 0.5_linux/Makefile | 278 ++-----
.../src/PASS_FTN_LIN.FOR.tpl | 68 --
.../Version 0.5_linux/src/refprop-ftn.cpp | 396 ---------
.../Version 0.5_linux/src/refprop_lib.h | 779 ------------------
.../{ => src}/refprop_wrapper.h | 0
.../{ => src}/refprop_wrapper.org.cpp | 0
.../{ => src}/refprop_wrapper.poco.cpp | 0
.../{ => src}/refpropwrappertest.cpp | 2 +-
readme.md | 12 +-
9 files changed, 92 insertions(+), 1443 deletions(-)
delete mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/PASS_FTN_LIN.FOR.tpl
delete mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/refprop-ftn.cpp
delete mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/refprop_lib.h
rename _REFPROP-Wrapper/Version 0.5_linux/{ => src}/refprop_wrapper.h (100%)
rename _REFPROP-Wrapper/Version 0.5_linux/{ => src}/refprop_wrapper.org.cpp (100%)
rename _REFPROP-Wrapper/Version 0.5_linux/{ => src}/refprop_wrapper.poco.cpp (100%)
rename _REFPROP-Wrapper/Version 0.5_linux/{ => src}/refpropwrappertest.cpp (96%)
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/Makefile b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
index d49d08b..4e02c08 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/Makefile
+++ b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
@@ -1,251 +1,143 @@
# ============================================================================
# Name : Makefile
# Author : Jorrit Wronski (jowr@mek.dtu.dk)
-# Version : 0.2
+# Version : 0.3
# Copyright : Use and modify at your own risk.
# Description : Makefile for Refprop from Fortran and C++ tests.
# ============================================================================
# The installation procedure should be as follows:
-# 1) make libheader library
-# 2) sudo make installlib
-# 3) make wrapheader wrapper
-# 4) sudo make installwrap
-# 5) sudo make fixit
+# 0) make sure to have librefprop.so available on your system
+# 1) make header library
+# 2) sudo make install
+# 3) sudo make fixit
# ============================================================================
+# general commands:
+RM := rm -f
+CP := cp
+CH := chmod 0644
+MK := mkdir -p
+LD := ldconfig
+LN := ln -sf
# used for the output
-THENAME =refprop
-THEWRAPPER =refprop_wrapper
+MAJORVERSION =0
+MINORVERSION =5
+THENAME =refprop_wrapper
+LIBRARYEXTENSION =.so
THETEST =refpropwrappertest
-LIBRARYEXTENSION =$(DYNAMICLIBRARYEXTENSION)
-WRAPPEREXTENSION =$(DYNAMICLIBRARYEXTENSION)
###########################################################
# Setting the directories for library, header and
# binary files created in this makefile.
###########################################################
-LIBDIR =/home/jowr/Documents/Fluids/refprop/v9.0
-DYMDIR =/opt/dymola
-LIBINST =$(DYMDIR)/bin/lib
-HEADINST =$(DYMDIR)/source
-BINDIR =.
+SRCDIR =./src
+# DYMDIR =/opt/dymola
+# LIBINST =$(DYMDIR)/bin/lib
+# HEADINST =$(DYMDIR)/source
+LIBINST =/usr/local/lib
+HEADINST =/usr/local/include
+BINDIR =./bin
-OPTFLAGS = -O3 -ffast-math# -ffloat-store # optimisation, remove for debugging
-###########################################################
-# Change these lines if you are using a different Fortran
-# compiler or if you would like to use other flags.
-###########################################################
-FC =gfortran
-FFLAGS =$(OPTFLAGS) -Wall -pedantic# -ff2c -fbounds-check
-FLINKFLAGS =$(FFLAGS)
+
+LIBS =-lrefprop
+OPTFLAGS =-O3 -ffast-math# -ffloat-store # optimisation, remove for debugging
###########################################################
# Change these lines if you are using a different C++
# compiler or if you would like to use other flags.
###########################################################
-CPPC =g++
-CPPFLAGS =$(OPTFLAGS) -Wall -pedantic -fbounds-check -ansi -Wpadded -Wpacked -malign-double -mpreferred-stack-boundary=8
+CPPC =g++
+CPPFLAGS =$(OPTFLAGS) -Wall -pedantic -fbounds-check -ansi -Wpadded -Wpacked -malign-double -mpreferred-stack-boundary=8
###########################################################
# Change these lines if you have other needs regarding
-# the library file.
+# the generated shared library file.
###########################################################
-LIBFLAGS =-rdynamic -fPIC -shared
-LIBRARY =lib$(THENAME)
-LIBFILE =PASS_FTN_LIN
-DYNAMICLIBRARYEXTENSION =.so
-STATICLIBRARYEXTENSION =.a
-#ar -cvq $(LIBRARY)$(STATICLIBRARYEXTENSION) $(OBJECTFILES)
-HEADERFILE =$(THENAME)_lib
-HEADEREXTENSION =.h
-### List of files to compile
-LIBOBJECTFILES = \
- $(LIBDIR)/fortran/SETUP.o \
- $(LIBDIR)/fortran/CORE_ANC.o \
- $(LIBDIR)/fortran/CORE_BWR.o \
- $(LIBDIR)/fortran/CORE_CPP.o \
- $(LIBDIR)/fortran/CORE_DE.o \
- $(LIBDIR)/fortran/CORE_ECS.o \
- $(LIBDIR)/fortran/CORE_FEQ.o \
- $(LIBDIR)/fortran/CORE_MLT.o \
- $(LIBDIR)/fortran/CORE_PH0.o \
- $(LIBDIR)/fortran/CORE_QUI.o \
- $(LIBDIR)/fortran/CORE_STN.o \
- $(LIBDIR)/fortran/CORE_PR.o \
- $(LIBDIR)/fortran/FLASH2.o \
- $(LIBDIR)/fortran/FLSH_SUB.o \
- $(LIBDIR)/fortran/IDEALGAS.o \
- $(LIBDIR)/fortran/MIX_AGA8.o \
- $(LIBDIR)/fortran/MIX_HMX.o \
- $(LIBDIR)/fortran/PROP_SUB.o \
- $(LIBDIR)/fortran/REALGAS.o \
- $(LIBDIR)/fortran/SAT_SUB.o \
- $(LIBDIR)/fortran/SETUP2.o \
- $(LIBDIR)/fortran/TRNS_ECS.o \
- $(LIBDIR)/fortran/TRNS_TCX.o \
- $(LIBDIR)/fortran/TRNS_VIS.o \
- $(LIBDIR)/fortran/TRNSP.o \
- $(LIBDIR)/fortran/UTILITY.o
-
+LIBFILE =$(THENAME)
+LIBRARY =lib$(THENAME)
+LIBFLAGS =-rdynamic -fPIC -shared -Wl,-soname,$(LIBRARY)$(LIBRARYEXTENSION).$(MAJORVERSION)
+HEADERFILE =$(THENAME)
+HEADEREXTENSION =.h
+
###########################################################
-# Link all files to places recognised by the system.
+# Copy files to places recognised by the system.
###########################################################
.PHONY : install
-install : installlib installwrap
-
-.PHONY : installlib
-installlib : libheader library
- ln -sf $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION) $(HEADINST)/$(HEADERFILE)$(HEADEREXTENSION)
- ln -sf $(LIBDIR)/$(LIBRARY)$(LIBRARYEXTENSION) $(LIBINST)/$(LIBRARY)$(LIBRARYEXTENSION)
- ln -sf $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION) /usr/include/$(HEADERFILE)$(HEADEREXTENSION)
- ln -sf $(LIBDIR)/$(LIBRARY)$(LIBRARYEXTENSION) /usr/lib/$(LIBRARY)$(LIBRARYEXTENSION)
-
-.PHONY : installwrap
-installwrap: wrapheader wrapper
- ln -sf $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION) $(HEADINST)/$(THEWRAPPER)$(HEADEREXTENSION)
- ln -sf $(LIBDIR)/lib$(THEWRAPPER)$(WRAPPEREXTENSION) $(LIBINST)/lib$(THEWRAPPER)$(WRAPPEREXTENSION)
- ln -sf $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION) /usr/include/$(THEWRAPPER)$(HEADEREXTENSION)
- ln -sf $(LIBDIR)/lib$(THEWRAPPER)$(WRAPPEREXTENSION) /usr/lib/lib$(THEWRAPPER)$(WRAPPEREXTENSION)
-
+install : header library
+ $(MK) $(HEADINST) $(LIBINST)
+ $(CP) $(BINDIR)/$(HEADERFILE)$(HEADEREXTENSION) $(HEADINST)/$(HEADERFILE)$(HEADEREXTENSION)
+ $(CP) $(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION) $(LIBINST)/$(LIBRARY)$(LIBRARYEXTENSION).$(MAJORVERSION).$(MINORVERSION)
+ $(CH) $(HEADINST)/$(HEADERFILE)$(HEADEREXTENSION)
+ $(CH) $(LIBINST)/$(LIBRARY)$(LIBRARYEXTENSION).$(MAJORVERSION).$(MINORVERSION)
+ $(LD) -l $(LIBINST)/$(LIBRARY)$(LIBRARYEXTENSION).$(MAJORVERSION).$(MINORVERSION)
+ $(LN) $(LIBINST)/$(LIBRARY)$(LIBRARYEXTENSION).$(MAJORVERSION) $(LIBINST)/$(LIBRARY)$(LIBRARYEXTENSION)
+ $(LD)
+
.PHONY : uninstall
-uninstall :
+uninstall : unfixit
$(RM) $(HEADINST)/$(HEADERFILE)$(HEADEREXTENSION)
- $(RM) $(LIBINST)/$(LIBRARY)$(LIBRARYEXTENSION)
- $(RM) /usr/include/$(HEADERFILE)$(HEADEREXTENSION)
- $(RM) /usr/lib/$(LIBRARY)$(LIBRARYEXTENSION)
- $(RM) $(HEADINST)/$(THEWRAPPER)$(HEADEREXTENSION)
- $(RM) $(LIBINST)/lib$(THEWRAPPER)$(WRAPPEREXTENSION)
- $(RM) /usr/include/$(THEWRAPPER)$(HEADEREXTENSION)
- $(RM) /usr/lib/lib$(THEWRAPPER)$(WRAPPEREXTENSION)
-
-.PHONY : purge
-purge : cleanlib
- $(RM) $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION)
- $(RM) $(LIBDIR)/$(LIBRARY)$(LIBRARYEXTENSION)
- $(RM) $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION)
- $(RM) $(LIBDIR)/lib$(THEWRAPPER)$(WRAPPEREXTENSION)
-
+ $(RM) $(LIBINST)/$(LIBRARY)$(LIBRARYEXTENSION)*
+
+.PHONY : all
+all : header library
+
.PHONY : fixit
fixit : install
- ln -sf $(LIBINST)/lib$(THEWRAPPER)$(WRAPPEREXTENSION) $(LIBINST)/libREFPROP_wrapper$(WRAPPEREXTENSION)
- ln -sf /usr/lib/lib$(THEWRAPPER)$(WRAPPEREXTENSION) /usr/lib/libREFPROP_wrapper$(WRAPPEREXTENSION)
+ ln -sf $(HEADINST)/$(HEADERFILE)$(HEADEREXTENSION) $(HEADINST)/REFPROP_wrapper$(HEADEREXTENSION)
+ ln -sf $(LIBINST)/$(LIBRARY)$(LIBRARYEXTENSION) $(LIBINST)/libREFPROP_wrapper$(LIBRARYEXTENSION)
.PHONY : unfixit
unfixit :
- $(RM) $(LIBINST)/libREFPROP_wrapper$(WRAPPEREXTENSION)
- $(RM) /usr/lib/libREFPROP_wrapper$(WRAPPEREXTENSION)
+ $(RM) $(HEADINST)/REFPROP_wrapper$(HEADEREXTENSION)
+ $(RM) $(LIBINST)/libREFPROP_wrapper$(LIBRARYEXTENSION)
-.PHONY : removeall
-removeall : uninstall purge unfixit
+##########################################################
+# Compile the C++ sources into a library file that can
+# be used as a shared object.
+###########################################################
+.PHONY : header
+header : $(BINDIR)/$(HEADERFILE)$(HEADEREXTENSION)
+$(BINDIR)/$(HEADERFILE)$(HEADEREXTENSION): $(SRCDIR)/$(HEADERFILE)$(HEADEREXTENSION)
+ $(CP) $(SRCDIR)/$(HEADERFILE)$(HEADEREXTENSION) $(BINDIR)
-.PHONY : all
-all :
- make libheader library
- sudo make installlib
- make wrapheader wrapper
- sudo make installwrap
- sudo make fixit
+.PHONY : library
+library : $(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION)
-###########################################################
-# Compile the wrapper class and its tests.
-###########################################################
-.PHONY : wrapheader
-wrapheader : $(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION)
-$(LIBDIR)/$(THEWRAPPER)$(HEADEREXTENSION): $(THEWRAPPER)$(HEADEREXTENSION)
- cp $(THEWRAPPER)$(HEADEREXTENSION) $(LIBDIR)
-
-.PHONY : wrapper
-wrapper : poco
-#wrapper : $(LIBDIR)/lib$(THEWRAPPER)$(WRAPPEREXTENSION)
+$(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION): nopoco
.PHONY : nopoco
-nopoco : $(THEWRAPPER).o wrapheader libheader library
- $(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(THEWRAPPER).org.o -l$(THENAME) -lPocoFoundation
+nopoco : $(SRCDIR)/$(LIBFILE).org.o
+ $(CPPC) $(LIBFLAGS) $(CPPFLAGS) -o $(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION) $(SRCDIR)/$(LIBFILE).org.o $(LIBS)
.PHONY : poco
-poco : $(THEWRAPPER).poco.o wrapheader libheader library
- $(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(LIBDIR)/lib$(THEWRAPPER)$(DYNAMICLIBRARYEXTENSION) $(THEWRAPPER).poco.o -l$(THENAME) -lPocoFoundation
-
-#$(LIBDIR)/lib$(THEWRAPPER)$(STATICLIBRARYEXTENSION): $(THEWRAPPER).o wrapheader libheader
-# ar -cvq $(LIBDIR)/lib$(THEWRAPPER)$(STATICLIBRARYEXTENSION) $(THEWRAPPER).o src/$(LIBFILE).o $(LIBOBJECTFILES)
-
-.PHONY : test
-test : $(THETEST)
-$(THETEST) : $(THETEST).o wrapheader wrapper
- $(FC) $(FLINKFLAGS) -o $(THETEST) $(THETEST).o -l$(THEWRAPPER) -lPocoFoundation
+poco : $(SRCDIR)/$(LIBFILE).poco.o
+ $(CPPC) $(LIBFLAGS) $(CPPFLAGS) -o $(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION) $(SRCDIR)/$(LIBFILE).poco.o $(LIBS) -lPocoFoundation
###########################################################
-# Compile the Fortran sources into a library file that can
-# be used as a shared object.
-###########################################################
-.PHONY : libheader
-libheader : $(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION)
-$(LIBDIR)/$(HEADERFILE)$(HEADEREXTENSION): src/$(HEADERFILE)$(HEADEREXTENSION)
- cp src/$(HEADERFILE)$(HEADEREXTENSION) $(LIBDIR)
-
-.PHONY : library
-library : $(LIBDIR)/$(LIBRARY)$(LIBRARYEXTENSION)
-
-$(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION): src/$(LIBFILE).o $(LIBOBJECTFILES)
- $(FC) $(LIBFLAGS) $(FLINKFLAGS) -o $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION) src/$(LIBFILE).o $(LIBOBJECTFILES)
-
-src/$(LIBFILE).FOR: $(LIBDIR)/fortran/PASS_FTN.FOR
- sed 's/dll_export/!dll_export/g' $(LIBDIR)/fortran/PASS_FTN.FOR > src/$(LIBFILE).FOR
- cat src/$(LIBFILE).FOR.tpl >> src/$(LIBFILE).FOR
-
-# sed -i 's/*10000/(10000)/g' src/$(LIBFILE).FOR
-# sed -i 's/*255/(255)/g' src/$(LIBFILE).FOR
+# Compile the wrapper class tests.
+###########################################################
+.PHONY : test
+test : $(BINDIR)/$(THETEST)
-$(LIBDIR)/fortran/%.o: $(LIBDIR)/fortran/%.FOR
- $(FC) $(FFLAGS) -o $(LIBDIR)/fortran/$*.o -c $<
+$(BINDIR)/$(THETEST) : $(SRCDIR)/$(THETEST).o
+ $(CPPC) $(CPPFLAGS) -o $(BINDIR)/$(THETEST) $(SRCDIR)/$(THETEST).o $(LIBS) -l$(THENAME)
###########################################################
# General rulesets for compilation.
###########################################################
-src/%.o : src/%.FOR
- $(FC) $(FFLAGS) -o src/$*.o -c $<
-
-src/%.o : src/%.cpp
- $(CPPC) $(CPPFLAGS) -o src/$*.o -c $<
+$(SRCDIR)/%.o : $(SRCDIR)/%.cpp
+ $(CPPC) $(CPPFLAGS) -o $(SRCDIR)/$*.o -c $<
+
+$(SRCDIR)/%.o : $(SRCDIR)/%.c
+ $(CC) $(CFLAGS) -o $(SRCDIR)/$*.o -c $<
-%.o : %.FOR
- $(FC) $(FFLAGS) -o $*.o -c $<
-
-%.o : %.cpp
- $(CPPC) $(CPPFLAGS) -o $*.o -c $<
+$(SRCDIR)/%.o : $(SRCDIR)/%.FOR
+ $(FC) $(FFLAGS) -o $(SRCDIR)/$*.o -c $<
.PHONY: clean
clean:
- $(RM) **.o **.so **.mod $(BINDIR)/RP-ftn src/$(LIBFILE).FOR $(THETEST)
-
-.PHONY : cleanlib
-cleanlib :
- $(RM) $(LIBDIR)/fortran/**.o
-
-###########################################################
-# Compile a simple example to illustrate the connection
-# between C++ and Fortran as well as the usage of the
-# created library with Fortran sources.
-###########################################################
-.PHONY : RP-ftn
-RP-ftn : $(BINDIR)/RP-ftn
-$(BINDIR)/RP-ftn : src/refprop-ftn.cpp libheader library
- $(CPPC) $(CPPFLAGS) -o src/refprop-ftn.o -c src/refprop-ftn.cpp
- $(FC) $(FLINKFLAGS) -o $(BINDIR)/RP-ftn src/refprop-ftn.o -l$(THENAME) -lPocoFoundation
-
-.PHONY : f2f
-f2f : $(BINDIR)/f2f
-$(BINDIR)/f2f : example/ex-mix.for $(LIBDIR)/$(LIBRARY)$(LIBRARYEXTENSION)
- $(FC) $(FFLAGS) -o example/ex-mix.o -c example/ex-mix.for
- $(FC) $(FLINKFLAGS) -o $(BINDIR)/f2f example/ex-mix.o $(LIBDIR)/$(LIBRARY)$(DYNAMICLIBRARYEXTENSION)
+ $(RM) **.o **.so **.mod $(BINDIR)/* $(SRCDIR)/*.o
-.PHONY : cpp2f
-cpp2f : $(BINDIR)/cpp2f
-$(BINDIR)/cpp2f : example/cpp2f.cpp example/easy_f.for
- $(FC) $(FFLAGS) -o example/easy_f.o -c example/easy_f.for
- $(CPPC) $(CPPFLAGS) -o example/cpp2f.o -c example/cpp2f.cpp
- $(FC) $(FLINKFLAGS) -o $(BINDIR)/cpp2f example/cpp2f.o example/easy_f.o
-
###########################################################
# Create the documentation from annotations in the source
# files with DOXYGEN, a configuration file is needed.
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/PASS_FTN_LIN.FOR.tpl b/_REFPROP-Wrapper/Version 0.5_linux/src/PASS_FTN_LIN.FOR.tpl
deleted file mode 100644
index edc83be..0000000
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/PASS_FTN_LIN.FOR.tpl
+++ /dev/null
@@ -1,68 +0,0 @@
-c ======================================================================
-c Adding new routines used in the Modelica interface.
-c subroutine DHFL1 (rho,h,x,t,ierr,herr)
-c subroutine DHFL2 (D,h,z,t,p,Dl,Dv,x,y,q,ierr,herr)
-c subroutine DSFL1 (rho,s,x,t,ierr,herr)
-c subroutine DSFL2 (d,s,z,t,p,Dl,Dv,x,y,q,ierr,herr)
-c subroutine TPFL2 (t,p,z,Dl,Dv,x,y,q,ierr,herr)
-c ======================================================================
- subroutine DHFL1dll (rho,h,x,t,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DHFLSHdll"::DHFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DHFLSHdll
- !dll_export DHFLSHdll
- dimension x(ncmax)
- call DHFL1 (rho,h,x,t,ierr,herr)
- end
-c ======================================================================
- subroutine DHFL2dll (D,h,z,t,p,Dl,Dv,x,y,q,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DHFLSHdll"::DHFLSHdll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DHFLSHdll
- !dll_export DHFLSHdll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call DHFL2 (D,h,z,t,p,Dl,Dv,x,y,q,ierr,herr)
- end
-c ======================================================================
- subroutine DSFL1dll (rho,s,x,t,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DSFL1dll"::DSFL1dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DSFL1dll
- !dll_export DSFL1dll
- dimension x(ncmax)
- call DSFL1 (rho,s,x,t,ierr,herr)
- end
-c ======================================================================
- subroutine DSFL2dll (d,s,z,t,p,Dl,Dv,x,y,q,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_DSFL2dll"::DSFL2dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::DSFL2dll
- !dll_export DSFL2dll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call DSFL2 (d,s,z,t,p,Dl,Dv,x,y,q,ierr,herr)
- end
-c ======================================================================
- subroutine TPFL2dll (t,p,z,Dl,Dv,x,y,q,ierr,herr)
- implicit double precision (a-h,o-z)
- implicit integer (i-n)
- parameter (ncmax=20)
- character*255 herr
-cDEC$ ATTRIBUTES DLLEXPORT, Alias: "_TPFL2dll"::TPFL2dll
-cDEC$ ATTRIBUTES STDCALL, REFERENCE::TPFL2dll
- !dll_export TPFL2dll
- dimension z(ncmax),x(ncmax),y(ncmax)
- call TPFL2 (t,p,z,Dl,Dv,x,y,q,ierr,herr)
- end
-c ======================================================================
\ No newline at end of file
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop-ftn.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop-ftn.cpp
deleted file mode 100644
index 24b9f8a..0000000
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop-ftn.cpp
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
- * ============================================================================
- * Name : refprop-ftn.cpp
- * Author : Jorrit Wronski (jowr@mek.dtu.dk)
- * Version : 0.1
- * Copyright : Use and modify at your own risk.
- * Description : example for Fortran and CPP interoperation. This file is
- * based on EX_C1.CPP by Chris Muzny and EX_C2.c by Ian Bell.
- * The example files can be obtained online from NIST
- * http://www.boulder.nist.gov/div838/theory/refprop/Frequently_asked_questions.htm
- * ============================================================================
- */
-
-#include
-#include /* EXIT_SUCCESS */
-#include /* strlen, memset, memcpy, memchr */
-#include /* refprop header file */
-
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#endif
-
-#define refpropcharlength 255
-#define filepathlength 255
-#define maxstringlength 10000
-#define lengthofreference 3
-#define errormessagelength 255
-#define ncmax 20 // Note: ncmax is the max number of components
-#define numparams 72
-#define maxcoefs 50
-
-
-void newline() {
- printf("%s","\n");
-}
-
-#include "Poco/SharedLibrary.h"
-#include "Poco/Path.h"
-#include "Poco/File.h"
-#include "Poco/Environment.h"
-#include "Poco/String.h"
-
-
-
-int main(int argc, char* argv[]) {
-
- static long i,ierr,info_index;
- static double wm,ttp,tnbp,tc,pc,dc,zc,acf,dip,rgas;
- static char hfld[maxstringlength+1],hrf[lengthofreference+1],herr[errormessagelength+1],hfm[refpropcharlength+1];
- static char v[refpropcharlength+1],hpth[filepathlength+1],errormsg[errormessagelength+1];
-
- static double x[ncmax],xliq[ncmax],xvap[ncmax],f[ncmax];
-
- double t=100.0;
- double p,dl,dv;
-
- char* REFPROP_PATH_CHAR = "/home/jowr/Documents/Fluids/refprop/v9.0";
- char* FLUIDS_CHAR = "fluids";
- char* LIBRARY_CHAR;
-
-
- Poco::Path REFPROP_PATH(true),FLD_PATH(true),LIB_PATH(true); // all paths will be absolute
-
- REFPROP_PATH.parse(REFPROP_PATH_CHAR, Poco::Path::PATH_NATIVE);
- if (!REFPROP_PATH.isDirectory()) REFPROP_PATH.append(REFPROP_PATH.separator());
- Poco::File theFile(REFPROP_PATH);
- if ( !theFile.isDirectory() || !theFile.canRead() ){
- printf ("REFPROP_PATH is not a readable directory: %s \n", REFPROP_PATH.toString().c_str());
- return 1;
- }
-
- FLD_PATH.parse(REFPROP_PATH.toString());
- FLD_PATH.pushDirectory(FLUIDS_CHAR);
-
- LIB_PATH.parse(REFPROP_PATH.toString());
- bool is_linux = ( 0 == Poco::icompare(Poco::Environment::osName(), "linux") );
- if (is_linux){
- LIBRARY_CHAR = "librefprop.so";
- } else {
- LIBRARY_CHAR = "refprop.dll";
- }
- LIB_PATH.setFileName(LIBRARY_CHAR);
-
- printf ("REFPROP_PATH as string: %s \n", REFPROP_PATH.toString().c_str());
- printf ("FLD_PATH as string: %s \n", FLD_PATH.toString().c_str());
- printf ("LIB_PATH as string: %s \n", LIB_PATH.toString().c_str());
- printf ("Running on: %s \n", Poco::Environment::osName().c_str());
-
- theFile = Poco::File(LIB_PATH);
- if ( !theFile.isFile() || !theFile.canExecute() ){
- printf ("LIB_PATH is not an executable file: %s \n", LIB_PATH.toString().c_str());
- return 1;
- }
-
- theFile = Poco::File(FLD_PATH);
- if ( !theFile.isDirectory() || !theFile.canRead() ){
- printf ("FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
- return 1;
- }
-
-// First we load the library with the POCO foundation
-// classes and then define all the needed functions
-// by their names and a cast to the correct type.
- Poco::SharedLibrary library(LIB_PATH.toString()); // will also load the library
-
-// Define the functions either by their pointers or type.
- RPVersion_POINTER RPVersion = (RPVersion_POINTER) library.getSymbol(RPVersion_NAME);
-// RPVersion_TYPE * RPVersion = (RPVersion_TYPE * ) library.getSymbol(RPVersion_NAME);
- SETPATHdll_TYPE * SETPATHdll = (SETPATHdll_TYPE *) library.getSymbol(SETPATHdll_NAME);
- ABFL1dll_TYPE * ABFL1dll = (ABFL1dll_TYPE * ) library.getSymbol(ABFL1dll_NAME);
- ABFL2dll_TYPE * ABFL2dll = (ABFL2dll_TYPE * ) library.getSymbol(ABFL2dll_NAME);
- ACTVYdll_TYPE * ACTVYdll = (ACTVYdll_TYPE * ) library.getSymbol(ACTVYdll_NAME);
- AGdll_TYPE * AGdll = (AGdll_TYPE * ) library.getSymbol(AGdll_NAME);
- CCRITdll_TYPE * CCRITdll = (CCRITdll_TYPE * ) library.getSymbol(CCRITdll_NAME);
- CP0dll_TYPE * CP0dll = (CP0dll_TYPE * ) library.getSymbol(CP0dll_NAME);
- CRITPdll_TYPE * CRITPdll = (CRITPdll_TYPE * ) library.getSymbol(CRITPdll_NAME);
- CSATKdll_TYPE * CSATKdll = (CSATKdll_TYPE * ) library.getSymbol(CSATKdll_NAME);
- CV2PKdll_TYPE * CV2PKdll = (CV2PKdll_TYPE * ) library.getSymbol(CV2PKdll_NAME);
- CVCPKdll_TYPE * CVCPKdll = (CVCPKdll_TYPE * ) library.getSymbol(CVCPKdll_NAME);
- CVCPdll_TYPE * CVCPdll = (CVCPdll_TYPE * ) library.getSymbol(CVCPdll_NAME);
- DBDTdll_TYPE * DBDTdll = (DBDTdll_TYPE * ) library.getSymbol(DBDTdll_NAME);
- DBFL1dll_TYPE * DBFL1dll = (DBFL1dll_TYPE * ) library.getSymbol(DBFL1dll_NAME);
- DBFL2dll_TYPE * DBFL2dll = (DBFL2dll_TYPE * ) library.getSymbol(DBFL2dll_NAME);
- DDDPdll_TYPE * DDDPdll = (DDDPdll_TYPE * ) library.getSymbol(DDDPdll_NAME);
- DDDTdll_TYPE * DDDTdll = (DDDTdll_TYPE * ) library.getSymbol(DDDTdll_NAME);
- DEFLSHdll_TYPE * DEFLSHdll = (DEFLSHdll_TYPE * ) library.getSymbol(DEFLSHdll_NAME);
- DHD1dll_TYPE * DHD1dll = (DHD1dll_TYPE * ) library.getSymbol(DHD1dll_NAME);
- DHFLSHdll_TYPE * DHFLSHdll = (DHFLSHdll_TYPE * ) library.getSymbol(DHFLSHdll_NAME);
- DHFL1dll_TYPE * DHFL1dll = (DHFL1dll_TYPE * ) library.getSymbol(DHFL1dll_NAME);
- DHFL2dll_TYPE * DHFL2dll = (DHFL2dll_TYPE * ) library.getSymbol(DHFL2dll_NAME);
- DIELECdll_TYPE * DIELECdll = (DIELECdll_TYPE * ) library.getSymbol(DIELECdll_NAME);
- DOTFILLdll_TYPE * DOTFILLdll = (DOTFILLdll_TYPE *) library.getSymbol(DOTFILLdll_NAME);
- DPDD2dll_TYPE * DPDD2dll = (DPDD2dll_TYPE * ) library.getSymbol(DPDD2dll_NAME);
- DPDDKdll_TYPE * DPDDKdll = (DPDDKdll_TYPE * ) library.getSymbol(DPDDKdll_NAME);
- DPDDdll_TYPE * DPDDdll = (DPDDdll_TYPE * ) library.getSymbol(DPDDdll_NAME);
- DPDTKdll_TYPE * DPDTKdll = (DPDTKdll_TYPE * ) library.getSymbol(DPDTKdll_NAME);
- DPDTdll_TYPE * DPDTdll = (DPDTdll_TYPE * ) library.getSymbol(DPDTdll_NAME);
- DPTSATKdll_TYPE * DPTSATKdll = (DPTSATKdll_TYPE *) library.getSymbol(DPTSATKdll_NAME);
- DSFLSHdll_TYPE * DSFLSHdll = (DSFLSHdll_TYPE * ) library.getSymbol(DSFLSHdll_NAME);
- DSFL1dll_TYPE * DSFL1dll = (DSFL1dll_TYPE * ) library.getSymbol(DSFL1dll_NAME);
- DSFL2dll_TYPE * DSFL2dll = (DSFL2dll_TYPE * ) library.getSymbol(DSFL2dll_NAME);
- ENTHALdll_TYPE * ENTHALdll = (ENTHALdll_TYPE * ) library.getSymbol(ENTHALdll_NAME);
- ENTROdll_TYPE * ENTROdll = (ENTROdll_TYPE * ) library.getSymbol(ENTROdll_NAME);
- ESFLSHdll_TYPE * ESFLSHdll = (ESFLSHdll_TYPE * ) library.getSymbol(ESFLSHdll_NAME);
- FGCTYdll_TYPE * FGCTYdll = (FGCTYdll_TYPE * ) library.getSymbol(FGCTYdll_NAME);
- FPVdll_TYPE * FPVdll = (FPVdll_TYPE * ) library.getSymbol(FPVdll_NAME);
- GERG04dll_TYPE * GERG04dll = (GERG04dll_TYPE * ) library.getSymbol(GERG04dll_NAME);
- GETFIJdll_TYPE * GETFIJdll = (GETFIJdll_TYPE * ) library.getSymbol(GETFIJdll_NAME);
- GETKTVdll_TYPE * GETKTVdll = (GETKTVdll_TYPE * ) library.getSymbol(GETKTVdll_NAME);
- GIBBSdll_TYPE * GIBBSdll = (GIBBSdll_TYPE * ) library.getSymbol(GIBBSdll_NAME);
- HSFLSHdll_TYPE * HSFLSHdll = (HSFLSHdll_TYPE * ) library.getSymbol(HSFLSHdll_NAME);
- INFOdll_TYPE * INFOdll = (INFOdll_TYPE * ) library.getSymbol(INFOdll_NAME);
- LIMITKdll_TYPE * LIMITKdll = (LIMITKdll_TYPE * ) library.getSymbol(LIMITKdll_NAME);
- LIMITSdll_TYPE * LIMITSdll = (LIMITSdll_TYPE * ) library.getSymbol(LIMITSdll_NAME);
- LIMITXdll_TYPE * LIMITXdll = (LIMITXdll_TYPE * ) library.getSymbol(LIMITXdll_NAME);
- MELTPdll_TYPE * MELTPdll = (MELTPdll_TYPE * ) library.getSymbol(MELTPdll_NAME);
- MELTTdll_TYPE * MELTTdll = (MELTTdll_TYPE * ) library.getSymbol(MELTTdll_NAME);
- MLTH2Odll_TYPE * MLTH2Odll = (MLTH2Odll_TYPE * ) library.getSymbol(MLTH2Odll_NAME);
- NAMEdll_TYPE * NAMEdll = (NAMEdll_TYPE * ) library.getSymbol(NAMEdll_NAME);
- PDFL1dll_TYPE * PDFL1dll = (PDFL1dll_TYPE * ) library.getSymbol(PDFL1dll_NAME);
- PDFLSHdll_TYPE * PDFLSHdll = (PDFLSHdll_TYPE * ) library.getSymbol(PDFLSHdll_NAME);
- PEFLSHdll_TYPE * PEFLSHdll = (PEFLSHdll_TYPE * ) library.getSymbol(PEFLSHdll_NAME);
- PHFL1dll_TYPE * PHFL1dll = (PHFL1dll_TYPE * ) library.getSymbol(PHFL1dll_NAME);
- PHFLSHdll_TYPE * PHFLSHdll = (PHFLSHdll_TYPE * ) library.getSymbol(PHFLSHdll_NAME);
- PQFLSHdll_TYPE * PQFLSHdll = (PQFLSHdll_TYPE * ) library.getSymbol(PQFLSHdll_NAME);
- PREOSdll_TYPE * PREOSdll = (PREOSdll_TYPE * ) library.getSymbol(PREOSdll_NAME);
- PRESSdll_TYPE * PRESSdll = (PRESSdll_TYPE * ) library.getSymbol(PRESSdll_NAME);
- PSFL1dll_TYPE * PSFL1dll = (PSFL1dll_TYPE * ) library.getSymbol(PSFL1dll_NAME);
- PSFLSHdll_TYPE * PSFLSHdll = (PSFLSHdll_TYPE * ) library.getSymbol(PSFLSHdll_NAME);
- PUREFLDdll_TYPE * PUREFLDdll = (PUREFLDdll_TYPE *) library.getSymbol(PUREFLDdll_NAME);
- QMASSdll_TYPE * QMASSdll = (QMASSdll_TYPE * ) library.getSymbol(QMASSdll_NAME);
- QMOLEdll_TYPE * QMOLEdll = (QMOLEdll_TYPE * ) library.getSymbol(QMOLEdll_NAME);
- SATDdll_TYPE * SATDdll = (SATDdll_TYPE * ) library.getSymbol(SATDdll_NAME);
- SATEdll_TYPE * SATEdll = (SATEdll_TYPE * ) library.getSymbol(SATEdll_NAME);
- SATHdll_TYPE * SATHdll = (SATHdll_TYPE * ) library.getSymbol(SATHdll_NAME);
- SATPdll_TYPE * SATPdll = (SATPdll_TYPE * ) library.getSymbol(SATPdll_NAME);
- SATSdll_TYPE * SATSdll = (SATSdll_TYPE * ) library.getSymbol(SATSdll_NAME);
- SATTdll_TYPE * SATTdll = (SATTdll_TYPE * ) library.getSymbol(SATTdll_NAME);
- SETAGAdll_TYPE * SETAGAdll = (SETAGAdll_TYPE * ) library.getSymbol(SETAGAdll_NAME);
- SETKTVdll_TYPE * SETKTVdll = (SETKTVdll_TYPE * ) library.getSymbol(SETKTVdll_NAME);
- SETMIXdll_TYPE * SETMIXdll = (SETMIXdll_TYPE * ) library.getSymbol(SETMIXdll_NAME);
- SETMODdll_TYPE * SETMODdll = (SETMODdll_TYPE * ) library.getSymbol(SETMODdll_NAME);
- SETREFdll_TYPE * SETREFdll = (SETREFdll_TYPE * ) library.getSymbol(SETREFdll_NAME);
- SETUPdll_TYPE * SETUPdll = (SETUPdll_TYPE * ) library.getSymbol(SETUPdll_NAME);
-// SPECGRdll_TYPE * SPECGRdll = (SPECGRdll_TYPE * ) library.getSymbol(SPECGRdll_NAME);
- SUBLPdll_TYPE * SUBLPdll = (SUBLPdll_TYPE * ) library.getSymbol(SUBLPdll_NAME);
- SUBLTdll_TYPE * SUBLTdll = (SUBLTdll_TYPE * ) library.getSymbol(SUBLTdll_NAME);
- SURFTdll_TYPE * SURFTdll = (SURFTdll_TYPE * ) library.getSymbol(SURFTdll_NAME);
- SURTENdll_TYPE * SURTENdll = (SURTENdll_TYPE * ) library.getSymbol(SURTENdll_NAME);
- TDFLSHdll_TYPE * TDFLSHdll = (TDFLSHdll_TYPE * ) library.getSymbol(TDFLSHdll_NAME);
- TEFLSHdll_TYPE * TEFLSHdll = (TEFLSHdll_TYPE * ) library.getSymbol(TEFLSHdll_NAME);
- THERM0dll_TYPE * THERM0dll = (THERM0dll_TYPE * ) library.getSymbol(THERM0dll_NAME);
- THERM2dll_TYPE * THERM2dll = (THERM2dll_TYPE * ) library.getSymbol(THERM2dll_NAME);
- THERM3dll_TYPE * THERM3dll = (THERM3dll_TYPE * ) library.getSymbol(THERM3dll_NAME);
- THERMdll_TYPE * THERMdll = (THERMdll_TYPE * ) library.getSymbol(THERMdll_NAME);
- THFLSHdll_TYPE * THFLSHdll = (THFLSHdll_TYPE * ) library.getSymbol(THFLSHdll_NAME);
- TPFLSHdll_TYPE * TPFLSHdll = (TPFLSHdll_TYPE * ) library.getSymbol(TPFLSHdll_NAME);
- TPFL2dll_TYPE * TPFL2dll = (TPFL2dll_TYPE * ) library.getSymbol(TPFL2dll_NAME);
- TPRHOdll_TYPE * TPRHOdll = (TPRHOdll_TYPE * ) library.getSymbol(TPRHOdll_NAME);
- TQFLSHdll_TYPE * TQFLSHdll = (TQFLSHdll_TYPE * ) library.getSymbol(TQFLSHdll_NAME);
- TRNPRPdll_TYPE * TRNPRPdll = (TRNPRPdll_TYPE * ) library.getSymbol(TRNPRPdll_NAME);
- TSFLSHdll_TYPE * TSFLSHdll = (TSFLSHdll_TYPE * ) library.getSymbol(TSFLSHdll_NAME);
- VIRBdll_TYPE * VIRBdll = (VIRBdll_TYPE * ) library.getSymbol(VIRBdll_NAME);
- VIRCdll_TYPE * VIRCdll = (VIRCdll_TYPE * ) library.getSymbol(VIRCdll_NAME);
- WMOLdll_TYPE * WMOLdll = (WMOLdll_TYPE * ) library.getSymbol(WMOLdll_NAME);
- XMASSdll_TYPE * XMASSdll = (XMASSdll_TYPE * ) library.getSymbol(XMASSdll_NAME);
- XMOLEdll_TYPE * XMOLEdll = (XMOLEdll_TYPE * ) library.getSymbol(XMOLEdll_NAME);
-
-
- newline();
-
- RPVersion(v);
- printf("RPVersion(v) returned v = %s\n", v);
-
- strcpy(hpth,REFPROP_PATH.toString().c_str());
- SETPATHdll(hpth);
- printf("SETPATHdll(hpth) called with hpth = %s\n", hpth);
-
- i=1;
- strcpy(hfld,"nitrogen.fld");
- strcpy(hfm,"hmx.bnc");
- strcpy(hrf,"DEF");
- strcpy(herr,"Ok");
- SETUPdll(i,hfld,hfm,hrf,ierr,herr);
- if (ierr != 0) printf("%s\n",herr);
- printf("SETUPdll(i,hfld,hfm,hrf,ierr,herr) called with hfld = %s\n", hfld);
-
- info_index = 1;
- INFOdll(info_index,wm,ttp,tnbp,tc,pc,dc,zc,acf,dip,rgas);
- printf("INFOdll(info_index,wm,ttp,tnbp,tc,pc,dc,zc,acf,dip,rgas) called with index = %l\n", info_index);
- printf("WM,ACF,DIP,TTP,TNBP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",wm,acf,dip,ttp,tnbp);
- printf("TC,PC,DC,RGAS %10.4f,%10.4f,%10.4f,%10.4f\n",tc,pc,dc,rgas);
-
- //...For a mixture, use the following setup instead of the lines above.
- // Use "|" as the file name delimiter for mixtures
- i=3;
- strcpy(hfld,"nitrogen.fld");
- strcat(hfld,"|argon.fld");
- strcat(hfld,"|oxygen.fld");
- strcpy(hfm,"hmx.bnc");
- strcpy(hrf,"DEF");
- strcpy(herr,"Ok");
- x[0]=.7812; //Air composition
- x[1]=.0092;
- x[2]=.2096;
- //...Call SETUP to initialize the program
- SETUPdll(i,hfld,hfm,hrf,ierr,herr);
- newline();
- printf("SETUPdll(i,hfld,hfm,hrf,ierr,herr) called with hfld = %s\n", hfld);
-
- INFOdll(info_index,wm,ttp,tnbp,tc,pc,dc,zc,acf,dip,rgas);
- printf("WM,ACF,DIP,TTP,TNBP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",wm,acf,dip,ttp,tnbp);
- printf("TC,PC,DC,RGAS %10.4f,%10.4f,%10.4f,%10.4f\n",tc,pc,dc,rgas);
-
- //...Calculate molecular weight of a mixture
- wm = 0.;
- WMOLdll(x,wm);
- newline();
- printf("wm %10.4f\n",wm);
-
- //...Get saturation properties given t,x; for i=1: x is liquid phase
- //..... for i=2: x is vapor phase
-
- SATTdll(t,x,i,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
- printf("P,Dl,Dv,xl[0],xv[0] %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",p,dl,dv,xliq[0],xvap[0]);
- i=2;
- SATTdll(t,x,i,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
- printf("P,Dl,Dv,xl[0],xv[0] %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",p,dl,dv,xliq[0],xvap[0]);
-
- //...Calculate saturation properties at a given p. i is same as SATT
- i=2;
- SATPdll(p,x,i,t,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
- printf("T,Dl,Dv,xl(1),xv(1) %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",t,dl,dv,xliq[0],xvap[0]);
-
- //...Other saturation routines are given in SAT_SUB.FOR
- t=300.0;
- p=20000.0;
-
- //...Calculate d from t,p,x
- //...If phase is known: (j=1: Liquid, j=2: Vapor)
- long j=1;
- double d,q,e,h,s,cv,cp,w,b,c,
- dpdrho,d2pdd2,dpdt,dhdt_d,dhdt_p,dhdp_t,dhdp_d,
- sigma,dhdd_t,dhdd_p,eta,tcx,pp,tt,hjt,h1,dd;
- long tmp_int=0;
- TPRHOdll(t,p,x,j,tmp_int,d,ierr,herr,errormessagelength);
- printf("T,P,D %10.4f,%10.4f,%10.4f\n",t,p,d);
-
- //...If phase is not known, call TPFLSH
- //...Calls to TPFLSH are much slower than TPRHO since SATT must be called first.
- //.....(If two phase, quality is returned as q)
- TPFLSHdll(t,p,x,d,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
- printf("T,P,D,H,CP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",t,p,d,h,cp);
-
- //...Calculate pressure (p), internal energy (e), enthalpy (h), entropy (s),
- //.....isochoric (cv) and isobaric (cp) heat capacities, speed of sound (w),
- //.....and Joule-Thomson coefficient (hjt) from t,d,x
- //.....(subroutines THERM2 and THERM3 contain more properties, see PROP_SUB.FOR)
- THERMdll(t,d,x,p,e,h,s,cv,cp,w,hjt);
-
- //...Calculate pressure
- PRESSdll(t,d,x,p);
-
- //...Calculate fugacity
- FGCTYdll(t,d,x,f);
-
- //...Calculate second and third virial coefficients
- VIRBdll (t,x,b);
- VIRCdll (t,x,c);
- printf("F,B,C %10.4f,%10.4f,%10.4f\n",f[0],b,c);
-
- //...Calculate the derivatives: dP/dD, d^2P/dD^2, dP/dT (D indicates density)
- //...(dD/dP, dD/dT, and dB/dT are also available, see PROP_SUB.FOR)
- DPDDdll (t,d,x,dpdrho);
- DPDD2dll (t,d,x,d2pdd2);
- DPDTdll (t,d,x,dpdt);
- printf("dP/dD,d2P/dD2,dP/dT %10.4f,%10.4f,%10.4f\n",dpdrho,d2pdd2,dpdt);
-
-
- //...Calculate derivatives of enthalpy with respect to T, P, and D
- DHD1dll(t,d,x,dhdt_d,dhdt_p,dhdd_t,dhdd_p,dhdp_t,dhdp_d);
- printf("Enthalpy derivatives %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",
- dhdt_d,dhdt_p,dhdd_t,dhdd_p/1000.0,dhdp_t);
- //...Calculate surface tension
- SURFTdll (t,dl,x,sigma,ierr,herr,errormessagelength);
- printf("T,SURF. TN. %10.4f,%10.4f\n",t,sigma);
-
- //...Calculate viscosity (eta) and thermal conductivity (tcx)
- TRNPRPdll (t,d,x,eta,tcx,ierr,herr,errormessagelength);
- printf("VIS.,TH.CND. %10.4f,%10.4f\n",eta,tcx*1000.0);
-
- //...General property calculation with inputs of t,d,x
- TDFLSHdll (t,d,x,pp,dl,dv,xliq,xvap,q,e,h1,s,cv,cp,w,ierr,herr,errormessagelength);
- printf("T, D, P from TDFLSH %10.4f,%10.4f,%10.4f\n",t,d,pp/1000.0);
-
- //...General property calculation with inputs of p,d,x
- PDFLSHdll (p,d,x,tt,dl,dv,xliq,xvap,q,e,h1,s,cv,cp,w,ierr,herr,errormessagelength);
- printf("T, D, P from PDFLSH %10.4f,%10.4f,%10.4f\n",tt,d,p/1000.0);
-
- //...General property calculation with inputs of p,h,x
- PHFLSHdll (p,h,x,tt,dd,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
- printf("T, D, P from PHFLSH %10.4f,%10.4f,%10.4f\n",tt,dd,p/1000.0);
-
- //...General property calculation with inputs of p,s,x
- PSFLSHdll (p,s,x,tt,dd,dl,dv,xliq,xvap,q,e,h1,cv,cp,w,ierr,herr,errormessagelength);
- printf("T, D, P from PSFLSH %10.4f,%10.4f,%10.4f\n",tt,dd,p/1000.0);
-
- //...General property calculation with inputs of d,h,x
- DHFLSHdll (d,h,x,tt,pp,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
- printf("T, D, P from DHFLSH %10.4f,%10.4f,%10.4f\n",tt,d,pp/1000.0);
-
- //...General property calculation with inputs of t,h,x
- // kr--flag specifying desired root for multi-valued inputs:
- // 1=return lower density root
- // 2=return higher density root
- long kr=1;
- THFLSHdll (t,h,x,
- kr,pp,dd,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
- printf("T, D, P from THFLSH %10.4f,%10.4f,%10.4f\n",t,dd,pp/1000.0);
-
- //...Other general property calculation routines are given in FLSH_SUB.FOR
- //...and FLASH2.FOR
-
- //...Calculate melting pressure
- t=100.0;
- MELTTdll (t,x,p,ierr,herr,errormessagelength);
- printf("Melting pressure(MPa) %10.4f,%10.4f\n",p/1000.0,t);
-
- //...Calculate melting temperature
- MELTPdll (p,x,tt,ierr,herr,errormessagelength);
- printf("Melting temperature(K)%10.4f,%10.4f\n",tt,p/1000.0);
-
- //...Calculate sublimation pressure
- t=200.0;
- SUBLTdll (t,x,p,ierr,herr,errormessagelength);
- printf("Sublimation pr.(kPa) %10.4f,%10.4f\n",p,t);
-
- //...Calculate sublimation temperature
- SUBLPdll (p,x,tt,ierr,herr,errormessagelength);
- printf("Sublimation temp.(K) %10.4f,%10.4f\n",tt,p);
-
- //...Get limits of the equations and check if t,d,p is a valid point
- //...Equation of state
- // call LIMITK ('EOS',1,t,d,p,tmin,tmax,Dmax,pmax,ierr,herr)
- //...Viscosity equation
- // call LIMITK ('ETA',1,t,d,p,tmin,tmax,Dmax,pmax,ierr,herr)
- //...Thermal conductivity equation
- // call LIMITK ('TCX',1,t,d,p,tmin,tmax,Dmax,pmax,ierr,herr)
-
- //...Other routines are given in UTILITY.FOR
-
- library.unload();
-
-return EXIT_SUCCESS;
-}
-
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_lib.h b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_lib.h
deleted file mode 100644
index dec78c1..0000000
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_lib.h
+++ /dev/null
@@ -1,779 +0,0 @@
-#ifndef REFPROP_H
-#define REFPROP_H
-//
-#include
-
-// Define data types that match the Fortran definitions. This is also
-// a possible starting point to introduce platform independence.
-// Partly taken from: http://arnholm.org/software/cppf77/cppf77.htm#Section5
-// An issue with characters still needs to be solved.
-//#include
-// The other data types can be handled:
-typedef long INTEGER;
-typedef float REAL;
-typedef double DOUBLE_PRECISION;
-typedef int LOGICAL;
-
-// Do some manual changes to the function names
-// if needed.
-#if defined(WIN32) || defined(_WIN32)
-// Define compiler specific calling conventions
-// for the shared library.
-# define LIBRARY_API __stdcall // __declspec(dllexport)
-// Do not define function names for the shared library,
-// in this case it is the REFPROP.dll and no special
-// names are needed.
-# define RPVersion RPVersion
-# define SETPATHdll SETPATHdll
-# define ABFL1dll ABFL1dll
-# define ABFL2dll ABFL2dll
-# define ACTVYdll ACTVYdll
-# define AGdll AGdll
-# define CCRITdll CCRITdll
-# define CP0dll CP0dll
-# define CRITPdll CRITPdll
-# define CSATKdll CSATKdll
-# define CV2PKdll CV2PKdll
-# define CVCPKdll CVCPKdll
-# define CVCPdll CVCPdll
-# define DBDTdll DBDTdll
-# define DBFL1dll DBFL1dll
-# define DBFL2dll DBFL2dll
-# define DDDPdll DDDPdll
-# define DDDTdll DDDTdll
-# define DEFLSHdll DEFLSHdll
-# define DHD1dll DHD1dll
-# define DHFL1dll DHFL1dll
-# define DHFL2dll DHFL2dll
-# define DHFLSHdll DHFLSHdll
-# define DIELECdll DIELECdll
-# define DOTFILLdll DOTFILLdll
-# define DPDD2dll DPDD2dll
-# define DPDDKdll DPDDKdll
-# define DPDDdll DPDDdll
-# define DPDTKdll DPDTKdll
-# define DPDTdll DPDTdll
-# define DPTSATKdll DPTSATKdll
-# define DSFLSHdll DSFLSHdll
-# define DSFL1dll DSFL1dll
-# define DSFL2dll DSFL2dll
-# define ENTHALdll ENTHALdll
-# define ENTROdll ENTROdll
-# define ESFLSHdll ESFLSHdll
-# define FGCTYdll FGCTYdll
-# define FPVdll FPVdll
-# define GERG04dll GERG04dll
-# define GETFIJdll GETFIJdll
-# define GETKTVdll GETKTVdll
-# define GIBBSdll GIBBSdll
-# define HSFLSHdll HSFLSHdll
-# define INFOdll INFOdll
-# define LIMITKdll LIMITKdll
-# define LIMITSdll LIMITSdll
-# define LIMITXdll LIMITXdll
-# define MELTPdll MELTPdll
-# define MELTTdll MELTTdll
-# define MLTH2Odll MLTH2Odll
-# define NAMEdll NAMEdll
-# define PDFL1dll PDFL1dll
-# define PDFLSHdll PDFLSHdll
-# define PEFLSHdll PEFLSHdll
-# define PHFL1dll PHFL1dll
-# define PHFLSHdll PHFLSHdll
-# define PQFLSHdll PQFLSHdll
-# define PREOSdll PREOSdll
-# define PRESSdll PRESSdll
-# define PSFL1dll PSFL1dll
-# define PSFLSHdll PSFLSHdll
-# define PUREFLDdll PUREFLDdll
-# define QMASSdll QMASSdll
-# define QMOLEdll QMOLEdll
-# define SATDdll SATDdll
-# define SATEdll SATEdll
-# define SATHdll SATHdll
-# define SATPdll SATPdll
-# define SATSdll SATSdll
-# define SATTdll SATTdll
-# define SETAGAdll SETAGAdll
-# define SETKTVdll SETKTVdll
-# define SETMIXdll SETMIXdll
-# define SETMODdll SETMODdll
-# define SETREFdll SETREFdll
-# define SETUPdll SETUPdll
-# define SPECGRdll SPECGRdll
-# define SUBLPdll SUBLPdll
-# define SUBLTdll SUBLTdll
-# define SURFTdll SURFTdll
-# define SURTENdll SURTENdll
-# define TDFLSHdll TDFLSHdll
-# define TEFLSHdll TEFLSHdll
-# define THERM0dll THERM0dll
-# define THERM2dll THERM2dll
-# define THERM3dll THERM3dll
-# define THERMdll THERMdll
-# define THFLSHdll THFLSHdll
-# define TPFLSHdll TPFLSHdll
-# define TPFL2dll TPFL2dll
-# define TPRHOdll TPRHOdll
-# define TQFLSHdll TQFLSHdll
-# define TRNPRPdll TRNPRPdll
-# define TSFLSHdll TSFLSHdll
-# define VIRBdll VIRBdll
-# define VIRCdll VIRCdll
-# define WMOLdll WMOLdll
-# define XMASSdll XMASSdll
-# define XMOLEdll XMOLEdll
-#else // defined(WIN32) || defined(_WIN32)
-// Define compiler specific calling conventions
-// for the shared library.
-# define LIBRARY_API
-// Define function names for the shared library,
-// in this case it is the librefprop.so and the
-// names might change on some systems during
-// the compilation of the Fortran files.
-# ifdef _CRAY
-# include
-# define RPVersion RPVERSION
-# define SETPATHdll SETPATHDLL
-# define ABFL1dll ABFL1DLL
-# define ABFL2dll ABFL2DLL
-# define ACTVYdll ACTVYDLL
-# define AGdll AGDLL
-# define CCRITdll CCRITDLL
-# define CP0dll CP0DLL
-# define CRITPdll CRITPDLL
-# define CSATKdll CSATKDLL
-# define CV2PKdll CV2PKDLL
-# define CVCPKdll CVCPKDLL
-# define CVCPdll CVCPDLL
-# define DBDTdll DBDTDLL
-# define DBFL1dll DBFL1DLL
-# define DBFL2dll DBFL2DLL
-# define DDDPdll DDDPDLL
-# define DDDTdll DDDTDLL
-# define DEFLSHdll DEFLSHDLL
-# define DHD1dll DHD1DLL
-# define DHFL1dll DHFL1DLL
-# define DHFL2dll DHFL2DLL
-# define DHFLSHdll DHFLSHDLL
-# define DIELECdll DIELECDLL
-# define DOTFILLdll DOTFILLDLL
-# define DPDD2dll DPDD2DLL
-# define DPDDKdll DPDDKDLL
-# define DPDDdll DPDDDLL
-# define DPDTKdll DPDTKDLL
-# define DPDTdll DPDTDLL
-# define DPTSATKdll DPTSATKDLL
-# define DSFLSHdll DSFLSHDLL
-# define DSFL1dll DSFL1DLL
-# define DSFL2dll DSFL2DLL
-# define ENTHALdll ENTHALDLL
-# define ENTROdll ENTRODLL
-# define ESFLSHdll ESFLSHDLL
-# define FGCTYdll FGCTYDLL
-# define FPVdll FPVDLL
-# define GERG04dll GERG04DLL
-# define GETFIJdll GETFIJDLL
-# define GETKTVdll GETKTVDLL
-# define GIBBSdll GIBBSDLL
-# define HSFLSHdll HSFLSHDLL
-# define INFOdll INFODLL
-# define LIMITKdll LIMITKDLL
-# define LIMITSdll LIMITSDLL
-# define LIMITXdll LIMITXDLL
-# define MELTPdll MELTPDLL
-# define MELTTdll MELTTDLL
-# define MLTH2Odll MLTH2ODLL
-# define NAMEdll NAMEDLL
-# define PDFL1dll PDFL1DLL
-# define PDFLSHdll PDFLSHDLL
-# define PEFLSHdll PEFLSHDLL
-# define PHFL1dll PHFL1DLL
-# define PHFLSHdll PHFLSHDLL
-# define PQFLSHdll PQFLSHDLL
-# define PREOSdll PREOSDLL
-# define PRESSdll PRESSDLL
-# define PSFL1dll PSFL1DLL
-# define PSFLSHdll PSFLSHDLL
-# define PUREFLDdll PUREFLDDLL
-# define QMASSdll QMASSDLL
-# define QMOLEdll QMOLEDLL
-# define SATDdll SATDDLL
-# define SATEdll SATEDLL
-# define SATHdll SATHDLL
-# define SATPdll SATPDLL
-# define SATSdll SATSDLL
-# define SATTdll SATTDLL
-# define SETAGAdll SETAGADLL
-# define SETKTVdll SETKTVDLL
-# define SETMIXdll SETMIXDLL
-# define SETMODdll SETMODDLL
-# define SETREFdll SETREFDLL
-# define SETUPdll SETUPDLL
-# define SPECGRdll SPECGRDLL
-# define SUBLPdll SUBLPDLL
-# define SUBLTdll SUBLTDLL
-# define SURFTdll SURFTDLL
-# define SURTENdll SURTENDLL
-# define TDFLSHdll TDFLSHDLL
-# define TEFLSHdll TEFLSHDLL
-# define THERM0dll THERM0DLL
-# define THERM2dll THERM2DLL
-# define THERM3dll THERM3DLL
-# define THERMdll THERMDLL
-# define THFLSHdll THFLSHDLL
-# define TPFLSHdll TPFLSHDLL
-# define TPFL2dll TPFL2DLL
-# define TPRHOdll TPRHODLL
-# define TQFLSHdll TQFLSHDLL
-# define TRNPRPdll TRNPRPDLL
-# define TSFLSHdll TSFLSHDLL
-# define VIRBdll VIRBDLL
-# define VIRCdll VIRCDLL
-# define WMOLdll WMOLDLL
-# define XMASSdll XMASSDLL
-# define XMOLEdll XMOLEDLL
-# else // _CRAY not defined
-# if !defined(_AIX) && !defined(__hpux)
-# define RPVersion rpversion_
-# define SETPATHdll setpathdll_
-# define ABFL1dll abfl1dll_
-# define ABFL2dll abfl2dll_
-# define ACTVYdll actvydll_
-# define AGdll agdll_
-# define CCRITdll ccritdll_
-# define CP0dll cp0dll_
-# define CRITPdll critpdll_
-# define CSATKdll csatkdll_
-# define CV2PKdll cv2pkdll_
-# define CVCPKdll cvcpkdll_
-# define CVCPdll cvcpdll_
-# define DBDTdll dbdtdll_
-# define DBFL1dll dbfl1dll_
-# define DBFL2dll dbfl2dll_
-# define DDDPdll dddpdll_
-# define DDDTdll dddtdll_
-# define DEFLSHdll deflshdll_
-# define DHD1dll dhd1dll_
-# define DHFL1dll dhfl1dll_
-# define DHFL2dll dhfl2dll_
-# define DHFLSHdll dhflshdll_
-# define DIELECdll dielecdll_
-# define DOTFILLdll dotfilldll_
-# define DPDD2dll dpdd2dll_
-# define DPDDKdll dpddkdll_
-# define DPDDdll dpdddll_
-# define DPDTKdll dpdtkdll_
-# define DPDTdll dpdtdll_
-# define DPTSATKdll dptsatkdll_
-# define DSFLSHdll dsflshdll_
-# define DSFL1dll dsfl1dll_
-# define DSFL2dll dsfl2dll_
-# define ENTHALdll enthaldll_
-# define ENTROdll entrodll_
-# define ESFLSHdll esflshdll_
-# define FGCTYdll fgctydll_
-# define FPVdll fpvdll_
-# define GERG04dll gerg04dll_
-# define GETFIJdll getfijdll_
-# define GETKTVdll getktvdll_
-# define GIBBSdll gibbsdll_
-# define HSFLSHdll hsflshdll_
-# define INFOdll infodll_
-# define LIMITKdll limitkdll_
-# define LIMITSdll limitsdll_
-# define LIMITXdll limitxdll_
-# define MELTPdll meltpdll_
-# define MELTTdll melttdll_
-# define MLTH2Odll mlth2odll_
-# define NAMEdll namedll_
-# define PDFL1dll pdfl1dll_
-# define PDFLSHdll pdflshdll_
-# define PEFLSHdll peflshdll_
-# define PHFL1dll phfl1dll_
-# define PHFLSHdll phflshdll_
-# define PQFLSHdll pqflshdll_
-# define PREOSdll preosdll_
-# define PRESSdll pressdll_
-# define PSFL1dll psfl1dll_
-# define PSFLSHdll psflshdll_
-# define PUREFLDdll pureflddll_
-# define QMASSdll qmassdll_
-# define QMOLEdll qmoledll_
-# define SATDdll satddll_
-# define SATEdll satedll_
-# define SATHdll sathdll_
-# define SATPdll satpdll_
-# define SATSdll satsdll_
-# define SATTdll sattdll_
-# define SETAGAdll setagadll_
-# define SETKTVdll setktvdll_
-# define SETMIXdll setmixdll_
-# define SETMODdll setmoddll_
-# define SETREFdll setrefdll_
-# define SETUPdll setupdll_
-# define SPECGRdll specgrdll_
-# define SUBLPdll sublpdll_
-# define SUBLTdll subltdll_
-# define SURFTdll surftdll_
-# define SURTENdll surtendll_
-# define TDFLSHdll tdflshdll_
-# define TEFLSHdll teflshdll_
-# define THERM0dll therm0dll_
-# define THERM2dll therm2dll_
-# define THERM3dll therm3dll_
-# define THERMdll thermdll_
-# define THFLSHdll thflshdll_
-# define TPFLSHdll tpflshdll_
-# define TPFL2dll tpfl2dll_
-# define TPRHOdll tprhodll_
-# define TQFLSHdll tqflshdll_
-# define TRNPRPdll trnprpdll_
-# define TSFLSHdll tsflshdll_
-# define VIRBdll virbdll_
-# define VIRCdll vircdll_
-# define WMOLdll wmoldll_
-# define XMASSdll xmassdll_
-# define XMOLEdll xmoledll_
-# endif // !defined(_AIX) && !defined(__hpux)
-# endif // _CRAY not defined, else branch
-#endif // defined(WIN32) || defined(_WIN32), else branch
-
-
-// define new macros for function names
-// http://stackoverflow.com/questions/195975/how-to-make-a-char-string-from-a-c-macros-value
-#define STR_VALUE(arg) #arg
-#define FUNCTION_NAME(name) STR_VALUE(name)
-//#define TEST_FUNC test_func
-//#define TEST_FUNC_NAME FUNCTION_NAME(TEST_FUNC)
-
-#define RPVersion_NAME FUNCTION_NAME(RPVersion)
-#define SETPATHdll_NAME FUNCTION_NAME(SETPATHdll)
-#define ABFL1dll_NAME FUNCTION_NAME(ABFL1dll)
-#define ABFL2dll_NAME FUNCTION_NAME(ABFL2dll)
-#define ACTVYdll_NAME FUNCTION_NAME(ACTVYdll)
-#define AGdll_NAME FUNCTION_NAME(AGdll)
-#define CCRITdll_NAME FUNCTION_NAME(CCRITdll)
-#define CP0dll_NAME FUNCTION_NAME(CP0dll)
-#define CRITPdll_NAME FUNCTION_NAME(CRITPdll)
-#define CSATKdll_NAME FUNCTION_NAME(CSATKdll)
-#define CV2PKdll_NAME FUNCTION_NAME(CV2PKdll)
-#define CVCPKdll_NAME FUNCTION_NAME(CVCPKdll)
-#define CVCPdll_NAME FUNCTION_NAME(CVCPdll)
-#define DBDTdll_NAME FUNCTION_NAME(DBDTdll)
-#define DBFL1dll_NAME FUNCTION_NAME(DBFL1dll)
-#define DBFL2dll_NAME FUNCTION_NAME(DBFL2dll)
-#define DDDPdll_NAME FUNCTION_NAME(DDDPdll)
-#define DDDTdll_NAME FUNCTION_NAME(DDDTdll)
-#define DEFLSHdll_NAME FUNCTION_NAME(DEFLSHdll)
-#define DHD1dll_NAME FUNCTION_NAME(DHD1dll)
-#define DHFL1dll_NAME FUNCTION_NAME(DHFL1dll)
-#define DHFL2dll_NAME FUNCTION_NAME(DHFL2dll)
-#define DHFLSHdll_NAME FUNCTION_NAME(DHFLSHdll)
-#define DIELECdll_NAME FUNCTION_NAME(DIELECdll)
-#define DOTFILLdll_NAME FUNCTION_NAME(DOTFILLdll)
-#define DPDD2dll_NAME FUNCTION_NAME(DPDD2dll)
-#define DPDDKdll_NAME FUNCTION_NAME(DPDDKdll)
-#define DPDDdll_NAME FUNCTION_NAME(DPDDdll)
-#define DPDTKdll_NAME FUNCTION_NAME(DPDTKdll)
-#define DPDTdll_NAME FUNCTION_NAME(DPDTdll)
-#define DPTSATKdll_NAME FUNCTION_NAME(DPTSATKdll)
-#define DSFLSHdll_NAME FUNCTION_NAME(DSFLSHdll)
-#define DSFL1dll_NAME FUNCTION_NAME(DSFL1dll)
-#define DSFL2dll_NAME FUNCTION_NAME(DSFL2dll)
-#define ENTHALdll_NAME FUNCTION_NAME(ENTHALdll)
-#define ENTROdll_NAME FUNCTION_NAME(ENTROdll)
-#define ESFLSHdll_NAME FUNCTION_NAME(ESFLSHdll)
-#define FGCTYdll_NAME FUNCTION_NAME(FGCTYdll)
-#define FPVdll_NAME FUNCTION_NAME(FPVdll)
-#define GERG04dll_NAME FUNCTION_NAME(GERG04dll)
-#define GETFIJdll_NAME FUNCTION_NAME(GETFIJdll)
-#define GETKTVdll_NAME FUNCTION_NAME(GETKTVdll)
-#define GIBBSdll_NAME FUNCTION_NAME(GIBBSdll)
-#define HSFLSHdll_NAME FUNCTION_NAME(HSFLSHdll)
-#define INFOdll_NAME FUNCTION_NAME(INFOdll)
-#define LIMITKdll_NAME FUNCTION_NAME(LIMITKdll)
-#define LIMITSdll_NAME FUNCTION_NAME(LIMITSdll)
-#define LIMITXdll_NAME FUNCTION_NAME(LIMITXdll)
-#define MELTPdll_NAME FUNCTION_NAME(MELTPdll)
-#define MELTTdll_NAME FUNCTION_NAME(MELTTdll)
-#define MLTH2Odll_NAME FUNCTION_NAME(MLTH2Odll)
-#define NAMEdll_NAME FUNCTION_NAME(NAMEdll)
-#define PDFL1dll_NAME FUNCTION_NAME(PDFL1dll)
-#define PDFLSHdll_NAME FUNCTION_NAME(PDFLSHdll)
-#define PEFLSHdll_NAME FUNCTION_NAME(PEFLSHdll)
-#define PHFL1dll_NAME FUNCTION_NAME(PHFL1dll)
-#define PHFLSHdll_NAME FUNCTION_NAME(PHFLSHdll)
-#define PQFLSHdll_NAME FUNCTION_NAME(PQFLSHdll)
-#define PREOSdll_NAME FUNCTION_NAME(PREOSdll)
-#define PRESSdll_NAME FUNCTION_NAME(PRESSdll)
-#define PSFL1dll_NAME FUNCTION_NAME(PSFL1dll)
-#define PSFLSHdll_NAME FUNCTION_NAME(PSFLSHdll)
-#define PUREFLDdll_NAME FUNCTION_NAME(PUREFLDdll)
-#define QMASSdll_NAME FUNCTION_NAME(QMASSdll)
-#define QMOLEdll_NAME FUNCTION_NAME(QMOLEdll)
-#define SATDdll_NAME FUNCTION_NAME(SATDdll)
-#define SATEdll_NAME FUNCTION_NAME(SATEdll)
-#define SATHdll_NAME FUNCTION_NAME(SATHdll)
-#define SATPdll_NAME FUNCTION_NAME(SATPdll)
-#define SATSdll_NAME FUNCTION_NAME(SATSdll)
-#define SATTdll_NAME FUNCTION_NAME(SATTdll)
-#define SETAGAdll_NAME FUNCTION_NAME(SETAGAdll)
-#define SETKTVdll_NAME FUNCTION_NAME(SETKTVdll)
-#define SETMIXdll_NAME FUNCTION_NAME(SETMIXdll)
-#define SETMODdll_NAME FUNCTION_NAME(SETMODdll)
-#define SETREFdll_NAME FUNCTION_NAME(SETREFdll)
-#define SETUPdll_NAME FUNCTION_NAME(SETUPdll)
-#define SPECGRdll_NAME FUNCTION_NAME(SPECGRdll)
-#define SUBLPdll_NAME FUNCTION_NAME(SUBLPdll)
-#define SUBLTdll_NAME FUNCTION_NAME(SUBLTdll)
-#define SURFTdll_NAME FUNCTION_NAME(SURFTdll)
-#define SURTENdll_NAME FUNCTION_NAME(SURTENdll)
-#define TDFLSHdll_NAME FUNCTION_NAME(TDFLSHdll)
-#define TEFLSHdll_NAME FUNCTION_NAME(TEFLSHdll)
-#define THERM0dll_NAME FUNCTION_NAME(THERM0dll)
-#define THERM2dll_NAME FUNCTION_NAME(THERM2dll)
-#define THERM3dll_NAME FUNCTION_NAME(THERM3dll)
-#define THERMdll_NAME FUNCTION_NAME(THERMdll)
-#define THFLSHdll_NAME FUNCTION_NAME(THFLSHdll)
-#define TPFLSHdll_NAME FUNCTION_NAME(TPFLSHdll)
-#define TPFL2dll_NAME FUNCTION_NAME(TPFL2dll)
-#define TPRHOdll_NAME FUNCTION_NAME(TPRHOdll)
-#define TQFLSHdll_NAME FUNCTION_NAME(TQFLSHdll)
-#define TRNPRPdll_NAME FUNCTION_NAME(TRNPRPdll)
-#define TSFLSHdll_NAME FUNCTION_NAME(TSFLSHdll)
-#define VIRBdll_NAME FUNCTION_NAME(VIRBdll)
-#define VIRCdll_NAME FUNCTION_NAME(VIRCdll)
-#define WMOLdll_NAME FUNCTION_NAME(WMOLdll)
-#define XMASSdll_NAME FUNCTION_NAME(XMASSdll)
-#define XMOLEdll_NAME FUNCTION_NAME(XMOLEdll)
-
-
-// I'll try to follow this example from:
-// http://www.gershnik.com/tips/cpp.asp
-////not a pointer but function type
-//typedef void [compiler specific stuff] func_t(int, float);
-//
-////this is the function declaration
-//func_t func;
-//
-////and this is the pointer type just for convenience
-//typedef func_t * func_ptr;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
- // extra function for setup
- typedef void (LIBRARY_API RPVersion_TYPE )( char* );
- typedef void (LIBRARY_API SETPATHdll_TYPE)( const char* );
- //
- typedef void (LIBRARY_API ABFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API ABFL2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API ACTVYdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API AGdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API CCRITdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API CP0dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API CRITPdll_TYPE)(DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API CSATKdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API CV2PKdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API CVCPKdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API CVCPdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DBDTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DBFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DBFL2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DDDPdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DDDTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DEFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DHD1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DHFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
- typedef void (LIBRARY_API DHFL2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
- typedef void (LIBRARY_API DHFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DIELECdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DOTFILLdll_TYPE)(INTEGER &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DPDD2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DPDDKdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DPDDdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DPDTKdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DPDTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API DPTSATKdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DSFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API DSFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
- typedef void (LIBRARY_API DSFL2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
- typedef void (LIBRARY_API ENTHALdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API ENTROdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API ESFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API FGCTYdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *);
- typedef void (LIBRARY_API FPVdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API GERG04dll_TYPE)(INTEGER &,INTEGER &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API GETFIJdll_TYPE)(char*,DOUBLE_PRECISION *,char*,char*,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API GETKTVdll_TYPE)(INTEGER &,INTEGER &,char*,DOUBLE_PRECISION *,char*,char*,char*,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API GIBBSdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API HSFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API INFOdll_TYPE)(INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API LIMITKdll_TYPE)(char*,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
- typedef void (LIBRARY_API LIMITSdll_TYPE)(char*,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER );
- typedef void (LIBRARY_API LIMITXdll_TYPE)(char*,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
- typedef void (LIBRARY_API MELTPdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API MELTTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API MLTH2Odll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API NAMEdll_TYPE)(INTEGER &,char*,char*,char*,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API PDFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PDFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PEFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PHFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PHFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PQFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PREOSdll_TYPE)(INTEGER &);
- typedef void (LIBRARY_API PRESSdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API PSFL1dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PSFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API PUREFLDdll_TYPE)(INTEGER &);
- typedef void (LIBRARY_API QMASSdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API QMOLEdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SATDdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SATEdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SATHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SATPdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SATSdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SATTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SETAGAdll_TYPE)(INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SETKTVdll_TYPE)(INTEGER &,INTEGER &,char*,DOUBLE_PRECISION *,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API SETMIXdll_TYPE)(char*,char*,char*,INTEGER &,char*,DOUBLE_PRECISION *,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API SETMODdll_TYPE)(INTEGER &,char*,char*,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API SETREFdll_TYPE)(char*,INTEGER &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER ,INTEGER );
- //typedef void (LIBRARY_API SETUPdll_TYPE)(INTEGER &,char*,char*,char*,INTEGER &,char*,INTEGER ,INTEGER ,INTEGER ,INTEGER );
- typedef void (LIBRARY_API SETUPdll_TYPE)(INTEGER &,char*,char*,char*,INTEGER &,char*);
- typedef void (LIBRARY_API SPECGRdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API SUBLPdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SUBLTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SURFTdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API SURTENdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TDFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TEFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API THERM0dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API THERM2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API THERM3dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API THERMdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API THFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TPFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TPFL2dll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );//added by henning francke
- typedef void (LIBRARY_API TPRHOdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,INTEGER &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TQFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TRNPRPdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API TSFLSHdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,INTEGER &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,DOUBLE_PRECISION &,INTEGER &,char*,INTEGER );
- typedef void (LIBRARY_API VIRBdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API VIRCdll_TYPE)(DOUBLE_PRECISION &,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API WMOLdll_TYPE)(DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API XMASSdll_TYPE)(DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
- typedef void (LIBRARY_API XMOLEdll_TYPE)(DOUBLE_PRECISION *,DOUBLE_PRECISION *,DOUBLE_PRECISION &);
-
- //Declare the functions for direct access
- RPVersion_TYPE RPVersion;
- SETPATHdll_TYPE SETPATHdll;
- ABFL1dll_TYPE ABFL1dll;
- ABFL2dll_TYPE ABFL2dll;
- ACTVYdll_TYPE ACTVYdll;
- AGdll_TYPE AGdll;
- CCRITdll_TYPE CCRITdll;
- CP0dll_TYPE CP0dll;
- CRITPdll_TYPE CRITPdll;
- CSATKdll_TYPE CSATKdll;
- CV2PKdll_TYPE CV2PKdll;
- CVCPKdll_TYPE CVCPKdll;
- CVCPdll_TYPE CVCPdll;
- DBDTdll_TYPE DBDTdll;
- DBFL1dll_TYPE DBFL1dll;
- DBFL2dll_TYPE DBFL2dll;
- DDDPdll_TYPE DDDPdll;
- DDDTdll_TYPE DDDTdll;
- DEFLSHdll_TYPE DEFLSHdll;
- DHD1dll_TYPE DHD1dll;
- DHFLSHdll_TYPE DHFLSHdll;
- DHFL1dll_TYPE DHFL1dll;
- DHFL2dll_TYPE DHFL2dll;
- DIELECdll_TYPE DIELECdll;
- DOTFILLdll_TYPE DOTFILLdll;
- DPDD2dll_TYPE DPDD2dll;
- DPDDKdll_TYPE DPDDKdll;
- DPDDdll_TYPE DPDDdll;
- DPDTKdll_TYPE DPDTKdll;
- DPDTdll_TYPE DPDTdll;
- DPTSATKdll_TYPE DPTSATKdll;
- DSFLSHdll_TYPE DSFLSHdll;
- DSFL1dll_TYPE DSFL1dll;
- DSFL2dll_TYPE DSFL2dll;
- ENTHALdll_TYPE ENTHALdll;
- ENTROdll_TYPE ENTROdll;
- ESFLSHdll_TYPE ESFLSHdll;
- FGCTYdll_TYPE FGCTYdll;
- FPVdll_TYPE FPVdll;
- GERG04dll_TYPE GERG04dll;
- GETFIJdll_TYPE GETFIJdll;
- GETKTVdll_TYPE GETKTVdll;
- GIBBSdll_TYPE GIBBSdll;
- HSFLSHdll_TYPE HSFLSHdll;
- INFOdll_TYPE INFOdll;
- LIMITKdll_TYPE LIMITKdll;
- LIMITSdll_TYPE LIMITSdll;
- LIMITXdll_TYPE LIMITXdll;
- MELTPdll_TYPE MELTPdll;
- MELTTdll_TYPE MELTTdll;
- MLTH2Odll_TYPE MLTH2Odll;
- NAMEdll_TYPE NAMEdll;
- PDFL1dll_TYPE PDFL1dll;
- PDFLSHdll_TYPE PDFLSHdll;
- PEFLSHdll_TYPE PEFLSHdll;
- PHFL1dll_TYPE PHFL1dll;
- PHFLSHdll_TYPE PHFLSHdll;
- PQFLSHdll_TYPE PQFLSHdll;
- PREOSdll_TYPE PREOSdll;
- PRESSdll_TYPE PRESSdll;
- PSFL1dll_TYPE PSFL1dll;
- PSFLSHdll_TYPE PSFLSHdll;
- PUREFLDdll_TYPE PUREFLDdll;
- QMASSdll_TYPE QMASSdll;
- QMOLEdll_TYPE QMOLEdll;
- SATDdll_TYPE SATDdll;
- SATEdll_TYPE SATEdll;
- SATHdll_TYPE SATHdll;
- SATPdll_TYPE SATPdll;
- SATSdll_TYPE SATSdll;
- SATTdll_TYPE SATTdll;
- SETAGAdll_TYPE SETAGAdll;
- SETKTVdll_TYPE SETKTVdll;
- SETMIXdll_TYPE SETMIXdll;
- SETMODdll_TYPE SETMODdll;
- SETREFdll_TYPE SETREFdll;
- SETUPdll_TYPE SETUPdll;
- SPECGRdll_TYPE SPECGRdll;
- SUBLPdll_TYPE SUBLPdll;
- SUBLTdll_TYPE SUBLTdll;
- SURFTdll_TYPE SURFTdll;
- SURTENdll_TYPE SURTENdll;
- TDFLSHdll_TYPE TDFLSHdll;
- TEFLSHdll_TYPE TEFLSHdll;
- THERM0dll_TYPE THERM0dll;
- THERM2dll_TYPE THERM2dll;
- THERM3dll_TYPE THERM3dll;
- THERMdll_TYPE THERMdll;
- THFLSHdll_TYPE THFLSHdll;
- TPFLSHdll_TYPE TPFLSHdll;
- TPFL2dll_TYPE TPFL2dll;
- TPRHOdll_TYPE TPRHOdll;
- TQFLSHdll_TYPE TQFLSHdll;
- TRNPRPdll_TYPE TRNPRPdll;
- TSFLSHdll_TYPE TSFLSHdll;
- VIRBdll_TYPE VIRBdll;
- VIRCdll_TYPE VIRCdll;
- WMOLdll_TYPE WMOLdll;
- XMASSdll_TYPE XMASSdll;
- XMOLEdll_TYPE XMOLEdll;
-
- //Define explicit function pointers
- typedef RPVersion_TYPE * RPVersion_POINTER;
- typedef SETPATHdll_TYPE * SETPATHdll_POINTER;
- typedef ABFL1dll_TYPE * ABFL1dll_POINTER;
- typedef ABFL2dll_TYPE * ABFL2dll_POINTER;
- typedef ACTVYdll_TYPE * ACTVYdll_POINTER;
- typedef AGdll_TYPE * AGdll_POINTER;
- typedef CCRITdll_TYPE * CCRITdll_POINTER;
- typedef CP0dll_TYPE * CP0dll_POINTER;
- typedef CRITPdll_TYPE * CRITPdll_POINTER;
- typedef CSATKdll_TYPE * CSATKdll_POINTER;
- typedef CV2PKdll_TYPE * CV2PKdll_POINTER;
- typedef CVCPKdll_TYPE * CVCPKdll_POINTER;
- typedef CVCPdll_TYPE * CVCPdll_POINTER;
- typedef DBDTdll_TYPE * DBDTdll_POINTER;
- typedef DBFL1dll_TYPE * DBFL1dll_POINTER;
- typedef DBFL2dll_TYPE * DBFL2dll_POINTER;
- typedef DDDPdll_TYPE * DDDPdll_POINTER;
- typedef DDDTdll_TYPE * DDDTdll_POINTER;
- typedef DEFLSHdll_TYPE * DEFLSHdll_POINTER;
- typedef DHD1dll_TYPE * DHD1dll_POINTER;
- typedef DHFLSHdll_TYPE * DHFLSHdll_POINTER;
- typedef DHFL1dll_TYPE * DHFL1dll_POINTER;
- typedef DHFL2dll_TYPE * DHFL2dll_POINTER;
- typedef DIELECdll_TYPE * DIELECdll_POINTER;
- typedef DOTFILLdll_TYPE * DOTFILLdll_POINTER;
- typedef DPDD2dll_TYPE * DPDD2dll_POINTER;
- typedef DPDDKdll_TYPE * DPDDKdll_POINTER;
- typedef DPDDdll_TYPE * DPDDdll_POINTER;
- typedef DPDTKdll_TYPE * DPDTKdll_POINTER;
- typedef DPDTdll_TYPE * DPDTdll_POINTER;
- typedef DPTSATKdll_TYPE * DPTSATKdll_POINTER;
- typedef DSFLSHdll_TYPE * DSFLSHdll_POINTER;
- typedef DSFL1dll_TYPE * DSFL1dll_POINTER;
- typedef DSFL2dll_TYPE * DSFL2dll_POINTER;
- typedef ENTHALdll_TYPE * ENTHALdll_POINTER;
- typedef ENTROdll_TYPE * ENTROdll_POINTER;
- typedef ESFLSHdll_TYPE * ESFLSHdll_POINTER;
- typedef FGCTYdll_TYPE * FGCTYdll_POINTER;
- typedef FPVdll_TYPE * FPVdll_POINTER;
- typedef GERG04dll_TYPE * GERG04dll_POINTER;
- typedef GETFIJdll_TYPE * GETFIJdll_POINTER;
- typedef GETKTVdll_TYPE * GETKTVdll_POINTER;
- typedef GIBBSdll_TYPE * GIBBSdll_POINTER;
- typedef HSFLSHdll_TYPE * HSFLSHdll_POINTER;
- typedef INFOdll_TYPE * INFOdll_POINTER;
- typedef LIMITKdll_TYPE * LIMITKdll_POINTER;
- typedef LIMITSdll_TYPE * LIMITSdll_POINTER;
- typedef LIMITXdll_TYPE * LIMITXdll_POINTER;
- typedef MELTPdll_TYPE * MELTPdll_POINTER;
- typedef MELTTdll_TYPE * MELTTdll_POINTER;
- typedef MLTH2Odll_TYPE * MLTH2Odll_POINTER;
- typedef NAMEdll_TYPE * NAMEdll_POINTER;
- typedef PDFL1dll_TYPE * PDFL1dll_POINTER;
- typedef PDFLSHdll_TYPE * PDFLSHdll_POINTER;
- typedef PEFLSHdll_TYPE * PEFLSHdll_POINTER;
- typedef PHFL1dll_TYPE * PHFL1dll_POINTER;
- typedef PHFLSHdll_TYPE * PHFLSHdll_POINTER;
- typedef PQFLSHdll_TYPE * PQFLSHdll_POINTER;
- typedef PREOSdll_TYPE * PREOSdll_POINTER;
- typedef PRESSdll_TYPE * PRESSdll_POINTER;
- typedef PSFL1dll_TYPE * PSFL1dll_POINTER;
- typedef PSFLSHdll_TYPE * PSFLSHdll_POINTER;
- typedef PUREFLDdll_TYPE * PUREFLDdll_POINTER;
- typedef QMASSdll_TYPE * QMASSdll_POINTER;
- typedef QMOLEdll_TYPE * QMOLEdll_POINTER;
- typedef SATDdll_TYPE * SATDdll_POINTER;
- typedef SATEdll_TYPE * SATEdll_POINTER;
- typedef SATHdll_TYPE * SATHdll_POINTER;
- typedef SATPdll_TYPE * SATPdll_POINTER;
- typedef SATSdll_TYPE * SATSdll_POINTER;
- typedef SATTdll_TYPE * SATTdll_POINTER;
- typedef SETAGAdll_TYPE * SETAGAdll_POINTER;
- typedef SETKTVdll_TYPE * SETKTVdll_POINTER;
- typedef SETMIXdll_TYPE * SETMIXdll_POINTER;
- typedef SETMODdll_TYPE * SETMODdll_POINTER;
- typedef SETREFdll_TYPE * SETREFdll_POINTER;
- typedef SETUPdll_TYPE * SETUPdll_POINTER;
- typedef SPECGRdll_TYPE * SPECGRdll_POINTER;
- typedef SUBLPdll_TYPE * SUBLPdll_POINTER;
- typedef SUBLTdll_TYPE * SUBLTdll_POINTER;
- typedef SURFTdll_TYPE * SURFTdll_POINTER;
- typedef SURTENdll_TYPE * SURTENdll_POINTER;
- typedef TDFLSHdll_TYPE * TDFLSHdll_POINTER;
- typedef TEFLSHdll_TYPE * TEFLSHdll_POINTER;
- typedef THERM0dll_TYPE * THERM0dll_POINTER;
- typedef THERM2dll_TYPE * THERM2dll_POINTER;
- typedef THERM3dll_TYPE * THERM3dll_POINTER;
- typedef THERMdll_TYPE * THERMdll_POINTER;
- typedef THFLSHdll_TYPE * THFLSHdll_POINTER;
- typedef TPFLSHdll_TYPE * TPFLSHdll_POINTER;
- typedef TPFL2dll_TYPE * TPFL2dll_POINTER;
- typedef TPRHOdll_TYPE * TPRHOdll_POINTER;
- typedef TQFLSHdll_TYPE * TQFLSHdll_POINTER;
- typedef TRNPRPdll_TYPE * TRNPRPdll_POINTER;
- typedef TSFLSHdll_TYPE * TSFLSHdll_POINTER;
- typedef VIRBdll_TYPE * VIRBdll_POINTER;
- typedef VIRCdll_TYPE * VIRCdll_POINTER;
- typedef WMOLdll_TYPE * WMOLdll_POINTER;
- typedef XMASSdll_TYPE * XMASSdll_POINTER;
- typedef XMOLEdll_TYPE * XMOLEdll_POINTER;
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-// REFPROP_H
-#endif
-
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.h b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.h
similarity index 100%
rename from _REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.h
rename to _REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.h
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.org.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.org.cpp
similarity index 100%
rename from _REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.org.cpp
rename to _REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.org.cpp
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.poco.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.poco.cpp
similarity index 100%
rename from _REFPROP-Wrapper/Version 0.5_linux/refprop_wrapper.poco.cpp
rename to _REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.poco.cpp
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/refpropwrappertest.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp
similarity index 96%
rename from _REFPROP-Wrapper/Version 0.5_linux/refpropwrappertest.cpp
rename to _REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp
index 9fb00fc..65b0501 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/refpropwrappertest.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp
@@ -21,7 +21,7 @@ int main(int argc, char* argv[]){
if (argc<5){
// printf("usage: refpropwrappertest.exe statevars fluidname1|fluidname2|... statevar1 statevar2 REFPROPdir massfractionComponent1 \nexample: refpropwrappertest \"pT\" \"isobutan|propane\" 1e5 293 \"d:\\Programme\\REFPROP\\\" .1");
- printf("usage: refpropwrappertest statevars fluidname1|fluidname2|... statevar1 statevar2 REFPROPdir massfractionComponent1 \nexample: refpropwrappertest \"pT\" \"ISOBUTAN|PROPANE\" 1e5 293 \"/home/jowr/Documents/Fluids/refprop/v9.0/\" .1\n");
+ printf("usage: refpropwrappertest statevars fluidname1|fluidname2|... statevar1 statevar2 REFPROPdir massfractionComponent1 \nexample: refpropwrappertest \"pT\" \"ISOBUTAN|PROPANE\" 1e5 293 \"/home/jowr/Documents/Fluids/Refprop/v9.0/\" .1\n");
return 1;
}
diff --git a/readme.md b/readme.md
index 3e833ac..7bdb6da 100644
--- a/readme.md
+++ b/readme.md
@@ -2,8 +2,6 @@
#Welcome to REFPROP2Modelica!
This piece of software enables the user to access the Refprop fluid property database from within Modelica. The aim is to develop wrapper classes and integrate them with the "Media" framework inside Modelica. It has only been tested with Dymola sofar.
-Please be aware that you might need a copy of the Poco C++ framework to compile the wrapper files yourself. You can find it at: http://pocoproject.org/. The general idea is to use this framework to implement platform independent library loading and caching, but it is still a long way to go.
-
## Installation Instructions
### Windows
@@ -12,16 +10,18 @@ For Windows, please follow these instructions
1. After downloading and unzipping rename folder containing these files to "MediaTwoPhaseMixture".
2. Copy \_REFPROP-Wrapper\Version x.x\REFPROP_WRAPPER.LIB to %DYMOLADIR%\\BIN\\LIB\ (%DYMOLADIR% is DYMOLA's program directory)
3. Copy \_REFPROP-Wrapper\Version x.x\REFPROP_WRAPPER.H to %DYMOLADIR%\\SOURCE\\
-4. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the package). Make sure you mask the backslashes. It should look something like: constant String REFPROP_PATH = "C:\\Program Files\\REFPROP\\";
+4. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the Modelica package). Make sure you mask the backslashes. It should look something like: constant String REFPROP_PATH = "C:\\Program Files\\REFPROP\\";
### Linux
For installing on a Linux machine, please follow the instructions in the Makefile provided in the directory containing the Linux version of the wrapper class. You only have to type in the right directories and install all the compilers / libraries required.
1. After downloading and unzipping rename folder containing these files to "MediaTwoPhaseMixture".
2. Change the paths in _REFPROP-Wrapper/Version x.x_linux/Makefile to your needs.
-3. Call "make libheader library" and "sudo make installlib" to compile and install refprop.
-4. Call "make wrapheader wrapper" and "sudo make installwrap" as well as "sudo make fixit" to compile and install the wrapper.
-5. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the package). It should look something like: constant String REFPROP_PATH = "/home/user/Refprop/";
+3. Make sure to have the shared library "librefprop.so" available. You might want to check https://github.com/jowr/librefprop.so for details.
+4. Call "make all" and "sudo make install" as well as "sudo make fixit" to compile and install the wrapper library.
+5. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the Modelica package). It should look something like: constant String REFPROP_PATH = "/home/user/Refprop/";
+
+To remove the files from your system, please use "sudo make uninstall". Please be aware that you might need a copy of the Poco C++ framework to compile future versions the wrapper files yourself. You can find it at: http://pocoproject.org/. The general idea is to use this framework to implement platform independent library loading and caching, but it is still a long way to go.
## General Remarks
Please note that you need a working and licensed copy of Refprop in order to use the software provided here. This is not a replacement for Refprop.
\ No newline at end of file
From d948b64be4d50476907d60d20ea288009efd6b9c Mon Sep 17 00:00:00 2001
From: jowr
Date: Wed, 31 Oct 2012 06:21:34 -0700
Subject: [PATCH 10/57] 2012:10:31 14:20 - Now using the poco framework in the
standard version, remember to have all dependencies when compiling.
---
_REFPROP-Wrapper/Version 0.5_linux/Makefile | 4 +-
.../src/refprop_wrapper.poco.cpp | 716 +++++++++++-------
.../src/refpropwrappertest.cpp | 19 +-
3 files changed, 458 insertions(+), 281 deletions(-)
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/Makefile b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
index 4e02c08..657396a 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/Makefile
+++ b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
@@ -103,7 +103,7 @@ $(BINDIR)/$(HEADERFILE)$(HEADEREXTENSION): $(SRCDIR)/$(HEADERFILE)$(HEADEREXTENS
.PHONY : library
library : $(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION)
-$(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION): nopoco
+$(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION): poco
.PHONY : nopoco
nopoco : $(SRCDIR)/$(LIBFILE).org.o
@@ -111,7 +111,7 @@ nopoco : $(SRCDIR)/$(LIBFILE).org.o
.PHONY : poco
poco : $(SRCDIR)/$(LIBFILE).poco.o
- $(CPPC) $(LIBFLAGS) $(CPPFLAGS) -o $(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION) $(SRCDIR)/$(LIBFILE).poco.o $(LIBS) -lPocoFoundation
+ $(CPPC) $(LIBFLAGS) $(CPPFLAGS) -o $(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION) $(SRCDIR)/$(LIBFILE).poco.o -lPocoFoundation
###########################################################
# Compile the wrapper class tests.
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.poco.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.poco.cpp
index d0ce770..1a624b2 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.poco.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.poco.cpp
@@ -18,7 +18,7 @@
DTU Mechanical Engineering
needs
- librefprop.h - header for librefprop.so, based on examples
+ refprop_lib.h - header for librefprop.so, based on examples
refprop_wrapper.h - header for static REFPROP_wrapper.a, also needed by Dymola
Use the provided makefile to install the library file from source.
@@ -29,14 +29,14 @@
#include
#if defined(WIN32) || defined(_WIN32)
# include
-# include "REFPROP_dll.h"
+//# include "REFPROP_dll.h"
#else // assuming Linux system
# include
# include
-# include
//# include // dlopen etc
# include // tolower etc
#endif
+#include
//# error "Could not determine system."
#include "refprop_wrapper.h"
@@ -47,6 +47,8 @@
#include "Poco/Environment.h"
#include "Poco/StringTokenizer.h"
#include "Poco/String.h"
+#include "Poco/Exception.h"
+
// Some constants...
const long filepathlength=1024;
@@ -55,111 +57,71 @@ const long lengthofreference=3;
const long refpropcharlength=255;
const long ncmax=20; // Note: ncmax is the max number of components
-//Poco::SharedLibrary RefpropdllInstance;
+Poco::SharedLibrary *RefpropdllInstance = NULL;
char loadedfluids[refpropcharlength];
char loadedpath[filepathlength];
-//// Define the functions either by their pointers or type.
-//WMOLdll_POINTER WMOLdll;
-//TPFL2dll_POINTER TPFL2dll;
-//TPFLSHdll_POINTER TPFLSHdll;
-//PHFL1dll_POINTER PHFL1dll;
-//PHFLSHdll_POINTER PHFLSHdll;
-//PDFL1dll_POINTER PDFL1dll;
-//PDFLSHdll_POINTER PDFLSHdll;
-//PSFLSHdll_POINTER PSFLSHdll;
-//PQFLSHdll_POINTER PQFLSHdll;
-//THFLSHdll_POINTER THFLSHdll;
-//TDFLSHdll_POINTER TDFLSHdll;
-//TSFLSHdll_POINTER TSFLSHdll;
-//TQFLSHdll_POINTER TQFLSHdll;
-//DHFL1dll_POINTER DHFL1dll;
-//DHFL2dll_POINTER DHFL2dll;
-//DHFLSHdll_POINTER DHFLSHdll;
-//HSFLSHdll_POINTER HSFLSHdll;
-//DSFL1dll_POINTER DSFL1dll;
-//DSFL2dll_POINTER DSFL2dll;
-//DSFLSHdll_POINTER DSFLSHdll;
-//TRNPRPdll_POINTER TRNPRPdll;
-//SATTdll_POINTER SATTdll;
-//SATPdll_POINTER SATPdll;
-//SATDdll_POINTER SATDdll;
+// Define the functions either by their pointers or type.
+WMOLdll_POINTER WMOL = NULL;
+TPFL2dll_POINTER TPFL2 = NULL;
+TPFLSHdll_POINTER TPFLSH = NULL;
+PHFL1dll_POINTER PHFL1 = NULL;
+PHFLSHdll_POINTER PHFLSH = NULL;
+PDFL1dll_POINTER PDFL1 = NULL;
+PDFLSHdll_POINTER PDFLSH = NULL;
+PSFLSHdll_POINTER PSFLSH = NULL;
+PQFLSHdll_POINTER PQFLSH = NULL;
+THFLSHdll_POINTER THFLSH = NULL;
+TDFLSHdll_POINTER TDFLSH = NULL;
+TSFLSHdll_POINTER TSFLSH = NULL;
+TQFLSHdll_POINTER TQFLSH = NULL;
+DHFL1dll_POINTER DHFL1 = NULL;
+DHFL2dll_POINTER DHFL2 = NULL;
+DHFLSHdll_POINTER DHFLSH = NULL;
+HSFLSHdll_POINTER HSFLSH = NULL;
+DSFL1dll_POINTER DSFL1 = NULL;
+DSFL2dll_POINTER DSFL2 = NULL;
+DSFLSHdll_POINTER DSFLSH = NULL;
+TRNPRPdll_POINTER TRNPRP = NULL;
+SATTdll_POINTER SATT = NULL;
+SATPdll_POINTER SATP = NULL;
+SATDdll_POINTER SATD = NULL;
+
//str_replace (fluidnames, "|", replace, nX)
-char *str_replace(char *str, char *search, char *replace, long *count) {
- int i,n_ret;
- int newlen = strlen(replace);
- int oldlen = strlen(search);
- char *ret;
+char *str_replace(char *str, char *search, char *replace, long *count, int DEBUGMODE) {
+
*count = 0;
+ char ret[filepathlength];
+
+ std::string fluids(str);
+ std::string dlimit(search);
+ std::string substi(replace);
+ std::string result;
+
+ // if (DEBUGMODE) printf("fluidnames: %s\n",fluids.c_str());
+ // if (DEBUGMODE) printf("delimiter: %s\n",dlimit.c_str());
+ // if (DEBUGMODE) printf("replace: %s\n",substi.c_str());
+ // if (DEBUGMODE) printf("nX: %li\n\n",*count);
+
+ Poco::StringTokenizer tokens(fluids.c_str(), dlimit.c_str(), Poco::StringTokenizer::TOK_TRIM | Poco::StringTokenizer::TOK_IGNORE_EMPTY);
+ result = std::string(Poco::cat(substi, tokens.begin(), tokens.end()));
+
+ strcpy(ret,result.c_str());
+ //strcat(ret,'\0');
+
+ *count = tokens.count()-1;
+
+ if (DEBUGMODE) printf("fluidnames: %s\n",fluids.c_str());
+ if (DEBUGMODE) printf("delimiter: %s\n",dlimit.c_str());
+ if (DEBUGMODE) printf("replace: %s\n",substi.c_str());
+ if (DEBUGMODE) printf("replaced: %s\n",result.c_str());
+ if (DEBUGMODE) printf("nX: %li\n\n",*count);
+
+return ret;
- //count occurrences of searchstring
- for (i = 0; oldlen && str[i]; ++i)
- if (strstr(&str[i], search) == &str[i]){ // if walk through is at searchstr
- ++*count, i+=oldlen - 1;
- }
- ret = (char *) calloc(n_ret = (strlen(str) + 1 + *count * (newlen - oldlen)), sizeof(char));
-// std::string stri (&str);
-// std::string sear (&search);
-// Poco::StringTokenizer StrTok(stri,sear,Poco::StringTokenizer::TOK_TRIM);
-// *count = StrTok.count();
-// ret = (char *) calloc(n_ret = (strlen(str) + 1 + *count * (newlen - oldlen)), sizeof(char));
-
- if (!ret){
- printf("Could not allocate memory");
- return "";
- }
-
- if (!*count){
- strncpy(ret,str,n_ret);
- //if (DEBUGMODE) printf("RET: %i %s\n",oldlen,str);
- }else{
- i = 0;
- while (*str)
- if (strstr(str, search) == str)
- strncpy(&ret[i], replace,n_ret-i-1),
- i += newlen,
- str += oldlen;
- else
- ret[i++] = *str++;
- ret[i] = '\0';
- }
- return ret;
}
-//char *str_replace(char *str, char *search, char *replace, long *count) {
-// int i,n_ret;
-// int newlen = strlen(replace);
-// int oldlen = strlen(search);
-// char *ret;
-// *count = 0;
-//
-// //count occurrences of searchstring
-// for (i = 0; oldlen && str[i]; ++i)
-// if (strstr(&str[i], search) == &str[i]){ // if walk through is at searchstr
-// ++*count, i+=oldlen - 1;
-// }
-// ret = (char *) calloc(n_ret = (strlen(str) + 1 + *count * (newlen - oldlen)), sizeof(char));
-// if (!ret){
-// printf("Could not allocate memory");
-// return "";
-// }
-//
-// if (!*count){
-// strncpy(ret,str,n_ret);
-// //if (DEBUGMODE) printf("RET: %i %s\n",oldlen,str);
-// }else{
-// i = 0;
-// while (*str)
-// if (strstr(str, search) == str)
-// strncpy(&ret[i], replace,n_ret-i-1),
-// i += newlen,
-// str += oldlen;
-// else
-// ret[i++] = *str++;
-// ret[i] = '\0';
-// }
-// return ret;
-//}
+
int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr, char* errormsg, int DEBUGMODE){
// Sets up the interface to the REFPROP.DLL
@@ -167,10 +129,10 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr
// char DLL_PATH[filepathlength], FLD_PATH[filepathlength];
long ierr=0;
-// DEBUGMODE = 1;
+// DEBUGMODE = 1;
if (strlen(REFPROP_PATH_CHAR)>filepathlength){
- sprintf(errormsg,"REFPROP_PATH_CHAR too long (%i > %i)\n",strlen(REFPROP_PATH_CHAR),filepathlength);
+ sprintf(errormsg,"REFPROP_PATH_CHAR too long (%i > %li)\n",strlen(REFPROP_PATH_CHAR),filepathlength);
return 0;
}
// Define temporary objects for checks.
@@ -180,7 +142,7 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr
Poco::Path FLD_PATH(true);
char LIBRARY_CHAR[filepathlength];
Poco::Path LIB_PATH(true);
- Poco::File theFile;
+ //Poco::File theFile;
// Parse the string and append a path separator if necessary.
REF_PATH.parse(REFPROP_PATH_CHAR, Poco::Path::PATH_NATIVE);
@@ -190,116 +152,170 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr
// Check the path if running in debugmode
if (DEBUGMODE) {
- theFile = Poco::File(REF_PATH);
- if ( !theFile.isDirectory() || !theFile.canRead() ){
- sprintf (errormsg,"REF_PATH is not a readable directory: %s \n", REF_PATH.toString().c_str());
- return 0;
+ Poco::File refFile(REF_PATH);
+ if ( !refFile.isDirectory() || !refFile.canRead() ){
+ printf ("REF_PATH is not a readable directory: %s \n", REF_PATH.toString().c_str());
+ sprintf (errormsg,"REF_PATH is not a readable directory: %s \n", REF_PATH.toString().c_str());
+ return 0;
+ } else {
+ printf ("REF_PATH is a readable directory: %s \n", REF_PATH.toString().c_str());
}
}
// The fluid files are in the Refprop directory, append "fluids".
FLD_PATH.parse(REF_PATH_CHAR);
FLD_PATH.pushDirectory(FLUIDS_CHAR);
-
- if (DEBUGMODE) {
- // Determine which library file should be loaded
- bool is_linux = ( 0 == Poco::icompare(Poco::Environment::osName(), "linux") );
- if (is_linux){
- strcpy(LIBRARY_CHAR,"librefprop.so");
- } else {
- strcpy(LIBRARY_CHAR,"refprop.dll");
- }
- std::string path(REF_PATH_CHAR); // This is not fail-safe, the OS might look somewhere else, e.g. /usr/lib ...
- //std::string path(Poco::Environment::get("PATH"));
- bool found_lib = Poco::Path::find(path, LIBRARY_CHAR, LIB_PATH);
- if (found_lib) {
- printf ("Found library %s in path %s \n", LIBRARY_CHAR, path.c_str());
- } else {
- printf ("Cannot find library %s in path %s \n", LIBRARY_CHAR, path.c_str());
- }
- } else {
- LIB_PATH.parse(REF_PATH_CHAR);
+
+// //std::string path(REF_PATH_CHAR); // This is not fail-safe, the OS might look somewhere else, e.g. /usr/lib ...
+// Poco::Path SRC_PATH;
+// SRC_PATH.parse(Poco::Environment::get("PATH"));
+
+// if (DEBUGMODE) {
+// // Determine which library file should be loaded
+// bool is_linux = ( 0 == Poco::icompare(Poco::Environment::osName(), "linux") );
+// if (is_linux){
+// strcpy(LIBRARY_CHAR,"librefprop.so");
+// SRC_PATH.pushDirectory("/usr/local/lib");
+// } else {
+// strcpy(LIBRARY_CHAR,"refprop.dll");
+// SRC_PATH.pushDirectory(REF_PATH.toString());
+// }
+
+
+ //bool found_lib = Poco::Path::find(SRC_PATH.toString(), LIBRARY_CHAR, LIB_PATH);
+// if (found_lib) {
+// printf ("Found library %s in path %s \n", LIBRARY_CHAR, path.c_str());
+// } else {
+// printf ("Cannot find library %s in path %s \n", LIBRARY_CHAR, path.c_str());
+// }
+// } else {
+// LIB_PATH.parse(REF_PATH_CHAR);
+// }
+
+ //LIB_PATH.parse(LIBRARY_CHAR);
+
+// if (DEBUGMODE) {
+// printf ("REF_PATH as string: %s \n", REF_PATH.toString().c_str());
+// printf ("FLD_PATH as string: %s \n", FLD_PATH.toString().c_str());
+// printf ("LIB_PATH as string: %s \n", LIB_PATH.toString().c_str());
+// printf ("Running OS family : %s \n\n", Poco::Environment::osName().c_str());
+// }
+
+ Poco::Path SRC_PATH; // This is not fail-safe, the OS might look somewhere else, e.g. /usr/lib ...
+
+ if (RefpropdllInstance==NULL) { // we need to load the library
+ if (DEBUGMODE) printf ("RefpropdllInstance loaded: %s \n", "false");
+
+ // Check the OS and assign the right names for the library
+ bool is_linux = ( 0 == Poco::icompare(Poco::Environment::osName(), "linux") );
+ if (is_linux){
+ strcpy(LIBRARY_CHAR,"librefprop.so");
+ SRC_PATH.parse("/usr/local/lib");
+ } else {
+ strcpy(LIBRARY_CHAR,"refprop.dll");
+ SRC_PATH = REF_PATH;
+ }
+
+ // search the library at the given path
+ bool found_lib = Poco::Path::find(SRC_PATH.toString(), LIBRARY_CHAR, LIB_PATH);
+ if (found_lib) {
+ if (DEBUGMODE) printf ("Found library %s in path %s \n", LIBRARY_CHAR, SRC_PATH.toString().c_str());
+ } else {
+ if (DEBUGMODE) printf ("Cannot find library %s in path %s \n", LIBRARY_CHAR, SRC_PATH.toString().c_str());
+ sprintf ("Cannot find library %s in path %s \n", LIBRARY_CHAR, SRC_PATH.toString().c_str());
+ return 0;
+ }
+
+ // check if the file is correct and executable
+ if (DEBUGMODE) {
+ Poco::File libFile(LIB_PATH);
+ if ( !libFile.isFile() || !libFile.canRead() ){
+ printf ("LIB_PATH is not a readable file: %s \n", LIB_PATH.toString().c_str());
+ sprintf (errormsg,"LIB_PATH is not a readable file: %s \n", LIB_PATH.toString().c_str());
+ return 0;
+ } else {
+ printf ("LIB_PATH exists and is readable: %s \n", LIB_PATH.toString().c_str());
+ }
+ }
+
+ // load a new library instance
+ RefpropdllInstance = new Poco::SharedLibrary(LIB_PATH.toString());
+ if (DEBUGMODE) printf ("RefpropdllInstance loaded: %s \n\n", "true");
+
+ } else { // library was already loaded
+ if (DEBUGMODE) printf ("RefpropdllInstance loaded: %s \n\n", "true");
}
-
- // Check for new fluids and if the library has to be loaded again.
- if (DEBUGMODE) printf ("Comparison of fluids : %i \n", strcmp(fluidnames,loadedfluids) );
- if (DEBUGMODE) printf ("Comparison of path : %i \n", strcmp(REF_PATH_CHAR,loadedpath) );
- if (DEBUGMODE) printf ("Checking setup : %s and %s \n\n", REF_PATH_CHAR,loadedpath );
-
-// if (strcmp(fluidnames,loadedfluids)==0) {
-// if ( strcmp(REF_PATH_CHAR,loadedpath)==0 ) {
-// sprintf(errormsg,"Library is already loaded: %s \n",LIB_PATH.toString().c_str());
-// if (DEBUGMODE) printf ("No setup needed: %s and %s \n", REF_PATH_CHAR,loadedpath );
-// return 0;
-// }
-// }
-
- strcpy(loadedpath,REF_PATH_CHAR);
-
+
+ // Now the library is loaded and we can start checkicng the fluid path
+ if (DEBUGMODE) {
+ Poco::File fldFile(FLD_PATH);
+ if ( !fldFile.isDirectory() || !fldFile.canRead() ){
+ printf ("FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
+ sprintf (errormsg,"FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
+ return 0;
+ } else {
+ printf ("FLD_PATH is a readable directory: %s \n", FLD_PATH.toString().c_str());
+ }
+ }
+ char FLD_PATH_CHAR[filepathlength];
+ strcpy(FLD_PATH_CHAR,FLD_PATH.toString().c_str());
+
+
if (DEBUGMODE) {
+ printf ("%s\n"," ");
printf ("REF_PATH as string: %s \n", REF_PATH.toString().c_str());
printf ("FLD_PATH as string: %s \n", FLD_PATH.toString().c_str());
printf ("LIB_PATH as string: %s \n", LIB_PATH.toString().c_str());
- printf ("Running OS family : %s \n\n", Poco::Environment::osName().c_str());
+ printf ("Running OS family : %s \n", Poco::Environment::osName().c_str());
+ printf ("%s\n"," ");
}
- if (DEBUGMODE) {
- theFile = Poco::File(LIB_PATH);
- if ( !theFile.isFile() || !theFile.canExecute() ){
- sprintf (errormsg,"LIB_PATH is not an executable file: %s \n", LIB_PATH.toString().c_str());
- return 0;
- }
- }
- char LIB_PATH_CHAR[filepathlength];
- strcpy(LIB_PATH_CHAR,LIB_PATH.toString().c_str());
-
- if (DEBUGMODE) {
- theFile = Poco::File(FLD_PATH);
- if ( !theFile.isDirectory() || !theFile.canRead() ){
- sprintf (errormsg,"FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
- return 0;
- }
- }
- char FLD_PATH_CHAR[filepathlength];
- strcpy(FLD_PATH_CHAR,FLD_PATH.toString().c_str());
-
-//// First we load the library with the POCO foundation
-//// classes and then define all the needed functions
-//// by their names and a cast to the correct type.
-// if (DEBUGMODE) printf ("RefpropdllInstance loaded path: %s \n", RefpropdllInstance.getPath().c_str());
-// if (DEBUGMODE) printf ("New path for loading the library: %s \n", LIB_PATH.toString().c_str());
-// if (DEBUGMODE) printf ("Comparison: %i \n", LIB_PATH.toString().compare(RefpropdllInstance.getPath()) );
-// if ( LIB_PATH.toString().compare(RefpropdllInstance.getPath())!=0 ) {
-// RefpropdllInstance.unload();
-// if (DEBUGMODE) printf ("RefpropdllInstance unloaded: %s \n", "true");
-// RefpropdllInstance.load(LIB_PATH_CHAR);
-// }
-//
-// if (!RefpropdllInstance.isLoaded()){
-// sprintf(errormsg,"ERROR in opening library at \"%s\"",LIB_PATH_CHAR);
-// return 100;
-// }
+ // Check for new fluids and if the library has to be loaded again.
+ bool isFluid = (strcmp(fluidnames,loadedfluids)==0);
+ bool isPath = (strcmp(REF_PATH_CHAR,loadedpath)==0);
+ if (DEBUGMODE) printf ("Comparison of fluids : %i \n", isFluid );
+ if (DEBUGMODE) printf ("Comparison of path : %i \n\n", isPath );
+ //if (DEBUGMODE) printf ("Checking setup : %s and %s \n\n", REF_PATH_CHAR,loadedpath );
- char hrf[lengthofreference+1],hfmix[filepathlength+1+7];
char *hf;
+
+// // // // if (isFluid && isPath) {
+// // // // //sprintf(errormsg,"Library is already loaded: %s \n",LIB_PATH.toString().c_str());
+// // // // if (DEBUGMODE) printf ("No setup needed, fluids (%s) and path (%s) did not change.\n\n", fluidnames,REF_PATH_CHAR);
+// // // // // // // // return 0;
+// // // // } else {
+ // we need to call setup
+
+ char hrf[lengthofreference+1],hfmix[filepathlength+1+7];
+// // // // char *hf;
//parse fluid composition string and insert absolute paths
- char replace[filepathlength+6];
- strcpy(replace,".FLD|");
+ char replace[filepathlength+6];
+ strcpy(replace,".FLD|");
//if (DEBUGMODE) printf("REPLACE: %s\n",replace);
- strncat(replace, FLD_PATH_CHAR,filepathlength-strlen(replace));
+ strncat(replace, FLD_PATH_CHAR,filepathlength-strlen(replace));
int hf_len = strlen(fluidnames)+ncmax*(strlen(replace)-1)+4;
hf = (char*) calloc(hf_len, sizeof(char));
strncpy(hf,FLD_PATH_CHAR,hf_len);
- strncat(hf,str_replace(fluidnames, "|", replace, nX),hf_len-strlen(hf)); //str_replace returns the number of delimiters -> nX, but components are one more ...
+
+ char replaced[filepathlength];
+
+ strcpy(replaced,str_replace(fluidnames, "|", replace, nX, DEBUGMODE));
+
+ //str_replace returns the number of delimiters -> nX, but components are one more ...
if (++*nX>ncmax){ //...that's why nX is incremented
- sprintf(errormsg,"Too many components (More than %i)\n",ncmax);
+ sprintf(errormsg,"Too many components (More than %li)\n",ncmax);
return 0;
}
+
+
+ strncat(hf,replaced,hf_len-strlen(hf));
+
strncat(hf,".FLD",hf_len-strlen(hf));
+
if (DEBUGMODE) printf("Fluid composition string: \"%s\"\n",hf);
strncpy(hfmix,FLD_PATH_CHAR,filepathlength+1);//add absolute path
@@ -307,39 +323,15 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr
strcpy(hrf,"DEF");
-// SETUPdll_TYPE * SETUPdll = (SETUPdll_TYPE * ) RefpropdllInstance.getSymbol(SETUPdll_NAME);
- if (DEBUGMODE) printf("Running SETUPdll...\n");
- SETUPdll(*nX, hf, hfmix, hrf, ierr, herr);
+ SETUPdll_POINTER SETUP = (SETUPdll_POINTER) RefpropdllInstance->getSymbol(SETUPdll_NAME);
+ if (DEBUGMODE) printf("Running SETUP...\n");
+ SETUP(*nX, hf, hfmix, hrf, ierr, herr);
+
strcpy(loadedfluids,fluidnames);
- if (DEBUGMODE) printf("SETUPdll run complete (Error no: %i)\n",ierr);
-
-// WMOLdll = (WMOLdll_POINTER) RefpropdllInstance.getSymbol(WMOLdll_NAME);
-// TPFL2dll = (TPFL2dll_POINTER) RefpropdllInstance.getSymbol(TPFL2dll_NAME);
-// TPFLSHdll = (TPFLSHdll_POINTER) RefpropdllInstance.getSymbol(TPFLSHdll_NAME);
-// PHFL1dll = (PHFL1dll_POINTER) RefpropdllInstance.getSymbol(PHFL1dll_NAME);
-// PHFLSHdll = (PHFLSHdll_POINTER) RefpropdllInstance.getSymbol(PHFLSHdll_NAME);
-// PDFL1dll = (PDFL1dll_POINTER) RefpropdllInstance.getSymbol(PDFL1dll_NAME);
-// PDFLSHdll = (PDFLSHdll_POINTER) RefpropdllInstance.getSymbol(PDFLSHdll_NAME);
-// PSFLSHdll = (PSFLSHdll_POINTER) RefpropdllInstance.getSymbol(PSFLSHdll_NAME);
-// PQFLSHdll = (PQFLSHdll_POINTER) RefpropdllInstance.getSymbol(PQFLSHdll_NAME);
-// THFLSHdll = (THFLSHdll_POINTER) RefpropdllInstance.getSymbol(THFLSHdll_NAME);
-// TDFLSHdll = (TDFLSHdll_POINTER) RefpropdllInstance.getSymbol(TDFLSHdll_NAME);
-// TSFLSHdll = (TSFLSHdll_POINTER) RefpropdllInstance.getSymbol(TSFLSHdll_NAME);
-// TQFLSHdll = (TQFLSHdll_POINTER) RefpropdllInstance.getSymbol(TQFLSHdll_NAME);
-// DHFL1dll = (DHFL1dll_POINTER) RefpropdllInstance.getSymbol(DHFL1dll_NAME);
-// DHFL2dll = (DHFL2dll_POINTER) RefpropdllInstance.getSymbol(DHFL2dll_NAME);
-// DHFLSHdll = (DHFLSHdll_POINTER) RefpropdllInstance.getSymbol(DHFLSHdll_NAME);
-// HSFLSHdll = (HSFLSHdll_POINTER) RefpropdllInstance.getSymbol(HSFLSHdll_NAME);
-// DSFL1dll = (DSFL1dll_POINTER) RefpropdllInstance.getSymbol(DSFL1dll_NAME);
-// DSFL2dll = (DSFL2dll_POINTER) RefpropdllInstance.getSymbol(DSFL2dll_NAME);
-// DSFLSHdll = (DSFLSHdll_POINTER) RefpropdllInstance.getSymbol(DSFLSHdll_NAME);
-// TRNPRPdll = (TRNPRPdll_POINTER) RefpropdllInstance.getSymbol(TRNPRPdll_NAME);
-// SATTdll = (SATTdll_POINTER) RefpropdllInstance.getSymbol(SATTdll_NAME);
-// SATPdll = (SATPdll_POINTER) RefpropdllInstance.getSymbol(SATPdll_NAME);
-// SATDdll = (SATDdll_POINTER) RefpropdllInstance.getSymbol(SATDdll_NAME);
-
-
-// if (DEBUGMODE) printf("Error code processing...\n");
+ strcpy(loadedpath,REF_PATH_CHAR);
+ if (DEBUGMODE) printf("SETUP run complete (Error no: %li)\n",ierr);
+
+ if (DEBUGMODE) printf("Error code processing...\n");
switch(ierr){
case 101:
//strcpy(errormsg,"error in opening file");
@@ -354,7 +346,7 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr
// if (DEBUGMODE) printf("Error -103\n");
strcpy(errormsg,"unknown model encountered in file");
break;
- case 104:
+ case 104:
// if (DEBUGMODE) printf("Error 104\n");
strcpy(errormsg,"error in setup of model");
break;
@@ -383,8 +375,152 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr
strncpy(errormsg,herr,errormessagelength);
break;
}
- free(hf);
+// // // // free(hf);
return ierr;
+
+
+// if (DEBUGMODE) {
+// theFile = Poco::File(LIB_PATH);
+// if ( !theFile.isFile() || !theFile.canExecute() ){
+// sprintf (errormsg,"LIB_PATH is not an executable file: %s \n", LIB_PATH.toString().c_str());
+// return 0;
+// }
+// }
+// char LIB_PATH_CHAR[filepathlength];
+// strcpy(LIB_PATH_CHAR,LIB_PATH.toString().c_str());
+//
+// if (DEBUGMODE) {
+// theFile = Poco::File(FLD_PATH);
+// if ( !theFile.isDirectory() || !theFile.canRead() ){
+// sprintf (errormsg,"FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
+// return 0;
+// }
+// }
+// char FLD_PATH_CHAR[filepathlength];
+// strcpy(FLD_PATH_CHAR,FLD_PATH.toString().c_str());
+
+//// First we load the library with the POCO foundation
+//// classes and then define all the needed functions
+//// by their names and a cast to the correct type.
+// if (DEBUGMODE) printf ("RefpropdllInstance loaded path: %s \n", RefpropdllInstance.getPath().c_str());
+// if (DEBUGMODE) printf ("New path for loading the library: %s \n", LIB_PATH.toString().c_str());
+// if (DEBUGMODE) printf ("Comparison: %i \n", LIB_PATH.toString().compare(RefpropdllInstance.getPath()) );
+// if ( LIB_PATH.toString().compare(RefpropdllInstance.getPath())!=0 ) {
+// RefpropdllInstance.unload();
+// if (DEBUGMODE) printf ("RefpropdllInstance unloaded: %s \n", "true");
+// RefpropdllInstance.load(LIB_PATH_CHAR);
+// }
+//
+// if (!RefpropdllInstance.isLoaded()){
+// sprintf(errormsg,"ERROR in opening library at \"%s\"",LIB_PATH_CHAR);
+// return 100;
+// }
+
+
+// char hrf[lengthofreference+1],hfmix[filepathlength+1+7];
+// char *hf;
+//
+// //parse fluid composition string and insert absolute paths
+// char replace[filepathlength+6];
+// strcpy(replace,".FLD|");
+// //if (DEBUGMODE) printf("REPLACE: %s\n",replace);
+// strncat(replace, FLD_PATH_CHAR,filepathlength-strlen(replace));
+//
+// int hf_len = strlen(fluidnames)+ncmax*(strlen(replace)-1)+4;
+// hf = (char*) calloc(hf_len, sizeof(char));
+//
+// strncpy(hf,FLD_PATH_CHAR,hf_len);
+// strncat(hf,str_replace(fluidnames, "|", replace, nX),hf_len-strlen(hf)); //str_replace returns the number of delimiters -> nX, but components are one more ...
+// if (++*nX>ncmax){ //...that's why nX is incremented
+// sprintf(errormsg,"Too many components (More than %i)\n",ncmax);
+// return 0;
+// }
+// strncat(hf,".FLD",hf_len-strlen(hf));
+// if (DEBUGMODE) printf("Fluid composition string: \"%s\"\n",hf);
+//
+// strncpy(hfmix,FLD_PATH_CHAR,filepathlength+1);//add absolute path
+// strncat(hfmix,"hmx.bnc",filepathlength+1+7-strlen(hfmix));
+// strcpy(hrf,"DEF");
+//
+//
+// // SETUPdll_TYPE * SETUPdll = (SETUPdll_TYPE * ) RefpropdllInstance.getSymbol(SETUPdll_NAME);
+// if (DEBUGMODE) printf("Running SETUPdll...\n");
+// SETUP(*nX, hf, hfmix, hrf, ierr, herr);
+// strcpy(loadedfluids,fluidnames);
+// if (DEBUGMODE) printf("SETUPdll run complete (Error no: %i)\n",ierr);
+//
+// // WMOLdll = (WMOLdll_POINTER) RefpropdllInstance.getSymbol(WMOLdll_NAME);
+// // TPFL2dll = (TPFL2dll_POINTER) RefpropdllInstance.getSymbol(TPFL2dll_NAME);
+// // TPFLSHdll = (TPFLSHdll_POINTER) RefpropdllInstance.getSymbol(TPFLSHdll_NAME);
+// // PHFL1dll = (PHFL1dll_POINTER) RefpropdllInstance.getSymbol(PHFL1dll_NAME);
+// // PHFLSHdll = (PHFLSHdll_POINTER) RefpropdllInstance.getSymbol(PHFLSHdll_NAME);
+// // PDFL1dll = (PDFL1dll_POINTER) RefpropdllInstance.getSymbol(PDFL1dll_NAME);
+// // PDFLSHdll = (PDFLSHdll_POINTER) RefpropdllInstance.getSymbol(PDFLSHdll_NAME);
+// // PSFLSHdll = (PSFLSHdll_POINTER) RefpropdllInstance.getSymbol(PSFLSHdll_NAME);
+// // PQFLSHdll = (PQFLSHdll_POINTER) RefpropdllInstance.getSymbol(PQFLSHdll_NAME);
+// // THFLSHdll = (THFLSHdll_POINTER) RefpropdllInstance.getSymbol(THFLSHdll_NAME);
+// // TDFLSHdll = (TDFLSHdll_POINTER) RefpropdllInstance.getSymbol(TDFLSHdll_NAME);
+// // TSFLSHdll = (TSFLSHdll_POINTER) RefpropdllInstance.getSymbol(TSFLSHdll_NAME);
+// // TQFLSHdll = (TQFLSHdll_POINTER) RefpropdllInstance.getSymbol(TQFLSHdll_NAME);
+// // DHFL1dll = (DHFL1dll_POINTER) RefpropdllInstance.getSymbol(DHFL1dll_NAME);
+// // DHFL2dll = (DHFL2dll_POINTER) RefpropdllInstance.getSymbol(DHFL2dll_NAME);
+// // DHFLSHdll = (DHFLSHdll_POINTER) RefpropdllInstance.getSymbol(DHFLSHdll_NAME);
+// // HSFLSHdll = (HSFLSHdll_POINTER) RefpropdllInstance.getSymbol(HSFLSHdll_NAME);
+// // DSFL1dll = (DSFL1dll_POINTER) RefpropdllInstance.getSymbol(DSFL1dll_NAME);
+// // DSFL2dll = (DSFL2dll_POINTER) RefpropdllInstance.getSymbol(DSFL2dll_NAME);
+// // DSFLSHdll = (DSFLSHdll_POINTER) RefpropdllInstance.getSymbol(DSFLSHdll_NAME);
+// // TRNPRPdll = (TRNPRPdll_POINTER) RefpropdllInstance.getSymbol(TRNPRPdll_NAME);
+// // SATTdll = (SATTdll_POINTER) RefpropdllInstance.getSymbol(SATTdll_NAME);
+// // SATPdll = (SATPdll_POINTER) RefpropdllInstance.getSymbol(SATPdll_NAME);
+// // SATDdll = (SATDdll_POINTER) RefpropdllInstance.getSymbol(SATDdll_NAME);
+
+
+// // if (DEBUGMODE) printf("Error code processing...\n");
+// switch(ierr){
+// case 101:
+// //strcpy(errormsg,"error in opening file");
+// // if (DEBUGMODE) printf("Error 101\n");
+// sprintf(errormsg,"error in opening file %s",hf);
+// break;
+// case 102:
+// // if (DEBUGMODE) printf("Error 102\n");
+// strcpy(errormsg,"error in file or premature end of file");
+// break;
+// case -103:
+// // if (DEBUGMODE) printf("Error -103\n");
+// strcpy(errormsg,"unknown model encountered in file");
+// break;
+// case 104:
+// // if (DEBUGMODE) printf("Error 104\n");
+// strcpy(errormsg,"error in setup of model");
+// break;
+// case 105:
+// // if (DEBUGMODE) printf("Error 105\n");
+// strcpy(errormsg,"specified model not found");
+// break;
+// case 111:
+// // if (DEBUGMODE) printf("Error 111\n");
+// strcpy(errormsg,"error in opening mixture file");
+// break;
+// case 112:
+// // if (DEBUGMODE) printf("Error 112\n");
+// strcpy(errormsg,"mixture file of wrong type");
+// break;
+// case 114:
+// // if (DEBUGMODE) printf("Error 114\n");
+// strcpy(errormsg,"nc<>nc from setmod");
+// break;
+// case 0:
+// break;
+// default:
+// // if (DEBUGMODE) printf("Unknown error\n");
+// strcpy(errormsg,"Unknown error");
+// //strcpy(errormsg,"Setup was successful!");
+// strncpy(errormsg,herr,errormessagelength);
+// break;
+// }
+// free(hf);
+// return ierr;
}
@@ -395,12 +531,12 @@ double props_REFPROP(char* what, char* statevars_in, char* fluidnames, double *p
statevars: string of any combination of two variables out of p,T,h,s,d
fluidnames: string containing names of substances in mixtured separated by |, substance names are identical to those of *.fld-files in REFPROP program directory
statevar1,statevar2: values of the two variables specified in statevars
- x: array containing the mass fractions of the components of the mixture
- REFPROP_PATH: string defining the path of the refprop.dll
+ x: array containing the mass fractions of the components of the mixture
+ REFPROP_PATH: string defining the path of the refprop.dll
OUTPUT
return value: value of variable specified by the input variable what
props: Array containing all calculated values (props[0] containing error number)
- errormsg: string containing error message
+ errormsg: string containing error message
*/
char statevars[3];
double p, T, d, val, dl,dv,q,e,h,s,cv,cp,w,wm,wmliq,wmvap,eta,tcx;
@@ -424,9 +560,10 @@ OUTPUT
}
//CALCULATE MOLAR MASS
-// WMOLdll = (fp_WMOLdllTYPE) GetProcAddress(RefpropdllInstance,"WMOLdll");
-// WMOLdll_TYPE * WMOLdll = (WMOLdll_TYPE * ) RefpropdllInstance.getSymbol(WMOLdll_NAME);
- WMOLdll(x,wm);
+// WMOL = (fp_WMOLdllTYPE) GetProcAddress(RefpropdllInstance,"WMOLdll");
+// WMOLdll_TYPE * WMOL = (WMOLdll_TYPE * ) RefpropdllInstance.getSymbol(WMOLdll_NAME);
+ WMOL = (WMOLdll_POINTER) RefpropdllInstance->getSymbol(WMOLdll_NAME);
+ WMOL(x,wm);
// sprintf(errormsg," %10.4f, %10.4f, %10.4f,",x[0],x[1],wm);
wm /= 1000; //g/mol -> kg/mol
@@ -470,113 +607,132 @@ OUTPUT
}
/*
-//...If phase j is known, call TPRHOdll:
+//...If phase j is known, call TPRHO:
long j=2; //phase definition(j=1: Liquid, j=2: Vapor)
long tmp_int=0;
TPRHOdll = (fp_TPRHOdllTYPE) GetProcAddress(RefpropdllInstance,"TPRHOdll");
- TPRHOdll(t,p,x,j,tmp_int,d,ierr,herr,errormessagelength);
+ TPRHO(t,p,x,j,tmp_int,d,ierr,herr,errormessagelength);
*/
//...If phase is not known, call TPFLSH
double xliq[ncmax],xvap[ncmax],f[ncmax];
long kq=2;/* additional input--only for TQFLSH and PQFLSH
- kq--flag specifying units for input quality
- kq = 1 quality on MOLAR basis [moles vapor/total moles]
- kq = 2 quality on MASS basis [mass vapor/total mass]*/
+ kq--flag specifying units for input quality
+ kq = 1 quality on MOLAR basis [moles vapor/total moles]
+ kq = 2 quality on MASS basis [mass vapor/total mass]*/
// sprintf(errormsg,"Huhu! %s %d", statevars, ierr);
if (ierr==0){
if (strcmp(statevars,"pt")==0 || strcmp(statevars,"tp")==0){
// strcat(errormsg,"Bin in TP!");
if (phase==2){ //fluid state is known to be two phase
// TPFL2dll = (fp_TPFL2dllTYPE) GetProcAddress(RefpropdllInstance,"TPFL2dll");
- TPFL2dll(T,p,x,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
+ TPFL2 = (TPFL2dll_POINTER) RefpropdllInstance->getSymbol(TPFL2dll_NAME);
+ TPFL2(T,p,x,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
}else{
// TPFLSHdll = (fp_TPFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TPFLSHdll");
- TPFLSHdll(T,p,x,d,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ TPFLSH = (TPFLSHdll_POINTER) RefpropdllInstance->getSymbol(TPFLSHdll_NAME);
+ TPFLSH(T,p,x,d,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
}
}else if (strcmp(statevars,"ph")==0 || strcmp(statevars,"hp")==0){
// if (phase==1){ //fluid state is known to be single phase
//// PHFL1dll = (fp_PHFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PHFL1dll");
-// PHFL1dll(p,h,x,liqvap,T,d,ierr,herr,errormessagelength);
+// PHFL1 = (PHFL1dll_POINTER) RefpropdllInstance->getSymbol(PHFL1dll_NAME);
+// PHFL1(p,h,x,liqvap,T,d,ierr,herr,errormessagelength);
//// if (liqvap==1) dl=d; else dv=d;
// }else{
//// PHFLSHdll = (fp_PHFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PHFLSHdll");
- PHFLSHdll(p,h,x,T,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
+ PHFLSH = (PHFLSHdll_POINTER) RefpropdllInstance->getSymbol(PHFLSHdll_NAME);
+ PHFLSH(p,h,x,T,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
// }
}else if (strcmp(statevars,"pd")==0 || strcmp(statevars,"dp")==0){
if (phase==1){ //fluid state is known to be single phase
// PDFL1dll = (fp_PDFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PDFL1dll");
- PDFL1dll(p,d,x,T,ierr,herr,errormessagelength);
+ PDFL1 = (PDFL1dll_POINTER) RefpropdllInstance->getSymbol(PDFL1dll_NAME);
+ PDFL1(p,d,x,T,ierr,herr,errormessagelength);
}else{
// PDFLSHdll = (fp_PDFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PDFLSHdll");
- PDFLSHdll(p,d,x,T,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ PDFLSH = (PDFLSHdll_POINTER) RefpropdllInstance->getSymbol(PDFLSHdll_NAME);
+ PDFLSH(p,d,x,T,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
}
}else if (strcmp(statevars,"ps")==0 || strcmp(statevars,"sp")==0){
/* if (phase==1){ //fluid state is known to be single phase
PSFL1dll = (fp_PSFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PSFL1dll");
- PSFL1dll(p,s,x,kph,T,d,ierr,herr,errormessagelength);
+ PSFL1(p,s,x,kph,T,d,ierr,herr,errormessagelength);
if (liqvap==1) dl=d; else dv=d;
}else{*/
// PSFLSHdll = (fp_PSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PSFLSHdll");
- PSFLSHdll(p,s,x,T,d,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
+ PSFLSH = (PSFLSHdll_POINTER) RefpropdllInstance->getSymbol(PSFLSHdll_NAME);
+ PSFLSH(p,s,x,T,d,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
// }
}else if (strcmp(statevars,"pq")==0 || strcmp(statevars,"qp")==0){
// PQFLSHdll = (fp_PQFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PQFLSHdll");
- PQFLSHdll(p,q,x,kq,T,d,dl,dv,xliq,xvap,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ PQFLSH = (PQFLSHdll_POINTER) RefpropdllInstance->getSymbol(PQFLSHdll_NAME);
+ PQFLSH(p,q,x,kq,T,d,dl,dv,xliq,xvap,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
// strcat(errormsg,"Bin in PQ!");
}else if (strcmp(statevars,"th")==0 || strcmp(statevars,"ht")==0){
/* if (phase==1){ //fluid state is known to be single phase
THFL1dll = (fp_THFL1dllTYPE) GetProcAddress(RefpropdllInstance,"THFL1dll");
- THFL1dll(T,h,x,Dmin,Dmax,d,ierr,herr,errormessagelength);
+ THFL1(T,h,x,Dmin,Dmax,d,ierr,herr,errormessagelength);
}else{*/
// THFLSHdll = (fp_THFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"THFLSHdll");
+ THFLSH = (THFLSHdll_POINTER) RefpropdllInstance->getSymbol(THFLSHdll_NAME);
long kr = 2;
/* kr--phase flag: 1 = input state is liquid
- 2 = input state is vapor in equilibrium with liq
- 3 = input state is liquid in equilibrium with solid
- 4 = input state is vapor in equilibrium with solid */
- THFLSHdll (T,h,x,kr,p,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
+ 2 = input state is vapor in equilibrium with liq
+ 3 = input state is liquid in equilibrium with solid
+ 4 = input state is vapor in equilibrium with solid */
+ THFLSH (T,h,x,kr,p,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
// }
}else if (strcmp(statevars,"td")==0 || strcmp(statevars,"dt")==0){
// TDFLSHdll = (fp_TDFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TDFLSHdll");
- TDFLSHdll(T,d,x,p,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ TDFLSH = (TDFLSHdll_POINTER) RefpropdllInstance->getSymbol(TDFLSHdll_NAME);
+ TDFLSH(T,d,x,p,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
}else if (strcmp(statevars,"ts")==0 || strcmp(statevars,"st")==0){
// TSFLSHdll = (fp_TSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TSFLSHdll");
+ TSFLSH = (TSFLSHdll_POINTER) RefpropdllInstance->getSymbol(TSFLSHdll_NAME);
long kr = 2;
- TSFLSHdll (T,s,x,kr,p,d,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
+ TSFLSH(T,s,x,kr,p,d,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
}else if (strcmp(statevars,"tq")==0 || strcmp(statevars,"qt")==0){
// TQFLSHdll = (fp_TQFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TQFLSHdll");
- TQFLSHdll(T,q,x,kq,p,d,dl,dv,xliq,xvap,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ TQFLSH = (TQFLSHdll_POINTER) RefpropdllInstance->getSymbol(TQFLSHdll_NAME);
+ TQFLSH(T,q,x,kq,p,d,dl,dv,xliq,xvap,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
}else if (strcmp(statevars,"hd")==0 || strcmp(statevars,"dh")==0){
switch(phase){ //fluid state is known to be single phase
case 1:
// DHFL1dll = (fp_DHFL1dllTYPE) GetProcAddress(RefpropdllInstance,"DHFL1dll");
- DHFL1dll(d,h,x,T,ierr,herr,errormessagelength);
+ DHFL1 = (DHFL1dll_POINTER) RefpropdllInstance->getSymbol(DHFL1dll_NAME);
+ DHFL1(d,h,x,T,ierr,herr,errormessagelength);
break;
case 2:
// DHFL2dll = (fp_DHFL2dllTYPE) GetProcAddress(RefpropdllInstance,"DHFL2dll");
- DHFL2dll(d,h,x,T,p,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
+ DHFL2 = (DHFL2dll_POINTER) RefpropdllInstance->getSymbol(DHFL2dll_NAME);
+ DHFL2(d,h,x,T,p,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
break;
default:
// DHFLSHdll = (fp_DHFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"DHFLSHdll");
- DHFLSHdll(d,h,x,T,p,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
+ DHFLSH = (DHFLSHdll_POINTER) RefpropdllInstance->getSymbol(DHFLSHdll_NAME);
+ DHFLSH(d,h,x,T,p,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
break;
}
}else if (strcmp(statevars,"hs")==0 || strcmp(statevars,"sh")==0){
// HSFLSHdll = (fp_HSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"HSFLSHdll");
- HSFLSHdll(h,s,x,T,p,d,dl,dv,xliq,xvap,q,e,cv,cp,w,ierr,herr,errormessagelength);
+ HSFLSH = (HSFLSHdll_POINTER) RefpropdllInstance->getSymbol(HSFLSHdll_NAME);
+ HSFLSH(h,s,x,T,p,d,dl,dv,xliq,xvap,q,e,cv,cp,w,ierr,herr,errormessagelength);
}else if (strcmp(statevars,"ds")==0 || strcmp(statevars,"sd")==0){
switch(phase){ //fluid state is known to be single phase
case 1:
// DSFL1dll = (fp_DSFL1dllTYPE) GetProcAddress(RefpropdllInstance,"DSFL1dll");
- DSFL1dll(d,s,x,T,ierr,herr,errormessagelength);
+ DSFL1 = (DSFL1dll_POINTER) RefpropdllInstance->getSymbol(DSFL1dll_NAME);
+ DSFL1(d,s,x,T,ierr,herr,errormessagelength);
break;
case 2:
// DSFL2dll = (fp_DSFL2dllTYPE) GetProcAddress(RefpropdllInstance,"DSFL2dll");
- DSFL2dll(d,s,x,T,p,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
+ DSFL2 = (DSFL2dll_POINTER) RefpropdllInstance->getSymbol(DSFL2dll_NAME);
+ DSFL2(d,s,x,T,p,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
break;
default:
// DSFLSHdll = (fp_DSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"DSFLSHdll");
- DSFLSHdll(d,s,x,T,p,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
+ DSFLSH = (DSFLSHdll_POINTER) RefpropdllInstance->getSymbol(DSFLSHdll_NAME);
+ DSFLSH(d,s,x,T,p,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
break;
}
}else
@@ -587,7 +743,8 @@ OUTPUT
case 'v': //dynamic viscosity uPa.s
case 'l': //thermal conductivity W/m.K
// TRNPRPdll = (fp_TRNPRPdllTYPE) GetProcAddress(RefpropdllInstance,"TRNPRPdll");
- TRNPRPdll (T,d,x,eta,tcx,ierr,herr,errormessagelength);
+ TRNPRP = (TRNPRPdll_POINTER) RefpropdllInstance->getSymbol(TRNPRPdll_NAME);
+ TRNPRP(T,d,x,eta,tcx,ierr,herr,errormessagelength);
break;
}
@@ -596,7 +753,7 @@ OUTPUT
case 1:
sprintf(errormsg,"T=%f < Tmin",T);
break;
- case 4:
+ case 4:
sprintf(errormsg,"P=%f < 0",p);
break;
case 5:
@@ -611,10 +768,10 @@ OUTPUT
case 12:
sprintf(errormsg,"x out of range and P=%f < 0",p);
break;
- case 13:
+ case 13:
sprintf(errormsg,"x, T=%f and p=%f out of range",T,p);
break;
- case 16:
+ case 16:
strcpy(errormsg,"TPFLSH error: p>melting pressure");
break;
case -31:
@@ -686,9 +843,9 @@ OUTPUT
//CONVERT TO SI-UNITS
if (ierr==0){
- WMOLdll(xliq,wmliq);
+ WMOL(xliq,wmliq);
wmliq /= 1000; //g/mol -> kg/mol
- WMOLdll(xvap,wmvap);
+ WMOL(xvap,wmvap);
wmvap /= 1000; //g/mol -> kg/mol
//printf("%d,%s\n%s\nP,T,D,H,CP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",nX,hf,hfmix,p,t,d,h,wm);
d *= wm*1000; //mol/dm� -> kg/m�
@@ -767,12 +924,12 @@ double satprops_REFPROP(char* what, char* statevar_in, char* fluidnames, double
statevar: string of 1 variable out of p,T,h,s,d
fluidnames: string containing names of substances in mixtured separated by |, substance names are identical to those of *.fld-files in REFPROP program directory
statevarval: values of the variable specified in statevar
- x: array containing the mass fractions of the components of the mixture
- REFPROP_PATH: string defining the path of the refprop.dll
+ x: array containing the mass fractions of the components of the mixture
+ REFPROP_PATH: string defining the path of the refprop.dll
OUTPUT
return value: value of variable specified by the input variable what
props: Array containing all calculated values
- errormsg: string containing error message
+ errormsg: string containing error message
*/
double p, T, d, val, dl,dv,wm,wmliq,wmvap;
long nX,ierr=0;
@@ -787,7 +944,7 @@ OUTPUT
//initialize interface to REFPROP.dll
if(props[0]=(double)init_REFPROP(fluidnames, REFPROP_PATH, &nX, herr, errormsg, DEBUGMODE)){
- printf("Error no. %i initializing REFPROP: \"%s\"\n", props[0], errormsg);
+ printf("Error no. %f initializing REFPROP: \"%s\"\n", props[0], errormsg);
return 0;
}
@@ -795,15 +952,16 @@ OUTPUT
//CALCULATE MOLAR MASS
// WMOLdll = (fp_WMOLdllTYPE) GetProcAddress(RefpropdllInstance,"WMOLdll");
- WMOLdll(x,wm);
+ WMOL = (WMOLdll_POINTER) RefpropdllInstance->getSymbol(WMOLdll_NAME);
+ WMOL(x,wm);
// sprintf(errormsg," %10.4f, %10.4f, %10.4f,",x[0],x[1],wm);
if (DEBUGMODE) printf("\nFunction WMOLdll was called\n");
wm /= 1000; //g/mol -> kg/mol
- if (DEBUGMODE) printf("\nwm converted.\n");
+ if (DEBUGMODE) printf("wm converted.\n");
- if (DEBUGMODE) printf("\statevar is %s \n",statevar_in);
+ if (DEBUGMODE) printf("statevar is %s \n",statevar_in);
//identify and assign passed state variables
// char tmpstr[1];
// strcpy(tmpstr,statevar[0]);
@@ -834,7 +992,7 @@ OUTPUT
break;
*/ default:
props[0] = 2;
- sprintf(errormsg,"Unknown state variable: %c", statevarval);
+ sprintf(errormsg,"Unknown state variable: %f", statevarval);
return 0;
}
}
@@ -845,17 +1003,19 @@ OUTPUT
long j=2,kr;
/* j--phase flag: 1 = input x is liquid composition (bubble point)
- 2 = input x is vapor composition (dew point)
- 3 = input x is liquid composition (freezing point)
- 4 = input x is vapor composition (sublimation point)
+ 2 = input x is vapor composition (dew point)
+ 3 = input x is liquid composition (freezing point)
+ 4 = input x is vapor composition (sublimation point)
*/
- if (ierr==0)
+ if (ierr==0) {
if (~strcmp(statevar,"t")){
// SATTdll = (fp_SATTdllTYPE) GetProcAddress(RefpropdllInstance,"SATTdll");
- SATTdll(T,x,j,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
+ SATT = (SATTdll_POINTER) RefpropdllInstance->getSymbol(SATTdll_NAME);
+ SATT(T,x,j,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
}else if (~strcmp(statevar,"p")){
// SATPdll = (fp_SATPdllTYPE) GetProcAddress(RefpropdllInstance,"SATPdll");
- SATPdll(p,x,j,T,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
+ SATP = (SATPdll_POINTER) RefpropdllInstance->getSymbol(SATPdll_NAME);
+ SATP(p,x,j,T,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
switch(ierr){
case 2:
strcpy(errormsg,"P < Ptp");
@@ -867,13 +1027,15 @@ OUTPUT
//sprintf(errormsg,"p=%f, h=%f",p ,statevar2);
}else if (~strcmp(statevar,"d")){
// SATDdll = (fp_SATDdllTYPE) GetProcAddress(RefpropdllInstance,"SATDdll");
- SATDdll(d,x,j,kr,T,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
+ SATD = (SATDdll_POINTER) RefpropdllInstance->getSymbol(SATDdll_NAME);
+ SATD(d,x,j,kr,T,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
switch(ierr){
case 2:
strcpy(errormsg,"D > Dmax");
break;
}
}
+ }
switch(ierr){
case 0:
@@ -969,9 +1131,9 @@ OUTPUT
//CONVERT TO SI-UNITS
if (ierr==0){
- WMOLdll(xliq,wmliq);
+ WMOL(xliq,wmliq);
wmliq /= 1000; //g/mol -> kg/mol
- WMOLdll(xvap,wmvap);
+ WMOL(xvap,wmvap);
wmvap /= 1000; //g/mol -> kg/mol
//printf("%d,%s\n%s\nP,T,D,H,CP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",nX,hf,hfmix,p,t,d,h,wm);
d *= wm*1000; //mol/dm� -> kg/m�
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp
index 65b0501..ea92eac 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp
@@ -89,7 +89,8 @@ int main(int argc, char* argv[]){
//strcpy(fluidname,argv[2]);
strcpy(fluidname,"BUTANE");
//props is defined
- double statevarval = 1e5; // 1 bar
+ double statevarval; // 1 bar
+ statevarval = 1e5; // 1 bar
// x is defined
char REFPROP_PATH[255];
strcpy(REFPROP_PATH,argv[5]);
@@ -97,7 +98,21 @@ int main(int argc, char* argv[]){
double T;
T = satprops_REFPROP (what, statevar, fluidname, props, statevarval, x, REFPROP_PATH, errormsg, DEBUG);
printf("Saturation conditions for %s\t",fluidname);
- printf("Saturation temperature =%f\t",T);
+ printf("Saturation temperature =%f\n\n",T);
+
+
+ strcpy(what, "T");
+ strcpy(statevar, "p");
+ strcpy(fluidname,"BUTANE");
+ statevarval = 1.1e5; // 1 bar
+ strcpy(REFPROP_PATH,argv[5]);
+
+ T = satprops_REFPROP (what, statevar, fluidname, props, statevarval, x, REFPROP_PATH, errormsg, DEBUG);
+ printf("Saturation conditions for %s\t",fluidname);
+ printf("Saturation temperature =%f\n\n",T);
+
+
+ printf("Errormessage: %s\n\n",errormsg);
return 0;
}
From 2d0830167f6ed1e828ad25f7ec23b489c8900e9f Mon Sep 17 00:00:00 2001
From: jowr
Date: Fri, 9 Nov 2012 03:26:54 -0800
Subject: [PATCH 11/57] 2012:11:09 12:25 - Fixed string length problems for
fluid string passing
---
.../src/refprop_wrapper.poco.cpp | 78 ++++++++++++++++---
1 file changed, 69 insertions(+), 9 deletions(-)
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.poco.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.poco.cpp
index 1a624b2..087c252 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.poco.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.poco.cpp
@@ -51,6 +51,7 @@
// Some constants...
+const long maxstringlength=10000;
const long filepathlength=1024;
const long errormessagelength=255+filepathlength;
const long lengthofreference=3;
@@ -87,12 +88,46 @@ SATTdll_POINTER SATT = NULL;
SATPdll_POINTER SATP = NULL;
SATDdll_POINTER SATD = NULL;
+// char *str_replace(char *str, char *search, char *replace, long *count, int DEBUGMODE) {
+// int i,n_ret;
+// int newlen = strlen(replace);
+// int oldlen = strlen(search);
+// char *ret;
+// *count = 0;
+//
+// //count occurrences of searchstring
+// for (i = 0; oldlen && str[i]; ++i)
+// if (strstr(&str[i], search) == &str[i]){ // if walk through is at searchstr
+// ++*count, i+=oldlen - 1;
+// }
+// ret = (char *) calloc(n_ret = (strlen(str) + 1 + *count * (newlen - oldlen)), sizeof(char));
+// if (!ret){
+// printf("Could not allocate memory");
+// return "";
+// }
+//
+// if (!*count){
+// strncpy(ret,str,n_ret);
+// //if (DEBUGMODE) printf("RET: %i %s\n",oldlen,str);
+// }else{
+// i = 0;
+// while (*str)
+// if (strstr(str, search) == str)
+// strncpy(&ret[i], replace,n_ret-i-1),
+// i += newlen,
+// str += oldlen;
+// else
+// ret[i++] = *str++;
+// ret[i] = '\0';
+// }
+// return ret;
+// }
//str_replace (fluidnames, "|", replace, nX)
char *str_replace(char *str, char *search, char *replace, long *count, int DEBUGMODE) {
*count = 0;
- char ret[filepathlength];
+ char ret[maxstringlength];
std::string fluids(str);
std::string dlimit(search);
@@ -122,6 +157,26 @@ return ret;
}
+// char printDoubleArray (double* arr[] ) {
+// std::copy(arr.begin(),arr.end(),std::ostream_iterator(std::cout,", "));
+// }
+
+char *printX(double arr[], long nX) {
+ char ret[filepathlength];
+ char tmp[filepathlength];
+ strcpy(ret,"(");
+ //for(int i = 0; i < (sizeof(arr)-1); i++) {
+ for(int i = 0; i < (nX-2); i++) {
+ sprintf(tmp,"%f, ", arr[i]);
+ strcat(ret,tmp);
+ }
+ sprintf(tmp,"%f", arr[nX-1]);
+ strcat(ret,tmp);
+
+ strcat(ret,")");
+ //printf ("output: %s \n", ret);
+ return ret;
+}
int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr, char* errormsg, int DEBUGMODE){
// Sets up the interface to the REFPROP.DLL
@@ -296,7 +351,8 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr
//if (DEBUGMODE) printf("REPLACE: %s\n",replace);
strncat(replace, FLD_PATH_CHAR,filepathlength-strlen(replace));
- int hf_len = strlen(fluidnames)+ncmax*(strlen(replace)-1)+4;
+ //int hf_len = strlen(fluidnames)+ncmax*(strlen(replace)-1)+4;
+ int hf_len = maxstringlength;
hf = (char*) calloc(hf_len, sizeof(char));
strncpy(hf,FLD_PATH_CHAR,hf_len);
@@ -325,7 +381,11 @@ int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr
SETUPdll_POINTER SETUP = (SETUPdll_POINTER) RefpropdllInstance->getSymbol(SETUPdll_NAME);
if (DEBUGMODE) printf("Running SETUP...\n");
- SETUP(*nX, hf, hfmix, hrf, ierr, herr);
+ //char hftmp[maxstringlength];
+ //strcpy(hftmp,hf);
+ static char hfld[maxstringlength+1];
+ strcpy(hfld,hf);
+ SETUP(*nX, hfld, hfmix, hrf, ierr, herr);
strcpy(loadedfluids,fluidnames);
strcpy(loadedpath,REF_PATH_CHAR);
@@ -760,16 +820,16 @@ OUTPUT
sprintf(errormsg,"T=%f and p=%f out of range",T,p);
break;
case 8:
- strcpy(errormsg,"x out of range (component and/or sum < 0 or > 1)");
+ sprintf(errormsg,"x out of range (component and/or sum < 0 or > 1):%s",printX(x,nX));
break;
case 9:
- sprintf(errormsg,"x or T=%f out of range",T);
+ sprintf(errormsg,"x=%s or T=%f out of range",printX(x,nX),T);
break;
case 12:
- sprintf(errormsg,"x out of range and P=%f < 0",p);
+ sprintf(errormsg,"x=%s out of range and P=%f < 0",printX(x,nX),p);
break;
case 13:
- sprintf(errormsg,"x, T=%f and p=%f out of range",T,p);
+ sprintf(errormsg,"x=%s, T=%f and p=%f out of range",printX(x,nX),T,p);
break;
case 16:
strcpy(errormsg,"TPFLSH error: p>melting pressure");
@@ -1045,10 +1105,10 @@ OUTPUT
sprintf(errormsg,"T=%f < Tmin",T);
break;
case 8:
- strcpy(errormsg,"x out of range");
+ sprintf(errormsg,"x out of range, %s",printX(x,nX));
break;
case 9:
- strcpy(errormsg,"T and x out of range");
+ sprintf(errormsg,"T=%f and x=%s out of range",T,printX(x,nX));
break;
case 10:
strcpy(errormsg,"D and x out of range");
From a229ba5ea346b5d06d1350ee06f8d6b219a77ddd Mon Sep 17 00:00:00 2001
From: jowr
Date: Tue, 13 Nov 2012 13:37:21 -0800
Subject: [PATCH 12/57] 2012:11:13 22:35 - Added a new wrapper file based on
Ian Bell's CoolProp wrapper. It seems to work with Dymola...
---
_REFPROP-Wrapper/Version 0.5_linux/Makefile | 12 +-
.../Version 0.5_linux/src/refprop_wrapper.h | 3 +
.../src/refprop_wrapper.ian.cpp | 1061 +++++++++++++++++
.../src/refpropwrappertest.cpp | 5 +
package.mo | 2 +-
readme.md | 4 +-
6 files changed, 1083 insertions(+), 4 deletions(-)
create mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/Makefile b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
index 657396a..ec954a4 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/Makefile
+++ b/_REFPROP-Wrapper/Version 0.5_linux/Makefile
@@ -103,7 +103,7 @@ $(BINDIR)/$(HEADERFILE)$(HEADEREXTENSION): $(SRCDIR)/$(HEADERFILE)$(HEADEREXTENS
.PHONY : library
library : $(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION)
-$(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION): poco
+$(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION): ian
.PHONY : nopoco
nopoco : $(SRCDIR)/$(LIBFILE).org.o
@@ -113,6 +113,10 @@ nopoco : $(SRCDIR)/$(LIBFILE).org.o
poco : $(SRCDIR)/$(LIBFILE).poco.o
$(CPPC) $(LIBFLAGS) $(CPPFLAGS) -o $(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION) $(SRCDIR)/$(LIBFILE).poco.o -lPocoFoundation
+.PHONY : ian
+ian : $(SRCDIR)/$(LIBFILE).ian.o
+ $(CPPC) $(LIBFLAGS) $(CPPFLAGS) -o $(BINDIR)/$(LIBRARY)$(LIBRARYEXTENSION) $(SRCDIR)/$(LIBFILE).ian.o -lPocoFoundation
+
###########################################################
# Compile the wrapper class tests.
###########################################################
@@ -122,6 +126,12 @@ test : $(BINDIR)/$(THETEST)
$(BINDIR)/$(THETEST) : $(SRCDIR)/$(THETEST).o
$(CPPC) $(CPPFLAGS) -o $(BINDIR)/$(THETEST) $(SRCDIR)/$(THETEST).o $(LIBS) -l$(THENAME)
+# .PHONY : ian
+# ian : $(BINDIR)/$(THETEST).ian
+#
+# $(BINDIR)/$(THETEST).ian : $(SRCDIR)/$(THETEST).ian.o $(SRCDIR)/$(LIBFILE).ian.o
+# $(CPPC) $(CPPFLAGS) -o $(BINDIR)/$(THETEST) $(SRCDIR)/$(THETEST).ian.o $(SRCDIR)/$(LIBFILE).ian.o -lPocoFoundation
+
###########################################################
# General rulesets for compilation.
###########################################################
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.h b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.h
index b672f42..19de850 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.h
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.h
@@ -38,6 +38,9 @@ extern "C" {
#endif // __cplusplus
double props_REFPROP(char* what, char* statevars, char* fluidnames, double *props, double statevar1, double statevar2, double* x, int phase, char* REFPROP_PATH, char* errormsg, int DEBUGMODE); //declaration;
double satprops_REFPROP(char* what, char* statevar, char* fluidnames, double *props, double statevarval, double* x, char* REFPROP_PATH, char* errormsg, int DEBUGMODE); //declaration;
+ //
+ //double REFPROP(char Output,char Name1, double Prop1, char Name2, double Prop2, char * Ref);
+ double REFPROP(char Output,char Name1, double Prop1, char Name2, double Prop2, double* xkg, char * Ref, char * Path, char * herr, int DEBUGMODE);
#ifdef __cplusplus
}
#endif // __cplusplus
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp
new file mode 100644
index 0000000..eba8238
--- /dev/null
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp
@@ -0,0 +1,1061 @@
+/*
+ wrapper file for refprop.
+
+ Based on earlier work by Henning Francke (francke@gfz-potsdam.de)
+ and the CoolProp wrapper by Ian Bell (ian.h.bell@gmail.com).
+
+ "Copied and pasted" by Jorrit Wronski (jowr@mek.dtu.dk)
+
+*/
+
+#if defined(WIN32) || defined(_WIN32)
+#include
+#endif
+
+// // #include "REFPROP.h"
+// //#include "refprop_lib.h"
+// #include "refprop_constants.h"
+// #include "refprop_names.h"
+// #include "refprop_cfunctions.h"
+#define refpropcharlong 10000
+// Some constants for REFPROP... defined by macros for ease of use
+#define refpropcharlength 255
+#define filepathlength 255
+#define lengthofreference 3
+#define errormessagelength 255
+#define ncmax 20 // Note: ncmax is the max number of components
+#define numparams 72
+#define maxcoefs 50
+
+#include
+#include
+#include
+#include
+#include // tolower etc
+
+#include
+//# error "Could not determine system."
+#include "refprop_wrapper.h"
+
+// get the POCO classes
+#include "Poco/SharedLibrary.h"
+#include "Poco/Path.h"
+#include "Poco/File.h"
+#include "Poco/Environment.h"
+#include "Poco/StringTokenizer.h"
+#include "Poco/String.h"
+#include "Poco/Exception.h"
+//
+//
+//
+ABFL1dll_POINTER ABFL1lib = NULL;
+ABFL2dll_POINTER ABFL2lib = NULL;
+ACTVYdll_POINTER ACTVYlib = NULL;
+AGdll_POINTER AGlib = NULL;
+CCRITdll_POINTER CCRITlib = NULL;
+CP0dll_POINTER CP0lib = NULL;
+CRITPdll_POINTER CRITPlib = NULL;
+CSATKdll_POINTER CSATKlib = NULL;
+CV2PKdll_POINTER CV2PKlib = NULL;
+CVCPKdll_POINTER CVCPKlib = NULL;
+CVCPdll_POINTER CVCPlib = NULL;
+DBDTdll_POINTER DBDTlib = NULL;
+DBFL1dll_POINTER DBFL1lib = NULL;
+DBFL2dll_POINTER DBFL2lib = NULL;
+DDDPdll_POINTER DDDPlib = NULL;
+DDDTdll_POINTER DDDTlib = NULL;
+DEFLSHdll_POINTER DEFLSHlib = NULL;
+DHD1dll_POINTER DHD1lib = NULL;
+DHFLSHdll_POINTER DHFLSHlib = NULL;
+DIELECdll_POINTER DIELEClib = NULL;
+DOTFILLdll_POINTER DOTFILLlib = NULL;
+DPDD2dll_POINTER DPDD2lib = NULL;
+DPDDKdll_POINTER DPDDKlib = NULL;
+DPDDdll_POINTER DPDDlib = NULL;
+DPDTKdll_POINTER DPDTKlib = NULL;
+DPDTdll_POINTER DPDTlib = NULL;
+DPTSATKdll_POINTER DPTSATKlib = NULL;
+DSFLSHdll_POINTER DSFLSHlib = NULL;
+ENTHALdll_POINTER ENTHALlib = NULL; //**
+ENTROdll_POINTER ENTROlib = NULL;
+ESFLSHdll_POINTER ESFLSHlib = NULL;
+FGCTYdll_POINTER FGCTYlib = NULL;
+FPVdll_POINTER FPVlib = NULL;
+GERG04dll_POINTER GERG04lib = NULL;
+GETFIJdll_POINTER GETFIJlib = NULL;
+GETKTVdll_POINTER GETKTVlib = NULL;
+GIBBSdll_POINTER GIBBSlib = NULL;
+HSFLSHdll_POINTER HSFLSHlib = NULL;
+INFOdll_POINTER INFOlib = NULL;
+LIMITKdll_POINTER LIMITKlib = NULL;
+LIMITSdll_POINTER LIMITSlib = NULL;
+LIMITXdll_POINTER LIMITXlib = NULL;
+MELTPdll_POINTER MELTPlib = NULL;
+MELTTdll_POINTER MELTTlib = NULL;
+MLTH2Odll_POINTER MLTH2Olib = NULL;
+NAMEdll_POINTER NAMElib = NULL;
+PDFL1dll_POINTER PDFL1lib = NULL;
+PDFLSHdll_POINTER PDFLSHlib = NULL;
+PEFLSHdll_POINTER PEFLSHlib = NULL;
+PHFL1dll_POINTER PHFL1lib = NULL;
+PHFLSHdll_POINTER PHFLSHlib = NULL;
+PQFLSHdll_POINTER PQFLSHlib = NULL;
+PREOSdll_POINTER PREOSlib = NULL;
+PRESSdll_POINTER PRESSlib = NULL;
+PSFL1dll_POINTER PSFL1lib = NULL;
+PSFLSHdll_POINTER PSFLSHlib = NULL;
+PUREFLDdll_POINTER PUREFLDlib = NULL;
+QMASSdll_POINTER QMASSlib = NULL;
+QMOLEdll_POINTER QMOLElib = NULL;
+SATDdll_POINTER SATDlib = NULL;
+SATEdll_POINTER SATElib = NULL;
+SATHdll_POINTER SATHlib = NULL;
+SATPdll_POINTER SATPlib = NULL;
+SATSdll_POINTER SATSlib = NULL;
+SATTdll_POINTER SATTlib = NULL;
+SETAGAdll_POINTER SETAGAlib = NULL;
+SETKTVdll_POINTER SETKTVlib = NULL;
+SETMIXdll_POINTER SETMIXlib = NULL;
+SETMODdll_POINTER SETMODlib = NULL;
+SETREFdll_POINTER SETREFlib = NULL;
+SETUPdll_POINTER SETUPlib = NULL;
+//SPECGRdll_POINTER SPECGRlib = NULL;
+SUBLPdll_POINTER SUBLPlib = NULL;
+SUBLTdll_POINTER SUBLTlib = NULL;
+SURFTdll_POINTER SURFTlib = NULL;
+SURTENdll_POINTER SURTENlib = NULL;
+TDFLSHdll_POINTER TDFLSHlib = NULL;
+TEFLSHdll_POINTER TEFLSHlib = NULL;
+THERM0dll_POINTER THERM0lib = NULL;
+THERM2dll_POINTER THERM2lib = NULL;
+THERM3dll_POINTER THERM3lib = NULL;
+THERMdll_POINTER THERMlib = NULL;
+THFLSHdll_POINTER THFLSHlib = NULL;
+TPFLSHdll_POINTER TPFLSHlib = NULL;
+TPRHOdll_POINTER TPRHOlib = NULL;
+TQFLSHdll_POINTER TQFLSHlib = NULL;
+TRNPRPdll_POINTER TRNPRPlib = NULL;
+TSFLSHdll_POINTER TSFLSHlib = NULL;
+VIRBdll_POINTER VIRBlib = NULL;
+VIRCdll_POINTER VIRClib = NULL;
+WMOLdll_POINTER WMOLlib = NULL;
+XMASSdll_POINTER XMASSlib = NULL;
+XMOLEdll_POINTER XMOLElib = NULL;
+
+// double REFPROP(char Output,char Name1, double Prop1, char Name2, double Prop2, double* xkg, char * Ref, char * Path, char * herr, int DEBUGMODE);
+
+// Load the library
+char LoadedREFPROPRef[2550];
+// HINSTANCE RefpropdllInstance=NULL;
+Poco::SharedLibrary *RefpropdllInstance = NULL;
+
+// global variables for array
+double T,p,d,dl,dv,dl_,dv_,q,e,h,s,cv,cp,w,MW,hl,hv,sl,sv,ul,
+ uv,pl,pv,hjt,eta,tcx,Q,Tcrit,pcrit,dcrit,rho,sigma;
+double x[ncmax],xliq[ncmax],xvap[ncmax];
+long i,ierr;
+
+int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr, char* errormsg, int DEBUGMODE){
+// Sets up the interface to the REFPROP.DLL
+// is called by props_REFPROP and satprops_REFPROP
+// char DLL_PATH[filepathlength], FLD_PATH[filepathlength];
+return 0;
+}
+
+int getProps(double *props) {
+ double MWliq,MWvap;
+
+ //CONVERT TO SI-UNITS
+ if (ierr==0){
+ WMOLlib(xliq,MWliq);
+ WMOLlib(xvap,MWvap);
+ }
+
+ //ASSIGN VALUES TO RETURN ARRAY
+ props[0] = ierr; //error code
+ props[1] = p*1000; //kPa -> Pa
+ props[2] = T; //Temperature in K
+ props[3] = MW/1000; //molecular weight, g/mol -> kg/mol
+ props[4] = d*MW; //density, mol/l -> kg/m3
+ props[5] = dl*MWliq; //density of liquid phase, mol/l -> kg/m3
+ props[6] = dv*MWvap; //density of vapour phase, mol/l -> kg/m3
+ props[7] = q*MWvap/MW; //vapor quality on a mass basis [mass vapor/total mass] (q=0 indicates saturated liquid, q=1 indicates saturated vapor)
+ props[8] = e/MW; //inner energy, J/mol -> J/kg
+ props[9] = h/MW; //specific enthalpy, J/mol -> J/kg
+ props[10] = s/MW; //specific entropy, J/molK -> J/kgK
+ props[11] = cv/MW; // heat capacity
+ props[12] = cp/MW; // heat capacity
+ props[13] = w; //speed of sound
+ props[14] = MWliq/1000;
+ props[15] = MWvap/1000;
+ for (int ii=0;iifilepathlength){
+ sprintf(herr,"Path too long (%i > %i)\n",strlen(RefpropPath),filepathlength);
+ return 0;
+ }
+ // Define temporary objects for checks.
+ Poco::Path REF_PATH(true);
+
+ char FLUIDS_CHAR[filepathlength+1] = "fluids";
+ Poco::Path FLD_PATH(true);
+ char LIBRARY_CHAR[filepathlength+1];
+ Poco::Path LIB_PATH(true);
+
+ // Parse the string and append a path separator if necessary.
+ REF_PATH.parse(RefpropPath, Poco::Path::PATH_NATIVE);
+ if (!REF_PATH.isDirectory()) REF_PATH.append(REF_PATH.separator());
+ // Overwrite the provided path
+ strcpy(path,REF_PATH.toString().c_str());
+
+ // Check the path if running in debugmode
+ if (DEBUGMODE) {
+ Poco::File refFile(REF_PATH);
+ if ( !refFile.isDirectory() || !refFile.canRead() ){
+ printf ("\nREF_PATH is not a readable directory: %s \n", REF_PATH.toString().c_str());
+ sprintf (herr,"\nREF_PATH is not a readable directory: %s \n", REF_PATH.toString().c_str());
+ return 0;
+ } else {
+ printf ("\nREF_PATH is a readable directory: %s \n", REF_PATH.toString().c_str());
+ }
+ }
+
+ // The fluid files are in the Refprop directory, append "fluids".
+ FLD_PATH.parse(path);
+ FLD_PATH.pushDirectory(FLUIDS_CHAR);
+
+ // First create a pointer to an instance of the library
+ // Then have windows load the library.
+
+ Poco::Path SRC_PATH; // This is not fail-safe, the OS might look somewhere else, e.g. /usr/lib ...
+ // If REFPROP is not loaded, try to load it
+ if (RefpropdllInstance==NULL)
+ {
+ if (DEBUGMODE) printf ("RefpropdllInstance loaded: %s \n", "false");
+ // Check the OS and assign the right names for the library
+ bool is_linux = ( 0 == Poco::icompare(Poco::Environment::osName(), "linux") );
+ if (is_linux){
+ strcpy(LIBRARY_CHAR,"librefprop.so");
+ //SRC_PATH.parse("/usr/local/lib");
+ } else {
+ strcpy(LIBRARY_CHAR,"refprop.dll");
+ //SRC_PATH = REF_PATH;
+ }
+ SRC_PATH = REF_PATH;
+
+ // search the library at the given path
+ bool found_lib = Poco::Path::find(SRC_PATH.toString(), LIBRARY_CHAR, LIB_PATH);
+ if (found_lib) {
+ if (DEBUGMODE) printf ("Found library %s in path %s \n", LIBRARY_CHAR, SRC_PATH.toString().c_str());
+ } else {
+ if (DEBUGMODE) printf ("Cannot find library %s in path %s \n", LIBRARY_CHAR, SRC_PATH.toString().c_str());
+ sprintf ("Cannot find library %s in path %s \n", LIBRARY_CHAR, SRC_PATH.toString().c_str());
+ return 0;
+ }
+
+ // check if the file is correct and executable
+ if (DEBUGMODE) {
+ Poco::File libFile(LIB_PATH);
+ if ( !libFile.isFile() || !libFile.canRead() ){
+ printf ("LIB_PATH is not a readable file: %s \n", LIB_PATH.toString().c_str());
+ sprintf (herr,"LIB_PATH is not a readable file: %s \n", LIB_PATH.toString().c_str());
+ return 0;
+ } else {
+ printf ("LIB_PATH exists and is readable: %s \n", LIB_PATH.toString().c_str());
+ }
+ }
+
+ // load a new library instance
+ RefpropdllInstance = new Poco::SharedLibrary(LIB_PATH.toString());
+ if (RefpropdllInstance==NULL)
+ {
+ printf("Could not load REFPROP. \n");
+ return -1;
+ }
+
+ //DHFL1 = (DHFL1dll_POINTER) RefpropdllInstance->getSymbol(DHFL1dll_NAME);
+ //DHFL1(d,h,x,T,ierr,herr,errormessagelength);
+
+ //ABFL1dll_POINTER {aka void (*)(double&, double&, double*, long int&, double&, double&, double&, double&, double&, double&, long int&, char*, long int)}’ to ‘
+ //ABFL1dll_TYPE {aka void (double&, double&, double*, long int&, double&, double&, double&, double&, double&, double&, long int&, char*, long int)}’
+
+ // Then get pointers into the dll to the actual functions.
+ ABFL1lib = (ABFL1dll_POINTER) RefpropdllInstance->getSymbol(ABFL1dll_NAME);
+ ABFL2lib = (ABFL2dll_POINTER) RefpropdllInstance->getSymbol(ABFL2dll_NAME);
+ ACTVYlib = (ACTVYdll_POINTER) RefpropdllInstance->getSymbol(ACTVYdll_NAME);
+ AGlib = (AGdll_POINTER) RefpropdllInstance->getSymbol(AGdll_NAME);
+ CCRITlib = (CCRITdll_POINTER) RefpropdllInstance->getSymbol(CCRITdll_NAME);
+ CP0lib = (CP0dll_POINTER) RefpropdllInstance->getSymbol(CP0dll_NAME);
+ CRITPlib = (CRITPdll_POINTER) RefpropdllInstance->getSymbol(CRITPdll_NAME);
+ CSATKlib = (CSATKdll_POINTER) RefpropdllInstance->getSymbol(CSATKdll_NAME);
+ CV2PKlib = (CV2PKdll_POINTER) RefpropdllInstance->getSymbol(CV2PKdll_NAME);
+ CVCPKlib = (CVCPKdll_POINTER) RefpropdllInstance->getSymbol(CVCPKdll_NAME);
+ CVCPlib = (CVCPdll_POINTER) RefpropdllInstance->getSymbol(CVCPdll_NAME);
+ DBDTlib = (DBDTdll_POINTER) RefpropdllInstance->getSymbol(DBDTdll_NAME);
+ DBFL1lib = (DBFL1dll_POINTER) RefpropdllInstance->getSymbol(DBFL1dll_NAME);
+ DBFL2lib = (DBFL2dll_POINTER) RefpropdllInstance->getSymbol(DBFL2dll_NAME);
+ DDDPlib = (DDDPdll_POINTER) RefpropdllInstance->getSymbol(DDDPdll_NAME);
+ DDDTlib = (DDDTdll_POINTER) RefpropdllInstance->getSymbol(DDDTdll_NAME);
+ DEFLSHlib = (DEFLSHdll_POINTER) RefpropdllInstance->getSymbol(DEFLSHdll_NAME);
+ DHD1lib = (DHD1dll_POINTER) RefpropdllInstance->getSymbol(DHD1dll_NAME);
+ DHFLSHlib = (DHFLSHdll_POINTER) RefpropdllInstance->getSymbol(DHFLSHdll_NAME);
+ DIELEClib = (DIELECdll_POINTER) RefpropdllInstance->getSymbol(DIELECdll_NAME);
+ DOTFILLlib = (DOTFILLdll_POINTER) RefpropdllInstance->getSymbol(DOTFILLdll_NAME);
+ DPDD2lib = (DPDD2dll_POINTER) RefpropdllInstance->getSymbol(DPDD2dll_NAME);
+ DPDDKlib = (DPDDKdll_POINTER) RefpropdllInstance->getSymbol(DPDDKdll_NAME);
+ DPDDlib = (DPDDdll_POINTER) RefpropdllInstance->getSymbol(DPDDdll_NAME);
+ DPDTKlib = (DPDTKdll_POINTER) RefpropdllInstance->getSymbol(DPDTKdll_NAME);
+ DPDTlib = (DPDTdll_POINTER) RefpropdllInstance->getSymbol(DPDTdll_NAME);
+ DPTSATKlib = (DPTSATKdll_POINTER) RefpropdllInstance->getSymbol(DPTSATKdll_NAME);
+ DSFLSHlib = (DSFLSHdll_POINTER) RefpropdllInstance->getSymbol(DSFLSHdll_NAME);
+ ENTHALlib = (ENTHALdll_POINTER) RefpropdllInstance->getSymbol(ENTHALdll_NAME); //**
+ ENTROlib = (ENTROdll_POINTER) RefpropdllInstance->getSymbol(ENTROdll_NAME);
+ ESFLSHlib = (ESFLSHdll_POINTER) RefpropdllInstance->getSymbol(ESFLSHdll_NAME);
+ FGCTYlib = (FGCTYdll_POINTER) RefpropdllInstance->getSymbol(FGCTYdll_NAME);
+ FPVlib = (FPVdll_POINTER) RefpropdllInstance->getSymbol(FPVdll_NAME);
+ GERG04lib = (GERG04dll_POINTER) RefpropdllInstance->getSymbol(GERG04dll_NAME);
+ GETFIJlib = (GETFIJdll_POINTER) RefpropdllInstance->getSymbol(GETFIJdll_NAME);
+ GETKTVlib = (GETKTVdll_POINTER) RefpropdllInstance->getSymbol(GETKTVdll_NAME);
+ GIBBSlib = (GIBBSdll_POINTER) RefpropdllInstance->getSymbol(GIBBSdll_NAME);
+ HSFLSHlib = (HSFLSHdll_POINTER) RefpropdllInstance->getSymbol(HSFLSHdll_NAME);
+ INFOlib = (INFOdll_POINTER) RefpropdllInstance->getSymbol(INFOdll_NAME);
+ LIMITKlib = (LIMITKdll_POINTER) RefpropdllInstance->getSymbol(LIMITKdll_NAME);
+ LIMITSlib = (LIMITSdll_POINTER) RefpropdllInstance->getSymbol(LIMITSdll_NAME);
+ LIMITXlib = (LIMITXdll_POINTER) RefpropdllInstance->getSymbol(LIMITXdll_NAME);
+ MELTPlib = (MELTPdll_POINTER) RefpropdllInstance->getSymbol(MELTPdll_NAME);
+ MELTTlib = (MELTTdll_POINTER) RefpropdllInstance->getSymbol(MELTTdll_NAME);
+ MLTH2Olib = (MLTH2Odll_POINTER) RefpropdllInstance->getSymbol(MLTH2Odll_NAME);
+ NAMElib = (NAMEdll_POINTER) RefpropdllInstance->getSymbol(NAMEdll_NAME);
+ PDFL1lib = (PDFL1dll_POINTER) RefpropdllInstance->getSymbol(PDFL1dll_NAME);
+ PDFLSHlib = (PDFLSHdll_POINTER) RefpropdllInstance->getSymbol(PDFLSHdll_NAME);
+ PEFLSHlib = (PEFLSHdll_POINTER) RefpropdllInstance->getSymbol(PEFLSHdll_NAME);
+ PHFL1lib = (PHFL1dll_POINTER) RefpropdllInstance->getSymbol(PHFL1dll_NAME);
+ PHFLSHlib = (PHFLSHdll_POINTER) RefpropdllInstance->getSymbol(PHFLSHdll_NAME);
+ PQFLSHlib = (PQFLSHdll_POINTER) RefpropdllInstance->getSymbol(PQFLSHdll_NAME);
+ PREOSlib = (PREOSdll_POINTER) RefpropdllInstance->getSymbol(PREOSdll_NAME);
+ PRESSlib = (PRESSdll_POINTER) RefpropdllInstance->getSymbol(PRESSdll_NAME);
+ PSFL1lib = (PSFL1dll_POINTER) RefpropdllInstance->getSymbol(PSFL1dll_NAME);
+ PSFLSHlib = (PSFLSHdll_POINTER) RefpropdllInstance->getSymbol(PSFLSHdll_NAME);
+ PUREFLDlib = (PUREFLDdll_POINTER) RefpropdllInstance->getSymbol(PUREFLDdll_NAME);
+ QMASSlib = (QMASSdll_POINTER) RefpropdllInstance->getSymbol(QMASSdll_NAME);
+ QMOLElib = (QMOLEdll_POINTER) RefpropdllInstance->getSymbol(QMOLEdll_NAME);
+ SATDlib = (SATDdll_POINTER) RefpropdllInstance->getSymbol(SATDdll_NAME);
+ SATElib = (SATEdll_POINTER) RefpropdllInstance->getSymbol(SATEdll_NAME);
+ SATHlib = (SATHdll_POINTER) RefpropdllInstance->getSymbol(SATHdll_NAME);
+ SATPlib = (SATPdll_POINTER) RefpropdllInstance->getSymbol(SATPdll_NAME);
+ SATSlib = (SATSdll_POINTER) RefpropdllInstance->getSymbol(SATSdll_NAME);
+ SATTlib = (SATTdll_POINTER) RefpropdllInstance->getSymbol(SATTdll_NAME);
+ SETAGAlib = (SETAGAdll_POINTER) RefpropdllInstance->getSymbol(SETAGAdll_NAME);
+ SETKTVlib = (SETKTVdll_POINTER) RefpropdllInstance->getSymbol(SETKTVdll_NAME);
+ SETMIXlib = (SETMIXdll_POINTER) RefpropdllInstance->getSymbol(SETMIXdll_NAME);
+ SETMODlib = (SETMODdll_POINTER) RefpropdllInstance->getSymbol(SETMODdll_NAME);
+ SETREFlib = (SETREFdll_POINTER) RefpropdllInstance->getSymbol(SETREFdll_NAME);
+ SETUPlib = (SETUPdll_POINTER) RefpropdllInstance->getSymbol(SETUPdll_NAME);
+// SPECGRlib = (SPECGRdll_POINTER) RefpropdllInstance->getSymbol(SPECGRdll_NAME);
+ SUBLPlib = (SUBLPdll_POINTER) RefpropdllInstance->getSymbol(SUBLPdll_NAME);
+ SUBLTlib = (SUBLTdll_POINTER) RefpropdllInstance->getSymbol(SUBLTdll_NAME);
+ SURFTlib = (SURFTdll_POINTER) RefpropdllInstance->getSymbol(SURFTdll_NAME);
+ SURTENlib = (SURTENdll_POINTER) RefpropdllInstance->getSymbol(SURTENdll_NAME);
+ TDFLSHlib = (TDFLSHdll_POINTER) RefpropdllInstance->getSymbol(TDFLSHdll_NAME);
+ TEFLSHlib = (TEFLSHdll_POINTER) RefpropdllInstance->getSymbol(TEFLSHdll_NAME);
+ THERM0lib = (THERM0dll_POINTER) RefpropdllInstance->getSymbol(THERM0dll_NAME);
+ THERM2lib = (THERM2dll_POINTER) RefpropdllInstance->getSymbol(THERM2dll_NAME);
+ THERM3lib = (THERM3dll_POINTER) RefpropdllInstance->getSymbol(THERM3dll_NAME);
+ THERMlib = (THERMdll_POINTER) RefpropdllInstance->getSymbol(THERMdll_NAME);
+ THFLSHlib = (THFLSHdll_POINTER) RefpropdllInstance->getSymbol(THFLSHdll_NAME);
+ TPFLSHlib = (TPFLSHdll_POINTER) RefpropdllInstance->getSymbol(TPFLSHdll_NAME);
+ TPRHOlib = (TPRHOdll_POINTER) RefpropdllInstance->getSymbol(TPRHOdll_NAME);
+ TQFLSHlib = (TQFLSHdll_POINTER) RefpropdllInstance->getSymbol(TQFLSHdll_NAME);
+ TRNPRPlib = (TRNPRPdll_POINTER) RefpropdllInstance->getSymbol(TRNPRPdll_NAME);
+ TSFLSHlib = (TSFLSHdll_POINTER) RefpropdllInstance->getSymbol(TSFLSHdll_NAME);
+ VIRBlib = (VIRBdll_POINTER) RefpropdllInstance->getSymbol(VIRBdll_NAME);
+ VIRClib = (VIRCdll_POINTER) RefpropdllInstance->getSymbol(VIRCdll_NAME);
+ WMOLlib = (WMOLdll_POINTER) RefpropdllInstance->getSymbol(WMOLdll_NAME);
+ XMASSlib = (XMASSdll_POINTER) RefpropdllInstance->getSymbol(XMASSdll_NAME);
+ XMOLElib = (XMOLEdll_POINTER) RefpropdllInstance->getSymbol(XMOLEdll_NAME);
+ //
+ if (DEBUGMODE) printf ("RefpropdllInstance loaded: %s \n", "true");
+ } else { // library was already loaded
+ if (DEBUGMODE) printf ("RefpropdllInstance loaded: %s \n", "true");
+ }
+
+
+ // Now the library is loaded and we can start checkicng the fluid path
+ if (DEBUGMODE) {
+ Poco::File fldFile(FLD_PATH);
+ if ( !fldFile.isDirectory() || !fldFile.canRead() ){
+ printf ("FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
+ sprintf (herr,"FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
+ return 0;
+ } else {
+ printf ("FLD_PATH is a readable directory: %s \n", FLD_PATH.toString().c_str());
+ }
+ }
+ char FLD_PATH_CHAR[filepathlength+1];
+ strcpy(FLD_PATH_CHAR,FLD_PATH.toString().c_str());
+
+
+ // If the fluid name starts with the string "REFPROP-", chop off the "REFPROP-"
+ if (!strncmp(Ref,"REFPROP-",8))
+ {
+ char *REFPROPRef=NULL,*RefCopy=NULL;
+ double prop;
+
+ // Allocate space for refrigerant name
+ RefCopy=(char *)malloc(strlen(Ref)+1);
+ // Make a backup copy
+ strcpy(RefCopy,Ref);
+ // Chop off the "REFPROP-"
+ REFPROPRef = strtok(RefCopy,"-");
+ REFPROPRef = strtok(NULL,"-");
+ // Run with the stripped Refrigerant name
+ prop=REFPROP(Output,Name1,Prop1,Name2,Prop2,xkg,REFPROPRef,path,herr,DEBUGMODE);
+ // Free allocated memory
+ free(RefCopy);
+ // Return the new value
+ return prop;
+ }
+
+ // find the delimiter
+ char *pointer;
+ pointer = strchr(Ref, '|');
+
+ if (!strncmp(Ref,"MIX",3))
+ {
+ // Sample is "REFPROP-MIX:R32[0.697615]&R125[0.302385]" - this is R410A
+ char *REFPROPRef=NULL,*RefCopy=NULL,*Refs[20],*Refrigerant;
+ double molefraction;
+
+ // Allocate space for refrigerant name
+ RefCopy=(char *)malloc(strlen(Ref)+1);
+ // Make a backup copy
+ strcpy(RefCopy,Ref);
+ // Chop off the "MIX"
+ REFPROPRef = strtok(RefCopy,":");
+ i=1;
+ while (REFPROPRef!=NULL)
+ {
+ Refs[i-1]=strtok(NULL,"&");
+ if (Refs[i-1]==NULL)
+ {
+ i--;
+ break;
+ }
+ else
+ i++;
+ }
+ // Check maximum number of components
+ if (i>ncmax){
+ sprintf(herr,"Too many components (More than %i)\n",ncmax);
+ return 1;
+ }
+ //Flush out RefString
+ sprintf(RefString,"");
+ for (j=0;jncmax){
+ sprintf(herr,"Too many components (More than %i)\n",ncmax);
+ return 1;
+ }
+ if (DEBUGMODE) printf("Mass-based mixture with %li components \n",i);
+ //Flush out RefString
+ sprintf(RefString,"");
+ for (j=0;j1)
+ {
+ fprintf(stderr,"Error: Accentric factor only defined for pure fluids\n");
+ return 1;
+ }
+ INFOlib(i,wmm,Ttriple,tnbpt,tc,pc,Dc,Zc,acf,dip,Rgas);
+ return acf;
+ }
+ else if (Output =='o')
+ {
+ double wmm,Ttriple,tnbpt,tc,pc,Dc,Zc,acf,dip,Rgas;
+ // Dipole moment
+ if (i>1)
+ {
+ fprintf(stderr,"Error: Dipole moment only defined for pure fluids\n");
+ return 1;
+ }
+ INFOlib(i,wmm,Ttriple,tnbpt,tc,pc,Dc,Zc,acf,dip,Rgas);
+ return dip;
+ }
+ else if (Output=='R')
+ {
+ long icomp;
+ double wmm,Ttriple,tnbpt,tc,pc,Dc,Zc,acf,dip,Rgas;
+ // Triple point temperature
+ icomp=1;
+ if (i>1)
+ {
+ fprintf(stderr,"Error: Triple point temperature only defined for pure fluids\n");
+ return 200;
+ }
+ INFOlib(icomp,wmm,Ttriple,tnbpt,tc,pc,Dc,Zc,acf,dip,Rgas);
+ return Ttriple;
+ }
+ else if (Output=='I')
+ {
+ if (Name1=='T'){
+ SURFTlib(Prop1,dl,x,sigma,i,herr,errormessagelength);
+ return sigma/1000;
+ }
+ else{
+ std::cout<< "If surface tension is the output, temperature must be the first input" << std::endl;
+ return 1;
+ }
+ }
+
+ else if ((Name1=='T' && Name2=='P') || (Name2=='T' && Name1=='P'))
+ {
+ // T in K, P in Pa
+ if (Name1 == 'T'){
+ T = Prop1; p = Prop2/1000;
+ }
+ else{
+ p = Prop1/1000; T = Prop2;
+ }
+
+
+ // Use flash routine to find properties
+ TPFLSHlib(T,p,x,d,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+ if (Output=='H') return h/MW;
+ else if (Output=='D') return d*MW;
+ else if (Output=='S') return s/MW;
+ else if (Output=='U') return e/MW;
+ else if (Output=='C') return cp/MW;
+ else if (Output=='O') return cv/MW;
+ else if (Output=='P') return p*1000;
+ else if (Output=='A') return w;
+ else if (Output=='V')
+ {
+ TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
+ return eta/1.0e6; //uPa-s to Pa-s
+ }
+ else if (Output=='L')
+ {
+ TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
+ return tcx/1000.0; //W/m-K to kW/m-K
+ }
+ else
+ return 1;
+ }
+ else if ((Name1=='T' && Name2=='D') || (Name2=='T' && Name1=='D'))
+ {
+ // T in K, D in kg/m^3
+ if (Name1 == 'T'){
+ T = Prop1; rho = Prop2/MW;
+ }
+ else{
+ rho = Prop1/MW; T = Prop2;
+ }
+
+ // This is the explicit formulation of the EOS
+ TDFLSHlib(T,rho,x,p,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
+
+ if (Output=='P')
+ {
+ return p*1000;
+ }
+ if (Output=='H')
+ {
+ return h/MW;
+ }
+ else if (Output=='A')
+ {
+ return w;
+ }
+ else if (Output=='S')
+ {
+ return s/MW;
+ }
+ else if (Output=='U')
+ {
+ return (h-p/rho)/MW;
+ }
+ else if (Output=='C')
+ {
+ return cp/MW;
+ }
+ else if (Output=='O')
+ {
+ return cv/MW;
+ }
+ else if (Output=='V')
+ {
+ TRNPRPlib(T,rho,x,eta,tcx,ierr,herr,errormessagelength);
+ return eta/1.0e6; //uPa-s to Pa-s
+ }
+ else if (Output=='L')
+ {
+ TRNPRPlib(T,rho,x,eta,tcx,ierr,herr,errormessagelength);
+ return tcx/1000.0; //W/m-K to kW/m-K
+ }
+ else if (Output=='D')
+ {
+ return rho*MW;
+ }
+ else
+ return 1;
+ }
+ else if ((Name1=='T' && Name2=='Q') || (Name2=='T' && Name1=='Q'))
+ {
+
+ if (Name1 == 'T'){
+ T = Prop1; Q = Prop2;
+ }
+ else{
+ Q = Prop1; T = Prop2;
+ }
+
+ // Saturation Density
+ i=1;
+ SATTlib(T,x,i,pl,dl,dv_,xliq,xvap,ierr,herr,errormessagelength);
+ i=2;
+ SATTlib(T,x,i,pv,dl_,dv,xliq,xvap,ierr,herr,errormessagelength);
+ if (Output=='D')
+ {
+ return 1/(Q/dv+(1-Q)/dl)*MW;
+ }
+ else if (Output=='P')
+ {
+ return (pv*Q+pl*(1-Q))*1000;
+ }
+ else if (Output=='A')
+ {
+ rho=1/(Q/dv+(1-Q)/dl);
+ THERMlib(T,rho,x,p,e,h,s,cv,cp,w,hjt);
+ return w;
+ }
+ else if (Output=='H')
+ {
+ ENTHALlib(T,dl,xliq,hl);
+ ENTHALlib(T,dv,xvap,hv);
+ return (hv*Q+hl*(1-Q))/MW*1000; // J/kg to kJ/kg
+ }
+ else if (Output=='S')
+ {
+ ENTROlib(T,dl,xliq,sl);
+ ENTROlib(T,dv,xvap,sv);
+ return (sv*Q+sl*(1-Q))/MW*1000; // J/kg-K to kJ/kg-K
+ }
+ else if (Output=='U')
+ {
+ ENTHALlib(T,dl,xliq,hl);
+ ENTHALlib(T,dv,xvap,hv);
+ p=pv*Q+pl*(1-Q);
+ ul=hl-p/dl;
+ uv=hv-p/dv;
+ return (uv*Q+ul*(1-Q))/MW*1000; // J/kg to kJ/kg
+ }
+ else if (Output=='C')
+ {
+ d=1/(Q/dv+(1-Q)/dl);
+ CVCPlib(T,d,x,cv,cp);
+ return cp/MW*1000; // J/kg-K to kJ/kg-K
+ }
+ else if (Output=='O')
+ {
+ d=1/(Q/dv+(1-Q)/dl);
+ CVCPlib(T,d,x,cv,cp);
+ return cv/MW*1000; // J/kg-K to kJ/kg-K
+ }
+ else if (Output=='V')
+ {
+ d=1/(Q/dv+(1-Q)/dl);
+ TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
+ return eta/1.0e6; //uPa-s to Pa-s
+ }
+ else if (Output=='L')
+ {
+ d=1/(Q/dv+(1-Q)/dl);
+ TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
+ return tcx/1000.0; //W/m-K to kW/m-K
+ }
+ else
+ return 1;
+ }
+ else if ((Name1=='P' && Name2=='Q') || (Name2=='P' && Name1=='Q'))
+ {
+
+ if (Name1 == 'P'){
+ p = Prop1/1000; Q = Prop2;
+ }
+ else{
+ Q = Prop1; p = Prop2/1000;
+ }
+
+ // Saturation Density
+ SATPlib(p,x,i,T,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
+ if (Output=='T')
+ {
+ return T;
+ }
+ else if (Output=='D')
+ {
+ return 1/(Q/dv+(1-Q)/dl)*MW;
+ }
+ else if (Output=='P')
+ {
+ PRESSlib(T,dl,xliq,pl);
+ PRESSlib(T,dv,xvap,pv);
+ return (pv*Q+pl*(1-Q))*1000;
+ }
+ else if (Output=='H')
+ {
+ ENTHALlib(T,dl,xliq,hl);
+ ENTHALlib(T,dv,xvap,hv);
+ return (hv*Q+hl*(1-Q))/MW*1000; // J/kg to kJ/kg
+ }
+ else if (Output=='S')
+ {
+ ENTROlib(T,dl,xliq,sl);
+ ENTROlib(T,dv,xvap,sv);
+ return (sv*Q+sl*(1-Q))/MW*1000; // J/kg-K to kJ/kg-K
+ }
+ else if (Output=='U')
+ {
+ ENTHALlib(T,dl,xliq,hl);
+ ENTHALlib(T,dv,xvap,hv);
+ ul=hl-p/dl;
+ uv=hv-p/dv;
+ return (uv*Q+ul*(1-Q))/MW*1000; // J/kg to kJ/kg
+ }
+ else if (Output=='C')
+ {
+ d=1/(Q/dv+(1-Q)/dl);
+ CVCPlib(T,d,x,cv,cp);
+ return cp/MW*1000; // J/kg-K to kJ/kg-K
+ }
+ else if (Output=='O')
+ {
+ d=1/(Q/dv+(1-Q)/dl);
+ CVCPlib(T,d,x,cv,cp);
+ return cv/MW*1000; // J/kg-K to kJ/kg-K
+ }
+ else if (Output=='A')
+ {
+ rho=1/(Q/dv+(1-Q)/dl);
+ THERMlib(T,rho,x,p,e,h,s,cv,cp,w,hjt);
+ return w;
+ }
+ else if (Output=='V')
+ {
+ d=1/(Q/dv+(1-Q)/dl);
+ TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
+ return eta/1.0e6; //uPa-s to Pa-s
+ }
+ else if (Output=='L')
+ {
+ d=1/(Q/dv+(1-Q)/dl);
+ TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
+ return tcx; //W/m-K to kW/m-K
+ }
+ else
+ return 1;
+ }
+ else if ((Name1=='P' && Name2=='H') || (Name2=='P' && Name1=='H'))
+ {
+ // p in Pa, h in J/kg
+ if (Name1 == 'P'){
+ p = Prop1/1000; h = Prop2*MW/1000;
+ }
+ else{
+ h = Prop1*MW/1000; p = Prop2/1000;
+ }
+
+ // Use flash routine to find properties
+ PHFLSHlib(p,h,x,T,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
+ if (Output=='H') return h/MW;
+ else if (Output=='T') return T;
+ else if (Output=='D') return d*MW;
+ else if (Output=='S') return s/MW;
+ else if (Output=='U') return e/MW;
+ else if (Output=='C') return cp/MW;
+ else if (Output=='O') return cv/MW;
+ else if (Output=='P') return p*1000;
+ else if (Output=='A') return w;
+ else if (Output=='V')
+ {
+ TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
+ return eta/1.0e6; //uPa-s to Pa-s
+ }
+ else if (Output=='L')
+ {
+ TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
+ return tcx/1000.0; //W/m-K to kW/m-K
+ }
+ else
+ return 1;
+ }
+ else
+ return 1;
+}
+// #endif
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp
index ea92eac..2fd571e 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp
@@ -113,6 +113,11 @@ int main(int argc, char* argv[]){
printf("Errormessage: %s\n\n",errormsg);
+
+
+// double dens;
+// dens = REFPROP(char "D",char Name1, double Prop1, char Name2, double Prop2, char * Ref)
+
return 0;
}
diff --git a/package.mo b/package.mo
index a773821..544bac1 100644
--- a/package.mo
+++ b/package.mo
@@ -1,7 +1,7 @@
within ;
package MediaTwoPhaseMixture
// constant String REFPROP_PATH = "d:\\Program Files (x86)\\REFPROP\\";
- constant String REFPROP_PATH = "/home/jowr/Documents/Fluids/refprop/v9.0/";
+ constant String REFPROP_PATH = "/opt/refprop/";
annotation (version="0.2", uses(Modelica(version="3.2")),
Documentation(info="
diff --git a/readme.md b/readme.md
index 7bdb6da..43b7aa3 100644
--- a/readme.md
+++ b/readme.md
@@ -17,9 +17,9 @@ For installing on a Linux machine, please follow the instructions in the Makefil
1. After downloading and unzipping rename folder containing these files to "MediaTwoPhaseMixture".
2. Change the paths in _REFPROP-Wrapper/Version x.x_linux/Makefile to your needs.
-3. Make sure to have the shared library "librefprop.so" available. You might want to check https://github.com/jowr/librefprop.so for details.
+3. Make sure to have the shared library "librefprop.so" available in the same directory as the "fluids" folder. You might want to check https://github.com/jowr/librefprop.so for details.
4. Call "make all" and "sudo make install" as well as "sudo make fixit" to compile and install the wrapper library.
-5. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the Modelica package). It should look something like: constant String REFPROP_PATH = "/home/user/Refprop/";
+5. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the Modelica package). It should look something like: constant String REFPROP_PATH = "/opt/refprop/";
To remove the files from your system, please use "sudo make uninstall". Please be aware that you might need a copy of the Poco C++ framework to compile future versions the wrapper files yourself. You can find it at: http://pocoproject.org/. The general idea is to use this framework to implement platform independent library loading and caching, but it is still a long way to go.
From bc14c6ea235933429186ac9311f07072f8f9e680 Mon Sep 17 00:00:00 2001
From: jowr
Date: Tue, 20 Nov 2012 05:32:44 -0800
Subject: [PATCH 13/57] 2012:11:20 14:31 - On the way to a better wrapper. Last
version of 0.5, added links to readme and a link to coolprop to the wrapper
file
---
.../src/refprop_wrapper.ian.cpp | 104 +++++++++++-------
.../src/refpropwrappertest.cpp | 2 +-
readme.md | 11 +-
3 files changed, 77 insertions(+), 40 deletions(-)
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp
index eba8238..1a7669d 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp
@@ -1,10 +1,14 @@
/*
wrapper file for refprop.
+ Heavily based on the Refprop wrapper in CoolProp by
+ Ian Bell (ian.h.bell@gmail.com) - http://coolprop.sourceforge.net/
+
+ Compatible to the modelica interface developed by
Based on earlier work by Henning Francke (francke@gfz-potsdam.de)
and the CoolProp wrapper by Ian Bell (ian.h.bell@gmail.com).
- "Copied and pasted" by Jorrit Wronski (jowr@mek.dtu.dk)
+ Changes to produce this file by Jorrit Wronski (jowr@mek.dtu.dk)
*/
@@ -42,9 +46,7 @@
#include "Poco/Path.h"
#include "Poco/File.h"
#include "Poco/Environment.h"
-#include "Poco/StringTokenizer.h"
#include "Poco/String.h"
-#include "Poco/Exception.h"
//
//
//
@@ -238,9 +240,34 @@ return ret;
}
-
-double REFPROP(char Output,char Name1, double Prop1, char Name2, double Prop2, double* xkg, char * Ref, char* RefpropPath, char* herr, int DEBUGMODE)
-{
+/*
+ * Calculate properties for the current conditions. Includes initialisation and check of
+ * the requested fluids. Since the input comes from Modelica, unit conversion functions are
+ * invoked if necessary.
+ * This function is based on the Refprop wrapper that comes with the CoolProp package
+ * written by Ian Bell (ian.h.bell@gmail.com). The software is an open-source fluid property
+ * calculator based on Helmholtz energy. It is available athttp://coolprop.sourceforge.net.
+ *
+ * Input parameters:
+ * Output : Which property are we looking for? This char is one of:
+ * Name1 : First input quantity
+ * Prop1 : Value of the first quantity
+ * Name2 : Second input quantity
+ * Prop2 : Value of the second quantity
+ * Xkg : Array of mass based composition fractions
+ * Fluids : Char specifying the fluids in the mixture
+ * RPath : Absolute path pointing to Refprop folder
+ *
+ * Output parameters:
+ * return : The requested property
+ * herr : Error message from Refprop
+ *
+ * Additional input:
+ * DEBUG : 0 or 1 to turn debug output off or on
+ *
+*/
+//double REFPROP(char Output, char Name1, double Prop1, char Name2, double Prop2, double* Xkg, char * Ref, char* RefpropPath, char* herr, int DEBUG){
+double REFPROP(char Output,char Name1, double Prop1, char Name2, double Prop2, double* xkg, char * Ref, char* RefpropPath, char* herr, int DEBUGMODE){
int j;
i=0;
ierr=0;
@@ -589,40 +616,41 @@ double REFPROP(char Output,char Name1, double Prop1, char Name2, double Prop2, d
{
i=1;
strcpy(RefString,"");
+ strcat(RefString,FLD_PATH_CHAR);
strcat(RefString,Ref);
- strcat(RefString,".ppf");
+ strcat(RefString,".PPF");
x[0]=1.0; //Pseudo-Pure fluid
}
- else if (!strcmp(Ref,"R507A"))
- {
- i=2;
- strcpy(RefString,"R23.fld|R116.fld");
- x[0]=0.62675;
- x[1]=0.37325;
- }
- else if (!strcmp(Ref,"R410A"))
- {
- i=2;
- strcpy(RefString,"R32.fld|R125.fld");
- x[0]=0.697615;
- x[1]=0.302385;
- }
- else if (!strcmp(Ref,"R404A"))
- {
- i=3;
- strcpy(RefString,"R125.fld|R134a.fld|R143a.fld");
- x[0]=0.35782;
- x[1]=0.038264;
- x[2]=0.60392;
- }
- else if (!strcmp(Ref,"Air"))
- {
- i=3;
- strcpy(RefString,"Nitrogen.fld|Oxygen.fld|Argon.fld");
- x[0]=0.7812;
- x[1]=0.2096;
- x[2]=0.0092;
- }
+// else if (!strcmp(Ref,"R507A"))
+// {
+// i=2;
+// strcpy(RefString,"R23.fld|R116.fld");
+// x[0]=0.62675;
+// x[1]=0.37325;
+// }
+// else if (!strcmp(Ref,"R410A"))
+// {
+// i=2;
+// strcpy(RefString,"R32.fld|R125.fld");
+// x[0]=0.697615;
+// x[1]=0.302385;
+// }
+// else if (!strcmp(Ref,"R404A"))
+// {
+// i=3;
+// strcpy(RefString,"R125.fld|R134a.fld|R143a.fld");
+// x[0]=0.35782;
+// x[1]=0.038264;
+// x[2]=0.60392;
+// }
+// else if (!strcmp(Ref,"Air"))
+// {
+// i=3;
+// strcpy(RefString,"Nitrogen.fld|Oxygen.fld|Argon.fld");
+// x[0]=0.7812;
+// x[1]=0.2096;
+// x[2]=0.0092;
+// }
else
{
i=1;
@@ -658,6 +686,8 @@ double REFPROP(char Output,char Name1, double Prop1, char Name2, double Prop2, d
// If the name of the refrigerant doesn't match
// that of the currently loaded refrigerant
+ if (DEBUGMODE) printf("Loaded fluids: %s \n",LoadedREFPROPRef);
+ if (DEBUGMODE) printf("New fluids: %s \n",Ref);
if (strcmp(LoadedREFPROPRef,Ref))
{
ierr=999;
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp
index 2fd571e..439392a 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/refpropwrappertest.cpp
@@ -21,7 +21,7 @@ int main(int argc, char* argv[]){
if (argc<5){
// printf("usage: refpropwrappertest.exe statevars fluidname1|fluidname2|... statevar1 statevar2 REFPROPdir massfractionComponent1 \nexample: refpropwrappertest \"pT\" \"isobutan|propane\" 1e5 293 \"d:\\Programme\\REFPROP\\\" .1");
- printf("usage: refpropwrappertest statevars fluidname1|fluidname2|... statevar1 statevar2 REFPROPdir massfractionComponent1 \nexample: refpropwrappertest \"pT\" \"ISOBUTAN|PROPANE\" 1e5 293 \"/home/jowr/Documents/Fluids/Refprop/v9.0/\" .1\n");
+ printf("usage: refpropwrappertest statevars fluidname1|fluidname2|... statevar1 statevar2 REFPROPdir massfractionComponent1 \nexample: ./bin/refpropwrappertest \"pT\" \"ISOBUTAN|PROPANE\" 1e5 293 \"/opt/refprop/\" .1\n");
return 1;
}
diff --git a/readme.md b/readme.md
index 43b7aa3..998fedc 100644
--- a/readme.md
+++ b/readme.md
@@ -21,7 +21,14 @@ For installing on a Linux machine, please follow the instructions in the Makefil
4. Call "make all" and "sudo make install" as well as "sudo make fixit" to compile and install the wrapper library.
5. Set the path to the REFPROP program directory with the constant String REFPROP_PATH (at the beginning of the Modelica package). It should look something like: constant String REFPROP_PATH = "/opt/refprop/";
-To remove the files from your system, please use "sudo make uninstall". Please be aware that you might need a copy of the Poco C++ framework to compile future versions the wrapper files yourself. You can find it at: http://pocoproject.org/. The general idea is to use this framework to implement platform independent library loading and caching, but it is still a long way to go.
+To remove the files from your system, please use "sudo make uninstall". Please be aware that you need a copy of the Poco C++ framework to compile future versions of the wrapper files yourself. You can find it at: http://pocoproject.org/. The general idea is to use this framework to implement platform independent library loading and caching, but it is still a long way to go.
## General Remarks
-Please note that you need a working and licensed copy of Refprop in order to use the software provided here. This is not a replacement for Refprop.
\ No newline at end of file
+Please note that you need a working and licensed copy of Refprop in order to use the software provided here. This is not a replacement for Refprop.
+
+## Links
+If you are interested in this kind of software, you might also consider the following projects:
+
+1. https://github.com/Heineken/REFPROP2Modelica (The original version of this library)
+2. https://github.com/thorade/HelmholtzMedia (A Modelica implementation the Helmholtz functions)
+3. http://coolprop.sourceforge.net/ (A free fluid property library also based on Helmholtz formulation)
\ No newline at end of file
From 649712948e124e4906dfe417fbef563027211a6f Mon Sep 17 00:00:00 2001
From: jowr
Date: Tue, 20 Nov 2012 06:52:34 -0800
Subject: [PATCH 14/57] 2012:11:20 15:51 - Removed constants from wrapper file
---
.../src/refprop_wrapper.ian.cpp | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp
index 1a7669d..db303ea 100644
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp
+++ b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp
@@ -21,15 +21,15 @@
// #include "refprop_constants.h"
// #include "refprop_names.h"
// #include "refprop_cfunctions.h"
-#define refpropcharlong 10000
-// Some constants for REFPROP... defined by macros for ease of use
-#define refpropcharlength 255
-#define filepathlength 255
-#define lengthofreference 3
-#define errormessagelength 255
-#define ncmax 20 // Note: ncmax is the max number of components
-#define numparams 72
-#define maxcoefs 50
+//#define refpropcharlong 10000
+//// Some constants for REFPROP... defined by macros for ease of use
+//#define refpropcharlength 255
+//#define filepathlength 255
+//#define lengthofreference 3
+//#define errormessagelength 255
+//#define ncmax 20 // Note: ncmax is the max number of components
+//#define numparams 72
+//#define maxcoefs 50
#include
#include
From 89e2977263338168d810eec0f23e463048090e35 Mon Sep 17 00:00:00 2001
From: jowr
Date: Sun, 25 Nov 2012 09:25:42 -0800
Subject: [PATCH 15/57] 2012:11:25 18:23 - Included a basic caching mechanism,
needs to be refined. Unit conversion errors were removed as well.
---
.../Version 0.5_linux/doc/Doxyfile | 1749 -----------------
_REFPROP-Wrapper/Version 0.5_linux/list.bsh | 17 -
.../src/refprop_wrapper.ian.cpp | 1091 ----------
.../src/refprop_wrapper.org.cpp | 883 ---------
.../src/refprop_wrapper.poco.cpp | 1252 ------------
.../v0.5}/REFPROP_dll.H | 0
.../v0.5}/REFPROP_wrapper.cpp | 0
.../v0.5}/REFPROP_wrapper.lib | Bin
.../v0.5}/makefile.bat | 0
.../v0.5}/refprop_wrapper.h | 0
.../v0.5}/refpropwrappertest.cpp | 0
.../v0.6}/Makefile | 22 +-
_wrapper/v0.6/src/refprop_wrapper.cpp | 1501 ++++++++++++++
.../v0.6}/src/refprop_wrapper.h | 5 +-
.../v0.6}/src/refpropwrappertest.cpp | 44 +-
readme.md | 20 +-
16 files changed, 1551 insertions(+), 5033 deletions(-)
delete mode 100644 _REFPROP-Wrapper/Version 0.5_linux/doc/Doxyfile
delete mode 100644 _REFPROP-Wrapper/Version 0.5_linux/list.bsh
delete mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp
delete mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.org.cpp
delete mode 100644 _REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.poco.cpp
rename {_REFPROP-Wrapper/Version 0.5 => _wrapper/v0.5}/REFPROP_dll.H (100%)
rename {_REFPROP-Wrapper/Version 0.5 => _wrapper/v0.5}/REFPROP_wrapper.cpp (100%)
rename {_REFPROP-Wrapper/Version 0.5 => _wrapper/v0.5}/REFPROP_wrapper.lib (100%)
rename {_REFPROP-Wrapper/Version 0.5 => _wrapper/v0.5}/makefile.bat (100%)
rename {_REFPROP-Wrapper/Version 0.5 => _wrapper/v0.5}/refprop_wrapper.h (100%)
rename {_REFPROP-Wrapper/Version 0.5 => _wrapper/v0.5}/refpropwrappertest.cpp (100%)
rename {_REFPROP-Wrapper/Version 0.5_linux => _wrapper/v0.6}/Makefile (88%)
create mode 100644 _wrapper/v0.6/src/refprop_wrapper.cpp
rename {_REFPROP-Wrapper/Version 0.5_linux => _wrapper/v0.6}/src/refprop_wrapper.h (84%)
rename {_REFPROP-Wrapper/Version 0.5_linux => _wrapper/v0.6}/src/refpropwrappertest.cpp (73%)
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/doc/Doxyfile b/_REFPROP-Wrapper/Version 0.5_linux/doc/Doxyfile
deleted file mode 100644
index 7ec9879..0000000
--- a/_REFPROP-Wrapper/Version 0.5_linux/doc/Doxyfile
+++ /dev/null
@@ -1,1749 +0,0 @@
-# Doxyfile 1.7.4
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = "Refprop2Modelica - Linux"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = 0.2
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer
-# a quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF = "Porting Henning Francke's Refprop2Modelica to Dymola on Linux"
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is
-# included in the documentation. The maximum height of the logo should not
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
-
-PROJECT_LOGO = /mnt/crypt/Software/modelica/Dymola/dymola-icon-small.png
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = "/home/jowr/Documents/Modelica_Libraries/REFPROP2Modelica/_REFPROP-Wrapper/Version 0.5_linux/doc"
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
-
-INLINE_GROUPED_CLASSES = NO
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
-
-STRICT_PROTO_MATCHING = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page. This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command , where is the value of
-# the FILE_VERSION_FILTER tag, and is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = "/home/jowr/Documents/Modelica_Libraries/REFPROP2Modelica/_REFPROP-Wrapper/Version 0.5_linux"
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
-
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.c++ \
- *.d \
- *.java \
- *.ii \
- *.ixx \
- *.ipp \
- *.i++ \
- *.inl \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
- *.idl \
- *.odl \
- *.cs \
- *.php \
- *.php3 \
- *.inc \
- *.m \
- *.mm \
- *.dox \
- *.py \
- *.f90 \
- *.f \
- *.for \
- *.vhd \
- *.vhdl
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command , where
-# is the value of the INPUT_FILTER tag, and is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
-
-FILTER_SOURCE_PATTERNS =
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header. Note that when using a custom header you are responsible
-# for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is adviced to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that
-# the files will be copied as-is; there are no commands or markers available.
-
-HTML_EXTRA_FILES =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-#
-# Qt Help Project / Custom Filters.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-#
-# Qt Help Project / Filter Attributes.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = NO
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
-
-USE_MATHJAX = NO
-
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the
-# mathjax.org site, so you can quickly see the result without installing
-# MathJax, but it is strongly recommended to install a local copy of MathJax
-# before deployment.
-
-MATHJAX_RELPATH = http://www.mathjax.org/mathjax
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvantages are that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = YES
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
-# the generated latex document. The footer should contain everything after
-# the last chapter. If it is left blank doxygen will generate a
-# standard footer. Notice: only use this tag if you know what you are doing!
-
-LATEX_FOOTER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# pointed to by INCLUDE_PATH will be searched when a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition that
-# overrules the definition found in the source code.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all references to function-like macros
-# that are alone on a line, have an all uppercase name, and do not end with a
-# semicolon, because these will confuse the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS = 0
-
-# By default doxygen will write a font called Helvetica to the output
-# directory and reference it in all dot files that doxygen generates.
-# When you want a differently looking font you can specify the font name
-# using DOT_FONTNAME. You need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are svg, png, jpg, or gif.
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
-
-MSCFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/list.bsh b/_REFPROP-Wrapper/Version 0.5_linux/list.bsh
deleted file mode 100644
index b334bc6..0000000
--- a/_REFPROP-Wrapper/Version 0.5_linux/list.bsh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-#
-function defineFunction {
- echo "$1_TYPE * $1 = ($1_TYPE *) library.getSymbol($1_NAME);"
-}
-#
-## declare an array variable
-# declare -a arr=(RPVersion SETPATHdll ABFL1dll ABFL2dll ACTVYdll AGdll CCRITdll CP0dll CRITPdll CSATKdll CV2PKdll CVCPKdll CVCPdll DBDTdll DBFL1dll DBFL2dll DDDPdll DDDTdll DEFLSHdll DHD1dll DHFLSHdll DHFL1dll DHFL2dll DIELECdll DOTFILLdll DPDD2dll DPDDKdll DPDDdll DPDTKdll DPDTdll DPTSATKdll DSFLSHdll DSFL1dll DSFL2dll ENTHALdll ENTROdll ESFLSHdll FGCTYdll FPVdll GERG04dll GETFIJdll GETKTVdll GIBBSdll HSFLSHdll INFOdll LIMITKdll LIMITSdll LIMITXdll MELTPdll MELTTdll MLTH2Odll NAMEdll PDFL1dll PDFLSHdll PEFLSHdll PHFL1dll PHFLSHdll PQFLSHdll PREOSdll PRESSdll PSFL1dll PSFLSHdll PUREFLDdll QMASSdll QMOLEdll SATDdll SATEdll SATHdll SATPdll SATSdll SATTdll SETAGAdll SETKTVdll SETMIXdll SETMODdll SETREFdll SETUPdll SPECGRdll SUBLPdll SUBLTdll SURFTdll SURTENdll TDFLSHdll TEFLSHdll THERM0dll THERM2dll THERM3dll THERMdll THFLSHdll TPFLSHdll TPFL2dll TPRHOdll TQFLSHdll TRNPRPdll TSFLSHdll VIRBdll VIRCdll WMOLdll XMASSdll XMOLEdll)
-# These ones are used in the wrapper
-declare -a arr=(WMOLdll TPFL2dll TPFLSHdll PHFL1dll PHFLSHdll PDFL1dll PDFLSHdll PSFLSHdll PQFLSHdll THFLSHdll TDFLSHdll TSFLSHdll TQFLSHdll DHFL1dll DHFL2dll DHFLSHdll HSFLSHdll DSFL1dll DSFL2dll DSFLSHdll TRNPRPdll SATTdll SATPdll SATDdll)
-#
-## now loop through the above array
-for i in ${arr[@]}
-do
- defineFunction $i # or do whatever with individual element of the array
-done
-
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp
deleted file mode 100644
index db303ea..0000000
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.ian.cpp
+++ /dev/null
@@ -1,1091 +0,0 @@
-/*
- wrapper file for refprop.
-
- Heavily based on the Refprop wrapper in CoolProp by
- Ian Bell (ian.h.bell@gmail.com) - http://coolprop.sourceforge.net/
-
- Compatible to the modelica interface developed by
- Based on earlier work by Henning Francke (francke@gfz-potsdam.de)
- and the CoolProp wrapper by Ian Bell (ian.h.bell@gmail.com).
-
- Changes to produce this file by Jorrit Wronski (jowr@mek.dtu.dk)
-
-*/
-
-#if defined(WIN32) || defined(_WIN32)
-#include
-#endif
-
-// // #include "REFPROP.h"
-// //#include "refprop_lib.h"
-// #include "refprop_constants.h"
-// #include "refprop_names.h"
-// #include "refprop_cfunctions.h"
-//#define refpropcharlong 10000
-//// Some constants for REFPROP... defined by macros for ease of use
-//#define refpropcharlength 255
-//#define filepathlength 255
-//#define lengthofreference 3
-//#define errormessagelength 255
-//#define ncmax 20 // Note: ncmax is the max number of components
-//#define numparams 72
-//#define maxcoefs 50
-
-#include
-#include
-#include
-#include
-#include // tolower etc
-
-#include
-//# error "Could not determine system."
-#include "refprop_wrapper.h"
-
-// get the POCO classes
-#include "Poco/SharedLibrary.h"
-#include "Poco/Path.h"
-#include "Poco/File.h"
-#include "Poco/Environment.h"
-#include "Poco/String.h"
-//
-//
-//
-ABFL1dll_POINTER ABFL1lib = NULL;
-ABFL2dll_POINTER ABFL2lib = NULL;
-ACTVYdll_POINTER ACTVYlib = NULL;
-AGdll_POINTER AGlib = NULL;
-CCRITdll_POINTER CCRITlib = NULL;
-CP0dll_POINTER CP0lib = NULL;
-CRITPdll_POINTER CRITPlib = NULL;
-CSATKdll_POINTER CSATKlib = NULL;
-CV2PKdll_POINTER CV2PKlib = NULL;
-CVCPKdll_POINTER CVCPKlib = NULL;
-CVCPdll_POINTER CVCPlib = NULL;
-DBDTdll_POINTER DBDTlib = NULL;
-DBFL1dll_POINTER DBFL1lib = NULL;
-DBFL2dll_POINTER DBFL2lib = NULL;
-DDDPdll_POINTER DDDPlib = NULL;
-DDDTdll_POINTER DDDTlib = NULL;
-DEFLSHdll_POINTER DEFLSHlib = NULL;
-DHD1dll_POINTER DHD1lib = NULL;
-DHFLSHdll_POINTER DHFLSHlib = NULL;
-DIELECdll_POINTER DIELEClib = NULL;
-DOTFILLdll_POINTER DOTFILLlib = NULL;
-DPDD2dll_POINTER DPDD2lib = NULL;
-DPDDKdll_POINTER DPDDKlib = NULL;
-DPDDdll_POINTER DPDDlib = NULL;
-DPDTKdll_POINTER DPDTKlib = NULL;
-DPDTdll_POINTER DPDTlib = NULL;
-DPTSATKdll_POINTER DPTSATKlib = NULL;
-DSFLSHdll_POINTER DSFLSHlib = NULL;
-ENTHALdll_POINTER ENTHALlib = NULL; //**
-ENTROdll_POINTER ENTROlib = NULL;
-ESFLSHdll_POINTER ESFLSHlib = NULL;
-FGCTYdll_POINTER FGCTYlib = NULL;
-FPVdll_POINTER FPVlib = NULL;
-GERG04dll_POINTER GERG04lib = NULL;
-GETFIJdll_POINTER GETFIJlib = NULL;
-GETKTVdll_POINTER GETKTVlib = NULL;
-GIBBSdll_POINTER GIBBSlib = NULL;
-HSFLSHdll_POINTER HSFLSHlib = NULL;
-INFOdll_POINTER INFOlib = NULL;
-LIMITKdll_POINTER LIMITKlib = NULL;
-LIMITSdll_POINTER LIMITSlib = NULL;
-LIMITXdll_POINTER LIMITXlib = NULL;
-MELTPdll_POINTER MELTPlib = NULL;
-MELTTdll_POINTER MELTTlib = NULL;
-MLTH2Odll_POINTER MLTH2Olib = NULL;
-NAMEdll_POINTER NAMElib = NULL;
-PDFL1dll_POINTER PDFL1lib = NULL;
-PDFLSHdll_POINTER PDFLSHlib = NULL;
-PEFLSHdll_POINTER PEFLSHlib = NULL;
-PHFL1dll_POINTER PHFL1lib = NULL;
-PHFLSHdll_POINTER PHFLSHlib = NULL;
-PQFLSHdll_POINTER PQFLSHlib = NULL;
-PREOSdll_POINTER PREOSlib = NULL;
-PRESSdll_POINTER PRESSlib = NULL;
-PSFL1dll_POINTER PSFL1lib = NULL;
-PSFLSHdll_POINTER PSFLSHlib = NULL;
-PUREFLDdll_POINTER PUREFLDlib = NULL;
-QMASSdll_POINTER QMASSlib = NULL;
-QMOLEdll_POINTER QMOLElib = NULL;
-SATDdll_POINTER SATDlib = NULL;
-SATEdll_POINTER SATElib = NULL;
-SATHdll_POINTER SATHlib = NULL;
-SATPdll_POINTER SATPlib = NULL;
-SATSdll_POINTER SATSlib = NULL;
-SATTdll_POINTER SATTlib = NULL;
-SETAGAdll_POINTER SETAGAlib = NULL;
-SETKTVdll_POINTER SETKTVlib = NULL;
-SETMIXdll_POINTER SETMIXlib = NULL;
-SETMODdll_POINTER SETMODlib = NULL;
-SETREFdll_POINTER SETREFlib = NULL;
-SETUPdll_POINTER SETUPlib = NULL;
-//SPECGRdll_POINTER SPECGRlib = NULL;
-SUBLPdll_POINTER SUBLPlib = NULL;
-SUBLTdll_POINTER SUBLTlib = NULL;
-SURFTdll_POINTER SURFTlib = NULL;
-SURTENdll_POINTER SURTENlib = NULL;
-TDFLSHdll_POINTER TDFLSHlib = NULL;
-TEFLSHdll_POINTER TEFLSHlib = NULL;
-THERM0dll_POINTER THERM0lib = NULL;
-THERM2dll_POINTER THERM2lib = NULL;
-THERM3dll_POINTER THERM3lib = NULL;
-THERMdll_POINTER THERMlib = NULL;
-THFLSHdll_POINTER THFLSHlib = NULL;
-TPFLSHdll_POINTER TPFLSHlib = NULL;
-TPRHOdll_POINTER TPRHOlib = NULL;
-TQFLSHdll_POINTER TQFLSHlib = NULL;
-TRNPRPdll_POINTER TRNPRPlib = NULL;
-TSFLSHdll_POINTER TSFLSHlib = NULL;
-VIRBdll_POINTER VIRBlib = NULL;
-VIRCdll_POINTER VIRClib = NULL;
-WMOLdll_POINTER WMOLlib = NULL;
-XMASSdll_POINTER XMASSlib = NULL;
-XMOLEdll_POINTER XMOLElib = NULL;
-
-// double REFPROP(char Output,char Name1, double Prop1, char Name2, double Prop2, double* xkg, char * Ref, char * Path, char * herr, int DEBUGMODE);
-
-// Load the library
-char LoadedREFPROPRef[2550];
-// HINSTANCE RefpropdllInstance=NULL;
-Poco::SharedLibrary *RefpropdllInstance = NULL;
-
-// global variables for array
-double T,p,d,dl,dv,dl_,dv_,q,e,h,s,cv,cp,w,MW,hl,hv,sl,sv,ul,
- uv,pl,pv,hjt,eta,tcx,Q,Tcrit,pcrit,dcrit,rho,sigma;
-double x[ncmax],xliq[ncmax],xvap[ncmax];
-long i,ierr;
-
-int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr, char* errormsg, int DEBUGMODE){
-// Sets up the interface to the REFPROP.DLL
-// is called by props_REFPROP and satprops_REFPROP
-// char DLL_PATH[filepathlength], FLD_PATH[filepathlength];
-return 0;
-}
-
-int getProps(double *props) {
- double MWliq,MWvap;
-
- //CONVERT TO SI-UNITS
- if (ierr==0){
- WMOLlib(xliq,MWliq);
- WMOLlib(xvap,MWvap);
- }
-
- //ASSIGN VALUES TO RETURN ARRAY
- props[0] = ierr; //error code
- props[1] = p*1000; //kPa -> Pa
- props[2] = T; //Temperature in K
- props[3] = MW/1000; //molecular weight, g/mol -> kg/mol
- props[4] = d*MW; //density, mol/l -> kg/m3
- props[5] = dl*MWliq; //density of liquid phase, mol/l -> kg/m3
- props[6] = dv*MWvap; //density of vapour phase, mol/l -> kg/m3
- props[7] = q*MWvap/MW; //vapor quality on a mass basis [mass vapor/total mass] (q=0 indicates saturated liquid, q=1 indicates saturated vapor)
- props[8] = e/MW; //inner energy, J/mol -> J/kg
- props[9] = h/MW; //specific enthalpy, J/mol -> J/kg
- props[10] = s/MW; //specific entropy, J/molK -> J/kgK
- props[11] = cv/MW; // heat capacity
- props[12] = cp/MW; // heat capacity
- props[13] = w; //speed of sound
- props[14] = MWliq/1000;
- props[15] = MWvap/1000;
- for (int ii=0;iifilepathlength){
- sprintf(herr,"Path too long (%i > %i)\n",strlen(RefpropPath),filepathlength);
- return 0;
- }
- // Define temporary objects for checks.
- Poco::Path REF_PATH(true);
-
- char FLUIDS_CHAR[filepathlength+1] = "fluids";
- Poco::Path FLD_PATH(true);
- char LIBRARY_CHAR[filepathlength+1];
- Poco::Path LIB_PATH(true);
-
- // Parse the string and append a path separator if necessary.
- REF_PATH.parse(RefpropPath, Poco::Path::PATH_NATIVE);
- if (!REF_PATH.isDirectory()) REF_PATH.append(REF_PATH.separator());
- // Overwrite the provided path
- strcpy(path,REF_PATH.toString().c_str());
-
- // Check the path if running in debugmode
- if (DEBUGMODE) {
- Poco::File refFile(REF_PATH);
- if ( !refFile.isDirectory() || !refFile.canRead() ){
- printf ("\nREF_PATH is not a readable directory: %s \n", REF_PATH.toString().c_str());
- sprintf (herr,"\nREF_PATH is not a readable directory: %s \n", REF_PATH.toString().c_str());
- return 0;
- } else {
- printf ("\nREF_PATH is a readable directory: %s \n", REF_PATH.toString().c_str());
- }
- }
-
- // The fluid files are in the Refprop directory, append "fluids".
- FLD_PATH.parse(path);
- FLD_PATH.pushDirectory(FLUIDS_CHAR);
-
- // First create a pointer to an instance of the library
- // Then have windows load the library.
-
- Poco::Path SRC_PATH; // This is not fail-safe, the OS might look somewhere else, e.g. /usr/lib ...
- // If REFPROP is not loaded, try to load it
- if (RefpropdllInstance==NULL)
- {
- if (DEBUGMODE) printf ("RefpropdllInstance loaded: %s \n", "false");
- // Check the OS and assign the right names for the library
- bool is_linux = ( 0 == Poco::icompare(Poco::Environment::osName(), "linux") );
- if (is_linux){
- strcpy(LIBRARY_CHAR,"librefprop.so");
- //SRC_PATH.parse("/usr/local/lib");
- } else {
- strcpy(LIBRARY_CHAR,"refprop.dll");
- //SRC_PATH = REF_PATH;
- }
- SRC_PATH = REF_PATH;
-
- // search the library at the given path
- bool found_lib = Poco::Path::find(SRC_PATH.toString(), LIBRARY_CHAR, LIB_PATH);
- if (found_lib) {
- if (DEBUGMODE) printf ("Found library %s in path %s \n", LIBRARY_CHAR, SRC_PATH.toString().c_str());
- } else {
- if (DEBUGMODE) printf ("Cannot find library %s in path %s \n", LIBRARY_CHAR, SRC_PATH.toString().c_str());
- sprintf ("Cannot find library %s in path %s \n", LIBRARY_CHAR, SRC_PATH.toString().c_str());
- return 0;
- }
-
- // check if the file is correct and executable
- if (DEBUGMODE) {
- Poco::File libFile(LIB_PATH);
- if ( !libFile.isFile() || !libFile.canRead() ){
- printf ("LIB_PATH is not a readable file: %s \n", LIB_PATH.toString().c_str());
- sprintf (herr,"LIB_PATH is not a readable file: %s \n", LIB_PATH.toString().c_str());
- return 0;
- } else {
- printf ("LIB_PATH exists and is readable: %s \n", LIB_PATH.toString().c_str());
- }
- }
-
- // load a new library instance
- RefpropdllInstance = new Poco::SharedLibrary(LIB_PATH.toString());
- if (RefpropdllInstance==NULL)
- {
- printf("Could not load REFPROP. \n");
- return -1;
- }
-
- //DHFL1 = (DHFL1dll_POINTER) RefpropdllInstance->getSymbol(DHFL1dll_NAME);
- //DHFL1(d,h,x,T,ierr,herr,errormessagelength);
-
- //ABFL1dll_POINTER {aka void (*)(double&, double&, double*, long int&, double&, double&, double&, double&, double&, double&, long int&, char*, long int)}’ to ‘
- //ABFL1dll_TYPE {aka void (double&, double&, double*, long int&, double&, double&, double&, double&, double&, double&, long int&, char*, long int)}’
-
- // Then get pointers into the dll to the actual functions.
- ABFL1lib = (ABFL1dll_POINTER) RefpropdllInstance->getSymbol(ABFL1dll_NAME);
- ABFL2lib = (ABFL2dll_POINTER) RefpropdllInstance->getSymbol(ABFL2dll_NAME);
- ACTVYlib = (ACTVYdll_POINTER) RefpropdllInstance->getSymbol(ACTVYdll_NAME);
- AGlib = (AGdll_POINTER) RefpropdllInstance->getSymbol(AGdll_NAME);
- CCRITlib = (CCRITdll_POINTER) RefpropdllInstance->getSymbol(CCRITdll_NAME);
- CP0lib = (CP0dll_POINTER) RefpropdllInstance->getSymbol(CP0dll_NAME);
- CRITPlib = (CRITPdll_POINTER) RefpropdllInstance->getSymbol(CRITPdll_NAME);
- CSATKlib = (CSATKdll_POINTER) RefpropdllInstance->getSymbol(CSATKdll_NAME);
- CV2PKlib = (CV2PKdll_POINTER) RefpropdllInstance->getSymbol(CV2PKdll_NAME);
- CVCPKlib = (CVCPKdll_POINTER) RefpropdllInstance->getSymbol(CVCPKdll_NAME);
- CVCPlib = (CVCPdll_POINTER) RefpropdllInstance->getSymbol(CVCPdll_NAME);
- DBDTlib = (DBDTdll_POINTER) RefpropdllInstance->getSymbol(DBDTdll_NAME);
- DBFL1lib = (DBFL1dll_POINTER) RefpropdllInstance->getSymbol(DBFL1dll_NAME);
- DBFL2lib = (DBFL2dll_POINTER) RefpropdllInstance->getSymbol(DBFL2dll_NAME);
- DDDPlib = (DDDPdll_POINTER) RefpropdllInstance->getSymbol(DDDPdll_NAME);
- DDDTlib = (DDDTdll_POINTER) RefpropdllInstance->getSymbol(DDDTdll_NAME);
- DEFLSHlib = (DEFLSHdll_POINTER) RefpropdllInstance->getSymbol(DEFLSHdll_NAME);
- DHD1lib = (DHD1dll_POINTER) RefpropdllInstance->getSymbol(DHD1dll_NAME);
- DHFLSHlib = (DHFLSHdll_POINTER) RefpropdllInstance->getSymbol(DHFLSHdll_NAME);
- DIELEClib = (DIELECdll_POINTER) RefpropdllInstance->getSymbol(DIELECdll_NAME);
- DOTFILLlib = (DOTFILLdll_POINTER) RefpropdllInstance->getSymbol(DOTFILLdll_NAME);
- DPDD2lib = (DPDD2dll_POINTER) RefpropdllInstance->getSymbol(DPDD2dll_NAME);
- DPDDKlib = (DPDDKdll_POINTER) RefpropdllInstance->getSymbol(DPDDKdll_NAME);
- DPDDlib = (DPDDdll_POINTER) RefpropdllInstance->getSymbol(DPDDdll_NAME);
- DPDTKlib = (DPDTKdll_POINTER) RefpropdllInstance->getSymbol(DPDTKdll_NAME);
- DPDTlib = (DPDTdll_POINTER) RefpropdllInstance->getSymbol(DPDTdll_NAME);
- DPTSATKlib = (DPTSATKdll_POINTER) RefpropdllInstance->getSymbol(DPTSATKdll_NAME);
- DSFLSHlib = (DSFLSHdll_POINTER) RefpropdllInstance->getSymbol(DSFLSHdll_NAME);
- ENTHALlib = (ENTHALdll_POINTER) RefpropdllInstance->getSymbol(ENTHALdll_NAME); //**
- ENTROlib = (ENTROdll_POINTER) RefpropdllInstance->getSymbol(ENTROdll_NAME);
- ESFLSHlib = (ESFLSHdll_POINTER) RefpropdllInstance->getSymbol(ESFLSHdll_NAME);
- FGCTYlib = (FGCTYdll_POINTER) RefpropdllInstance->getSymbol(FGCTYdll_NAME);
- FPVlib = (FPVdll_POINTER) RefpropdllInstance->getSymbol(FPVdll_NAME);
- GERG04lib = (GERG04dll_POINTER) RefpropdllInstance->getSymbol(GERG04dll_NAME);
- GETFIJlib = (GETFIJdll_POINTER) RefpropdllInstance->getSymbol(GETFIJdll_NAME);
- GETKTVlib = (GETKTVdll_POINTER) RefpropdllInstance->getSymbol(GETKTVdll_NAME);
- GIBBSlib = (GIBBSdll_POINTER) RefpropdllInstance->getSymbol(GIBBSdll_NAME);
- HSFLSHlib = (HSFLSHdll_POINTER) RefpropdllInstance->getSymbol(HSFLSHdll_NAME);
- INFOlib = (INFOdll_POINTER) RefpropdllInstance->getSymbol(INFOdll_NAME);
- LIMITKlib = (LIMITKdll_POINTER) RefpropdllInstance->getSymbol(LIMITKdll_NAME);
- LIMITSlib = (LIMITSdll_POINTER) RefpropdllInstance->getSymbol(LIMITSdll_NAME);
- LIMITXlib = (LIMITXdll_POINTER) RefpropdllInstance->getSymbol(LIMITXdll_NAME);
- MELTPlib = (MELTPdll_POINTER) RefpropdllInstance->getSymbol(MELTPdll_NAME);
- MELTTlib = (MELTTdll_POINTER) RefpropdllInstance->getSymbol(MELTTdll_NAME);
- MLTH2Olib = (MLTH2Odll_POINTER) RefpropdllInstance->getSymbol(MLTH2Odll_NAME);
- NAMElib = (NAMEdll_POINTER) RefpropdllInstance->getSymbol(NAMEdll_NAME);
- PDFL1lib = (PDFL1dll_POINTER) RefpropdllInstance->getSymbol(PDFL1dll_NAME);
- PDFLSHlib = (PDFLSHdll_POINTER) RefpropdllInstance->getSymbol(PDFLSHdll_NAME);
- PEFLSHlib = (PEFLSHdll_POINTER) RefpropdllInstance->getSymbol(PEFLSHdll_NAME);
- PHFL1lib = (PHFL1dll_POINTER) RefpropdllInstance->getSymbol(PHFL1dll_NAME);
- PHFLSHlib = (PHFLSHdll_POINTER) RefpropdllInstance->getSymbol(PHFLSHdll_NAME);
- PQFLSHlib = (PQFLSHdll_POINTER) RefpropdllInstance->getSymbol(PQFLSHdll_NAME);
- PREOSlib = (PREOSdll_POINTER) RefpropdllInstance->getSymbol(PREOSdll_NAME);
- PRESSlib = (PRESSdll_POINTER) RefpropdllInstance->getSymbol(PRESSdll_NAME);
- PSFL1lib = (PSFL1dll_POINTER) RefpropdllInstance->getSymbol(PSFL1dll_NAME);
- PSFLSHlib = (PSFLSHdll_POINTER) RefpropdllInstance->getSymbol(PSFLSHdll_NAME);
- PUREFLDlib = (PUREFLDdll_POINTER) RefpropdllInstance->getSymbol(PUREFLDdll_NAME);
- QMASSlib = (QMASSdll_POINTER) RefpropdllInstance->getSymbol(QMASSdll_NAME);
- QMOLElib = (QMOLEdll_POINTER) RefpropdllInstance->getSymbol(QMOLEdll_NAME);
- SATDlib = (SATDdll_POINTER) RefpropdllInstance->getSymbol(SATDdll_NAME);
- SATElib = (SATEdll_POINTER) RefpropdllInstance->getSymbol(SATEdll_NAME);
- SATHlib = (SATHdll_POINTER) RefpropdllInstance->getSymbol(SATHdll_NAME);
- SATPlib = (SATPdll_POINTER) RefpropdllInstance->getSymbol(SATPdll_NAME);
- SATSlib = (SATSdll_POINTER) RefpropdllInstance->getSymbol(SATSdll_NAME);
- SATTlib = (SATTdll_POINTER) RefpropdllInstance->getSymbol(SATTdll_NAME);
- SETAGAlib = (SETAGAdll_POINTER) RefpropdllInstance->getSymbol(SETAGAdll_NAME);
- SETKTVlib = (SETKTVdll_POINTER) RefpropdllInstance->getSymbol(SETKTVdll_NAME);
- SETMIXlib = (SETMIXdll_POINTER) RefpropdllInstance->getSymbol(SETMIXdll_NAME);
- SETMODlib = (SETMODdll_POINTER) RefpropdllInstance->getSymbol(SETMODdll_NAME);
- SETREFlib = (SETREFdll_POINTER) RefpropdllInstance->getSymbol(SETREFdll_NAME);
- SETUPlib = (SETUPdll_POINTER) RefpropdllInstance->getSymbol(SETUPdll_NAME);
-// SPECGRlib = (SPECGRdll_POINTER) RefpropdllInstance->getSymbol(SPECGRdll_NAME);
- SUBLPlib = (SUBLPdll_POINTER) RefpropdllInstance->getSymbol(SUBLPdll_NAME);
- SUBLTlib = (SUBLTdll_POINTER) RefpropdllInstance->getSymbol(SUBLTdll_NAME);
- SURFTlib = (SURFTdll_POINTER) RefpropdllInstance->getSymbol(SURFTdll_NAME);
- SURTENlib = (SURTENdll_POINTER) RefpropdllInstance->getSymbol(SURTENdll_NAME);
- TDFLSHlib = (TDFLSHdll_POINTER) RefpropdllInstance->getSymbol(TDFLSHdll_NAME);
- TEFLSHlib = (TEFLSHdll_POINTER) RefpropdllInstance->getSymbol(TEFLSHdll_NAME);
- THERM0lib = (THERM0dll_POINTER) RefpropdllInstance->getSymbol(THERM0dll_NAME);
- THERM2lib = (THERM2dll_POINTER) RefpropdllInstance->getSymbol(THERM2dll_NAME);
- THERM3lib = (THERM3dll_POINTER) RefpropdllInstance->getSymbol(THERM3dll_NAME);
- THERMlib = (THERMdll_POINTER) RefpropdllInstance->getSymbol(THERMdll_NAME);
- THFLSHlib = (THFLSHdll_POINTER) RefpropdllInstance->getSymbol(THFLSHdll_NAME);
- TPFLSHlib = (TPFLSHdll_POINTER) RefpropdllInstance->getSymbol(TPFLSHdll_NAME);
- TPRHOlib = (TPRHOdll_POINTER) RefpropdllInstance->getSymbol(TPRHOdll_NAME);
- TQFLSHlib = (TQFLSHdll_POINTER) RefpropdllInstance->getSymbol(TQFLSHdll_NAME);
- TRNPRPlib = (TRNPRPdll_POINTER) RefpropdllInstance->getSymbol(TRNPRPdll_NAME);
- TSFLSHlib = (TSFLSHdll_POINTER) RefpropdllInstance->getSymbol(TSFLSHdll_NAME);
- VIRBlib = (VIRBdll_POINTER) RefpropdllInstance->getSymbol(VIRBdll_NAME);
- VIRClib = (VIRCdll_POINTER) RefpropdllInstance->getSymbol(VIRCdll_NAME);
- WMOLlib = (WMOLdll_POINTER) RefpropdllInstance->getSymbol(WMOLdll_NAME);
- XMASSlib = (XMASSdll_POINTER) RefpropdllInstance->getSymbol(XMASSdll_NAME);
- XMOLElib = (XMOLEdll_POINTER) RefpropdllInstance->getSymbol(XMOLEdll_NAME);
- //
- if (DEBUGMODE) printf ("RefpropdllInstance loaded: %s \n", "true");
- } else { // library was already loaded
- if (DEBUGMODE) printf ("RefpropdllInstance loaded: %s \n", "true");
- }
-
-
- // Now the library is loaded and we can start checkicng the fluid path
- if (DEBUGMODE) {
- Poco::File fldFile(FLD_PATH);
- if ( !fldFile.isDirectory() || !fldFile.canRead() ){
- printf ("FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
- sprintf (herr,"FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
- return 0;
- } else {
- printf ("FLD_PATH is a readable directory: %s \n", FLD_PATH.toString().c_str());
- }
- }
- char FLD_PATH_CHAR[filepathlength+1];
- strcpy(FLD_PATH_CHAR,FLD_PATH.toString().c_str());
-
-
- // If the fluid name starts with the string "REFPROP-", chop off the "REFPROP-"
- if (!strncmp(Ref,"REFPROP-",8))
- {
- char *REFPROPRef=NULL,*RefCopy=NULL;
- double prop;
-
- // Allocate space for refrigerant name
- RefCopy=(char *)malloc(strlen(Ref)+1);
- // Make a backup copy
- strcpy(RefCopy,Ref);
- // Chop off the "REFPROP-"
- REFPROPRef = strtok(RefCopy,"-");
- REFPROPRef = strtok(NULL,"-");
- // Run with the stripped Refrigerant name
- prop=REFPROP(Output,Name1,Prop1,Name2,Prop2,xkg,REFPROPRef,path,herr,DEBUGMODE);
- // Free allocated memory
- free(RefCopy);
- // Return the new value
- return prop;
- }
-
- // find the delimiter
- char *pointer;
- pointer = strchr(Ref, '|');
-
- if (!strncmp(Ref,"MIX",3))
- {
- // Sample is "REFPROP-MIX:R32[0.697615]&R125[0.302385]" - this is R410A
- char *REFPROPRef=NULL,*RefCopy=NULL,*Refs[20],*Refrigerant;
- double molefraction;
-
- // Allocate space for refrigerant name
- RefCopy=(char *)malloc(strlen(Ref)+1);
- // Make a backup copy
- strcpy(RefCopy,Ref);
- // Chop off the "MIX"
- REFPROPRef = strtok(RefCopy,":");
- i=1;
- while (REFPROPRef!=NULL)
- {
- Refs[i-1]=strtok(NULL,"&");
- if (Refs[i-1]==NULL)
- {
- i--;
- break;
- }
- else
- i++;
- }
- // Check maximum number of components
- if (i>ncmax){
- sprintf(herr,"Too many components (More than %i)\n",ncmax);
- return 1;
- }
- //Flush out RefString
- sprintf(RefString,"");
- for (j=0;jncmax){
- sprintf(herr,"Too many components (More than %i)\n",ncmax);
- return 1;
- }
- if (DEBUGMODE) printf("Mass-based mixture with %li components \n",i);
- //Flush out RefString
- sprintf(RefString,"");
- for (j=0;j1)
- {
- fprintf(stderr,"Error: Accentric factor only defined for pure fluids\n");
- return 1;
- }
- INFOlib(i,wmm,Ttriple,tnbpt,tc,pc,Dc,Zc,acf,dip,Rgas);
- return acf;
- }
- else if (Output =='o')
- {
- double wmm,Ttriple,tnbpt,tc,pc,Dc,Zc,acf,dip,Rgas;
- // Dipole moment
- if (i>1)
- {
- fprintf(stderr,"Error: Dipole moment only defined for pure fluids\n");
- return 1;
- }
- INFOlib(i,wmm,Ttriple,tnbpt,tc,pc,Dc,Zc,acf,dip,Rgas);
- return dip;
- }
- else if (Output=='R')
- {
- long icomp;
- double wmm,Ttriple,tnbpt,tc,pc,Dc,Zc,acf,dip,Rgas;
- // Triple point temperature
- icomp=1;
- if (i>1)
- {
- fprintf(stderr,"Error: Triple point temperature only defined for pure fluids\n");
- return 200;
- }
- INFOlib(icomp,wmm,Ttriple,tnbpt,tc,pc,Dc,Zc,acf,dip,Rgas);
- return Ttriple;
- }
- else if (Output=='I')
- {
- if (Name1=='T'){
- SURFTlib(Prop1,dl,x,sigma,i,herr,errormessagelength);
- return sigma/1000;
- }
- else{
- std::cout<< "If surface tension is the output, temperature must be the first input" << std::endl;
- return 1;
- }
- }
-
- else if ((Name1=='T' && Name2=='P') || (Name2=='T' && Name1=='P'))
- {
- // T in K, P in Pa
- if (Name1 == 'T'){
- T = Prop1; p = Prop2/1000;
- }
- else{
- p = Prop1/1000; T = Prop2;
- }
-
-
- // Use flash routine to find properties
- TPFLSHlib(T,p,x,d,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
- if (Output=='H') return h/MW;
- else if (Output=='D') return d*MW;
- else if (Output=='S') return s/MW;
- else if (Output=='U') return e/MW;
- else if (Output=='C') return cp/MW;
- else if (Output=='O') return cv/MW;
- else if (Output=='P') return p*1000;
- else if (Output=='A') return w;
- else if (Output=='V')
- {
- TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
- return eta/1.0e6; //uPa-s to Pa-s
- }
- else if (Output=='L')
- {
- TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
- return tcx/1000.0; //W/m-K to kW/m-K
- }
- else
- return 1;
- }
- else if ((Name1=='T' && Name2=='D') || (Name2=='T' && Name1=='D'))
- {
- // T in K, D in kg/m^3
- if (Name1 == 'T'){
- T = Prop1; rho = Prop2/MW;
- }
- else{
- rho = Prop1/MW; T = Prop2;
- }
-
- // This is the explicit formulation of the EOS
- TDFLSHlib(T,rho,x,p,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
-
- if (Output=='P')
- {
- return p*1000;
- }
- if (Output=='H')
- {
- return h/MW;
- }
- else if (Output=='A')
- {
- return w;
- }
- else if (Output=='S')
- {
- return s/MW;
- }
- else if (Output=='U')
- {
- return (h-p/rho)/MW;
- }
- else if (Output=='C')
- {
- return cp/MW;
- }
- else if (Output=='O')
- {
- return cv/MW;
- }
- else if (Output=='V')
- {
- TRNPRPlib(T,rho,x,eta,tcx,ierr,herr,errormessagelength);
- return eta/1.0e6; //uPa-s to Pa-s
- }
- else if (Output=='L')
- {
- TRNPRPlib(T,rho,x,eta,tcx,ierr,herr,errormessagelength);
- return tcx/1000.0; //W/m-K to kW/m-K
- }
- else if (Output=='D')
- {
- return rho*MW;
- }
- else
- return 1;
- }
- else if ((Name1=='T' && Name2=='Q') || (Name2=='T' && Name1=='Q'))
- {
-
- if (Name1 == 'T'){
- T = Prop1; Q = Prop2;
- }
- else{
- Q = Prop1; T = Prop2;
- }
-
- // Saturation Density
- i=1;
- SATTlib(T,x,i,pl,dl,dv_,xliq,xvap,ierr,herr,errormessagelength);
- i=2;
- SATTlib(T,x,i,pv,dl_,dv,xliq,xvap,ierr,herr,errormessagelength);
- if (Output=='D')
- {
- return 1/(Q/dv+(1-Q)/dl)*MW;
- }
- else if (Output=='P')
- {
- return (pv*Q+pl*(1-Q))*1000;
- }
- else if (Output=='A')
- {
- rho=1/(Q/dv+(1-Q)/dl);
- THERMlib(T,rho,x,p,e,h,s,cv,cp,w,hjt);
- return w;
- }
- else if (Output=='H')
- {
- ENTHALlib(T,dl,xliq,hl);
- ENTHALlib(T,dv,xvap,hv);
- return (hv*Q+hl*(1-Q))/MW*1000; // J/kg to kJ/kg
- }
- else if (Output=='S')
- {
- ENTROlib(T,dl,xliq,sl);
- ENTROlib(T,dv,xvap,sv);
- return (sv*Q+sl*(1-Q))/MW*1000; // J/kg-K to kJ/kg-K
- }
- else if (Output=='U')
- {
- ENTHALlib(T,dl,xliq,hl);
- ENTHALlib(T,dv,xvap,hv);
- p=pv*Q+pl*(1-Q);
- ul=hl-p/dl;
- uv=hv-p/dv;
- return (uv*Q+ul*(1-Q))/MW*1000; // J/kg to kJ/kg
- }
- else if (Output=='C')
- {
- d=1/(Q/dv+(1-Q)/dl);
- CVCPlib(T,d,x,cv,cp);
- return cp/MW*1000; // J/kg-K to kJ/kg-K
- }
- else if (Output=='O')
- {
- d=1/(Q/dv+(1-Q)/dl);
- CVCPlib(T,d,x,cv,cp);
- return cv/MW*1000; // J/kg-K to kJ/kg-K
- }
- else if (Output=='V')
- {
- d=1/(Q/dv+(1-Q)/dl);
- TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
- return eta/1.0e6; //uPa-s to Pa-s
- }
- else if (Output=='L')
- {
- d=1/(Q/dv+(1-Q)/dl);
- TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
- return tcx/1000.0; //W/m-K to kW/m-K
- }
- else
- return 1;
- }
- else if ((Name1=='P' && Name2=='Q') || (Name2=='P' && Name1=='Q'))
- {
-
- if (Name1 == 'P'){
- p = Prop1/1000; Q = Prop2;
- }
- else{
- Q = Prop1; p = Prop2/1000;
- }
-
- // Saturation Density
- SATPlib(p,x,i,T,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
- if (Output=='T')
- {
- return T;
- }
- else if (Output=='D')
- {
- return 1/(Q/dv+(1-Q)/dl)*MW;
- }
- else if (Output=='P')
- {
- PRESSlib(T,dl,xliq,pl);
- PRESSlib(T,dv,xvap,pv);
- return (pv*Q+pl*(1-Q))*1000;
- }
- else if (Output=='H')
- {
- ENTHALlib(T,dl,xliq,hl);
- ENTHALlib(T,dv,xvap,hv);
- return (hv*Q+hl*(1-Q))/MW*1000; // J/kg to kJ/kg
- }
- else if (Output=='S')
- {
- ENTROlib(T,dl,xliq,sl);
- ENTROlib(T,dv,xvap,sv);
- return (sv*Q+sl*(1-Q))/MW*1000; // J/kg-K to kJ/kg-K
- }
- else if (Output=='U')
- {
- ENTHALlib(T,dl,xliq,hl);
- ENTHALlib(T,dv,xvap,hv);
- ul=hl-p/dl;
- uv=hv-p/dv;
- return (uv*Q+ul*(1-Q))/MW*1000; // J/kg to kJ/kg
- }
- else if (Output=='C')
- {
- d=1/(Q/dv+(1-Q)/dl);
- CVCPlib(T,d,x,cv,cp);
- return cp/MW*1000; // J/kg-K to kJ/kg-K
- }
- else if (Output=='O')
- {
- d=1/(Q/dv+(1-Q)/dl);
- CVCPlib(T,d,x,cv,cp);
- return cv/MW*1000; // J/kg-K to kJ/kg-K
- }
- else if (Output=='A')
- {
- rho=1/(Q/dv+(1-Q)/dl);
- THERMlib(T,rho,x,p,e,h,s,cv,cp,w,hjt);
- return w;
- }
- else if (Output=='V')
- {
- d=1/(Q/dv+(1-Q)/dl);
- TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
- return eta/1.0e6; //uPa-s to Pa-s
- }
- else if (Output=='L')
- {
- d=1/(Q/dv+(1-Q)/dl);
- TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
- return tcx; //W/m-K to kW/m-K
- }
- else
- return 1;
- }
- else if ((Name1=='P' && Name2=='H') || (Name2=='P' && Name1=='H'))
- {
- // p in Pa, h in J/kg
- if (Name1 == 'P'){
- p = Prop1/1000; h = Prop2*MW/1000;
- }
- else{
- h = Prop1*MW/1000; p = Prop2/1000;
- }
-
- // Use flash routine to find properties
- PHFLSHlib(p,h,x,T,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
- if (Output=='H') return h/MW;
- else if (Output=='T') return T;
- else if (Output=='D') return d*MW;
- else if (Output=='S') return s/MW;
- else if (Output=='U') return e/MW;
- else if (Output=='C') return cp/MW;
- else if (Output=='O') return cv/MW;
- else if (Output=='P') return p*1000;
- else if (Output=='A') return w;
- else if (Output=='V')
- {
- TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
- return eta/1.0e6; //uPa-s to Pa-s
- }
- else if (Output=='L')
- {
- TRNPRPlib(T,d,x,eta,tcx,ierr,herr,errormessagelength);
- return tcx/1000.0; //W/m-K to kW/m-K
- }
- else
- return 1;
- }
- else
- return 1;
-}
-// #endif
diff --git a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.org.cpp b/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.org.cpp
deleted file mode 100644
index 94d5262..0000000
--- a/_REFPROP-Wrapper/Version 0.5_linux/src/refprop_wrapper.org.cpp
+++ /dev/null
@@ -1,883 +0,0 @@
-/*
- wrapper code for a static library containing functions from the dynamic
- library librefprop.so to be used from Modelica
-
- This file is released under the Modelica License 2.
-
- Coded in 2010 by
- Henning Francke
- francke@gfz-potsdam.de
-
- Helmholtz Centre Potsdam
- GFZ German Research Centre for Geosciences
- Telegrafenberg, D-14473 Potsdam
-
- Modified for Linux in 2012 by
- Jorrit Wronski (jowr@mek.dtu.dk)
- DTU Mechanical Engineering
-
- needs
- refprop.h - header for librefprop.so, based on examples
- refprop_wrapper.h - header for REFPROP_wrapper.so, also needed by Dymola
-
- Use the provided makefile to install the library file from source.
-*/
-
-//#define DEBUGMODE 1
-//
-//#include "Poco/SharedLibrary.h"
-//using Poco::SharedLibrary;
-//
-//typedef void (*HelloFunc)(); // function pointer type
-//
-//
-//
-//
-//typedef void (__stdcall *fp_XMOLEdllTYPE)(double *,double *,double &);
-//
-////Define explicit function pointers
-//fp_ABFL1dllTYPE ABFL1dll;
-//
-//
-//int main(int argc, char** argv)
-//{
-//std::string path("TestLibrary");
-//path.append(SharedLibrary::suffix()); // adds ".dll" or ".so"
-//SharedLibrary library(path); // will also load the library
-//HelloFunc func = (HelloFunc) library.getSymbol("hello");
-//func();
-//library.unload();
-//}
-//return 0;
-
-
-
-#include
-#if defined(WIN32) || defined(_WIN32)
-# include
-#else // assuming Linux system
-# include
-# include
-# include // tolower etc
-#endif
-//# error "Could not determine system."
-#include
-#include "refprop_wrapper.h"
-
-
-// Some constants...
-const long filepathlength=1024;
-const long errormessagelength=255+filepathlength;
-const long lengthofreference=3;
-const long refpropcharlength=255;
-const long ncmax=20; // Note: ncmax is the max number of components
-
-//static const char RP_
-static char const GB_optId = '-' ; // - under UNIX
-static char const GB_altOptId = '+' ; // + under UNIX
-static char const GB_asciiEsc = '\\' ; // under UNIX
-static char* const GB_preferredPathSep = "/" ; // / under UNIX
-static char const GB_allowedPathSep[] = "/" ;
-static bool const GB_ignoreCase = false ; // in filenames only.
-static char const GB_stdinName[] = "-" ;
-static int const GB_exitSuccess = 0 ;
-static int const GB_exitWarning = 1 ;
-static int const GB_exitError = 2 ;
-static int const GB_exitFatal = 3 ;
-static int const GB_exitInternal = 4 ;
-
-
-char *str_replace(char *str, char *search, char *replace, long *count) {
- int i,n_ret;
- int newlen = strlen(replace);
- int oldlen = strlen(search);
- char *ret;
- *count = 0;
-
- //count occurrences of searchstring
- for (i = 0; oldlen && str[i]; ++i)
- if (strstr(&str[i], search) == &str[i]){ // if walk through is at searchstr
- ++*count, i+=oldlen - 1;
- }
- ret = (char *) calloc(n_ret = (strlen(str) + 1 + *count * (newlen - oldlen)), sizeof(char));
- if (!ret){
- printf("Could not allocate memory");
- return "";
- }
-
- if (!*count){
- strncpy(ret,str,n_ret);
- //if (DEBUGMODE) printf("RET: %i %s\n",oldlen,str);
- }else{
- i = 0;
- while (*str)
- if (strstr(str, search) == str)
- strncpy(&ret[i], replace,n_ret-i-1),
- i += newlen,
- str += oldlen;
- else
- ret[i++] = *str++;
- ret[i] = '\0';
- }
- return ret;
-}
-
-int init_REFPROP(char* fluidnames, char* REFPROP_PATH, long* nX, char* herr, void* RefpropdllInstance, char* errormsg, int DEBUGMODE){
-// Sets up the interface to the REFPROP.DLL
-// is called by props_REFPROP and satprops_REFPROP
- char DLL_PATH[filepathlength], FLD_PATH[filepathlength];
- long ierr=0;
-
- if (strlen(REFPROP_PATH)>filepathlength){
- sprintf(errormsg,"REFPROP_PATH too long (%i > %i)\n",strlen(REFPROP_PATH),filepathlength);
- return 0;
- }
-
- strcpy(FLD_PATH, REFPROP_PATH);
- strcpy(DLL_PATH, REFPROP_PATH);
- if (REFPROP_PATH[strlen(REFPROP_PATH)-1]==*GB_preferredPathSep){ //if last char is backslash
-// strcat(DLL_PATH, "refprop.dll");
- strcat(FLD_PATH, "fluids");
- strcat(FLD_PATH, GB_preferredPathSep);
- }else{//add missing backslash
-// strcat(DLL_PATH,"\\refprop.dll");
- strcat(FLD_PATH, GB_preferredPathSep);
- strcat(FLD_PATH, "fluids");
- strcat(FLD_PATH, GB_preferredPathSep);
- }
-
- //std::string path("TestLibrary");
- //path.append(SharedLibrary::suffix()); // adds ".dll" or ".so"
- //SharedLibrary library(path); // will also load the library
- //HelloFunc func = (HelloFunc) library.getSymbol("hello");
- //func();
- //library.unload();
-
- //*RefpropdllInstance = LoadLibrary(DLL_PATH);
-// RefpropdllInstance = dlopen(DLL_PATH, RTLD_LAZY);
-// if (!RefpropdllInstance){
-// sprintf(errormsg,"ERROR in opening librefprop.so at \"%s\"",DLL_PATH);
-// fputs (dlerror(), stderr);
-// return 100;
-// }
-
-
- char hrf[lengthofreference+1],hfmix[filepathlength+1+7];
- //char hf[refpropcharlength*ncmax];
- char *hf;
-
-
- //parse fluid composition string and insert absolute paths
- char replace[filepathlength+6];
- strcpy(replace,".FLD|");
- //if (DEBUGMODE) printf("REPLACE: %s\n",replace);
- strncat(replace, FLD_PATH,filepathlength-strlen(replace));
-
- int hf_len = strlen(fluidnames)+ncmax*(strlen(replace)-1)+4;
- hf = (char*) calloc(hf_len, sizeof(char));
-
- strncpy(hf,FLD_PATH,hf_len);
- strncat(hf,str_replace(fluidnames, "|", replace, nX),hf_len-strlen(hf)); //str_replace returns the number of delimiters -> nX, but components are one more ...
- if (++*nX>ncmax){ //...that's why nX is incremented
- sprintf(errormsg,"Too many components (More than %i)\n",ncmax);
- return 0;
- }
- strncat(hf,".FLD",hf_len-strlen(hf));
- if (DEBUGMODE) printf("Fluid composition string: \"%s\"\n",hf);
-
- strncpy(hfmix,FLD_PATH,filepathlength+1);//add absolute path
- strncat(hfmix,"hmx.bnc",filepathlength+1+7-strlen(hfmix));
- strcpy(hrf,"DEF");
-
-
-// //...Call SETUP to initialize the program
-// SETUPdll = (fp_SETUPdllTYPE) GetProcAddress(*RefpropdllInstance,"SETUPdll");
-// //printf("hf:%s\n hrf: %s\n hfmix: %s\n",hf,hrf,hfmix);
-// void (*SETUP)(void);
-// void (*SETUP)(void);
-// SETUP = dlsym(RefpropdllInstance, "SETUPdll");
-// if ((errormsg = dlerror()) != NULL) {
-// fputs(errormsg, stderr);
-// exit(1);
-// }
-
-
- if (DEBUGMODE) printf("Running SETUPdll...\n");
- SETUPdll(*nX, hf, hfmix, hrf, ierr, herr);
- if (DEBUGMODE) printf("SETUPdll run complete (Error no: %i)\n",ierr);
-
-
-// if (DEBUGMODE) printf("Error code processing...\n");
- switch(ierr){
- case 101:
- //strcpy(errormsg,"error in opening file");
-// if (DEBUGMODE) printf("Error 101\n");
- sprintf(errormsg,"error in opening file %s",hf);
- break;
- case 102:
-// if (DEBUGMODE) printf("Error 102\n");
- strcpy(errormsg,"error in file or premature end of file");
- break;
- case -103:
-// if (DEBUGMODE) printf("Error -103\n");
- strcpy(errormsg,"unknown model encountered in file");
- break;
- case 104:
-// if (DEBUGMODE) printf("Error 104\n");
- strcpy(errormsg,"error in setup of model");
- break;
- case 105:
-// if (DEBUGMODE) printf("Error 105\n");
- strcpy(errormsg,"specified model not found");
- break;
- case 111:
-// if (DEBUGMODE) printf("Error 111\n");
- strcpy(errormsg,"error in opening mixture file");
- break;
- case 112:
-// if (DEBUGMODE) printf("Error 112\n");
- strcpy(errormsg,"mixture file of wrong type");
- break;
- case 114:
-// if (DEBUGMODE) printf("Error 114\n");
- strcpy(errormsg,"nc<>nc from setmod");
- break;
- case 0:
- break;
- default:
-// if (DEBUGMODE) printf("Unknown error\n");
- strcpy(errormsg,"Unknown error");
- //strcpy(errormsg,"Setup was successful!");
- strncpy(errormsg,herr,errormessagelength);
- break;
- }
- free(hf);
- return ierr;
-}
-
-
-double props_REFPROP(char* what, char* statevars_in, char* fluidnames, double *props, double statevar1, double statevar2, double* x, int phase, char* REFPROP_PATH, char* errormsg, int DEBUGMODE){
-/*Calculates thermodynamic properties of a pure substance/mixture, returns both single value and array containing all calculated values (because the are calculated anyway)
-INPUT:
- what: character specifying return value (p,T,h,s,d,wm,q,e,w) - Explanation of variables at the end of this function
- statevars: string of any combination of two variables out of p,T,h,s,d
- fluidnames: string containing names of substances in mixtured separated by |, substance names are identical to those of *.fld-files in REFPROP program directory
- statevar1,statevar2: values of the two variables specified in statevars
- x: array containing the mass fractions of the components of the mixture
- REFPROP_PATH: string defining the path of the refprop.dll
-OUTPUT
- return value: value of variable specified by the input variable what
- props: Array containing all calculated values (props[0] containing error number)
- errormsg: string containing error message
-*/
- char statevars[3];
- double p, T, d, val, dl,dv,q,e,h,s,cv,cp,w,wm,wmliq,wmvap,eta,tcx;
- long nX,ierr=0; //zero means no error
- char herr[errormessagelength+1];
-// HINSTANCE RefpropdllInstance;// Then have windows load the library.
- void* RefpropdllInstance;
-
- if (DEBUGMODE) printf("\nStarting function props_REFPROP to calc %c...\n", what[0]);
-
- //initialize interface to REFPROP.dll
-
- if(props[0]=(double)init_REFPROP(fluidnames, REFPROP_PATH, &nX, herr, &RefpropdllInstance, errormsg, DEBUGMODE)){
- printf("Error no. %g initializing REFPROP: \"%s\"\n", props[0], errormsg);
- return 0;
- }
-
- //CALCULATE MOLAR MASS
-// WMOLdll = (fp_WMOLdllTYPE) GetProcAddress(RefpropdllInstance,"WMOLdll");
- WMOLdll(x,wm);
-// sprintf(errormsg," %10.4f, %10.4f, %10.4f,",x[0],x[1],wm);
- wm /= 1000; //g/mol -> kg/mol
-
- //identify and assign passed state variables
- statevars[0] = tolower(statevars_in[0]);
- statevars[1] = tolower(statevars_in[1]);
- statevars[2] = '\0';
- if (statevars[0]!='\0'){
- if (statevars[0]==statevars[1]){
- props[0] = 3;
- sprintf(errormsg,"State variable 1 is the same as state variable 2 (%c)",statevars[0]);
- return 0;
- }
- for (int ii=0;ii<2;ii++){
- val = (ii==0?statevar1:statevar2);
- switch(statevars[ii]){
- case 'p':
- p = val/1000; //Pa->kPa
- break;
- case 't':
- T = val;
- break;
- case 's':
- s = val*wm; //J/(kg�K) -> kJ/(mol�K)
- break;
- case 'h':
- h = val*wm; //J/kg --> kJ/mol
- break;
- case 'd':
- d = val/wm/1000; //kg/m� -> mol/dm�
- break;
- case 'q': //vapor quality on a mass basis [mass vapor/total mass] (q=0 indicates saturated liquid, q=1 indicates saturated vapor)
- q = val;
- break;
- default:
- props[0] = 2;
- sprintf(errormsg,"Unknown state variable %i: %c",ii+1 ,statevars[ii]);/**/
- return 0;
- }
- }
- }
-
-/*
-//...If phase j is known, call TPRHOdll:
- long j=2; //phase definition(j=1: Liquid, j=2: Vapor)
- long tmp_int=0;
- TPRHOdll = (fp_TPRHOdllTYPE) GetProcAddress(RefpropdllInstance,"TPRHOdll");
- TPRHOdll(t,p,x,j,tmp_int,d,ierr,herr,errormessagelength);
-*/
-//...If phase is not known, call TPFLSH
- double xliq[ncmax],xvap[ncmax],f[ncmax];
- long kq=2;/* additional input--only for TQFLSH and PQFLSH
- kq--flag specifying units for input quality
- kq = 1 quality on MOLAR basis [moles vapor/total moles]
- kq = 2 quality on MASS basis [mass vapor/total mass]*/
-// sprintf(errormsg,"Huhu! %s %d", statevars, ierr);
- if (ierr==0){
- if (strcmp(statevars,"pt")==0 || strcmp(statevars,"tp")==0){
-// strcat(errormsg,"Bin in TP!");
- if (phase==2){ //fluid state is known to be two phase
-// TPFL2dll = (fp_TPFL2dllTYPE) GetProcAddress(RefpropdllInstance,"TPFL2dll");
- TPFL2dll(T,p,x,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
- }else{
-// TPFLSHdll = (fp_TPFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TPFLSHdll");
- TPFLSHdll(T,p,x,d,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
- }
- }else if (strcmp(statevars,"ph")==0 || strcmp(statevars,"hp")==0){
-/* if (phase==1){ //fluid state is known to be single phase
- PHFL1dll = (fp_PHFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PHFL1dll");
- PHFL1dll(p,h,x,liqvap,T,d,ierr,herr,errormessagelength);
- if (liqvap==1) dl=d; else dv=d;
- }else{*/
-// PHFLSHdll = (fp_PHFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PHFLSHdll");
- PHFLSHdll(p,h,x,T,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
-// }
- }else if (strcmp(statevars,"pd")==0 || strcmp(statevars,"dp")==0){
- if (phase==1){ //fluid state is known to be single phase
-// PDFL1dll = (fp_PDFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PDFL1dll");
- PDFL1dll(p,d,x,T,ierr,herr,errormessagelength);
- }else{
-// PDFLSHdll = (fp_PDFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PDFLSHdll");
- PDFLSHdll(p,d,x,T,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
- }
- }else if (strcmp(statevars,"ps")==0 || strcmp(statevars,"sp")==0){
-/* if (phase==1){ //fluid state is known to be single phase
- PSFL1dll = (fp_PSFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PSFL1dll");
- PSFL1dll(p,s,x,kph,T,d,ierr,herr,errormessagelength);
- if (liqvap==1) dl=d; else dv=d;
- }else{*/
-// PSFLSHdll = (fp_PSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PSFLSHdll");
- PSFLSHdll(p,s,x,T,d,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
-// }
- }else if (strcmp(statevars,"pq")==0 || strcmp(statevars,"qp")==0){
-// PQFLSHdll = (fp_PQFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PQFLSHdll");
- PQFLSHdll(p,q,x,kq,T,d,dl,dv,xliq,xvap,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
-// strcat(errormsg,"Bin in PQ!");
- }else if (strcmp(statevars,"th")==0 || strcmp(statevars,"ht")==0){
-/* if (phase==1){ //fluid state is known to be single phase
- THFL1dll = (fp_THFL1dllTYPE) GetProcAddress(RefpropdllInstance,"THFL1dll");
- THFL1dll(T,h,x,Dmin,Dmax,d,ierr,herr,errormessagelength);
- }else{*/
-// THFLSHdll = (fp_THFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"THFLSHdll");
- long kr = 2;
-/* kr--phase flag: 1 = input state is liquid
- 2 = input state is vapor in equilibrium with liq
- 3 = input state is liquid in equilibrium with solid
- 4 = input state is vapor in equilibrium with solid */
- THFLSHdll (T,h,x,kr,p,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
-// }
- }else if (strcmp(statevars,"td")==0 || strcmp(statevars,"dt")==0){
-// TDFLSHdll = (fp_TDFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TDFLSHdll");
- TDFLSHdll(T,d,x,p,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
- }else if (strcmp(statevars,"ts")==0 || strcmp(statevars,"st")==0){
-// TSFLSHdll = (fp_TSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TSFLSHdll");
- long kr = 2;
- TSFLSHdll (T,s,x,kr,p,d,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
- }else if (strcmp(statevars,"tq")==0 || strcmp(statevars,"qt")==0){
-// TQFLSHdll = (fp_TQFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TQFLSHdll");
- TQFLSHdll(T,q,x,kq,p,d,dl,dv,xliq,xvap,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
- }else if (strcmp(statevars,"hd")==0 || strcmp(statevars,"dh")==0){
- switch(phase){ //fluid state is known to be single phase
- case 1:
-// DHFL1dll = (fp_DHFL1dllTYPE) GetProcAddress(RefpropdllInstance,"DHFL1dll");
- DHFL1dll(d,h,x,T,ierr,herr,errormessagelength);
- break;
- case 2:
-// DHFL2dll = (fp_DHFL2dllTYPE) GetProcAddress(RefpropdllInstance,"DHFL2dll");
- DHFL2dll(d,h,x,T,p,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
- break;
- default:
-// DHFLSHdll = (fp_DHFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"DHFLSHdll");
- DHFLSHdll(d,h,x,T,p,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
- }
- }else if (strcmp(statevars,"hs")==0 || strcmp(statevars,"sh")==0){
-// HSFLSHdll = (fp_HSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"HSFLSHdll");
- HSFLSHdll(h,s,x,T,p,d,dl,dv,xliq,xvap,q,e,cv,cp,w,ierr,herr,errormessagelength);
- }else if (strcmp(statevars,"ds")==0 || strcmp(statevars,"sd")==0){
- switch(phase){ //fluid state is known to be single phase
- case 1:
-// DSFL1dll = (fp_DSFL1dllTYPE) GetProcAddress(RefpropdllInstance,"DSFL1dll");
- DSFL1dll(d,s,x,T,ierr,herr,errormessagelength);
- break;
- case 2:
-// DSFL2dll = (fp_DSFL2dllTYPE) GetProcAddress(RefpropdllInstance,"DSFL2dll");
- DSFL2dll(d,s,x,T,p,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
- break;
- default:
-// DSFLSHdll = (fp_DSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"DSFLSHdll");
- DSFLSHdll(d,s,x,T,p,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
- }
- }else
- sprintf(errormsg,"Unknown combination of state variables! %s", statevars);
- }
-
- switch(tolower(what[0])){ //CHOOSE RETURN VARIABLE
- case 'v': //dynamic viscosity uPa.s
- case 'l': //thermal conductivity W/m.K
-// TRNPRPdll = (fp_TRNPRPdllTYPE) GetProcAddress(RefpropdllInstance,"TRNPRPdll");
- TRNPRPdll (T,d,x,eta,tcx,ierr,herr,errormessagelength);
- }
-
-
- switch(ierr){
- case 1:
- sprintf(errormsg,"T=%f < Tmin",T);
- break;
- case 4:
- sprintf(errormsg,"P=%f < 0",p);
- break;
- case 5:
- sprintf(errormsg,"T=%f and p=%f out of range",T,p);
- break;
- case 8:
- strcpy(errormsg,"x out of range (component and/or sum < 0 or > 1)");
- break;
- case 9:
- sprintf(errormsg,"x or T=%f out of range",T);
- break;
- case 12:
- sprintf(errormsg,"x out of range and P=%f < 0",p);
- break;
- case 13:
- sprintf(errormsg,"x, T=%f and p=%f out of range",T,p);
- break;
- case 16:
- strcpy(errormsg,"TPFLSH error: p>melting pressure");
- break;
- case -31:
- sprintf(errormsg,"Temperature T=%f out of range for conductivity",T);
- break;
- case -32:
- sprintf(errormsg,"density d=%f out of range for conductivity",d);
- break;
- case -33:
- sprintf(errormsg,"Temperature T=%f and density d=%f out of range for conductivity",T,d);
- break;
- case -41:
- sprintf(errormsg,"Temperature T=%f out of range for viscosity",T);
- break;
- case -42:
- sprintf(errormsg,"density d=%f out of range for viscosity",d);
- break;
- case -43:
- sprintf(errormsg,"Temperature T=%f and density d=%f out of range for viscosity",T,d);
- break;
- case -51:
- sprintf(errormsg,"Temperature T=%f out of range for conductivity and viscosity",T);
- break;
- case -52:
- sprintf(errormsg,"density d=%f out of range for conductivity and viscosity",d);
- break;
- case -53:
- sprintf(errormsg,"Temperature T=%f and density d=%f out of range for conductivity and viscosity",T,d);
- break;
- case 39:
- sprintf(errormsg,"model not found for thermal conductivity");
- break;
- case 49:
- sprintf(errormsg,"model not found for viscosity");
- break;
- case 50:
- sprintf(errormsg,"ammonia/water mixture (no properties calculated)");
- break;
- case 51:
- sprintf(errormsg,"exactly at T=%f, rhoc for a pure fluid; k is infinite",T);
- break;
- case -58:
- case -59:
- sprintf(errormsg,"ECS model did not converge");
- break;
- case 211:
- sprintf(errormsg,"TPFLSH bubble point calculation did not converge: [SATTP error 1] iteration failed to converge");
- case 239:
- sprintf(errormsg,"THFLSH error: Input value of enthalpy (%f) is outside limits",h);
- break;
- case 248:
- sprintf(errormsg,"DSFLSH error: Iteration did not converge with d=%f and s=%f",d,s);
- break;
- case 249:
- sprintf(errormsg,"PHFLSH error: Input value of enthalpy (%f) is outside limits",h);
- break;
- case 271:
- sprintf(errormsg,"TQFLSH error: T=%f > Tcrit, T-q calculation not possible",T);
- break;
- case 291:
- sprintf(errormsg,"PQFLSH error: p=%f > pcrit, p-q calculation not possible",T);
- break;
- default:
- strncpy(errormsg,herr,errormessagelength);
- }
-
-
- //CONVERT TO SI-UNITS
- if (ierr==0){
- WMOLdll(xliq,wmliq);
- wmliq /= 1000; //g/mol -> kg/mol
- WMOLdll(xvap,wmvap);
- wmvap /= 1000; //g/mol -> kg/mol
- //printf("%d,%s\n%s\nP,T,D,H,CP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",nX,hf,hfmix,p,t,d,h,wm);
- d *= wm*1000; //mol/dm� -> kg/m�
- dl *= wmliq*1000; //mol/dm� -> kg/m�
- dv *= wmvap*1000; //mol/dm� -> kg/m�
- e /= e/wm; //kJ/mol -> J/kg
- h /= wm; //kJ/mol -> J/kg
- s /= wm; //kJ/(mol�K) -> J/(kg�K)
- cv /= wm;
- cp /= wm;
- p *= 1000; //kPa->Pa
- if (nX>1 && abs(q)<990) q *= wmvap/wm; //molar bass -> mass basis
- eta/=1e6; //uPa.s -> Pa.s
- }
-
- //ASSIGN VALUES TO RETURN ARRAY
- props[0] = ierr;//error code
- props[1] = p;//pressure in Pa
- props[2] = T; //Temperature in K
- props[3] = wm; //molecular weight
- props[4] = d; //density
- props[5] = dl; //density of liquid phase
- props[6] = dv; //density of liquid phase
- props[7] = q; //vapor quality on a mass basis [mass vapor/total mass] (q=0 indicates saturated liquid, q=1 indicates saturated vapor)
- props[8] = e; //inner energy
- props[9] = h; //specific enthalpy
- props[10] = s;//specific entropy
- props[11] = cv;
- props[12] = cp;
- props[13] = w; //speed of sound
- props[14] = wmliq;
- props[15] = wmvap;
- for (int ii=0;ii kg/mol
-
- if (DEBUGMODE) printf("\nwm converted.\n");
-
- if (DEBUGMODE) printf("\statevar is %s \n",statevar_in);
- //identify and assign passed state variables
- // char tmpstr[1];
- // strcpy(tmpstr,statevar[0]);
- // statevar = toLowerCase(tmpstr);
- //statevar[0] = tolower(statevar[0]);
- char statevar[1];
- statevar[0] = tolower(statevar_in[0]);
- if (DEBUGMODE) printf("\nstatevar lowercase.\n");
- if (statevar[0]!='\0'){
-// if (strcmp(statevar[0],"")){
-// if (statevar[0] != NULL){
- if (DEBUGMODE) printf("\nentering statevar switch.\n");
- switch(statevar[0]){
- case 'p':
- p = statevarval/1000; //Pa->kPa
- break;
- case 't':
- T = statevarval;
- break;
- case 'd':
- d = statevarval/wm/1000; //kg/m� -> mol/dm�
- break;
-/* case 's':
- s = statevarval*wm; //J/(kg�K) -> kJ/(mol�K)
- break;
- case 'h':
- h = statevarval*wm; //J/kg --> kJ/mol
- break;
-*/ default:
- props[0] = 2;
- sprintf(errormsg,"Unknown state variable: %c", statevarval);
- return 0;
- }
- }
-
- if (DEBUGMODE) printf("\nstatevar checked.\n");
-
- double xliq[ncmax],xvap[ncmax],f[ncmax];
-
- long j=2,kr;
-/* j--phase flag: 1 = input x is liquid composition (bubble point)
- 2 = input x is vapor composition (dew point)
- 3 = input x is liquid composition (freezing point)
- 4 = input x is vapor composition (sublimation point)
-*/
- if (ierr==0)
- if (~strcmp(statevar,"t")){
-// SATTdll = (fp_SATTdllTYPE) GetProcAddress(RefpropdllInstance,"SATTdll");
- SATTdll(T,x,j,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
- }else if (~strcmp(statevar,"p")){
-// SATPdll = (fp_SATPdllTYPE) GetProcAddress(RefpropdllInstance,"SATPdll");
- SATPdll(p,x,j,T,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
- switch(ierr){
- case 2:
- strcpy(errormsg,"P < Ptp");
- break;
- case 4:
- strcpy(errormsg,"P < 0");
- break;
- }
- //sprintf(errormsg,"p=%f, h=%f",p ,statevar2);
- }else if (~strcmp(statevar,"d")){
-// SATDdll = (fp_SATDdllTYPE) GetProcAddress(RefpropdllInstance,"SATDdll");
- SATDdll(d,x,j,kr,T,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
- switch(ierr){
- case 2:
- strcpy(errormsg,"D > Dmax");
- break;
- }
- }
-
- switch(ierr){
- case 0:
- strcpy(errormsg,"Saturation routine successful");
- break;
- case 1:
- sprintf(errormsg,"T=%f < Tmin",T);
- break;
- case 8:
- strcpy(errormsg,"x out of range");
- break;
- case 9:
- strcpy(errormsg,"T and x out of range");
- break;
- case 10:
- strcpy(errormsg,"D and x out of range");
- break;
- case 12:
- strcpy(errormsg,"P and x out of range");
- break;
- case 120:
- strcpy(errormsg,"CRITP did not converge");
- break;
- case 121:
- strcpy(errormsg,"T > Tcrit");
- break;
- case 122:
- strcpy(errormsg,"TPRHO-liquid did not converge (pure fluid)");
- break;
- case 123:
- strcpy(errormsg,"TPRHO-vapor did not converge (pure fluid)");
- break;
- case 124:
- strcpy(errormsg,"pure fluid iteration did not converge");
- break;
- case -125:
- strcpy(errormsg,"TPRHO did not converge for parent ph (mix)");
- break;
- case -126:
- strcpy(errormsg,"TPRHO did not converge for incipient (mix)");
- break;
- case -127:
- strcpy(errormsg,"composition iteration did not converge");
- break;
- case 128:
- strcpy(errormsg,"mixture iteration did not converge");
- break;
- case 140:
- strcpy(errormsg,"CRITP did not converge");
- break;
- case 141:
- strcpy(errormsg,"P > Pcrit");
- break;
- case 142:
- strcpy(errormsg,"TPRHO-liquid did not converge (pure fluid)");
- break;
- case 143:
- strcpy(errormsg,"TPRHO-vapor did not converge (pure fluid)");
- break;
- case 144:
- strcpy(errormsg,"pure fluid iteration did not converge");
- break;
- case -144:
- strcpy(errormsg,"Raoult's law (mixture initial guess) did not converge");
- break;
- case -145:
- strcpy(errormsg,"TPRHO did not converge for parent ph (mix)");
- break;
- case -146:
- strcpy(errormsg,"TPRHO did not converge for incipient (mix)");
- break;
- case -147:
- strcpy(errormsg,"composition iteration did not converge");
- break;
- case 148:
- strcpy(errormsg,"mixture iteration did not converge");
- break;
- case 160:
- strcpy(errormsg,"CRITP did not converge");
- break;
- case 161:
- strcpy(errormsg,"SATD did not converge");
- break;
- default:
- strncpy(errormsg,herr,errormessagelength);
- }
-
- /*SATHdll = (fp_SATHdllTYPE) GetProcAddress(RefpropdllInstance,"SATHdll");
- SATEdll = (fp_SATEdllTYPE) GetProcAddress(RefpropdllInstance,"SATEdll");
- SATSdll = (fp_SATSdllTYPE) GetProcAddress(RefpropdllInstance,"SATSdll");*/
-
-
- //CONVERT TO SI-UNITS
- if (ierr==0){
- WMOLdll(xliq,wmliq);
- wmliq /= 1000; //g/mol -> kg/mol
- WMOLdll(xvap,wmvap);
- wmvap /= 1000; //g/mol -> kg/mol
- //printf("%d,%s\n%s\nP,T,D,H,CP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",nX,hf,hfmix,p,t,d,h,wm);
- d *= wm*1000; //mol/dm� -> kg/m�
- dl *= wmliq*1000; //mol/dm� -> kg/m�
- dv *= wmvap*1000; //mol/dm� -> kg/m�
-/* e /= e/wm; //kJ/mol -> J/kg
- h /= wm; //kJ/mol -> J/kg
- s /= wm; //kJ/(mol�K) -> J/(kg�K)
-*/ p *= 1000; //kPa->Pa
- }
-
-
- //ASSIGN VALUES TO RETURN ARRAY
- props[0] = ierr;//error code
- props[1] = p;//pressure in kPa->Pa
- props[2] = T; //Temperature in K
- props[3] = wm; //molecular weight
- props[4] = d; //density
- props[5] = dl; //density of liquid phase
- props[6] = dv; //density of liquid phase
- props[7] = 0;
- props[8] = 0; //inner energy
- props[9] = 0; //specific enthalpy
- props[10] = 0;//specific entropy
- props[11] = 0;
- props[12] = 0;
- props[13] = 0; //speed of sound
- props[14] = wmliq;
- props[15] = wmvap;
- for (int ii=0;ii
-#if defined(WIN32) || defined(_WIN32)
-# include
-//# include "REFPROP_dll.h"
-#else // assuming Linux system
-# include
-# include
-//# include // dlopen etc
-# include // tolower etc
-#endif
-#include
-//# error "Could not determine system."
-#include "refprop_wrapper.h"
-
-// get the POCO classes
-#include "Poco/SharedLibrary.h"
-#include "Poco/Path.h"
-#include "Poco/File.h"
-#include "Poco/Environment.h"
-#include "Poco/StringTokenizer.h"
-#include "Poco/String.h"
-#include "Poco/Exception.h"
-
-
-// Some constants...
-const long maxstringlength=10000;
-const long filepathlength=1024;
-const long errormessagelength=255+filepathlength;
-const long lengthofreference=3;
-const long refpropcharlength=255;
-const long ncmax=20; // Note: ncmax is the max number of components
-
-Poco::SharedLibrary *RefpropdllInstance = NULL;
-char loadedfluids[refpropcharlength];
-char loadedpath[filepathlength];
-
-// Define the functions either by their pointers or type.
-WMOLdll_POINTER WMOL = NULL;
-TPFL2dll_POINTER TPFL2 = NULL;
-TPFLSHdll_POINTER TPFLSH = NULL;
-PHFL1dll_POINTER PHFL1 = NULL;
-PHFLSHdll_POINTER PHFLSH = NULL;
-PDFL1dll_POINTER PDFL1 = NULL;
-PDFLSHdll_POINTER PDFLSH = NULL;
-PSFLSHdll_POINTER PSFLSH = NULL;
-PQFLSHdll_POINTER PQFLSH = NULL;
-THFLSHdll_POINTER THFLSH = NULL;
-TDFLSHdll_POINTER TDFLSH = NULL;
-TSFLSHdll_POINTER TSFLSH = NULL;
-TQFLSHdll_POINTER TQFLSH = NULL;
-DHFL1dll_POINTER DHFL1 = NULL;
-DHFL2dll_POINTER DHFL2 = NULL;
-DHFLSHdll_POINTER DHFLSH = NULL;
-HSFLSHdll_POINTER HSFLSH = NULL;
-DSFL1dll_POINTER DSFL1 = NULL;
-DSFL2dll_POINTER DSFL2 = NULL;
-DSFLSHdll_POINTER DSFLSH = NULL;
-TRNPRPdll_POINTER TRNPRP = NULL;
-SATTdll_POINTER SATT = NULL;
-SATPdll_POINTER SATP = NULL;
-SATDdll_POINTER SATD = NULL;
-
-// char *str_replace(char *str, char *search, char *replace, long *count, int DEBUGMODE) {
-// int i,n_ret;
-// int newlen = strlen(replace);
-// int oldlen = strlen(search);
-// char *ret;
-// *count = 0;
-//
-// //count occurrences of searchstring
-// for (i = 0; oldlen && str[i]; ++i)
-// if (strstr(&str[i], search) == &str[i]){ // if walk through is at searchstr
-// ++*count, i+=oldlen - 1;
-// }
-// ret = (char *) calloc(n_ret = (strlen(str) + 1 + *count * (newlen - oldlen)), sizeof(char));
-// if (!ret){
-// printf("Could not allocate memory");
-// return "";
-// }
-//
-// if (!*count){
-// strncpy(ret,str,n_ret);
-// //if (DEBUGMODE) printf("RET: %i %s\n",oldlen,str);
-// }else{
-// i = 0;
-// while (*str)
-// if (strstr(str, search) == str)
-// strncpy(&ret[i], replace,n_ret-i-1),
-// i += newlen,
-// str += oldlen;
-// else
-// ret[i++] = *str++;
-// ret[i] = '\0';
-// }
-// return ret;
-// }
-
-//str_replace (fluidnames, "|", replace, nX)
-char *str_replace(char *str, char *search, char *replace, long *count, int DEBUGMODE) {
-
- *count = 0;
- char ret[maxstringlength];
-
- std::string fluids(str);
- std::string dlimit(search);
- std::string substi(replace);
- std::string result;
-
- // if (DEBUGMODE) printf("fluidnames: %s\n",fluids.c_str());
- // if (DEBUGMODE) printf("delimiter: %s\n",dlimit.c_str());
- // if (DEBUGMODE) printf("replace: %s\n",substi.c_str());
- // if (DEBUGMODE) printf("nX: %li\n\n",*count);
-
- Poco::StringTokenizer tokens(fluids.c_str(), dlimit.c_str(), Poco::StringTokenizer::TOK_TRIM | Poco::StringTokenizer::TOK_IGNORE_EMPTY);
- result = std::string(Poco::cat(substi, tokens.begin(), tokens.end()));
-
- strcpy(ret,result.c_str());
- //strcat(ret,'\0');
-
- *count = tokens.count()-1;
-
- if (DEBUGMODE) printf("fluidnames: %s\n",fluids.c_str());
- if (DEBUGMODE) printf("delimiter: %s\n",dlimit.c_str());
- if (DEBUGMODE) printf("replace: %s\n",substi.c_str());
- if (DEBUGMODE) printf("replaced: %s\n",result.c_str());
- if (DEBUGMODE) printf("nX: %li\n\n",*count);
-
-return ret;
-
-}
-
-// char printDoubleArray (double* arr[] ) {
-// std::copy(arr.begin(),arr.end(),std::ostream_iterator(std::cout,", "));
-// }
-
-char *printX(double arr[], long nX) {
- char ret[filepathlength];
- char tmp[filepathlength];
- strcpy(ret,"(");
- //for(int i = 0; i < (sizeof(arr)-1); i++) {
- for(int i = 0; i < (nX-2); i++) {
- sprintf(tmp,"%f, ", arr[i]);
- strcat(ret,tmp);
- }
- sprintf(tmp,"%f", arr[nX-1]);
- strcat(ret,tmp);
-
- strcat(ret,")");
- //printf ("output: %s \n", ret);
- return ret;
-}
-
-int init_REFPROP(char* fluidnames, char* REFPROP_PATH_CHAR, long* nX, char* herr, char* errormsg, int DEBUGMODE){
-// Sets up the interface to the REFPROP.DLL
-// is called by props_REFPROP and satprops_REFPROP
-// char DLL_PATH[filepathlength], FLD_PATH[filepathlength];
-
- long ierr=0;
-// DEBUGMODE = 1;
-
- if (strlen(REFPROP_PATH_CHAR)>filepathlength){
- sprintf(errormsg,"REFPROP_PATH_CHAR too long (%i > %li)\n",strlen(REFPROP_PATH_CHAR),filepathlength);
- return 0;
- }
- // Define temporary objects for checks.
- char REF_PATH_CHAR[filepathlength];
- Poco::Path REF_PATH(true);
- char FLUIDS_CHAR[filepathlength] = "fluids";
- Poco::Path FLD_PATH(true);
- char LIBRARY_CHAR[filepathlength];
- Poco::Path LIB_PATH(true);
- //Poco::File theFile;
-
- // Parse the string and append a path separator if necessary.
- REF_PATH.parse(REFPROP_PATH_CHAR, Poco::Path::PATH_NATIVE);
- if (!REF_PATH.isDirectory()) REF_PATH.append(REF_PATH.separator());
- // Overwrite the provided path
- strcpy(REF_PATH_CHAR,REF_PATH.toString().c_str());
-
- // Check the path if running in debugmode
- if (DEBUGMODE) {
- Poco::File refFile(REF_PATH);
- if ( !refFile.isDirectory() || !refFile.canRead() ){
- printf ("REF_PATH is not a readable directory: %s \n", REF_PATH.toString().c_str());
- sprintf (errormsg,"REF_PATH is not a readable directory: %s \n", REF_PATH.toString().c_str());
- return 0;
- } else {
- printf ("REF_PATH is a readable directory: %s \n", REF_PATH.toString().c_str());
- }
- }
-
- // The fluid files are in the Refprop directory, append "fluids".
- FLD_PATH.parse(REF_PATH_CHAR);
- FLD_PATH.pushDirectory(FLUIDS_CHAR);
-
-// //std::string path(REF_PATH_CHAR); // This is not fail-safe, the OS might look somewhere else, e.g. /usr/lib ...
-// Poco::Path SRC_PATH;
-// SRC_PATH.parse(Poco::Environment::get("PATH"));
-
-// if (DEBUGMODE) {
-// // Determine which library file should be loaded
-// bool is_linux = ( 0 == Poco::icompare(Poco::Environment::osName(), "linux") );
-// if (is_linux){
-// strcpy(LIBRARY_CHAR,"librefprop.so");
-// SRC_PATH.pushDirectory("/usr/local/lib");
-// } else {
-// strcpy(LIBRARY_CHAR,"refprop.dll");
-// SRC_PATH.pushDirectory(REF_PATH.toString());
-// }
-
-
- //bool found_lib = Poco::Path::find(SRC_PATH.toString(), LIBRARY_CHAR, LIB_PATH);
-// if (found_lib) {
-// printf ("Found library %s in path %s \n", LIBRARY_CHAR, path.c_str());
-// } else {
-// printf ("Cannot find library %s in path %s \n", LIBRARY_CHAR, path.c_str());
-// }
-// } else {
-// LIB_PATH.parse(REF_PATH_CHAR);
-// }
-
- //LIB_PATH.parse(LIBRARY_CHAR);
-
-// if (DEBUGMODE) {
-// printf ("REF_PATH as string: %s \n", REF_PATH.toString().c_str());
-// printf ("FLD_PATH as string: %s \n", FLD_PATH.toString().c_str());
-// printf ("LIB_PATH as string: %s \n", LIB_PATH.toString().c_str());
-// printf ("Running OS family : %s \n\n", Poco::Environment::osName().c_str());
-// }
-
- Poco::Path SRC_PATH; // This is not fail-safe, the OS might look somewhere else, e.g. /usr/lib ...
-
- if (RefpropdllInstance==NULL) { // we need to load the library
- if (DEBUGMODE) printf ("RefpropdllInstance loaded: %s \n", "false");
-
- // Check the OS and assign the right names for the library
- bool is_linux = ( 0 == Poco::icompare(Poco::Environment::osName(), "linux") );
- if (is_linux){
- strcpy(LIBRARY_CHAR,"librefprop.so");
- SRC_PATH.parse("/usr/local/lib");
- } else {
- strcpy(LIBRARY_CHAR,"refprop.dll");
- SRC_PATH = REF_PATH;
- }
-
- // search the library at the given path
- bool found_lib = Poco::Path::find(SRC_PATH.toString(), LIBRARY_CHAR, LIB_PATH);
- if (found_lib) {
- if (DEBUGMODE) printf ("Found library %s in path %s \n", LIBRARY_CHAR, SRC_PATH.toString().c_str());
- } else {
- if (DEBUGMODE) printf ("Cannot find library %s in path %s \n", LIBRARY_CHAR, SRC_PATH.toString().c_str());
- sprintf ("Cannot find library %s in path %s \n", LIBRARY_CHAR, SRC_PATH.toString().c_str());
- return 0;
- }
-
- // check if the file is correct and executable
- if (DEBUGMODE) {
- Poco::File libFile(LIB_PATH);
- if ( !libFile.isFile() || !libFile.canRead() ){
- printf ("LIB_PATH is not a readable file: %s \n", LIB_PATH.toString().c_str());
- sprintf (errormsg,"LIB_PATH is not a readable file: %s \n", LIB_PATH.toString().c_str());
- return 0;
- } else {
- printf ("LIB_PATH exists and is readable: %s \n", LIB_PATH.toString().c_str());
- }
- }
-
- // load a new library instance
- RefpropdllInstance = new Poco::SharedLibrary(LIB_PATH.toString());
- if (DEBUGMODE) printf ("RefpropdllInstance loaded: %s \n\n", "true");
-
- } else { // library was already loaded
- if (DEBUGMODE) printf ("RefpropdllInstance loaded: %s \n\n", "true");
- }
-
- // Now the library is loaded and we can start checkicng the fluid path
- if (DEBUGMODE) {
- Poco::File fldFile(FLD_PATH);
- if ( !fldFile.isDirectory() || !fldFile.canRead() ){
- printf ("FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
- sprintf (errormsg,"FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
- return 0;
- } else {
- printf ("FLD_PATH is a readable directory: %s \n", FLD_PATH.toString().c_str());
- }
- }
- char FLD_PATH_CHAR[filepathlength];
- strcpy(FLD_PATH_CHAR,FLD_PATH.toString().c_str());
-
-
- if (DEBUGMODE) {
- printf ("%s\n"," ");
- printf ("REF_PATH as string: %s \n", REF_PATH.toString().c_str());
- printf ("FLD_PATH as string: %s \n", FLD_PATH.toString().c_str());
- printf ("LIB_PATH as string: %s \n", LIB_PATH.toString().c_str());
- printf ("Running OS family : %s \n", Poco::Environment::osName().c_str());
- printf ("%s\n"," ");
- }
-
-
- // Check for new fluids and if the library has to be loaded again.
- bool isFluid = (strcmp(fluidnames,loadedfluids)==0);
- bool isPath = (strcmp(REF_PATH_CHAR,loadedpath)==0);
- if (DEBUGMODE) printf ("Comparison of fluids : %i \n", isFluid );
- if (DEBUGMODE) printf ("Comparison of path : %i \n\n", isPath );
- //if (DEBUGMODE) printf ("Checking setup : %s and %s \n\n", REF_PATH_CHAR,loadedpath );
-
- char *hf;
-
-// // // // if (isFluid && isPath) {
-// // // // //sprintf(errormsg,"Library is already loaded: %s \n",LIB_PATH.toString().c_str());
-// // // // if (DEBUGMODE) printf ("No setup needed, fluids (%s) and path (%s) did not change.\n\n", fluidnames,REF_PATH_CHAR);
-// // // // // // // // return 0;
-// // // // } else {
- // we need to call setup
-
- char hrf[lengthofreference+1],hfmix[filepathlength+1+7];
-// // // // char *hf;
-
- //parse fluid composition string and insert absolute paths
- char replace[filepathlength+6];
- strcpy(replace,".FLD|");
- //if (DEBUGMODE) printf("REPLACE: %s\n",replace);
- strncat(replace, FLD_PATH_CHAR,filepathlength-strlen(replace));
-
- //int hf_len = strlen(fluidnames)+ncmax*(strlen(replace)-1)+4;
- int hf_len = maxstringlength;
- hf = (char*) calloc(hf_len, sizeof(char));
-
- strncpy(hf,FLD_PATH_CHAR,hf_len);
-
- char replaced[filepathlength];
-
- strcpy(replaced,str_replace(fluidnames, "|", replace, nX, DEBUGMODE));
-
- //str_replace returns the number of delimiters -> nX, but components are one more ...
- if (++*nX>ncmax){ //...that's why nX is incremented
- sprintf(errormsg,"Too many components (More than %li)\n",ncmax);
- return 0;
- }
-
-
- strncat(hf,replaced,hf_len-strlen(hf));
-
- strncat(hf,".FLD",hf_len-strlen(hf));
-
- if (DEBUGMODE) printf("Fluid composition string: \"%s\"\n",hf);
-
- strncpy(hfmix,FLD_PATH_CHAR,filepathlength+1);//add absolute path
- strncat(hfmix,"hmx.bnc",filepathlength+1+7-strlen(hfmix));
- strcpy(hrf,"DEF");
-
-
- SETUPdll_POINTER SETUP = (SETUPdll_POINTER) RefpropdllInstance->getSymbol(SETUPdll_NAME);
- if (DEBUGMODE) printf("Running SETUP...\n");
- //char hftmp[maxstringlength];
- //strcpy(hftmp,hf);
- static char hfld[maxstringlength+1];
- strcpy(hfld,hf);
- SETUP(*nX, hfld, hfmix, hrf, ierr, herr);
-
- strcpy(loadedfluids,fluidnames);
- strcpy(loadedpath,REF_PATH_CHAR);
- if (DEBUGMODE) printf("SETUP run complete (Error no: %li)\n",ierr);
-
- if (DEBUGMODE) printf("Error code processing...\n");
- switch(ierr){
- case 101:
- //strcpy(errormsg,"error in opening file");
-// if (DEBUGMODE) printf("Error 101\n");
- sprintf(errormsg,"error in opening file %s",hf);
- break;
- case 102:
-// if (DEBUGMODE) printf("Error 102\n");
- strcpy(errormsg,"error in file or premature end of file");
- break;
- case -103:
-// if (DEBUGMODE) printf("Error -103\n");
- strcpy(errormsg,"unknown model encountered in file");
- break;
- case 104:
-// if (DEBUGMODE) printf("Error 104\n");
- strcpy(errormsg,"error in setup of model");
- break;
- case 105:
-// if (DEBUGMODE) printf("Error 105\n");
- strcpy(errormsg,"specified model not found");
- break;
- case 111:
-// if (DEBUGMODE) printf("Error 111\n");
- strcpy(errormsg,"error in opening mixture file");
- break;
- case 112:
-// if (DEBUGMODE) printf("Error 112\n");
- strcpy(errormsg,"mixture file of wrong type");
- break;
- case 114:
-// if (DEBUGMODE) printf("Error 114\n");
- strcpy(errormsg,"nc<>nc from setmod");
- break;
- case 0:
- break;
- default:
-// if (DEBUGMODE) printf("Unknown error\n");
- strcpy(errormsg,"Unknown error");
- //strcpy(errormsg,"Setup was successful!");
- strncpy(errormsg,herr,errormessagelength);
- break;
- }
-// // // // free(hf);
- return ierr;
-
-
-// if (DEBUGMODE) {
-// theFile = Poco::File(LIB_PATH);
-// if ( !theFile.isFile() || !theFile.canExecute() ){
-// sprintf (errormsg,"LIB_PATH is not an executable file: %s \n", LIB_PATH.toString().c_str());
-// return 0;
-// }
-// }
-// char LIB_PATH_CHAR[filepathlength];
-// strcpy(LIB_PATH_CHAR,LIB_PATH.toString().c_str());
-//
-// if (DEBUGMODE) {
-// theFile = Poco::File(FLD_PATH);
-// if ( !theFile.isDirectory() || !theFile.canRead() ){
-// sprintf (errormsg,"FLD_PATH is not a readable directory: %s \n", FLD_PATH.toString().c_str());
-// return 0;
-// }
-// }
-// char FLD_PATH_CHAR[filepathlength];
-// strcpy(FLD_PATH_CHAR,FLD_PATH.toString().c_str());
-
-//// First we load the library with the POCO foundation
-//// classes and then define all the needed functions
-//// by their names and a cast to the correct type.
-// if (DEBUGMODE) printf ("RefpropdllInstance loaded path: %s \n", RefpropdllInstance.getPath().c_str());
-// if (DEBUGMODE) printf ("New path for loading the library: %s \n", LIB_PATH.toString().c_str());
-// if (DEBUGMODE) printf ("Comparison: %i \n", LIB_PATH.toString().compare(RefpropdllInstance.getPath()) );
-// if ( LIB_PATH.toString().compare(RefpropdllInstance.getPath())!=0 ) {
-// RefpropdllInstance.unload();
-// if (DEBUGMODE) printf ("RefpropdllInstance unloaded: %s \n", "true");
-// RefpropdllInstance.load(LIB_PATH_CHAR);
-// }
-//
-// if (!RefpropdllInstance.isLoaded()){
-// sprintf(errormsg,"ERROR in opening library at \"%s\"",LIB_PATH_CHAR);
-// return 100;
-// }
-
-
-// char hrf[lengthofreference+1],hfmix[filepathlength+1+7];
-// char *hf;
-//
-// //parse fluid composition string and insert absolute paths
-// char replace[filepathlength+6];
-// strcpy(replace,".FLD|");
-// //if (DEBUGMODE) printf("REPLACE: %s\n",replace);
-// strncat(replace, FLD_PATH_CHAR,filepathlength-strlen(replace));
-//
-// int hf_len = strlen(fluidnames)+ncmax*(strlen(replace)-1)+4;
-// hf = (char*) calloc(hf_len, sizeof(char));
-//
-// strncpy(hf,FLD_PATH_CHAR,hf_len);
-// strncat(hf,str_replace(fluidnames, "|", replace, nX),hf_len-strlen(hf)); //str_replace returns the number of delimiters -> nX, but components are one more ...
-// if (++*nX>ncmax){ //...that's why nX is incremented
-// sprintf(errormsg,"Too many components (More than %i)\n",ncmax);
-// return 0;
-// }
-// strncat(hf,".FLD",hf_len-strlen(hf));
-// if (DEBUGMODE) printf("Fluid composition string: \"%s\"\n",hf);
-//
-// strncpy(hfmix,FLD_PATH_CHAR,filepathlength+1);//add absolute path
-// strncat(hfmix,"hmx.bnc",filepathlength+1+7-strlen(hfmix));
-// strcpy(hrf,"DEF");
-//
-//
-// // SETUPdll_TYPE * SETUPdll = (SETUPdll_TYPE * ) RefpropdllInstance.getSymbol(SETUPdll_NAME);
-// if (DEBUGMODE) printf("Running SETUPdll...\n");
-// SETUP(*nX, hf, hfmix, hrf, ierr, herr);
-// strcpy(loadedfluids,fluidnames);
-// if (DEBUGMODE) printf("SETUPdll run complete (Error no: %i)\n",ierr);
-//
-// // WMOLdll = (WMOLdll_POINTER) RefpropdllInstance.getSymbol(WMOLdll_NAME);
-// // TPFL2dll = (TPFL2dll_POINTER) RefpropdllInstance.getSymbol(TPFL2dll_NAME);
-// // TPFLSHdll = (TPFLSHdll_POINTER) RefpropdllInstance.getSymbol(TPFLSHdll_NAME);
-// // PHFL1dll = (PHFL1dll_POINTER) RefpropdllInstance.getSymbol(PHFL1dll_NAME);
-// // PHFLSHdll = (PHFLSHdll_POINTER) RefpropdllInstance.getSymbol(PHFLSHdll_NAME);
-// // PDFL1dll = (PDFL1dll_POINTER) RefpropdllInstance.getSymbol(PDFL1dll_NAME);
-// // PDFLSHdll = (PDFLSHdll_POINTER) RefpropdllInstance.getSymbol(PDFLSHdll_NAME);
-// // PSFLSHdll = (PSFLSHdll_POINTER) RefpropdllInstance.getSymbol(PSFLSHdll_NAME);
-// // PQFLSHdll = (PQFLSHdll_POINTER) RefpropdllInstance.getSymbol(PQFLSHdll_NAME);
-// // THFLSHdll = (THFLSHdll_POINTER) RefpropdllInstance.getSymbol(THFLSHdll_NAME);
-// // TDFLSHdll = (TDFLSHdll_POINTER) RefpropdllInstance.getSymbol(TDFLSHdll_NAME);
-// // TSFLSHdll = (TSFLSHdll_POINTER) RefpropdllInstance.getSymbol(TSFLSHdll_NAME);
-// // TQFLSHdll = (TQFLSHdll_POINTER) RefpropdllInstance.getSymbol(TQFLSHdll_NAME);
-// // DHFL1dll = (DHFL1dll_POINTER) RefpropdllInstance.getSymbol(DHFL1dll_NAME);
-// // DHFL2dll = (DHFL2dll_POINTER) RefpropdllInstance.getSymbol(DHFL2dll_NAME);
-// // DHFLSHdll = (DHFLSHdll_POINTER) RefpropdllInstance.getSymbol(DHFLSHdll_NAME);
-// // HSFLSHdll = (HSFLSHdll_POINTER) RefpropdllInstance.getSymbol(HSFLSHdll_NAME);
-// // DSFL1dll = (DSFL1dll_POINTER) RefpropdllInstance.getSymbol(DSFL1dll_NAME);
-// // DSFL2dll = (DSFL2dll_POINTER) RefpropdllInstance.getSymbol(DSFL2dll_NAME);
-// // DSFLSHdll = (DSFLSHdll_POINTER) RefpropdllInstance.getSymbol(DSFLSHdll_NAME);
-// // TRNPRPdll = (TRNPRPdll_POINTER) RefpropdllInstance.getSymbol(TRNPRPdll_NAME);
-// // SATTdll = (SATTdll_POINTER) RefpropdllInstance.getSymbol(SATTdll_NAME);
-// // SATPdll = (SATPdll_POINTER) RefpropdllInstance.getSymbol(SATPdll_NAME);
-// // SATDdll = (SATDdll_POINTER) RefpropdllInstance.getSymbol(SATDdll_NAME);
-
-
-// // if (DEBUGMODE) printf("Error code processing...\n");
-// switch(ierr){
-// case 101:
-// //strcpy(errormsg,"error in opening file");
-// // if (DEBUGMODE) printf("Error 101\n");
-// sprintf(errormsg,"error in opening file %s",hf);
-// break;
-// case 102:
-// // if (DEBUGMODE) printf("Error 102\n");
-// strcpy(errormsg,"error in file or premature end of file");
-// break;
-// case -103:
-// // if (DEBUGMODE) printf("Error -103\n");
-// strcpy(errormsg,"unknown model encountered in file");
-// break;
-// case 104:
-// // if (DEBUGMODE) printf("Error 104\n");
-// strcpy(errormsg,"error in setup of model");
-// break;
-// case 105:
-// // if (DEBUGMODE) printf("Error 105\n");
-// strcpy(errormsg,"specified model not found");
-// break;
-// case 111:
-// // if (DEBUGMODE) printf("Error 111\n");
-// strcpy(errormsg,"error in opening mixture file");
-// break;
-// case 112:
-// // if (DEBUGMODE) printf("Error 112\n");
-// strcpy(errormsg,"mixture file of wrong type");
-// break;
-// case 114:
-// // if (DEBUGMODE) printf("Error 114\n");
-// strcpy(errormsg,"nc<>nc from setmod");
-// break;
-// case 0:
-// break;
-// default:
-// // if (DEBUGMODE) printf("Unknown error\n");
-// strcpy(errormsg,"Unknown error");
-// //strcpy(errormsg,"Setup was successful!");
-// strncpy(errormsg,herr,errormessagelength);
-// break;
-// }
-// free(hf);
-// return ierr;
-}
-
-
-double props_REFPROP(char* what, char* statevars_in, char* fluidnames, double *props, double statevar1, double statevar2, double* x, int phase, char* REFPROP_PATH, char* errormsg, int DEBUGMODE){
-/*Calculates thermodynamic properties of a pure substance/mixture, returns both single value and array containing all calculated values (because the are calculated anyway)
-INPUT:
- what: character specifying return value (p,T,h,s,d,wm,q,e,w) - Explanation of variables at the end of this function
- statevars: string of any combination of two variables out of p,T,h,s,d
- fluidnames: string containing names of substances in mixtured separated by |, substance names are identical to those of *.fld-files in REFPROP program directory
- statevar1,statevar2: values of the two variables specified in statevars
- x: array containing the mass fractions of the components of the mixture
- REFPROP_PATH: string defining the path of the refprop.dll
-OUTPUT
- return value: value of variable specified by the input variable what
- props: Array containing all calculated values (props[0] containing error number)
- errormsg: string containing error message
-*/
- char statevars[3];
- double p, T, d, val, dl,dv,q,e,h,s,cv,cp,w,wm,wmliq,wmvap,eta,tcx;
- long nX,ierr=0; //zero means no error
- char herr[errormessagelength+1];
-// HINSTANCE RefpropdllInstance;// Then have windows load the library.
-// Poco::SharedLibrary RefpropdllInstance("");
-
-// DEBUGMODE = 1;
-
- if (DEBUGMODE) printf("\nStarting function props_REFPROP to calc %c...\n", what[0]);
-
- //initialize interface to REFPROP.dll
-// if(props[0]=(double)init_REFPROP(fluidnames, REFPROP_PATH, &nX, herr, &RefpropdllInstance, errormsg, DEBUGMODE)){
-// printf("Error no. %g initializing REFPROP: \"%s\"\n", props[0], errormsg);
-// return 0;
-// }
- if(props[0]=(double)init_REFPROP(fluidnames, REFPROP_PATH, &nX, herr, errormsg, DEBUGMODE)){
- printf("Error no. %g initializing REFPROP: \"%s\"\n", props[0], errormsg);
- return 0;
- }
-
- //CALCULATE MOLAR MASS
-// WMOL = (fp_WMOLdllTYPE) GetProcAddress(RefpropdllInstance,"WMOLdll");
-// WMOLdll_TYPE * WMOL = (WMOLdll_TYPE * ) RefpropdllInstance.getSymbol(WMOLdll_NAME);
- WMOL = (WMOLdll_POINTER) RefpropdllInstance->getSymbol(WMOLdll_NAME);
- WMOL(x,wm);
-// sprintf(errormsg," %10.4f, %10.4f, %10.4f,",x[0],x[1],wm);
- wm /= 1000; //g/mol -> kg/mol
-
- //identify and assign passed state variables
- statevars[0] = tolower(statevars_in[0]);
- statevars[1] = tolower(statevars_in[1]);
- statevars[2] = '\0';
- if (statevars[0]!='\0'){
- if (statevars[0]==statevars[1]){
- props[0] = 3;
- sprintf(errormsg,"State variable 1 is the same as state variable 2 (%c)",statevars[0]);
- return 0;
- }
- for (int ii=0;ii<2;ii++){
- val = (ii==0?statevar1:statevar2);
- switch(statevars[ii]){
- case 'p':
- p = val/1000; //Pa->kPa
- break;
- case 't':
- T = val;
- break;
- case 's':
- s = val*wm; //J/(kg�K) -> kJ/(mol�K)
- break;
- case 'h':
- h = val*wm; //J/kg --> kJ/mol
- break;
- case 'd':
- d = val/wm/1000; //kg/m� -> mol/dm�
- break;
- case 'q': //vapor quality on a mass basis [mass vapor/total mass] (q=0 indicates saturated liquid, q=1 indicates saturated vapor)
- q = val;
- break;
- default:
- props[0] = 2;
- sprintf(errormsg,"Unknown state variable %i: %c",ii+1 ,statevars[ii]);/**/
- return 0;
- }
- }
- }
-
-/*
-//...If phase j is known, call TPRHO:
- long j=2; //phase definition(j=1: Liquid, j=2: Vapor)
- long tmp_int=0;
- TPRHOdll = (fp_TPRHOdllTYPE) GetProcAddress(RefpropdllInstance,"TPRHOdll");
- TPRHO(t,p,x,j,tmp_int,d,ierr,herr,errormessagelength);
-*/
-//...If phase is not known, call TPFLSH
- double xliq[ncmax],xvap[ncmax],f[ncmax];
- long kq=2;/* additional input--only for TQFLSH and PQFLSH
- kq--flag specifying units for input quality
- kq = 1 quality on MOLAR basis [moles vapor/total moles]
- kq = 2 quality on MASS basis [mass vapor/total mass]*/
-// sprintf(errormsg,"Huhu! %s %d", statevars, ierr);
- if (ierr==0){
- if (strcmp(statevars,"pt")==0 || strcmp(statevars,"tp")==0){
-// strcat(errormsg,"Bin in TP!");
- if (phase==2){ //fluid state is known to be two phase
-// TPFL2dll = (fp_TPFL2dllTYPE) GetProcAddress(RefpropdllInstance,"TPFL2dll");
- TPFL2 = (TPFL2dll_POINTER) RefpropdllInstance->getSymbol(TPFL2dll_NAME);
- TPFL2(T,p,x,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
- }else{
-// TPFLSHdll = (fp_TPFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TPFLSHdll");
- TPFLSH = (TPFLSHdll_POINTER) RefpropdllInstance->getSymbol(TPFLSHdll_NAME);
- TPFLSH(T,p,x,d,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
- }
- }else if (strcmp(statevars,"ph")==0 || strcmp(statevars,"hp")==0){
-// if (phase==1){ //fluid state is known to be single phase
-//// PHFL1dll = (fp_PHFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PHFL1dll");
-// PHFL1 = (PHFL1dll_POINTER) RefpropdllInstance->getSymbol(PHFL1dll_NAME);
-// PHFL1(p,h,x,liqvap,T,d,ierr,herr,errormessagelength);
-//// if (liqvap==1) dl=d; else dv=d;
-// }else{
-//// PHFLSHdll = (fp_PHFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PHFLSHdll");
- PHFLSH = (PHFLSHdll_POINTER) RefpropdllInstance->getSymbol(PHFLSHdll_NAME);
- PHFLSH(p,h,x,T,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
-// }
- }else if (strcmp(statevars,"pd")==0 || strcmp(statevars,"dp")==0){
- if (phase==1){ //fluid state is known to be single phase
-// PDFL1dll = (fp_PDFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PDFL1dll");
- PDFL1 = (PDFL1dll_POINTER) RefpropdllInstance->getSymbol(PDFL1dll_NAME);
- PDFL1(p,d,x,T,ierr,herr,errormessagelength);
- }else{
-// PDFLSHdll = (fp_PDFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PDFLSHdll");
- PDFLSH = (PDFLSHdll_POINTER) RefpropdllInstance->getSymbol(PDFLSHdll_NAME);
- PDFLSH(p,d,x,T,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
- }
- }else if (strcmp(statevars,"ps")==0 || strcmp(statevars,"sp")==0){
-/* if (phase==1){ //fluid state is known to be single phase
- PSFL1dll = (fp_PSFL1dllTYPE) GetProcAddress(RefpropdllInstance,"PSFL1dll");
- PSFL1(p,s,x,kph,T,d,ierr,herr,errormessagelength);
- if (liqvap==1) dl=d; else dv=d;
- }else{*/
-// PSFLSHdll = (fp_PSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PSFLSHdll");
- PSFLSH = (PSFLSHdll_POINTER) RefpropdllInstance->getSymbol(PSFLSHdll_NAME);
- PSFLSH(p,s,x,T,d,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
-// }
- }else if (strcmp(statevars,"pq")==0 || strcmp(statevars,"qp")==0){
-// PQFLSHdll = (fp_PQFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"PQFLSHdll");
- PQFLSH = (PQFLSHdll_POINTER) RefpropdllInstance->getSymbol(PQFLSHdll_NAME);
- PQFLSH(p,q,x,kq,T,d,dl,dv,xliq,xvap,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
-// strcat(errormsg,"Bin in PQ!");
- }else if (strcmp(statevars,"th")==0 || strcmp(statevars,"ht")==0){
-/* if (phase==1){ //fluid state is known to be single phase
- THFL1dll = (fp_THFL1dllTYPE) GetProcAddress(RefpropdllInstance,"THFL1dll");
- THFL1(T,h,x,Dmin,Dmax,d,ierr,herr,errormessagelength);
- }else{*/
-// THFLSHdll = (fp_THFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"THFLSHdll");
- THFLSH = (THFLSHdll_POINTER) RefpropdllInstance->getSymbol(THFLSHdll_NAME);
- long kr = 2;
-/* kr--phase flag: 1 = input state is liquid
- 2 = input state is vapor in equilibrium with liq
- 3 = input state is liquid in equilibrium with solid
- 4 = input state is vapor in equilibrium with solid */
- THFLSH (T,h,x,kr,p,d,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
-// }
- }else if (strcmp(statevars,"td")==0 || strcmp(statevars,"dt")==0){
-// TDFLSHdll = (fp_TDFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TDFLSHdll");
- TDFLSH = (TDFLSHdll_POINTER) RefpropdllInstance->getSymbol(TDFLSHdll_NAME);
- TDFLSH(T,d,x,p,dl,dv,xliq,xvap,q,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
- }else if (strcmp(statevars,"ts")==0 || strcmp(statevars,"st")==0){
-// TSFLSHdll = (fp_TSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TSFLSHdll");
- TSFLSH = (TSFLSHdll_POINTER) RefpropdllInstance->getSymbol(TSFLSHdll_NAME);
- long kr = 2;
- TSFLSH(T,s,x,kr,p,d,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
- }else if (strcmp(statevars,"tq")==0 || strcmp(statevars,"qt")==0){
-// TQFLSHdll = (fp_TQFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"TQFLSHdll");
- TQFLSH = (TQFLSHdll_POINTER) RefpropdllInstance->getSymbol(TQFLSHdll_NAME);
- TQFLSH(T,q,x,kq,p,d,dl,dv,xliq,xvap,e,h,s,cv,cp,w,ierr,herr,errormessagelength);
- }else if (strcmp(statevars,"hd")==0 || strcmp(statevars,"dh")==0){
- switch(phase){ //fluid state is known to be single phase
- case 1:
-// DHFL1dll = (fp_DHFL1dllTYPE) GetProcAddress(RefpropdllInstance,"DHFL1dll");
- DHFL1 = (DHFL1dll_POINTER) RefpropdllInstance->getSymbol(DHFL1dll_NAME);
- DHFL1(d,h,x,T,ierr,herr,errormessagelength);
- break;
- case 2:
-// DHFL2dll = (fp_DHFL2dllTYPE) GetProcAddress(RefpropdllInstance,"DHFL2dll");
- DHFL2 = (DHFL2dll_POINTER) RefpropdllInstance->getSymbol(DHFL2dll_NAME);
- DHFL2(d,h,x,T,p,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
- break;
- default:
-// DHFLSHdll = (fp_DHFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"DHFLSHdll");
- DHFLSH = (DHFLSHdll_POINTER) RefpropdllInstance->getSymbol(DHFLSHdll_NAME);
- DHFLSH(d,h,x,T,p,dl,dv,xliq,xvap,q,e,s,cv,cp,w,ierr,herr,errormessagelength);
- break;
- }
- }else if (strcmp(statevars,"hs")==0 || strcmp(statevars,"sh")==0){
-// HSFLSHdll = (fp_HSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"HSFLSHdll");
- HSFLSH = (HSFLSHdll_POINTER) RefpropdllInstance->getSymbol(HSFLSHdll_NAME);
- HSFLSH(h,s,x,T,p,d,dl,dv,xliq,xvap,q,e,cv,cp,w,ierr,herr,errormessagelength);
- }else if (strcmp(statevars,"ds")==0 || strcmp(statevars,"sd")==0){
- switch(phase){ //fluid state is known to be single phase
- case 1:
-// DSFL1dll = (fp_DSFL1dllTYPE) GetProcAddress(RefpropdllInstance,"DSFL1dll");
- DSFL1 = (DSFL1dll_POINTER) RefpropdllInstance->getSymbol(DSFL1dll_NAME);
- DSFL1(d,s,x,T,ierr,herr,errormessagelength);
- break;
- case 2:
-// DSFL2dll = (fp_DSFL2dllTYPE) GetProcAddress(RefpropdllInstance,"DSFL2dll");
- DSFL2 = (DSFL2dll_POINTER) RefpropdllInstance->getSymbol(DSFL2dll_NAME);
- DSFL2(d,s,x,T,p,dl,dv,xliq,xvap,q,ierr,herr,errormessagelength);
- break;
- default:
-// DSFLSHdll = (fp_DSFLSHdllTYPE) GetProcAddress(RefpropdllInstance,"DSFLSHdll");
- DSFLSH = (DSFLSHdll_POINTER) RefpropdllInstance->getSymbol(DSFLSHdll_NAME);
- DSFLSH(d,s,x,T,p,dl,dv,xliq,xvap,q,e,h,cv,cp,w,ierr,herr,errormessagelength);
- break;
- }
- }else
- sprintf(errormsg,"Unknown combination of state variables! %s", statevars);
- }
-
- switch(tolower(what[0])){ //CHOOSE RETURN VARIABLE
- case 'v': //dynamic viscosity uPa.s
- case 'l': //thermal conductivity W/m.K
-// TRNPRPdll = (fp_TRNPRPdllTYPE) GetProcAddress(RefpropdllInstance,"TRNPRPdll");
- TRNPRP = (TRNPRPdll_POINTER) RefpropdllInstance->getSymbol(TRNPRPdll_NAME);
- TRNPRP(T,d,x,eta,tcx,ierr,herr,errormessagelength);
- break;
- }
-
-
- switch(ierr){
- case 1:
- sprintf(errormsg,"T=%f < Tmin",T);
- break;
- case 4:
- sprintf(errormsg,"P=%f < 0",p);
- break;
- case 5:
- sprintf(errormsg,"T=%f and p=%f out of range",T,p);
- break;
- case 8:
- sprintf(errormsg,"x out of range (component and/or sum < 0 or > 1):%s",printX(x,nX));
- break;
- case 9:
- sprintf(errormsg,"x=%s or T=%f out of range",printX(x,nX),T);
- break;
- case 12:
- sprintf(errormsg,"x=%s out of range and P=%f < 0",printX(x,nX),p);
- break;
- case 13:
- sprintf(errormsg,"x=%s, T=%f and p=%f out of range",printX(x,nX),T,p);
- break;
- case 16:
- strcpy(errormsg,"TPFLSH error: p>melting pressure");
- break;
- case -31:
- sprintf(errormsg,"Temperature T=%f out of range for conductivity",T);
- break;
- case -32:
- sprintf(errormsg,"density d=%f out of range for conductivity",d);
- break;
- case -33:
- sprintf(errormsg,"Temperature T=%f and density d=%f out of range for conductivity",T,d);
- break;
- case -41:
- sprintf(errormsg,"Temperature T=%f out of range for viscosity",T);
- break;
- case -42:
- sprintf(errormsg,"density d=%f out of range for viscosity",d);
- break;
- case -43:
- sprintf(errormsg,"Temperature T=%f and density d=%f out of range for viscosity",T,d);
- break;
- case -51:
- sprintf(errormsg,"Temperature T=%f out of range for conductivity and viscosity",T);
- break;
- case -52:
- sprintf(errormsg,"density d=%f out of range for conductivity and viscosity",d);
- break;
- case -53:
- sprintf(errormsg,"Temperature T=%f and density d=%f out of range for conductivity and viscosity",T,d);
- break;
- case 39:
- sprintf(errormsg,"model not found for thermal conductivity");
- break;
- case 49:
- sprintf(errormsg,"model not found for viscosity");
- break;
- case 50:
- sprintf(errormsg,"ammonia/water mixture (no properties calculated)");
- break;
- case 51:
- sprintf(errormsg,"exactly at T=%f, rhoc for a pure fluid; k is infinite",T);
- break;
- case -58:
- case -59:
- sprintf(errormsg,"ECS model did not converge");
- break;
- case 211:
- sprintf(errormsg,"TPFLSH bubble point calculation did not converge: [SATTP error 1] iteration failed to converge");
- break;
- case 239:
- sprintf(errormsg,"THFLSH error: Input value of enthalpy (%f) is outside limits",h);
- break;
- case 248:
- sprintf(errormsg,"DSFLSH error: Iteration did not converge with d=%f and s=%f",d,s);
- break;
- case 249:
- sprintf(errormsg,"PHFLSH error: Input value of enthalpy (%f) is outside limits",h);
- break;
- case 271:
- sprintf(errormsg,"TQFLSH error: T=%f > Tcrit, T-q calculation not possible",T);
- break;
- case 291:
- sprintf(errormsg,"PQFLSH error: p=%f > pcrit, p-q calculation not possible",T);
- break;
- default:
- strncpy(errormsg,herr,errormessagelength);
- break;
- }
-
-
- //CONVERT TO SI-UNITS
- if (ierr==0){
- WMOL(xliq,wmliq);
- wmliq /= 1000; //g/mol -> kg/mol
- WMOL(xvap,wmvap);
- wmvap /= 1000; //g/mol -> kg/mol
- //printf("%d,%s\n%s\nP,T,D,H,CP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",nX,hf,hfmix,p,t,d,h,wm);
- d *= wm*1000; //mol/dm� -> kg/m�
- dl *= wmliq*1000; //mol/dm� -> kg/m�
- dv *= wmvap*1000; //mol/dm� -> kg/m�
- e /= e/wm; //kJ/mol -> J/kg
- h /= wm; //kJ/mol -> J/kg
- s /= wm; //kJ/(mol�K) -> J/(kg�K)
- cv /= wm;
- cp /= wm;
- p *= 1000; //kPa->Pa
- if (nX>1 && abs(q)<990) q *= wmvap/wm; //molar bass -> mass basis
- eta/=1e6; //uPa.s -> Pa.s
- }
-
- //ASSIGN VALUES TO RETURN ARRAY
- props[0] = ierr;//error code
- props[1] = p;//pressure in Pa
- props[2] = T; //Temperature in K
- props[3] = wm; //molecular weight
- props[4] = d; //density
- props[5] = dl; //density of liquid phase
- props[6] = dv; //density of liquid phase
- props[7] = q; //vapor quality on a mass basis [mass vapor/total mass] (q=0 indicates saturated liquid, q=1 indicates saturated vapor)
- props[8] = e; //inner energy
- props[9] = h; //specific enthalpy
- props[10] = s;//specific entropy
- props[11] = cv;
- props[12] = cp;
- props[13] = w; //speed of sound
- props[14] = wmliq;
- props[15] = wmvap;
- for (int ii=0;iigetSymbol(WMOLdll_NAME);
- WMOL(x,wm);
-// sprintf(errormsg," %10.4f, %10.4f, %10.4f,",x[0],x[1],wm);
- if (DEBUGMODE) printf("\nFunction WMOLdll was called\n");
-
- wm /= 1000; //g/mol -> kg/mol
-
- if (DEBUGMODE) printf("wm converted.\n");
-
- if (DEBUGMODE) printf("statevar is %s \n",statevar_in);
- //identify and assign passed state variables
- // char tmpstr[1];
- // strcpy(tmpstr,statevar[0]);
- // statevar = toLowerCase(tmpstr);
- //statevar[0] = tolower(statevar[0]);
- char statevar[1];
- statevar[0] = tolower(statevar_in[0]);
- if (DEBUGMODE) printf("\nstatevar lowercase.\n");
- if (statevar[0]!='\0'){
-// if (strcmp(statevar[0],"")){
-// if (statevar[0] != NULL){
- if (DEBUGMODE) printf("\nentering statevar switch.\n");
- switch(statevar[0]){
- case 'p':
- p = statevarval/1000; //Pa->kPa
- break;
- case 't':
- T = statevarval;
- break;
- case 'd':
- d = statevarval/wm/1000; //kg/m� -> mol/dm�
- break;
-/* case 's':
- s = statevarval*wm; //J/(kg�K) -> kJ/(mol�K)
- break;
- case 'h':
- h = statevarval*wm; //J/kg --> kJ/mol
- break;
-*/ default:
- props[0] = 2;
- sprintf(errormsg,"Unknown state variable: %f", statevarval);
- return 0;
- }
- }
-
- if (DEBUGMODE) printf("\nstatevar checked.\n");
-
- double xliq[ncmax],xvap[ncmax],f[ncmax];
-
- long j=2,kr;
-/* j--phase flag: 1 = input x is liquid composition (bubble point)
- 2 = input x is vapor composition (dew point)
- 3 = input x is liquid composition (freezing point)
- 4 = input x is vapor composition (sublimation point)
-*/
- if (ierr==0) {
- if (~strcmp(statevar,"t")){
-// SATTdll = (fp_SATTdllTYPE) GetProcAddress(RefpropdllInstance,"SATTdll");
- SATT = (SATTdll_POINTER) RefpropdllInstance->getSymbol(SATTdll_NAME);
- SATT(T,x,j,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
- }else if (~strcmp(statevar,"p")){
-// SATPdll = (fp_SATPdllTYPE) GetProcAddress(RefpropdllInstance,"SATPdll");
- SATP = (SATPdll_POINTER) RefpropdllInstance->getSymbol(SATPdll_NAME);
- SATP(p,x,j,T,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
- switch(ierr){
- case 2:
- strcpy(errormsg,"P < Ptp");
- break;
- case 4:
- strcpy(errormsg,"P < 0");
- break;
- }
- //sprintf(errormsg,"p=%f, h=%f",p ,statevar2);
- }else if (~strcmp(statevar,"d")){
-// SATDdll = (fp_SATDdllTYPE) GetProcAddress(RefpropdllInstance,"SATDdll");
- SATD = (SATDdll_POINTER) RefpropdllInstance->getSymbol(SATDdll_NAME);
- SATD(d,x,j,kr,T,p,dl,dv,xliq,xvap,ierr,herr,errormessagelength);
- switch(ierr){
- case 2:
- strcpy(errormsg,"D > Dmax");
- break;
- }
- }
- }
-
- switch(ierr){
- case 0:
- strcpy(errormsg,"Saturation routine successful");
- break;
- case 1:
- sprintf(errormsg,"T=%f < Tmin",T);
- break;
- case 8:
- sprintf(errormsg,"x out of range, %s",printX(x,nX));
- break;
- case 9:
- sprintf(errormsg,"T=%f and x=%s out of range",T,printX(x,nX));
- break;
- case 10:
- strcpy(errormsg,"D and x out of range");
- break;
- case 12:
- strcpy(errormsg,"P and x out of range");
- break;
- case 120:
- strcpy(errormsg,"CRITP did not converge");
- break;
- case 121:
- strcpy(errormsg,"T > Tcrit");
- break;
- case 122:
- strcpy(errormsg,"TPRHO-liquid did not converge (pure fluid)");
- break;
- case 123:
- strcpy(errormsg,"TPRHO-vapor did not converge (pure fluid)");
- break;
- case 124:
- strcpy(errormsg,"pure fluid iteration did not converge");
- break;
- case -125:
- strcpy(errormsg,"TPRHO did not converge for parent ph (mix)");
- break;
- case -126:
- strcpy(errormsg,"TPRHO did not converge for incipient (mix)");
- break;
- case -127:
- strcpy(errormsg,"composition iteration did not converge");
- break;
- case 128:
- strcpy(errormsg,"mixture iteration did not converge");
- break;
- case 140:
- strcpy(errormsg,"CRITP did not converge");
- break;
- case 141:
- strcpy(errormsg,"P > Pcrit");
- break;
- case 142:
- strcpy(errormsg,"TPRHO-liquid did not converge (pure fluid)");
- break;
- case 143:
- strcpy(errormsg,"TPRHO-vapor did not converge (pure fluid)");
- break;
- case 144:
- strcpy(errormsg,"pure fluid iteration did not converge");
- break;
- case -144:
- strcpy(errormsg,"Raoult's law (mixture initial guess) did not converge");
- break;
- case -145:
- strcpy(errormsg,"TPRHO did not converge for parent ph (mix)");
- break;
- case -146:
- strcpy(errormsg,"TPRHO did not converge for incipient (mix)");
- break;
- case -147:
- strcpy(errormsg,"composition iteration did not converge");
- break;
- case 148:
- strcpy(errormsg,"mixture iteration did not converge");
- break;
- case 160:
- strcpy(errormsg,"CRITP did not converge");
- break;
- case 161:
- strcpy(errormsg,"SATD did not converge");
- break;
- default:
- strncpy(errormsg,herr,errormessagelength);
- break;
- }
-
- /*SATHdll = (fp_SATHdllTYPE) GetProcAddress(RefpropdllInstance,"SATHdll");
- SATEdll = (fp_SATEdllTYPE) GetProcAddress(RefpropdllInstance,"SATEdll");
- SATSdll = (fp_SATSdllTYPE) GetProcAddress(RefpropdllInstance,"SATSdll");*/
-
-
- //CONVERT TO SI-UNITS
- if (ierr==0){
- WMOL(xliq,wmliq);
- wmliq /= 1000; //g/mol -> kg/mol
- WMOL(xvap,wmvap);
- wmvap /= 1000; //g/mol -> kg/mol
- //printf("%d,%s\n%s\nP,T,D,H,CP %10.4f,%10.4f,%10.4f,%10.4f,%10.4f\n",nX,hf,hfmix,p,t,d,h,wm);
- d *= wm*1000; //mol/dm� -> kg/m�
- dl *= wmliq*1000; //mol/dm� -> kg/m�
- dv *= wmvap*1000; //mol/dm� -> kg/m�
-/* e /= e/wm; //kJ/mol -> J/kg
- h /= wm; //kJ/mol -> J/kg
- s /= wm; //kJ/(mol�K) -> J/(kg�K)
-*/ p *= 1000; //kPa->Pa
- }
-
-
- //ASSIGN VALUES TO RETURN ARRAY
- props[0] = ierr;//error code
- props[1] = p;//pressure in kPa->Pa
- props[2] = T; //Temperature in K
- props[3] = wm; //molecular weight
- props[4] = d; //density
- props[5] = dl; //density of liquid phase
- props[6] = dv; //density of liquid phase
- props[7] = 0;
- props[8] = 0; //inner energy
- props[9] = 0; //specific enthalpy
- props[10] = 0;//specific entropy
- props[11] = 0;
- props[12] = 0;
- props[13] = 0; //speed of sound
- props[14] = wmliq;
- props[15] = wmvap;
- for (int ii=0;ii
+#endif
+
+#include
+#include
+#include
+#include
+#include
+All calculated values are returned in SI-Units and are mass based.
+
+Verbose mode can be switched on globally by setting the variable debugmode to true. This leads to many status messages from the modelica functions
+ as well as from the compiled library. The latter only appear are only seen in only seen when the dymola.exe is run directly in the command window.
+
+
+
Details
+ In order to take advantage of REFPROP's capability of calculating two-phase mixtures a new Medium template had to be created by merging
+ Modelica.Media.Interfaces.PartialMixtureMedium and Modelica.Media.Interfaces.PartialTwoPhaseMedium of the Modelica Standard Library 3.1.
+ Alternatively, there is a version of this package limited to single-substance fluids (REFPROPMediumPureSubstance) which uses the standard
+ template Modelica.Media.Interfaces.PartialTwoPhaseMedium.
+ All property functions contain a definition of their inverses. So, in many cases no numerical inversion by the solver is needed because
+ explicit REFPROP functions are used (meaning, numerical inversion happens in REFPROP instead).
+ Example: When explicitVars are set to \"ph\" and p and T are given, the specificEnthalpy is calculated first using the inverse function of
+ Temperature_phX --> specificEnthalpy_pTX. With p and h known all other variables are calculated by setstate_phX.
+
+
+
+
+
+
+
+ Created by
+Henning Francke
+Helmholtz Centre Potsdam
+GFZ German Research Centre for Geosciences
+Telegrafenberg, D-14473 Potsdam
+Germany
+
+francke@gfz-potsdam.de
+
+", revisions="
+
+"));
+end REFPROPMixtureTwoPhaseMedium;
diff --git a/Interfaces/package.mo b/Interfaces/package.mo
new file mode 100644
index 0000000..85f5c15
--- /dev/null
+++ b/Interfaces/package.mo
@@ -0,0 +1,4 @@
+within REFPROP2Modelica;
+package Interfaces "Interfaces for dummy implementations"
+ extends Modelica.Icons.InterfacesPackage;
+end Interfaces;
diff --git a/Interfaces/package.order b/Interfaces/package.order
new file mode 100644
index 0000000..048dc0e
--- /dev/null
+++ b/Interfaces/package.order
@@ -0,0 +1,4 @@
+PureSubstanceInputChoice
+MixtureInputChoice
+REFPROPMixtureTwoPhaseMedium
+PartialMixtureTwoPhaseMediumTwo
diff --git a/Media/Pentane.mo b/Media/Pentane.mo
new file mode 100644
index 0000000..22d21a6
--- /dev/null
+++ b/Media/Pentane.mo
@@ -0,0 +1,5 @@
+within REFPROP2Modelica.Media;
+package Pentane "Pentane from REFPROP library"
+ extends Interfaces.REFPROPMixtureTwoPhaseMedium(
+ final substanceNames={"pentane"});
+end Pentane;
diff --git a/Media/R410mix.mo b/Media/R410mix.mo
new file mode 100644
index 0000000..1d03112
--- /dev/null
+++ b/Media/R410mix.mo
@@ -0,0 +1,5 @@
+within REFPROP2Modelica.Media;
+package R410mix "R410 defined as mixture in REFPROP library"
+ extends Interfaces.REFPROPMixtureTwoPhaseMedium(
+ final substanceNames={"R32","R125"},reference_X={0.697615,0.302385});
+end R410mix;
diff --git a/Media/package.mo b/Media/package.mo
new file mode 100644
index 0000000..b0947ed
--- /dev/null
+++ b/Media/package.mo
@@ -0,0 +1,3 @@
+within REFPROP2Modelica;
+package Media
+end Media;
diff --git a/Media/package.order b/Media/package.order
new file mode 100644
index 0000000..ca12c9b
--- /dev/null
+++ b/Media/package.order
@@ -0,0 +1,2 @@
+Pentane
+R410mix
diff --git a/PartialMixtureTwoPhaseMedium/FixedPhase.mo b/PartialMixtureTwoPhaseMedium/FixedPhase.mo
deleted file mode 100644
index 3d17485..0000000
--- a/PartialMixtureTwoPhaseMedium/FixedPhase.mo
+++ /dev/null
@@ -1,3 +0,0 @@
-within MediaTwoPhaseMixture.PartialMixtureTwoPhaseMedium;
-type FixedPhase = Integer(min=0,max=2)
- "phase of the fluid: 1 for 1-phase, 2 for two-phase, 0 for not known, e.g. interactive use";
diff --git a/PartialMixtureTwoPhaseMedium/FluidLimits.mo b/PartialMixtureTwoPhaseMedium/FluidLimits.mo
deleted file mode 100644
index 5e3532b..0000000
--- a/PartialMixtureTwoPhaseMedium/FluidLimits.mo
+++ /dev/null
@@ -1,21 +0,0 @@
-within MediaTwoPhaseMixture.PartialMixtureTwoPhaseMedium;
-record FluidLimits "validity limits for fluid model"
- extends Modelica.Icons.Record;
- Temperature TMIN "minimum temperature";
- Temperature TMAX "maximum temperature";
- Density DMIN "minimum density";
- Density DMAX "maximum density";
- AbsolutePressure PMIN "minimum pressure";
- AbsolutePressure PMAX "maximum pressure";
- SpecificEnthalpy HMIN "minimum enthalpy";
- SpecificEnthalpy HMAX "maximum enthalpy";
- SpecificEntropy SMIN "minimum entropy";
- SpecificEntropy SMAX "maximum entropy";
- annotation(Documentation(
- info="
-
The minimum pressure mostly applies to the liquid state only.
- The minimum density is also arbitrary, but is reasonable for techical
- applications to limit iterations in non-linear systems. The limits in
- enthalpy and entropy are used as safeguards in inverse iterations.
- "));
-end FluidLimits;
diff --git a/PartialMixtureTwoPhaseMedium/package.mo b/PartialMixtureTwoPhaseMedium/package.mo
deleted file mode 100644
index 0b703e1..0000000
--- a/PartialMixtureTwoPhaseMedium/package.mo
+++ /dev/null
@@ -1,728 +0,0 @@
-within MediaTwoPhaseMixture;
-partial package PartialMixtureTwoPhaseMedium "Template class for two phase medium of a mixture of substances "
-
-
- extends Modelica.Media.Interfaces.PartialMixtureMedium;
-// constant Boolean smoothModel "true if the (derived) model should not generate state events";
- constant Boolean onePhase = false
- "true if the (derived) model should never be called with two-phase inputs";
-
-
- redeclare replaceable record extends FluidConstants
- "extended fluid constants"
- /* Temperature criticalTemperature "critical temperature";
- AbsolutePressure criticalPressure "critical pressure";
- MolarVolume criticalMolarVolume "critical molar Volume";
- Real acentricFactor "Pitzer acentric factor";
- Temperature triplePointTemperature "triple point temperature";
- AbsolutePressure triplePointPressure "triple point pressure";
- Temperature meltingPoint "melting point at 101325 Pa";
- Temperature normalBoilingPoint "normal boiling point (at 101325 Pa)";
- DipoleMoment dipoleMoment
- "dipole moment of molecule in Debye (1 debye = 3.33564e10-30 C.m)";
- Boolean hasIdealGasHeatCapacity=false
- "true if ideal gas heat capacity is available";
- Boolean hasCriticalData=false "true if critical data are known";
- Boolean hasDipoleMoment=false "true if a dipole moment known";
- Boolean hasFundamentalEquation=false "true if a fundamental equation";
- Boolean hasLiquidHeatCapacity=false
- "true if liquid heat capacity is available";
- Boolean hasSolidHeatCapacity=false
- "true if solid heat capacity is available";
- Boolean hasAccurateViscosityData=false
- "true if accurate data for a viscosity function is available";
- Boolean hasAccurateConductivityData=false
- "true if accurate data for thermal conductivity is available";
- Boolean hasVapourPressureCurve=false
- "true if vapour pressure data, e.g. Antoine coefficents are known";
- Boolean hasAcentricFactor=false "true if Pitzer accentric factor is known";
- SpecificEnthalpy HCRIT0=0.0
- "Critical specific enthalpy of the fundamental equation";
- SpecificEntropy SCRIT0=0.0
- "Critical specific entropy of the fundamental equation";
- SpecificEnthalpy deltah=0.0
- "Difference between specific enthalpy model (h_m) and f.eq. (h_f) (h_m - h_f)";
- SpecificEntropy deltas=0.0
- "Difference between specific enthalpy model (s_m) and f.eq. (s_f) (s_m - s_f)";
- */
- annotation(Documentation(info=""));
- end FluidConstants;
-
-constant FluidConstants[nS] fluidConstants "constant data for the fluid";
-
-
-redeclare replaceable record extends ThermodynamicState
- "Thermodynamic state of two phase medium"
- FixedPhase phase(min=0, max=2)
- "phase of the fluid: 1 for 1-phase, 2 for two-phase, 0 for not known, e.g. interactive use";
- Density d_l(start=300) "density liquid phase";
- Density d_g(start=300) "density gas phase";
- MassFraction X_l[nX] "Mass fraction of NaCl in kg/kg";
- annotation(Documentation(info=""));
-//MassFraction X[nX] "Mass fraction of NaCl in kg/kg"
-end ThermodynamicState;
-
-
- replaceable record SaturationProperties
- "Saturation properties of two phase medium"
- extends Modelica.Icons.Record;
- AbsolutePressure psat "saturation pressure";
- Temperature Tsat "saturation temperature";
- MassFraction X[nX] "Mass fractions";
- annotation(Documentation(info=""));
- end SaturationProperties;
-
-
- redeclare replaceable partial model extends BaseProperties
- "Base properties (p, d, T, h, s, u, R, MM, sat) of two phase medium"
- // Temperature T(start=300);
- Modelica.SIunits.SpecificEntropy s;
- SaturationProperties sat "Saturation properties at the medium pressure";
- annotation(Documentation(info=""));
- end BaseProperties;
-
-
- replaceable partial function setDewState
- "Return the thermodynamic state on the dew line"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation point";
- input FixedPhase phase(min = 1, max = 2) = 1 "phase: default is one phase";
- output ThermodynamicState state "complete thermodynamic state info";
- annotation(Documentation(info=""));
- end setDewState;
-
-
- replaceable partial function setBubbleState
- "Return the thermodynamic state on the bubble line"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation point";
- input FixedPhase phase(min = 1, max = 2) = 1 "phase: default is one phase";
- output ThermodynamicState state "complete thermodynamic state info";
- annotation(Documentation(info=""));
- end setBubbleState;
-
-
- redeclare replaceable partial function extends setState_dTX
- "Return thermodynamic state as function of d, T and composition X or Xi"
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- annotation(Documentation(info=""));
- end setState_dTX;
-
-
- redeclare replaceable partial function extends setState_phX
- "Return thermodynamic state as function of p, h and composition X or Xi"
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- annotation(Documentation(info=""));
- end setState_phX;
-
-
- redeclare replaceable partial function extends setState_psX
- "Return thermodynamic state as function of p, s and composition X or Xi"
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- annotation(Documentation(info=""));
- end setState_psX;
-
-
- redeclare replaceable partial function extends setState_pTX
- "Return thermodynamic state as function of p, T and composition X or Xi"
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- annotation(Documentation(info=""));
- end setState_pTX;
-
-
- replaceable function setSat_TX
- "Return saturation property record from temperature"
- extends Modelica.Icons.Function;
- input Temperature T "temperature";
- input MassFraction X[nX] "Mass fractions";
- output SaturationProperties sat "saturation property record";
- algorithm
- sat.Tsat := T;
- sat.psat := saturationPressure(T,X);
- sat.X := X;
- annotation(Documentation(info=""));
- end setSat_TX;
-
-
- replaceable function setSat_pX
- "Return saturation property record from pressure"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "pressure";
- input MassFraction X[nX] "Mass fractions";
- output SaturationProperties sat "saturation property record";
- algorithm
- sat.psat := p;
- sat.Tsat := saturationTemperature(p,X);
- sat.X := X;
- annotation(Documentation(info=""));
- end setSat_pX;
-
-
- replaceable partial function bubbleEnthalpy
- "Return bubble point specific enthalpy"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation property record";
- output Modelica.SIunits.SpecificEnthalpy hl
- "boiling curve specific enthalpy";
- annotation(Documentation(info=""));
- end bubbleEnthalpy;
-
-
- replaceable partial function dewEnthalpy
- "Return dew point specific enthalpy"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation property record";
- output Modelica.SIunits.SpecificEnthalpy hv "dew curve specific enthalpy";
- annotation(Documentation(info=""));
- end dewEnthalpy;
-
-
- replaceable partial function bubbleEntropy
- "Return bubble point specific entropy"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation property record";
- output Modelica.SIunits.SpecificEntropy sl "boiling curve specific entropy";
- annotation(Documentation(info=""));
- end bubbleEntropy;
-
-
- replaceable partial function dewEntropy "Return dew point specific entropy"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation property record";
- output Modelica.SIunits.SpecificEntropy sv "dew curve specific entropy";
- annotation(Documentation(info=""));
- end dewEntropy;
-
-
- replaceable partial function bubbleDensity "Return bubble point density"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation property record";
- output Density dl "boiling curve density";
- annotation(Documentation(info=""));
- end bubbleDensity;
-
-
- replaceable partial function dewDensity "Return dew point density"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation property record";
- output Density dv "dew curve density";
- annotation(Documentation(info=""));
- end dewDensity;
-
-
- replaceable partial function saturationPressure
- "Return saturation pressure"
- extends Modelica.Icons.Function;
- input Temperature T "temperature";
- input MassFraction X[:]={1} "fluid composition as mass fractions";
- output AbsolutePressure p "saturation pressure";
-
- annotation(Documentation(info=""));
- end saturationPressure;
-
-
- replaceable partial function saturationTemperature
- "Return saturation temperature"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "pressure";
- input MassFraction X[:]={1} "fluid composition as mass fractions";
- output Temperature T "saturation temperature";
-
- annotation(Documentation(info=""));
- end saturationTemperature;
-
-
- replaceable function saturationPressure_sat "Return saturation temperature"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation property record";
- output AbsolutePressure p "saturation pressure";
- algorithm
- p := sat.psat;
- annotation(Documentation(info=""));
- end saturationPressure_sat;
-
-
- replaceable function saturationTemperature_sat
- "Return saturation temperature"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation property record";
- output Temperature T "saturation temperature";
- algorithm
- T := sat.Tsat;
- annotation(Documentation(info=""));
- end saturationTemperature_sat;
-
-
- replaceable partial function saturationTemperature_derp
- "Return derivative of saturation temperature w.r.t. pressure"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "pressure";
- output Real dTp "derivative of saturation temperature w.r.t. pressure";
- annotation(Documentation(info=""));
- end saturationTemperature_derp;
-
-
- replaceable function saturationTemperature_derp_sat
- "Return derivative of saturation temperature w.r.t. pressure"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation property record";
- output Real dTp "derivative of saturation temperature w.r.t. pressure";
- algorithm
- dTp := saturationTemperature_derp(sat.psat);
- annotation(Documentation(info=""));
- end saturationTemperature_derp_sat;
-
-
- replaceable partial function surfaceTension
- "Return surface tension sigma in the two phase region"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation property record";
- output SurfaceTension sigma "Surface tension sigma in the two phase region";
- annotation(Documentation(info=""));
- end surfaceTension;
-
- /* redeclare replaceable partial function extends molarMass
- "Return the molar mass of the medium"
- algorithm
- MM := fluidConstants[1].molarMass;
- end molarMass;*/
-
-
- replaceable partial function dBubbleDensity_dPressure
- "Return bubble point density derivative"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation property record";
- output DerDensityByPressure ddldp "boiling curve density derivative";
- annotation(Documentation(info=""));
- end dBubbleDensity_dPressure;
-
-
- replaceable partial function dDewDensity_dPressure
- "Return dew point density derivative"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation property record";
- output DerDensityByPressure ddvdp "saturated steam density derivative";
- annotation(Documentation(info=""));
- end dDewDensity_dPressure;
-
-
- replaceable partial function dBubbleEnthalpy_dPressure
- "Return bubble point specific enthalpy derivative"
- extends Modelica.Icons.Function;
- input SaturationProperties sat "saturation property record";
- output DerEnthalpyByPressure dhldp
- "boiling curve specific enthalpy derivative";
- annotation(Documentation(info=""));
- end dBubbleEnthalpy_dPressure;
-
-
- replaceable partial function dDewEnthalpy_dPressure
- "Return dew point specific enthalpy derivative"
- extends Modelica.Icons.Function;
-
- input SaturationProperties sat "saturation property record";
- output DerEnthalpyByPressure dhvdp
- "saturated steam specific enthalpy derivative";
- annotation(Documentation(info=""));
- end dDewEnthalpy_dPressure;
-
-
- redeclare replaceable function specificEnthalpy_pTX
- "Return specific enthalpy from pressure, temperature and mass fraction"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input Temperature T "Temperature";
- input MassFraction X[nX] "Mass fractions";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output SpecificEnthalpy h "Specific enthalpy at p, T, X";
- algorithm
- h := specificEnthalpy(setState_pTX(p,T,X,phase));
- annotation(Documentation(info=""));
- end specificEnthalpy_pTX;
-
-
- redeclare replaceable function temperature_phX
- "Return temperature from p, h, and X or Xi"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEnthalpy h "Specific enthalpy";
- input MassFraction X[nX] "Mass fractions";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Temperature T "Temperature";
- algorithm
- T := temperature(setState_phX(p,h,X,phase));
- annotation(Documentation(info=""));
- end temperature_phX;
-
-
- redeclare replaceable function density_phX
- "Return density from p, h, and X or Xi"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEnthalpy h "Specific enthalpy";
- input MassFraction X[nX] "Mass fractions";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Density d "density";
- algorithm
- d := density(setState_phX(p,h,X,phase));
- annotation(Documentation(info=""));
- end density_phX;
-
-
- redeclare replaceable function temperature_psX
- "Return temperature from p, s, and X or Xi"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEntropy s "Specific entropy";
- input MassFraction X[nX] "Mass fractions";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Temperature T "Temperature";
- algorithm
- T := temperature(setState_psX(p,s,X,phase));
- annotation(Documentation(info=""));
- end temperature_psX;
-
-
- redeclare replaceable function density_psX
- "Return density from p, s, and X or Xi"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEntropy s "Specific entropy";
- input MassFraction X[nX] "Mass fractions";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Density d "Density";
- algorithm
- d := density(setState_psX(p,s,X,phase));
- annotation(Documentation(info=""));
- end density_psX;
-
-
- redeclare replaceable function specificEnthalpy_psX
- "Return specific enthalpy from p, s, and X or Xi"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEntropy s "Specific entropy";
- input MassFraction X[nX] "Mass fractions";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output SpecificEnthalpy h "specific enthalpy";
- algorithm
- h := specificEnthalpy(setState_psX(p,s,X,phase));
- annotation(Documentation(info=""));
- end specificEnthalpy_psX;
-
-
- replaceable function setState_pT "Return thermodynamic state from p and T"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input Temperature T "Temperature";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output ThermodynamicState state "thermodynamic state record";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures.");
- state := setState_pTX(p,T,fill(0,0),phase);
- annotation(Documentation(info=""));
- end setState_pT;
-
-
- replaceable function setState_ph "Return thermodynamic state from p and h"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEnthalpy h "Specific enthalpy";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output ThermodynamicState state "thermodynamic state record";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures.");
- state := setState_phX(p,h,fill(0, 0),phase);
- annotation(Documentation(info=""));
- end setState_ph;
-
-
- replaceable function setState_ps "Return thermodynamic state from p and s"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEntropy s "Specific entropy";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output ThermodynamicState state "thermodynamic state record";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures.");
- state := setState_psX(p,s,fill(0,0),phase);
- annotation(Documentation(info=""));
- end setState_ps;
-
-
- replaceable function setState_dT "Return thermodynamic state from d and T"
- extends Modelica.Icons.Function;
- input Density d "density";
- input Temperature T "Temperature";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output ThermodynamicState state "thermodynamic state record";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures.");
- state := setState_dTX(d,T,fill(0,0),phase);
- annotation(Documentation(info=""));
- end setState_dT;
-
-
- replaceable function setState_px
- "Return thermodynamic state from pressure and vapour quality"
- input AbsolutePressure p "Pressure";
- input MassFraction x "Vapour quality";
- output ThermodynamicState state "Thermodynamic state record";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures.");
- state := setState_ph(
- p,
- (1 - x)*bubbleEnthalpy(
- MediaTwoPhaseMixture.PartialMixtureTwoPhaseMedium.setSat_pX(p)) + x*
- dewEnthalpy(MediaTwoPhaseMixture.PartialMixtureTwoPhaseMedium.setSat_pX(p)),
- 2);
- annotation(Documentation(info=""));
- end setState_px;
-
-
- replaceable function setState_Tx
- "Return thermodynamic state from temperature and vapour quality"
- input Temperature T "Temperature";
- input MassFraction x "Vapour quality";
- output ThermodynamicState state "thermodynamic state record";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures.");
- state := setState_ph(
- saturationPressure_sat(
- MediaTwoPhaseMixture.PartialMixtureTwoPhaseMedium.setSat_TX(T)),
- (1 - x)*bubbleEnthalpy(
- MediaTwoPhaseMixture.PartialMixtureTwoPhaseMedium.setSat_TX(T)) + x*
- dewEnthalpy(MediaTwoPhaseMixture.PartialMixtureTwoPhaseMedium.setSat_TX(T)),
- 2);
- annotation(Documentation(info=""));
- end setState_Tx;
-
-
- replaceable function vapourQuality "Return vapour quality"
- input ThermodynamicState state "Thermodynamic state record";
- output MassFraction x "Vapour quality";
-protected
- constant SpecificEnthalpy eps = 1e-8;
- algorithm
- x := min(max((specificEnthalpy(state) - bubbleEnthalpy(setSat_pX(pressure(state),state.X)))
- /(dewEnthalpy(setSat_pX(pressure(state),state.X)) - bubbleEnthalpy(setSat_pX(pressure(state),state.X))
- + eps), 0), 1);
- annotation(Documentation(info=""));
- end vapourQuality;
-
-
- replaceable function density_ph "Return density from p and h"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEnthalpy h "Specific enthalpy";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Density d "Density";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures. Use density_phX() instead!");
- d := density_phX(p, h, fill(0,0), phase);
- annotation(Documentation(info=""));
- end density_ph;
-
-
- replaceable function temperature_ph "Return temperature from p and h"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEnthalpy h "Specific enthalpy";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Temperature T "Temperature";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures. Use temperature_phX() instead!");
- T := temperature_phX(p, h, fill(0,0),phase);
- annotation(Documentation(info=""));
- end temperature_ph;
-
-
- replaceable function pressure_dT "Return pressure from d and T"
- extends Modelica.Icons.Function;
- input Density d "Density";
- input Temperature T "Temperature";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output AbsolutePressure p "Pressure";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures. Use pressure_dTX() instead!");
- p := pressure(setState_dTX(d, T, fill(0,0),phase));
- annotation(Documentation(info=""));
- end pressure_dT;
-
-
- replaceable function specificEnthalpy_dT
- "Return specific enthalpy from d and T"
- extends Modelica.Icons.Function;
- input Density d "Density";
- input Temperature T "Temperature";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output SpecificEnthalpy h "specific enthalpy";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures. Use specificEnthalpy_dX() instead!");
- h := specificEnthalpy(setState_dTX(d, T, fill(0,0),phase));
- annotation(Documentation(info=""));
- end specificEnthalpy_dT;
-
-
- replaceable function specificEnthalpy_ps
- "Return specific enthalpy from p and s"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEntropy s "Specific entropy";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output SpecificEnthalpy h "specific enthalpy";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures. Use specificEnthalpy_psX() instead!");
- h := specificEnthalpy_psX(p,s,reference_X);
- annotation(Documentation(info=""));
- end specificEnthalpy_ps;
-
-
- replaceable function temperature_ps "Return temperature from p and s"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEntropy s "Specific entropy";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Temperature T "Temperature";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures. Use temperature_psX() instead!");
- T := temperature_psX(p,s,fill(0,0),phase);
- annotation(Documentation(info=""));
- end temperature_ps;
-
-
- replaceable function density_ps "Return density from p and s"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEntropy s "Specific entropy";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Density d "Density";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures. Use density_psX() instead!");
- d := density_psX(p, s, fill(0,0), phase);
- annotation(Documentation(info=""));
- end density_ps;
-
-
- replaceable function specificEnthalpy_pT
- "Return specific enthalpy from p and T"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input Temperature T "Temperature";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output SpecificEnthalpy h "specific enthalpy";
- algorithm
- assert(nX==1,"This function is not allowed for mixtures. Use specificEnthalpy_pTx() instead!");
- h := specificEnthalpy_pTX(p, T, fill(0,0),phase);
- annotation(Documentation(info=""));
- end specificEnthalpy_pT;
-
-
- replaceable function density_pT "Return density from p and T"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input Temperature T "Temperature";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Density d "Density";
- algorithm
- d := density(setState_pTX(p, T, fill(0,0),phase));
- annotation(Documentation(info=""));
- end density_pT;
-
-
-replaceable function specificEnthalpy_dTX
- "Return specific enthalpy from d, T, and X or Xi"
- extends Modelica.Icons.Function;
- input Density d "Pressure";
- input Temperature T "Specific entropy";
- input MassFraction X[nX] "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output SpecificEnthalpy h "specific enthalpy";
-algorithm
- h := specificEnthalpy(setState_dTX(d,T,X,phase));
-
-annotation(Documentation(info=""));
-end specificEnthalpy_dTX;
-
-
-redeclare replaceable function pressure
- input ThermodynamicState state "Thermodynamic state record";
- output Modelica.SIunits.Pressure p;
-algorithm
- p:=state.p;
-end pressure;
-
-
-redeclare replaceable function specificEnthalpy
- input ThermodynamicState state "Thermodynamic state record";
- output Modelica.SIunits.SpecificEnthalpy h;
-algorithm
- h:=state.h;
-end specificEnthalpy;
-
-
-replaceable function density_liq
- input ThermodynamicState state "Thermodynamic state record";
- output Modelica.SIunits.Density d_l;
-algorithm
- d_l:=state.d_l;
-end density_liq;
-
-
- replaceable function dynamicViscosity_liq "Viscosity of liquid phase"
- // extends dynamicViscosity; Warum funzt das nicht? Er sagt "multiple algorithms"
- extends Modelica.Icons.Function;
- input ThermodynamicState state "thermodynamic state record";
- output DynamicViscosity eta "Dynamic viscosity";
- /*protected
- Modelica.SIunits.Pressure p_sat = max(state.p,saturationPressure(state.T, {1}));
- ThermodynamicState state_l=state "liquid state";
-algorithm
- state_l.d:=state.d_l;
- state_l.p:=p_sat;
- eta := dynamicViscosity(state_l);
-// eta := Modelica.Media.Water.IF97_Utilities.dynamicViscosity(state.d_l, state.T, p_sat, 1);
-// Modelica.Utilities.Streams.print(String(p_sat));
-*/
- end dynamicViscosity_liq;
-
-
- replaceable function dynamicViscosity_gas "Viscosity of liquid phase"
- // extends dynamicViscosity; Warum funzt das nicht? Er sagt "multiple algorithms"
- extends Modelica.Icons.Function;
- input ThermodynamicState state "thermodynamic state record";
- output DynamicViscosity eta "Dynamic viscosity";
- /*protected
- Modelica.SIunits.Pressure p_sat = min(state.p,saturationPressure(state.T, {1}));
- ThermodynamicState state_g=state "gaseous state";
-algorithm
- state_g.d:=state.d_g;
- state_g.p:=p_sat;
- eta := dynamicViscosity(state_g);
- */
- // eta := Modelica.Media.Water.IF97_Utilities.dynamicViscosity(state.d_g, state.T, p_sat, 1);
- end dynamicViscosity_gas;
-
-
- annotation (Documentation(info="
- PartialMixtureTwoPhaseMedium
- This is a template for two phase medium of a mixture of substances and is used by REFPROPMedium.
- It has been created by merging PartialMixtureMedium and PartialTwoPhaseMedium from Modelica.Media.Interfaces.
-
- Created by
-Henning Francke
-Helmholtz Centre Potsdam
-GFZ German Research Centre for Geosciences
-Telegrafenberg, D-14473 Potsdam
-Germany
-
-francke@gfz-potsdam.de
-
-"), uses(Modelica(version="3.1")));
-end PartialMixtureTwoPhaseMedium;
diff --git a/PartialMixtureTwoPhaseMedium/package.order b/PartialMixtureTwoPhaseMedium/package.order
deleted file mode 100644
index 6ccc947..0000000
--- a/PartialMixtureTwoPhaseMedium/package.order
+++ /dev/null
@@ -1,61 +0,0 @@
-onePhase
-FluidLimits
-FluidConstants
-fluidConstants
-ThermodynamicState
-SaturationProperties
-FixedPhase
-BaseProperties
-setDewState
-setBubbleState
-setState_dTX
-setState_phX
-setState_psX
-setState_pTX
-setSat_TX
-setSat_pX
-bubbleEnthalpy
-dewEnthalpy
-bubbleEntropy
-dewEntropy
-bubbleDensity
-dewDensity
-saturationPressure
-saturationTemperature
-saturationPressure_sat
-saturationTemperature_sat
-saturationTemperature_derp
-saturationTemperature_derp_sat
-surfaceTension
-dBubbleDensity_dPressure
-dDewDensity_dPressure
-dBubbleEnthalpy_dPressure
-dDewEnthalpy_dPressure
-specificEnthalpy_pTX
-temperature_phX
-density_phX
-temperature_psX
-density_psX
-specificEnthalpy_psX
-setState_pT
-setState_ph
-setState_ps
-setState_dT
-setState_px
-setState_Tx
-vapourQuality
-density_ph
-temperature_ph
-pressure_dT
-specificEnthalpy_dT
-specificEnthalpy_ps
-temperature_ps
-density_ps
-specificEnthalpy_pT
-density_pT
-specificEnthalpy_dTX
-pressure
-specificEnthalpy
-density_liq
-dynamicViscosity_liq
-dynamicViscosity_gas
diff --git a/REFPROPMedium/StrJoin.mo b/REFPROPMedium/StrJoin.mo
deleted file mode 100644
index f44713b..0000000
--- a/REFPROPMedium/StrJoin.mo
+++ /dev/null
@@ -1,11 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function StrJoin "Converts an Array of Strings into a string separated by |"
- input String[:] s_in;
- input String delimiter;
- output String s_out;
-algorithm
- s_out :=s_in[1];
- for i in 2:size(s_in,1) loop
- s_out :=s_out + delimiter + s_in[i];
- end for;
-end StrJoin;
diff --git a/REFPROPMedium/density_ThX.mo b/REFPROPMedium/density_ThX.mo
deleted file mode 100644
index ccfa89b..0000000
--- a/REFPROPMedium/density_ThX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function density_ThX "calls REFPROP-Wrapper, returns density"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Modelica.SIunits.SpecificEnthalpy h;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_ThX("+String(T)+","+String(h)+",X)");
- end if;
- d :=getProp_REFPROP_check("d", "Th",T,h,X,phase);
- annotation(LateInline=true,inverse(h=specificEnthalpy_dTX(d,T,X,phase),
- T=temperature_hdX(h,d,X,phase)));
-end density_ThX;
diff --git a/REFPROPMedium/density_TsX.mo b/REFPROPMedium/density_TsX.mo
deleted file mode 100644
index 5b9267e..0000000
--- a/REFPROPMedium/density_TsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function density_TsX "calls REFPROP-Wrapper, returns density"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_TsX("+String(T)+","+String(s)+",X)");
- end if;
- d :=getProp_REFPROP_check("d", "Ts",T,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_dTX(d,T,X,phase),
- T=temperature_dsX(d,s,X,phase)));
-end density_TsX;
diff --git a/REFPROPMedium/density_hsX.mo b/REFPROPMedium/density_hsX.mo
deleted file mode 100644
index 54ac0a2..0000000
--- a/REFPROPMedium/density_hsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function density_hsX "calls REFPROP-Wrapper, returns density"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.SpecificEnthalpy h;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_hsX("+String(h)+","+String(s)+",X)");
- end if;
- d :=getProp_REFPROP_check("d", "hs",h,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_hdX(h,d,X,phase),
- h=specificEnthalpy_dsX(d,s,X,phase)));
-end density_hsX;
diff --git a/REFPROPMedium/density_pqX.mo b/REFPROPMedium/density_pqX.mo
deleted file mode 100644
index 2d4338d..0000000
--- a/REFPROPMedium/density_pqX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function density_pqX "calls REFPROP-Wrapper, returns specific density"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Real q;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_pqX("+String(p)+","+String(q)+",X)");
- end if;
- d :=getProp_REFPROP_check("d", "pq",p,q,X,phase);
-/* annotation(LateInline=true,inverse(p=pressure_dqX(d,q,X,phase),
- q=quality_pdX(p,d,X,phase)));*/
-end density_pqX;
diff --git a/REFPROPMedium/getProp_REFPROP.mo b/REFPROPMedium/getProp_REFPROP.mo
deleted file mode 100644
index ade4a0a..0000000
--- a/REFPROPMedium/getProp_REFPROP.mo
+++ /dev/null
@@ -1,19 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function getProp_REFPROP
- "calls C function with property identifier & returns single property"
- input String what2calc;
- input String statevars;
- input String fluidnames;
- input Real[:] props;
- input Real statevar1;
- input Real statevar2;
- input MassFraction X[:] "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- input String errormsg;
-// input Integer debug=1;
- output Real val;
-
- external "C" val = props_REFPROP(what2calc, statevars, fluidnames, props, statevar1, statevar2, X, phase, REFPROP_PATH, errormsg, debugmode);
-
-annotation (Include="#include ", Library="refprop_wrapper");
-end getProp_REFPROP;
diff --git a/REFPROPMedium/getProp_REFPROP_check.mo b/REFPROPMedium/getProp_REFPROP_check.mo
deleted file mode 100644
index 35a2e02..0000000
--- a/REFPROPMedium/getProp_REFPROP_check.mo
+++ /dev/null
@@ -1,23 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function getProp_REFPROP_check
- "wrapper for getProp_REFPROP returning 1 property value with error check"
- extends partialREFPROP;
- input String what2calc;
- input String statevars;
-// input String fluidnames;
- input Real statevar1;
- input Real statevar2;
- input MassFraction X[:] "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Real val;
-algorithm
- assert(size(X,1)>0,"The mass fraction vector must have at least 1 element.");
-
-// Modelica.Utilities.Streams.print("Calc "+what2calc);
- val :=getProp_REFPROP(what2calc,statevars,fluidnames,props,statevar1,statevar2,X,phase,errormsg)
- "just passing through";
-
-// Modelica.Utilities.Streams.print("ERR("+String(props[1])+"):"+errormsg);
- assert(props[1]==0,"Errorcode "+String(props[1])+" in REFPROP wrapper function:\n"+errormsg +"\n");
-
-end getProp_REFPROP_check;
diff --git a/REFPROPMedium/getSatProp_REFPROP.mo b/REFPROPMedium/getSatProp_REFPROP.mo
deleted file mode 100644
index 7e59f44..0000000
--- a/REFPROPMedium/getSatProp_REFPROP.mo
+++ /dev/null
@@ -1,17 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function getSatProp_REFPROP
- "calls C function with property identifier & returns single property"
- input String what2calc;
- input String statevar;
- input String fluidnames;
- input Real[:] props;
- input Real statevarval;
- input MassFraction X[:] "mass fraction m_NaCl/m_Sol";
- input String errormsg;
- output Real val;
-// input Integer debugmode=1;
-
- external "C" val = satprops_REFPROP(what2calc, statevar, fluidnames, props, statevarval, X, REFPROP_PATH, errormsg, debugmode);
-
- annotation (Include="#include ", Library="refprop_wrapper");
-end getSatProp_REFPROP;
diff --git a/REFPROPMedium/getSatProp_REFPROP_check.mo b/REFPROPMedium/getSatProp_REFPROP_check.mo
deleted file mode 100644
index d3f6441..0000000
--- a/REFPROPMedium/getSatProp_REFPROP_check.mo
+++ /dev/null
@@ -1,21 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function getSatProp_REFPROP_check
- "wrapper for getSatProp_REFPROP returning 1 property value with error check"
- extends partialREFPROP;
- input String what2calc;
- input String statevar;
-// input String fluidnames;
- input Real statevarval;
- input MassFraction X[:] "mass fraction m_NaCl/m_Sol";
- output Real val;
-algorithm
- assert(size(X,1)>0,"The mass fraction vector must have at least 1 element.");
- val :=getSatProp_REFPROP(what2calc,statevar,fluidnames,props,statevarval,X,errormsg)
- "just passing through";
-//Error string decoding in wrapper-c-function
- assert(props[1]==0 or props[1]==141,"Errorcode "+String(props[1])+" in REFPROP wrapper function:\n"+errormsg +"\n");
- if props[1]==141 then
- Modelica.Utilities.Streams.print("Saturation properties cannot be calculated, because P > p_crit!...");
- val :=-999;
- end if;
-end getSatProp_REFPROP_check;
diff --git a/REFPROPMedium/package.mo b/REFPROPMedium/package.mo
deleted file mode 100644
index 6c88db5..0000000
--- a/REFPROPMedium/package.mo
+++ /dev/null
@@ -1,597 +0,0 @@
-within MediaTwoPhaseMixture;
-package REFPROPMedium "Two Phase Mixture Medium whose property functions are supplied by REFPROPR (via wrapper for refprop.dll)"
-constant Boolean debugmode = false
- "print messages in functions and in refpropwrapper.lib (to see the latter, start dymosim.exe in command window)";
-
-constant String explicitVars = "ph"
- "set of variables the model is explicit for, may be set to all combinations of p,h,T,d,s,d, REFPROP works internally with dT";
-final constant String fluidnames= StrJoin(substanceNames,"|");
-
-
-extends PartialMixtureTwoPhaseMedium(
- mediumName="REFPROP Medium",
- final reducedX = true,
- final singleState=false,
- reference_X=cat(1,fill(0,nX-1),{1}),
- fluidConstants = rpConstants);
-//"mediumName is being checked for consistency at flowports"
-
- constant FluidConstants[nS] rpConstants(
- each chemicalFormula = "REFPROP Medium",
- each structureFormula="REFPROP Medium",
- each casRegistryNumber="007",
- each iupacName="REFPROP Medium",
- each molarMass=0.1,
- each criticalTemperature = 600,
- each criticalPressure = 300e5,
- each criticalMolarVolume = 1,
- each acentricFactor = 1,
- each triplePointTemperature = 273.15,
- each triplePointPressure = 1e5,
- each meltingPoint = 1,
- each normalBoilingPoint = 1,
- each dipoleMoment = 1);
-
-
-redeclare record extends ThermodynamicState
- "a selection of variables that uniquely defines the thermodynamic state"
-/* AbsolutePressure p "Absolute pressure of medium";
- Temperature T "Temperature of medium";
- MassFraction X[nX] "Composition (Mass fractions in kg/kg)";*/
- MolarMass MM "Molar Mass of the whole mixture";
- Density d(start=300) "density";
- Density d_l(start=300) "density liquid phase";
- Density d_g(start=300) "density gas phase";
- Real x "vapor quality on a mass basis [mass vapor/total mass]";
- SpecificEnergy u "Specific energy";
- SpecificEnthalpy h "Specific enthalpy";
- SpecificEntropy s "Specific entropy";
- Modelica.SIunits.SpecificHeatCapacityAtConstantPressure cp;
- Modelica.SIunits.SpecificHeatCapacityAtConstantVolume cv;
- VelocityOfSound c;
- MolarMass MM_l "Molar Mass of liquid phase";
- MolarMass MM_g "Molar Mass of gas phase";
- MassFraction X_l[nX] "Composition of liquid phase (Mass fractions in kg/kg)";
- MassFraction X_g[nX] "Composition of gas phase (Mass fractions in kg/kg)";
-// Real GVF "Gas Void Fraction";
-end ThermodynamicState;
-
-
- redeclare model extends BaseProperties "Base properties of medium"
-
- equation
- u = h - p/d
- "state.u - calculated anyway by REFPROP, but this way the expression can be derived symbolically";
- MM = state.MM;
- R = 1 "Modelica.Constants.R/MM";
-
- //ph-explicit
- if explicitVars=="ph" or explicitVars=="hp" then
- state = setState_phX(p,h,X,0) " ,fluidnames)";
- T = temperature_phX(p,h,X)
- "double calculation, but necessary if T is given";
- // T = state.T "can be used instead";
-
- s = specificEntropy_phX(p,h,X)
- "double calculation, but necessary if s is given";
- // s = state.s "can be used instead";
-
- d = density_phX(p,h,X) "double calculation, but necessary if d is given";
- //d = state.d "can be used instead";
- elseif explicitVars=="pT" or explicitVars=="Tp" then
- //pT-explicit
- state = setState_pTX(p,T,X,0) ",fluidnames)";
- h = specificEnthalpy_pTX(p,T,X)
- "double calculation, but necessary if s is given";
- //h = state.h "can be used instead";
-
- s = specificEntropy_pTX(p,T,X)
- "state.s double calculation, but necessary if s is given";
- // s = state.s "can be used instead";
-
- d = density_pTX(p,T,X)
- "state.d double calculation, but necessary if d is given";
- //d = state.d "can be used instead";
- elseif explicitVars=="dT" or explicitVars=="Td" then
- //Td-explicit
- state = setState_dTX(d,T,X,0) ",fluidnames)";
- h = specificEnthalpy_dTX(d,T,X)
- "double calculation, but necessary if s is given";
- //h = state.h "can be used instead";
-
- s = specificEntropy_dTX(d,T,X)
- "state.s double calculation, but necessary if s is given";
- // s = state.s "can be used instead";
- p = pressure_dTX(d,T,X)
- "state.d double calculation, but necessary if d is given";
- // p = state.p "can be used instead";
- elseif explicitVars=="ps" or explicitVars=="ps" then
- state = setState_psX(p,s,X,0) ",fluidnames)";
- T = temperature_psX(p,s,X);
- h = specificEnthalpy_psX(p,s,X);
- d = density_psX(p,s,X);
- elseif explicitVars=="pd" or explicitVars=="pd" then
- state = setState_pdX(p,d,X,0) ",fluidnames)";
- T = temperature_pdX(p,d,X);
- h = specificEnthalpy_pdX(p,d,X);
- s = specificEntropy_pdX(p,d,X);
- elseif explicitVars=="hT" or explicitVars=="Th" then
- state = setState_ThX(T,h,X,0) ",fluidnames)";
- p = pressure_ThX(T,h,X);
- s = specificEntropy_ThX(T,h,X);
- d = density_ThX(T,h,X);
- elseif explicitVars=="sT" or explicitVars=="Ts" then
- state = setState_TsX(T,s,X,0) ",fluidnames)";
- p = pressure_TsX(T,s,X);
- h = specificEnthalpy_TsX(T,s,X);
- d = density_TsX(T,s,X);
- elseif explicitVars=="hd" or explicitVars=="hd" then
- state = setState_hdX(h,d,X,0) ",fluidnames)";
- p = pressure_hdX(h,d,X);
- s = specificEntropy_hdX(h,d,X);
- T = temperature_hdX(h,d,X);
- elseif explicitVars=="hs" or explicitVars=="sh" then
- state = setState_hsX(h,s,X,0) ",fluidnames)";
- p = pressure_hsX(h,s,X);
- T = temperature_hsX(h,s,X);
- d = density_hsX(h,s,X);
- elseif explicitVars=="sd" or explicitVars=="ds" then
- state = setState_dsX(d,s,X,0) ",fluidnames)";
- p = pressure_dsX(d,s,X);
- h = specificEnthalpy_dsX(d,s,X);
- T = temperature_dsX(d,s,X);
- end if;
-
- sat.psat = p;
- sat.Tsat = saturationTemperature(p,X);
- sat.X = X;
- annotation (Documentation(info="
-
- The baseproperties model is explicit for one set of 2 variables, which can be chosen to be ph, pT, ps, pd, Th, dT, Ts, hd, hs, ds (set explicitVars when calling this package or in package).
- That means, that if only one of these variables is explicitly given, the other one is calculated by inverting its property function.
- Then alle state variables are calculated using the corresponding setstate_XX function.
- In order to avoid numerical inversion by the solver, 3 state variables are set explicitly using their respective property function, which has its inverses defined.
- Example: So for p and h as explicit variables a state given by p and T is calculated by first calculating h with specificEnthalpy_pTX (inverse function of temperature_phX),
- then calculating the other variables using setState_phX. s and d, however, are then calculated, although they are already known in the state variable.
- Knowing this, the baseproperty model can be adapted to your calculation needs to decrease computation time:
-
- - Choose the explicitVars to the combination occurring most often in your model. (The combination dT might be favorable, because it is used by REFPROP's internal algorithm.)
- - if you are sure, that it won't be needed, in BaseProperties replace explicit calculation of T/s/d/h with definition as state (commented line)
-
- "));
- end BaseProperties;
-
-
-redeclare function extends saturationPressure
-// extends Modelica.Icons.Function;
-algorithm
-// p := getSatProp_REFPROP_check("p", "T", fluidnames,T,X);
- p := getSatProp_REFPROP_check("p", "T", T,X);
-end saturationPressure;
-
-
-redeclare function extends saturationTemperature
-// extends Modelica.Icons.Function;
-algorithm
-// T := getSatProp_REFPROP_check("T", "p", fluidnames,p,X);
- T := getSatProp_REFPROP_check("T", "p", p,X);
-end saturationTemperature;
-
-
- redeclare function extends specificEntropy
- "Return specific entropy - seems useless, but good for compatibility between PartialMedium and PartialMixedMediumTwoPhase"
- algorithm
- s := state.s;
- end specificEntropy;
-
-
- redeclare replaceable function extends density
- "returns density from state - seems useless, but good for compatibility between PartialMedium and PartialMixedMediumTwoPhase"
- algorithm
- d := state.d;
- end density;
-
-
-redeclare function extends dewEnthalpy "dew curve specific enthalpy"
- extends Modelica.Icons.Function;
-algorithm
- hv := getProp_REFPROP_check("h", "pq", sat.psat,1,sat.X,1);
-end dewEnthalpy;
-
-
- redeclare function extends dewEntropy "dew curve specific entropy of water"
- extends Modelica.Icons.Function;
- algorithm
- sv := getProp_REFPROP_check("s", "pq", sat.psat,1,sat.X,1);
- end dewEntropy;
-
-
- redeclare function extends dewDensity "dew curve specific density of water"
- extends Modelica.Icons.Function;
- algorithm
- dv := getProp_REFPROP_check("d", "pq", sat.psat,1,sat.X,1);
- end dewDensity;
-
-
- redeclare function extends bubbleEnthalpy
- "boiling curve specific enthalpy of water"
- extends Modelica.Icons.Function;
- algorithm
- hl := getProp_REFPROP_check("h", "pq", sat.psat,0,sat.X,1);
- end bubbleEnthalpy;
-
-
- redeclare function extends bubbleEntropy
- "boiling curve specific entropy of water"
- extends Modelica.Icons.Function;
- algorithm
- sl := getProp_REFPROP_check("s", "pq", sat.psat,0,sat.X,1);
- end bubbleEntropy;
-
-
- redeclare function extends bubbleDensity
- "boiling curve specific density of water"
- extends Modelica.Icons.Function;
- algorithm
- dl := getProp_REFPROP_check("d", "pq", sat.psat,0,sat.X,1);
- end bubbleDensity;
-
-
-redeclare replaceable partial function extends molarMass
- "Return the molar mass of the medium"
- extends Modelica.Icons.Function;
-algorithm
- MM:=state.MM;
-end molarMass;
-
-
-redeclare replaceable partial function extends setState_phX
- "Calculates medium properties from p,h,X"
-// input String fluidnames;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_phX("+String(p)+","+String(h)+",X)...");
- end if;
- state := setState("ph",p,h,X,phase) ",fluidnames)";
-end setState_phX;
-
-
- redeclare function density_phX "calls REFPROP-Wrapper, returns density"
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.SpecificEnthalpy h;
- input MassFraction X[:]=reference_X
- "composition defined by mass fractions";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_phX("+String(p)+","+String(h)+",X)");
- end if;
- // p="+String(p)+",h="+String(h)+", X={"+String(X[1])+","+String(X[2])+"}");
- d :=getProp_REFPROP_check("d", "ph",p,h,X,phase);
- annotation(LateInline=true,inverse(h=specificEnthalpy_pdX(p,d,X,phase),
- p=pressure_hdX(h,d,X,phase)));
- end density_phX;
-
-
- redeclare function temperature_phX
- "calls REFPROP-Wrapper, returns temperature"
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.SpecificEnthalpy h;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_phX("+String(p)+","+String(h)+",X)");
- end if;
- T :=getProp_REFPROP_check("T", "ph",p,h,X,phase);
- annotation(LateInline=true,inverse(h=specificEnthalpy_pTX(p,T,X,phase),
- p=pressure_ThX(T,h,X,phase)));
- end temperature_phX;
-
-
-redeclare replaceable partial function extends setState_pTX
-// input String fluidnames;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_pTX("+String(p)+","+String(T)+",X)...");
- end if;
- state := setState("pT",p,T,X,phase) ",fluidnames)";
-end setState_pTX;
-
-
- redeclare function density_pTX "calls REFPROP-Wrapper, returns density"
- extends Modelica.Icons.Function;
- // input String fluidnames;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.Temperature T;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_pTX("+String(p)+","+String(T)+",X)...");
- end if;
- d :=getProp_REFPROP_check("d", "pT",p,T,X,phase);
- annotation(LateInline=true,inverse(T=temperature_pdX(p,d,X,phase),
- p=pressure_dTX(d,T,X,phase)));
- end density_pTX;
-
-
- redeclare function specificEnthalpy_pTX
- "calls REFPROP-Wrapper, returns specific enthalpy"
- //does not extend existing function from PartialMedium because there the algorithm is already defined
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.Temp_K T;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- // input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
- /*protected
- Real[14+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",10),"");*/
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_pTX("+String(p)+","+String(T)+",X)...");
- end if;
- // p="+String(p)+",T="+String(T)+", X={"+String(X[1])+","+String(X[2])+"}");
- h :=getProp_REFPROP_check("h", "pT",p,T,X,phase);
- annotation(LateInline=true,inverse(T=temperature_phX(p,h,X,phase),
- p=pressure_ThX(T,h,X,phase)));
- end specificEnthalpy_pTX;
-
-
- redeclare function specificEntropy_pTX
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.Temp_K T;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_pTX("+String(p)+","+String(T)+",X)");
- end if;
- s:=getProp_REFPROP_check("s", "pT",p,T,X,phase);
- annotation(LateInline=true,inverse(T=temperature_psX(p,s,X,phase),
- p=pressure_TsX(T,s,X,phase)));
- end specificEntropy_pTX;
-
-
-redeclare replaceable partial function extends setState_psX
- "Calculates medium properties from p,s,X"
-// input String fluidnames;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_psX("+String(p)+","+String(s)+",X)...");
- end if;
- state := setState("ps",p,s,X,phase) ",fluidnames)";
-end setState_psX;
-
-
- redeclare function temperature_psX
- "calls REFPROP-Wrapper, returns temperature"
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_psX("+String(p)+","+String(s)+",X)...");
- end if;
- T :=getProp_REFPROP_check("T", "ps",p,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_pTX(p,T,X,phase),
- p=pressure_TsX(T,s,X,phase)));
- end temperature_psX;
-
-
- redeclare function specificEnthalpy_psX
- "calls REFPROP-Wrapper, returns specific enthalpy"
- //does not extend existing function from PartialMedium because there the algorithm is already defined
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- // input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
- /*protected
- Real[14+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",10),"");*/
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_psX("+String(p)+","+String(s)+",X)...");
- end if;
- h :=getProp_REFPROP_check("h", "ps",p,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_phX(p,h,X,phase),
- p=pressure_hsX(h,s,X,phase)));
- end specificEnthalpy_psX;
-
-
- redeclare function density_psX "calls REFPROP-Wrapper, returns density"
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_psX("+String(p)+","+String(s)+",X)");
- end if;
- d :=getProp_REFPROP_check("d", "ps",p,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_pdX(p,d,X,phase),
- p=pressure_dsX(d,s,X,phase)));
- end density_psX;
-
-
-redeclare replaceable partial function extends setState_dTX
-// input String fluidnames;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_dTX("+String(d)+","+String(T)+",X)...");
- end if;
- state := setState("dT",d,T,X,phase) ",fluidnames)";
-end setState_dTX;
-
-
- redeclare function specificEnthalpy_dTX
- "calls REFPROP-Wrapper, returns specific enthalpy"
- //does not extend existing function from PartialMedium because there the algorithm is already defined
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Density d;
- input Modelica.SIunits.Temperature T;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- // input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_dTX("+String(d)+","+String(T)+",X)");
- end if;
- // h :=getProp_REFPROP_check("h", "dT", fluidnames,d,T,X,phase);
- h :=getProp_REFPROP_check("h", "dT", d,T,X,phase);
- annotation(LateInline=true,inverse(d=density_ThX(T,h,X,phase),
- T=temperature_hdX(h,d,X,phase)));
- end specificEnthalpy_dTX;
-
-
-redeclare function extends dynamicViscosity
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running dynamicViscosity");
- end if;
- eta := getProp_REFPROP_check("v", "Td",state.T,state.d,state.X,state.phase);
-end dynamicViscosity;
-
-
-redeclare function extends thermalConductivity
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running thermalConductivity");
- end if;
- lambda := getProp_REFPROP_check("l", "Td",state.T,state.d,state.X,state.phase);
-end thermalConductivity;
-
-
- redeclare function vapourQuality "Return vapour quality"
- input ThermodynamicState state "Thermodynamic state record";
- output MassFraction x "Vapour quality";
- algorithm
- x := state.x;
- annotation(Documentation(info=""));
- end vapourQuality;
-
-
- redeclare function extends specificHeatCapacityCp
-
- algorithm
- cp:=state.cp;
- end specificHeatCapacityCp;
-
-
- redeclare function extends specificHeatCapacityCv
-
- algorithm
- cv:=state.cv;
- end specificHeatCapacityCv;
-
-
- annotation (Documentation(info="
-
-REFPROPMedium is a package that delivers REFPROP data to a model based on and largely compatible to the Modelica.Media library.
-It can be used to model two-phase mixtures of all fluids whose data is delivered with REFPROP. It has been developed and tested only in Dymola up to 2012 FD01.
-
-
-All files in this library, including the C source files are released under the Modelica License 2.
-
-Installation
-The installation basically consists in copying 2 files and changing one line in this package:
-
-This package needs the package PartialMixtureMediumTwoPhase which should be included in the parent package.
-
-
-Usage
-As it is based on Modelica.Media, the usage is little different from the usage of the two-phase water model:
-Create an instance of REFPROPMedium and specify the mixture by passing the names of the medium components (medium names are the names of the .fld files in the
-%REFPROP%\\fluids directory):
-
- package Medium = REFPROPMedium (final substanceNames={\"nitrogen\",\"argon\"});
-
-Create an Instance of REFPROPMedium.Baseproperties:
-
- Medium.BaseProperties props;
-
-You can then use the BaseProperties model to define the actual medium composition (via Xi or X), to define the thermodynamic state and calculate the corresponding properties.
-
- props.p = 1e5;
- props.T = 300;
- props.Xi = {.8};
- d = props.d;
- h = props.h;
-
-Any combination of the pressure, temperature, specific enthalpy, specific entropy and density (p,T,h,s,d) can be used to define a
-thermodynamic state. Explicit functions for all combinations exist in REFPROP and likewise in the REFPROPMedium package.
-The calculation of all variables of a thermodynamic state, however, is by default done by setState_phX, so p and h have to be
-calculated from the given combination of two variables first. Actually, by doing this, REFPROP already calculates all variables
-of the thermodynamic state, but they cannot be used directly. This is a limitation of DYMOLA, as it is not able to invert a function
-returning an array.
-You can change the set of variables the property model is explicit for by setting the string variable explicitVars e.g. to \"pT\" or \"dT\":
-
-package Medium = REFPROPMedium(final substanceNames={\"water\"}, final explicitVars = \"pT\");
-
-
-All calculated values are returned in SI-Units and are mass based.
-
-Verbose mode can be switched on globally by setting the variable debugmode to true. This leads to many status messages from the modelica functions
- as well as from the compiled library. The latter only appear are only seen in only seen when the dymola.exe is run directly in the command window.
-
-
-
Details
- In order to take advantage of REFPROP's capability of calculating two-phase mixtures a new Medium template had to be created by merging
- Modelica.Media.Interfaces.PartialMixtureMedium and Modelica.Media.Interfaces.PartialTwoPhaseMedium of the Modelica Standard Library 3.1.
- Alternatively, there is a version of this package limited to single-substance fluids (REFPROPMediumPureSubstance) which uses the standard
- template Modelica.Media.Interfaces.PartialTwoPhaseMedium.
- All property functions contain a definition of their inverses. So, in many cases no numerical inversion by the solver is needed because
- explicit REFPROP functions are used (meaning, numerical inversion happens in REFPROP instead).
- Example: When explicitVars are set to \"ph\" and p and T are given, the specificEnthalpy is calculated first using the inverse function of
- Temperature_phX --> specificEnthalpy_pTX. With p and h known all other variables are calculated by setstate_phX.
-
-
-
-
-
-
-
- Created by
-Henning Francke
-Helmholtz Centre Potsdam
-GFZ German Research Centre for Geosciences
-Telegrafenberg, D-14473 Potsdam
-Germany
-
-francke@gfz-potsdam.de
-
-",
- revisions="
-
-"), uses(Modelica(version="3.2")));
-end REFPROPMedium;
diff --git a/REFPROPMedium/package.order b/REFPROPMedium/package.order
deleted file mode 100644
index 95f6c45..0000000
--- a/REFPROPMedium/package.order
+++ /dev/null
@@ -1,75 +0,0 @@
-debugmode
-explicitVars
-fluidnames
-rpConstants
-ThermodynamicState
-BaseProperties
-StrJoin
-partialREFPROP
-getSatProp_REFPROP_check
-getSatProp_REFPROP
-saturationPressure
-saturationTemperature
-getProp_REFPROP_check
-getProp_REFPROP
-setState
-specificEntropy
-density
-dewEnthalpy
-dewEntropy
-dewDensity
-bubbleEnthalpy
-bubbleEntropy
-bubbleDensity
-molarMass
-setState_phX
-density_phX
-temperature_phX
-specificEntropy_phX
-setState_pTX
-density_pTX
-specificEnthalpy_pTX
-specificEntropy_pTX
-setState_psX
-temperature_psX
-specificEnthalpy_psX
-density_psX
-setState_pdX
-temperature_pdX
-specificEnthalpy_pdX
-specificEntropy_pdX
-setState_ThX
-pressure_ThX
-density_ThX
-specificEntropy_ThX
-setState_dTX
-pressure_dTX
-specificEnthalpy_dTX
-specificEntropy_dTX
-setState_TsX
-pressure_TsX
-specificEnthalpy_TsX
-density_TsX
-setState_hdX
-pressure_hdX
-temperature_hdX
-specificEntropy_hdX
-setState_hsX
-pressure_hsX
-temperature_hsX
-density_hsX
-setState_dsX
-pressure_dsX
-temperature_dsX
-specificEnthalpy_dsX
-setState_pqX
-density_pqX
-pressure_TqX
-specificEnthalpy_pqX
-specificEntropy_pqX
-temperature_pqX
-dynamicViscosity
-thermalConductivity
-vapourQuality
-specificHeatCapacityCp
-specificHeatCapacityCv
diff --git a/REFPROPMedium/partialREFPROP.mo b/REFPROPMedium/partialREFPROP.mo
deleted file mode 100644
index e63fed0..0000000
--- a/REFPROPMedium/partialREFPROP.mo
+++ /dev/null
@@ -1,9 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-partial function partialREFPROP "Declaration of array props"
-//used by getSatProp_REFPROP_check() and getProp_REFPROP_check()
- extends Modelica.Icons.Function;
-protected
- Real[16+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",64),"")
- "Allocating memory, string will be written by C function, doesn't work for strings longer than 40 bytes";
-end partialREFPROP;
diff --git a/REFPROPMedium/pressure_ThX.mo b/REFPROPMedium/pressure_ThX.mo
deleted file mode 100644
index 110c086..0000000
--- a/REFPROPMedium/pressure_ThX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function pressure_ThX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Modelica.SIunits.SpecificEnthalpy h;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_ThX("+String(T)+","+String(h)+",X)...");
- end if;
- p :=getProp_REFPROP_check("p", "Th",T,h,X,phase);
- annotation(LateInline=true,inverse(h=specificEnthalpy_pTX(p,T,X,phase),
- T=temperature_phX(p,h,X,phase)));
-end pressure_ThX;
diff --git a/REFPROPMedium/pressure_TqX.mo b/REFPROPMedium/pressure_TqX.mo
deleted file mode 100644
index 0493d86..0000000
--- a/REFPROPMedium/pressure_TqX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function pressure_TqX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Real q;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
- //T=quality_pTX(p,T,X,phase)
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_TqX("+String(T)+","+String(q)+",X)");
- end if;
- p :=getProp_REFPROP_check("p", "Tq",T,q,X,phase);
- annotation(LateInline=true,inverse(T=temperature_pqX(p,q,X,phase)));
-end pressure_TqX;
diff --git a/REFPROPMedium/pressure_TsX.mo b/REFPROPMedium/pressure_TsX.mo
deleted file mode 100644
index 22b56a2..0000000
--- a/REFPROPMedium/pressure_TsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function pressure_TsX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_TsX("+String(T)+","+String(s)+",X)...");
- end if;
- p :=getProp_REFPROP_check("p", "Ts",T,s,X,phase);
- annotation(LateInline=true,inverse(s = specificEntropy_pTX(p,T,X,phase),
- T=temperature_psX(p,s,X,phase)));
-end pressure_TsX;
diff --git a/REFPROPMedium/pressure_dTX.mo b/REFPROPMedium/pressure_dTX.mo
deleted file mode 100644
index e8664f0..0000000
--- a/REFPROPMedium/pressure_dTX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function pressure_dTX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Density d;
- input Modelica.SIunits.Temperature T;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_dTX("+String(d)+","+String(T)+",X)");
- end if;
- p :=getProp_REFPROP_check("p", "dT",d,T,X,phase);
- annotation(LateInline=true,inverse(d = density_pTX(p,T,X,phase),
- T=temperature_pdX(p,d,X,phase)));
-end pressure_dTX;
diff --git a/REFPROPMedium/pressure_dsX.mo b/REFPROPMedium/pressure_dsX.mo
deleted file mode 100644
index c02f8b5..0000000
--- a/REFPROPMedium/pressure_dsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function pressure_dsX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Density d;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_dsX("+String(d)+","+String(s)+",X)");
- end if;
- p :=getProp_REFPROP_check("p", "ds",d,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_pdX(p,d,X,phase),
- d=density_psX(p,s,X,phase)));
-end pressure_dsX;
diff --git a/REFPROPMedium/pressure_hdX.mo b/REFPROPMedium/pressure_hdX.mo
deleted file mode 100644
index e35dba0..0000000
--- a/REFPROPMedium/pressure_hdX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function pressure_hdX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.SpecificEnthalpy h;
- input Modelica.SIunits.Density d;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_hdX("+String(h)+","+String(d)+",X)");
- end if;
- p :=getProp_REFPROP_check("p", "hd",h,d,X,phase);
- annotation(LateInline=true,inverse(d=density_phX(p,h,X,phase),
- h=specificEnthalpy_pdX(p,d,X,phase)));
-end pressure_hdX;
diff --git a/REFPROPMedium/pressure_hsX.mo b/REFPROPMedium/pressure_hsX.mo
deleted file mode 100644
index d7b5ad2..0000000
--- a/REFPROPMedium/pressure_hsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function pressure_hsX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.SpecificEnthalpy h;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_hsX("+String(h)+","+String(s)+",X)");
- end if;
- p :=getProp_REFPROP_check("p", "hs",h,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_phX(p,h,X,phase),
- h=specificEnthalpy_psX(p,s,X,phase)));
-end pressure_hsX;
diff --git a/REFPROPMedium/setState.mo b/REFPROPMedium/setState.mo
deleted file mode 100644
index 487ee63..0000000
--- a/REFPROPMedium/setState.mo
+++ /dev/null
@@ -1,45 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function setState "Calculates medium properties"
- extends partialREFPROP;
- input String statevars;
- input Real statevar1;
- input Real statevar2;
- input Modelica.SIunits.MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-// Real[:] props=getProps_REFPROP_check(statevars, fluidnames,statevar1, statevar2, X, phase);
-/*protected
- Real[16+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",64),"")
- "Allocating memory, string will be written by C function";*/
-
-algorithm
- assert(size(X,1)>0,"The mass fraction vector must have at least 1 element.");
- getProp_REFPROP("",statevars,fluidnames,props,statevar1,statevar2,X,phase,errormsg);
- assert(props[1]==0,"Error in REFPROP wrapper function: "+errormsg +"\n");
-/* If q = 990 Then Modelica.Utilities.Streams.print(msg+String(z)) end if;
-
- If q = 998 Then Quality = Trim2("Superheated vapor with T>Tc")
- If q = 999 Then Quality = Trim2("Supercritical state (T>Tc, p>pc)")
- If q = -998 Then Quality = Trim2("Subcooled liquid with p>pc")*/
- state := ThermodynamicState( p= props[2],
- T= props[3],
- X= X,
- MM= props[4],
- d=props[5],
- d_l=props[6],
- d_g=props[7],
- x=min(max(props[8],0),1),
- u=props[9],
- h=props[10],
- s=props[11],
- cv=props[12],
- cp=props[13],
- c=props[14],
- MM_l=props[15],
- MM_g=props[16],
- X_l=props[17:16+nX],
- X_g=props[17+nX:16+2*nX],
- phase=if (props[8]>0 and props[8]<1) then 2 else 1);
-end setState;
diff --git a/REFPROPMedium/setState_ThX.mo b/REFPROPMedium/setState_ThX.mo
deleted file mode 100644
index 1d180d0..0000000
--- a/REFPROPMedium/setState_ThX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function setState_ThX "Calculates medium properties from T,h,X"
- extends Modelica.Icons.Function;
- input Temperature T "Temperature";
- input SpecificEnthalpy h "Enthalpy";
- input MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_ThX("+String(T)+","+String(h)+",X)...");
- end if;
- state := setState("Th",T,h,X,phase) ",fluidnames)";
-end setState_ThX;
diff --git a/REFPROPMedium/setState_TsX.mo b/REFPROPMedium/setState_TsX.mo
deleted file mode 100644
index eca8fb9..0000000
--- a/REFPROPMedium/setState_TsX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function setState_TsX "Calculates medium properties from T,s,X"
- extends Modelica.Icons.Function;
- input Temperature T "Temperature";
- input SpecificEntropy s "Entropy";
- input MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_TsX("+String(T)+","+String(s)+",X)...");
- end if;
- state := setState("Ts",T,s,X,phase) ",fluidnames)";
-end setState_TsX;
diff --git a/REFPROPMedium/setState_dsX.mo b/REFPROPMedium/setState_dsX.mo
deleted file mode 100644
index 83781be..0000000
--- a/REFPROPMedium/setState_dsX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function setState_dsX "Calculates medium properties from d,s,X"
- extends Modelica.Icons.Function;
- input Density d "Temperature";
- input SpecificEntropy s "Entropy";
- input MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_dsX("+String(d)+","+String(s)+",X)...");
- end if;
- state := setState("ds",d,s,X,phase) ",fluidnames)";
-end setState_dsX;
diff --git a/REFPROPMedium/setState_hdX.mo b/REFPROPMedium/setState_hdX.mo
deleted file mode 100644
index bcadcf4..0000000
--- a/REFPROPMedium/setState_hdX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function setState_hdX "Calculates medium properties from h,d,X"
- extends Modelica.Icons.Function;
- input SpecificEnthalpy h "Enthalpy";
- input Density d "Temperature";
- input MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_hdX("+String(h)+","+String(d)+",X)...");
- end if;
- state := setState("hd",h,d,X,phase) ",fluidnames)";
-end setState_hdX;
diff --git a/REFPROPMedium/setState_hsX.mo b/REFPROPMedium/setState_hsX.mo
deleted file mode 100644
index 0fa1127..0000000
--- a/REFPROPMedium/setState_hsX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function setState_hsX "Calculates medium properties from h,s,X"
- extends Modelica.Icons.Function;
- input SpecificEnthalpy h "Enthalpy";
- input SpecificEntropy s "Entropy";
- input MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running ("+String(h)+","+String(s)+",X)...");
- end if;
- state := setState("hs",h,s,X,phase) ",fluidnames)";
-end setState_hsX;
diff --git a/REFPROPMedium/setState_pdX.mo b/REFPROPMedium/setState_pdX.mo
deleted file mode 100644
index 0dafcda..0000000
--- a/REFPROPMedium/setState_pdX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function setState_pdX "Calculates medium properties from p,d,X"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input Density d "Density";
- input MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_pdX("+String(p)+","+String(d)+",X)...");
- end if;
- state := setState("pd",p,d,X,phase) ",fluidnames)";
-end setState_pdX;
diff --git a/REFPROPMedium/setState_pqX.mo b/REFPROPMedium/setState_pqX.mo
deleted file mode 100644
index 5199d57..0000000
--- a/REFPROPMedium/setState_pqX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function setState_pqX "Calculates medium properties from p,q,X"
- extends Modelica.Icons.Function;
- input Modelica.SIunits.AbsolutePressure p "Pressure";
- input Modelica.SIunits.MassFraction q "quality (vapor mass fraction)";
- input Modelica.SIunits.MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_pqX("+String(p)+","+String(q)+",X)...");
- end if;
- state := setState("pq",p,q,X,phase) ",fluidnames)";
-end setState_pqX;
diff --git a/REFPROPMedium/specificEnthalpy_TsX.mo b/REFPROPMedium/specificEnthalpy_TsX.mo
deleted file mode 100644
index 171e0c7..0000000
--- a/REFPROPMedium/specificEnthalpy_TsX.mo
+++ /dev/null
@@ -1,19 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function specificEnthalpy_TsX
- "calls REFPROP-Wrapper, returns specific enthalpy"
- //does not extend existing function from PartialMedium because there the algorithm is already defined
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
-// input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_TsX("+String(T)+","+String(s)+",X)");
- end if;
- h :=getProp_REFPROP_check("h", "Ts",T,s,X,phase);
- annotation(LateInline=true,inverse(s = specificEntropy_ThX(T,h,X,phase),
- T=temperature_hsX(h,s,X,phase)));
-end specificEnthalpy_TsX;
diff --git a/REFPROPMedium/specificEnthalpy_dsX.mo b/REFPROPMedium/specificEnthalpy_dsX.mo
deleted file mode 100644
index 548cd1b..0000000
--- a/REFPROPMedium/specificEnthalpy_dsX.mo
+++ /dev/null
@@ -1,23 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function specificEnthalpy_dsX
- "calls REFPROP-Wrapper, returns specific enthalpy"
- //does not extend existing function from PartialMedium because there the algorithm is already defined
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Density d;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
-// input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
-/*protected
- Real[14+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",10),"");*/
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_dsX("+String(d)+","+String(s)+",X)");
- end if;
-// h :=getProp_REFPROP_check("h", "ds", fluidnames,d,s,X,phase);
- h :=getProp_REFPROP_check("h", "ds", d,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_hdX(h,d,X,phase),
- d=density_hsX(h,s,X,phase)));
-end specificEnthalpy_dsX;
diff --git a/REFPROPMedium/specificEnthalpy_pdX.mo b/REFPROPMedium/specificEnthalpy_pdX.mo
deleted file mode 100644
index abb5bb6..0000000
--- a/REFPROPMedium/specificEnthalpy_pdX.mo
+++ /dev/null
@@ -1,19 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function specificEnthalpy_pdX
- "calls REFPROP-Wrapper, returns specific enthalpy"
- //does not extend existing function from PartialMedium because there the algorithm is already defined
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.Density d;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_pdX("+String(p)+","+String(d)+",X)...");
- end if;
-// h :=getProp_REFPROP_check("h", "pd", fluidnames,p,d,X,phase);
- h :=getProp_REFPROP_check("h", "pd", p,d,X,phase);
- annotation(LateInline=true,inverse(d = density_phX(p,h,X,phase),
- p=pressure_hdX(h,d,X,phase)));
-end specificEnthalpy_pdX;
diff --git a/REFPROPMedium/specificEnthalpy_pqX.mo b/REFPROPMedium/specificEnthalpy_pqX.mo
deleted file mode 100644
index 4b6abfc..0000000
--- a/REFPROPMedium/specificEnthalpy_pqX.mo
+++ /dev/null
@@ -1,17 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function specificEnthalpy_pqX
- "calls REFPROP-Wrapper, returns specific enthalpy"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Real q;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
-// annotation(LateInline=true,inverse(p = pressure_hqX(h,q,X,phase),quality_phX(p,h,X,phase)));
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_pqX("+String(p)+","+String(q)+",X)");
- end if;
-// h :=getProp_REFPROP_check("h", "pq", fluidnames,p,q,X,phase);
- h :=getProp_REFPROP_check("h", "pq", p,q,X,phase);
-end specificEnthalpy_pqX;
diff --git a/REFPROPMedium/specificEntropy_ThX.mo b/REFPROPMedium/specificEntropy_ThX.mo
deleted file mode 100644
index 168b2a8..0000000
--- a/REFPROPMedium/specificEntropy_ThX.mo
+++ /dev/null
@@ -1,20 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function specificEntropy_ThX
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Modelica.SIunits.SpecificEnthalpy h;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
-// input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
-/*protected
- Real[14+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",10),"");*/
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_ThX("+String(T)+","+String(h)+",X)");
- end if;
- s:=getProp_REFPROP_check("s", "Th",T,h,X,phase);
- annotation(LateInline=true,inverse(h = specificEnthalpy_TsX(T,s,X,phase),
- T=temperature_hsX(h,s,X,phase)));
-end specificEntropy_ThX;
diff --git a/REFPROPMedium/specificEntropy_dTX.mo b/REFPROPMedium/specificEntropy_dTX.mo
deleted file mode 100644
index f18a891..0000000
--- a/REFPROPMedium/specificEntropy_dTX.mo
+++ /dev/null
@@ -1,17 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function specificEntropy_dTX
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Density d;
- input Modelica.SIunits.Temperature T;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
-// input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_dTX("+String(d)+","+String(T)+",X)");
- end if;
- s:=getProp_REFPROP_check("s", "dT",d,T,X,phase);
- annotation(LateInline=true,inverse(d = density_TsX(T,s,X,phase),
- T=temperature_dsX(d,s,X,phase)));
-end specificEntropy_dTX;
diff --git a/REFPROPMedium/specificEntropy_hdX.mo b/REFPROPMedium/specificEntropy_hdX.mo
deleted file mode 100644
index bd4de6f..0000000
--- a/REFPROPMedium/specificEntropy_hdX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function specificEntropy_hdX
- extends Modelica.Icons.Function;
- input Modelica.SIunits.SpecificEnthalpy h;
- input Modelica.SIunits.Density d;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_hdX("+String(h)+","+String(d)+",X)");
- end if;
- s:=getProp_REFPROP_check("s", "hd",h,d,X,phase);
- annotation(LateInline=true,inverse(d=density_hsX(h,s,X,phase),
- h=specificEnthalpy_dsX(d,s,X,phase)));
-end specificEntropy_hdX;
diff --git a/REFPROPMedium/specificEntropy_pdX.mo b/REFPROPMedium/specificEntropy_pdX.mo
deleted file mode 100644
index 5401d50..0000000
--- a/REFPROPMedium/specificEntropy_pdX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function specificEntropy_pdX
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.Density d;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_pdX("+String(p)+","+String(d)+",X)");
- end if;
- s:=getProp_REFPROP_check("s", "pd",p,d,X,phase);
- annotation(LateInline=true,inverse(d = density_psX(p,s,X,phase),
- p=pressure_dsX(d,s,X,phase)));
-end specificEntropy_pdX;
diff --git a/REFPROPMedium/specificEntropy_phX.mo b/REFPROPMedium/specificEntropy_phX.mo
deleted file mode 100644
index 61652e1..0000000
--- a/REFPROPMedium/specificEntropy_phX.mo
+++ /dev/null
@@ -1,21 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function specificEntropy_phX
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.SpecificEnthalpy h;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
-// input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
-/*protected
- Real[14+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",10),"");*/
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_phX("+String(p)+","+String(h)+",X)...");
- // p="+String(p)+",h="+String(h)+", X={"+String(X[1])+","+String(X[2])+"}");
- end if;
- s:=getProp_REFPROP_check("s", "ph",p,h,X,phase);
- annotation(LateInline=true,inverse(h=specificEnthalpy_psX(p,s,X,phase),
- p=pressure_hsX(h,s,X,phase)));
-end specificEntropy_phX;
diff --git a/REFPROPMedium/specificEntropy_pqX.mo b/REFPROPMedium/specificEntropy_pqX.mo
deleted file mode 100644
index 5de1d4b..0000000
--- a/REFPROPMedium/specificEntropy_pqX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function specificEntropy_pqX "calls REFPROP-Wrapper, returns specific entropy"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Real q;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
-// annotation(LateInline=true,inverse(p = pressure_sqX(s,q,X,phase),q=quality_psX(p,s,X,phase));
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_pqX("+String(p)+","+String(q)+",X)");
- end if;
- s :=getProp_REFPROP_check("s", "pq",p,q,X,phase);
-end specificEntropy_pqX;
diff --git a/REFPROPMedium/temperature_dsX.mo b/REFPROPMedium/temperature_dsX.mo
deleted file mode 100644
index 5c220fc..0000000
--- a/REFPROPMedium/temperature_dsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function temperature_dsX "calls REFPROP-Wrapper, returns temperature"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Density d;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_dsX("+String(d)+","+String(s)+",X)");
- end if;
- T :=getProp_REFPROP_check("T", "ds",d,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_dTX(d,T,X,phase),
- d=density_TsX(T,s,X,phase)));
-end temperature_dsX;
diff --git a/REFPROPMedium/temperature_hdX.mo b/REFPROPMedium/temperature_hdX.mo
deleted file mode 100644
index debe323..0000000
--- a/REFPROPMedium/temperature_hdX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function temperature_hdX "calls REFPROP-Wrapper, returns temperature"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.SpecificEnthalpy h;
- input Modelica.SIunits.Density d;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_hdX("+String(h)+","+String(d)+",X)");
- end if;
- T :=getProp_REFPROP_check("T", "hd",h,d,X,phase);
- annotation(LateInline=true,inverse(d=density_ThX(T,h,X,phase),
- h=specificEnthalpy_dTX(d,T,X,phase)));
-end temperature_hdX;
diff --git a/REFPROPMedium/temperature_hsX.mo b/REFPROPMedium/temperature_hsX.mo
deleted file mode 100644
index 4864bb4..0000000
--- a/REFPROPMedium/temperature_hsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function temperature_hsX "calls REFPROP-Wrapper, returns temperature"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.SpecificEnthalpy h;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_hsX("+String(h)+","+String(s)+",X)");
- end if;
- T :=getProp_REFPROP_check("T", "hs",h,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_ThX(T,h,X,phase),
- h=specificEnthalpy_TsX(T,s,X,phase)));
-end temperature_hsX;
diff --git a/REFPROPMedium/temperature_pdX.mo b/REFPROPMedium/temperature_pdX.mo
deleted file mode 100644
index e03d68b..0000000
--- a/REFPROPMedium/temperature_pdX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function temperature_pdX "calls REFPROP-Wrapper, returns temperature"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.Density d;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_psX("+String(p)+","+String(d)+",X)...");
- end if;
- T :=getProp_REFPROP_check("T", "pd",p,d,X,phase);
- annotation(LateInline=true,inverse(d=density_pTX(p,T,X,phase),
- p=pressure_dTX(d,T,X,phase)));
-end temperature_pdX;
diff --git a/REFPROPMedium/temperature_pqX.mo b/REFPROPMedium/temperature_pqX.mo
deleted file mode 100644
index 98a382a..0000000
--- a/REFPROPMedium/temperature_pqX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMedium;
-function temperature_pqX
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input MassFraction q;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
-// annotation(LateInline=true,inverse(p = pressure_TqX(T,q,X,phase),q=quality_pTX(p,T,X,phase));
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_pqX("+String(p)+","+String(q)+",X)");
- end if;
- T :=getProp_REFPROP_check("T", "pq",p,q,X,phase);
-end temperature_pqX;
diff --git a/REFPROPMediumPureSubstance/StrJoin.mo b/REFPROPMediumPureSubstance/StrJoin.mo
deleted file mode 100644
index 632a94b..0000000
--- a/REFPROPMediumPureSubstance/StrJoin.mo
+++ /dev/null
@@ -1,11 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function StrJoin "Converts an Array of Strings into a string separated by |"
- input String[:] s_in;
- input String delimiter;
- output String s_out;
-algorithm
- s_out :=s_in[1];
- for i in 2:size(s_in,1) loop
- s_out :=s_out + delimiter + s_in[i];
- end for;
-end StrJoin;
diff --git a/REFPROPMediumPureSubstance/density_ThX.mo b/REFPROPMediumPureSubstance/density_ThX.mo
deleted file mode 100644
index cbdecc1..0000000
--- a/REFPROPMediumPureSubstance/density_ThX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function density_ThX "calls REFPROP-Wrapper, returns density"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Modelica.SIunits.SpecificEnthalpy h;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_ThX("+String(T)+","+String(h)+",X)");
- end if;
- d :=getProp_REFPROP_check("d", "Th",T,h,X,phase);
- annotation(LateInline=true,inverse(h=specificEnthalpy_dTX(d,T,X,phase),
- T=temperature_hdX(h,d,X,phase)));
-end density_ThX;
diff --git a/REFPROPMediumPureSubstance/density_TsX.mo b/REFPROPMediumPureSubstance/density_TsX.mo
deleted file mode 100644
index f305235..0000000
--- a/REFPROPMediumPureSubstance/density_TsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function density_TsX "calls REFPROP-Wrapper, returns density"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_TsX("+String(T)+","+String(s)+",X)");
- end if;
- d :=getProp_REFPROP_check("d", "Ts",T,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_dTX(d,T,X,phase),
- T=temperature_dsX(d,s,X,phase)));
-end density_TsX;
diff --git a/REFPROPMediumPureSubstance/density_hsX.mo b/REFPROPMediumPureSubstance/density_hsX.mo
deleted file mode 100644
index 812b528..0000000
--- a/REFPROPMediumPureSubstance/density_hsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function density_hsX "calls REFPROP-Wrapper, returns density"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.SpecificEnthalpy h;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_hsX("+String(h)+","+String(s)+",X)");
- end if;
- d :=getProp_REFPROP_check("d", "hs",h,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_hdX(h,d,X,phase),
- h=specificEnthalpy_dsX(d,s,X,phase)));
-end density_hsX;
diff --git a/REFPROPMediumPureSubstance/density_pqX.mo b/REFPROPMediumPureSubstance/density_pqX.mo
deleted file mode 100644
index d493d76..0000000
--- a/REFPROPMediumPureSubstance/density_pqX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function density_pqX "calls REFPROP-Wrapper, returns specific density"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Real q;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_pqX("+String(p)+","+String(q)+",X)");
- end if;
- d :=getProp_REFPROP_check("d", "pq",p,q,X,phase);
-/* annotation(LateInline=true,inverse(p=pressure_dqX(d,q,X,phase),
- q=quality_pdX(p,d,X,phase)));*/
-end density_pqX;
diff --git a/REFPROPMediumPureSubstance/getProp_REFPROP.mo b/REFPROPMediumPureSubstance/getProp_REFPROP.mo
deleted file mode 100644
index 4e4dc1b..0000000
--- a/REFPROPMediumPureSubstance/getProp_REFPROP.mo
+++ /dev/null
@@ -1,19 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function getProp_REFPROP
- "calls C function with property identifier & returns single property"
- input String what2calc;
- input String statevars;
- input String fluidnames;
- input Real[:] props;
- input Real statevar1;
- input Real statevar2;
- input MassFraction X[:] "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- input String errormsg;
-// input Integer debug=1;
- output Real val;
-
- external "C" val = props_REFPROP(what2calc, statevars, fluidnames, props, statevar1, statevar2, X, phase, REFPROP_PATH, errormsg, debugmode);
-
-annotation (Include="#include ", Library="refprop_wrapper");
-end getProp_REFPROP;
diff --git a/REFPROPMediumPureSubstance/getProp_REFPROP_check.mo b/REFPROPMediumPureSubstance/getProp_REFPROP_check.mo
deleted file mode 100644
index d8e383f..0000000
--- a/REFPROPMediumPureSubstance/getProp_REFPROP_check.mo
+++ /dev/null
@@ -1,23 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function getProp_REFPROP_check
- "wrapper for getProp_REFPROP returning 1 property value with error check"
- extends partialREFPROP;
- input String what2calc;
- input String statevars;
-// input String fluidnames;
- input Real statevar1;
- input Real statevar2;
- input MassFraction X[:] "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Real val;
-algorithm
- assert(size(X,1)>0,"The mass fraction vector must have at least 1 element.");
-
-// Modelica.Utilities.Streams.print("Calc "+what2calc);
- val :=getProp_REFPROP(what2calc,statevars,fluidnames,props,statevar1,statevar2,X,phase,errormsg)
- "just passing through";
-
-// Modelica.Utilities.Streams.print("ERR("+String(props[1])+"):"+errormsg);
- assert(props[1]==0,"Errorcode "+String(props[1])+" in REFPROP wrapper function:\n"+errormsg +"\n");
-
-end getProp_REFPROP_check;
diff --git a/REFPROPMediumPureSubstance/getSatProp_REFPROP.mo b/REFPROPMediumPureSubstance/getSatProp_REFPROP.mo
deleted file mode 100644
index 3d50d64..0000000
--- a/REFPROPMediumPureSubstance/getSatProp_REFPROP.mo
+++ /dev/null
@@ -1,17 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function getSatProp_REFPROP
- "calls C function with property identifier & returns single property"
- input String what2calc;
- input String statevar;
- input String fluidnames;
- input Real[:] props;
- input Real statevarval;
- input MassFraction X[:] "mass fraction m_NaCl/m_Sol";
- input String errormsg;
- output Real val;
-// input Integer debugmode=1;
-
- external "C" val = satprops_REFPROP(what2calc, statevar, fluidnames, props, statevarval, X, REFPROP_PATH, errormsg, debugmode);
-
- annotation (Include="#include ", Library="refprop_wrapper");
-end getSatProp_REFPROP;
diff --git a/REFPROPMediumPureSubstance/getSatProp_REFPROP_check.mo b/REFPROPMediumPureSubstance/getSatProp_REFPROP_check.mo
deleted file mode 100644
index 935173d..0000000
--- a/REFPROPMediumPureSubstance/getSatProp_REFPROP_check.mo
+++ /dev/null
@@ -1,21 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function getSatProp_REFPROP_check
- "wrapper for getSatProp_REFPROP returning 1 property value with error check"
- extends partialREFPROP;
- input String what2calc;
- input String statevar;
-// input String fluidnames;
- input Real statevarval;
- input MassFraction X[:] "mass fraction m_NaCl/m_Sol";
- output Real val;
-algorithm
- assert(size(X,1)>0,"The mass fraction vector must have at least 1 element.");
- val :=getSatProp_REFPROP(what2calc,statevar,fluidnames,props,statevarval,X,errormsg)
- "just passing through";
-//Error string decoding in wrapper-c-function
- assert(props[1]==0 or props[1]==141,"Errorcode "+String(props[1])+" in REFPROP wrapper function:\n"+errormsg +"\n");
- if props[1]==141 then
- Modelica.Utilities.Streams.print("Saturation properties cannot be calculated, because P > p_crit!...");
- val :=-999;
- end if;
-end getSatProp_REFPROP_check;
diff --git a/REFPROPMediumPureSubstance/package.mo b/REFPROPMediumPureSubstance/package.mo
deleted file mode 100644
index e96e706..0000000
--- a/REFPROPMediumPureSubstance/package.mo
+++ /dev/null
@@ -1,592 +0,0 @@
-within MediaTwoPhaseMixture;
-package REFPROPMediumPureSubstance "Two Phase single component two-phase medium whose property functions are supplied by REFPROP (via wrapper for refprop.dll). Extends PartialTwoPhaseMedium."
-/*To create this package, REFPROPMedium has been copied and the following things have been changed:
--"extends PartialMixtureTwoPhaseMedium" -> "extends Modelica.Media.Interfaces.PartialTwoPhaseMedium"
--redeclare record SaturationProperties
--added preset X to saturationTemperature() and saturationPressure()
--added s and sat in BaseProperties
--add p,T,X in ThermodynamicState
--for specificEnthalpy_dTX: redeclare function -> function
--remove X from ThermodynamicState and SaturationState
-*/
-
-
-redeclare record extends SaturationProperties
-// MassFraction X[nX] "Mass fractions";
-end SaturationProperties;
-
-
-redeclare function extends saturationPressure
-// extends Modelica.Icons.Function;
-// input MassFraction X[:]={1} "fluid composition as mass fractions";
-algorithm
- p := getSatProp_REFPROP_check("p", "T",T,reference_X);
-end saturationPressure;
-
-
-redeclare function extends saturationTemperature
-// extends Modelica.Icons.Function;
-// input MassFraction X[:]={1} "fluid composition as mass fractions";
-algorithm
- T := getSatProp_REFPROP_check("T", "p",p,reference_X);
-end saturationTemperature;
-constant Boolean debugmode = false
- "print messages in functions and in refpropwrapper.lib (to see the latter, start dymosim.exe in command window)";
-
-constant String explicitVars = "ph"
- "set of variables the model is explicit for, may be set to all combinations of p,h,T,d,s,d, REFPROP works internally with dT";
-final constant String fluidnames= StrJoin(substanceNames,"|");
-
-
-extends Modelica.Media.Interfaces.PartialTwoPhaseMedium(
- mediumName="REFPROP Medium",
- final singleState=false,
- fluidConstants=rpConstants);
-//"mediumName is being checked for consistency at flowports"
-
- constant FluidConstants[nS] rpConstants(
- each chemicalFormula = "REFPROP Medium",
- each structureFormula="REFPROP Medium",
- each casRegistryNumber="007",
- each iupacName="REFPROP Medium",
- each molarMass=0.1,
- each criticalTemperature = 600,
- each criticalPressure = 300e5,
- each criticalMolarVolume = 1,
- each acentricFactor = 1,
- each triplePointTemperature = 273.15,
- each triplePointPressure = 1e5,
- each meltingPoint = 1,
- each normalBoilingPoint = 1,
- each dipoleMoment = 1);
-
-
-redeclare record extends ThermodynamicState
- "a selection of variables that uniquely defines the thermodynamic state"
- AbsolutePressure p "Absolute pressure of medium";
- Temperature T "Temperature of medium";
-// MassFraction X[nX] "Composition (Mass fractions in kg/kg)";/**/
- MolarMass MM "Molar Mass of the whole mixture";
- Density d(start=300) "density";
- Density d_l(start=300) "density liquid phase";
- Density d_g(start=300) "density gas phase";
- Real x "vapor quality on a mass basis [mass vapor/total mass]";
- SpecificEnergy u "Specific energy";
- SpecificEnthalpy h "Specific enthalpy";
- SpecificEntropy s "Specific entropy";
- Modelica.SIunits.SpecificHeatCapacityAtConstantPressure cp;
- Modelica.SIunits.SpecificHeatCapacityAtConstantVolume cv;
- VelocityOfSound c;
-// MolarMass MM_l "Molar Mass of liquid phase";
-// MolarMass MM_g "Molar Mass of gas phase";
-// MassFraction X_l[nX] "Composition of liquid phase (Mass fractions in kg/kg)";
-// MassFraction X_g[nX] "Composition of gas phase (Mass fractions in kg/kg)";
-// Real GVF "Gas Void Fraction";
-end ThermodynamicState;
-
-
- redeclare model extends BaseProperties "Base properties of medium"
-
- Modelica.SIunits.SpecificEntropy s;
- SaturationProperties sat "Saturation properties at the medium pressure";
- equation
- u = h - p/d
- "state.u - calculated anyway by REFPROP, but this way the expression can be derived symbolically";
- MM = state.MM;
- R = 1 "Modelica.Constants.R/MM";
-
- //ph-explicit
- if explicitVars=="ph" or explicitVars=="hp" then
- state = setState_phX(p,h,X,0) ",fluidnames)";
- T = temperature_phX(p,h,X)
- "double calculation, but necessary if T is given";
- // T = state.T "can be used instead";
-
- s = specificEntropy_phX(p,h,X)
- "double calculation, but necessary if s is given";
- // s = state.s "can be used instead";
-
- d = density_phX(p,h,X) "double calculation, but necessary if d is given";
- //d = state.d "can be used instead";
- elseif explicitVars=="pT" or explicitVars=="Tp" then
- //pT-explicit
- state = setState_pTX(p,T,X,0) ",fluidnames)";
- h = specificEnthalpy_pTX(p,T,X)
- "double calculation, but necessary if s is given";
- //h = state.h "can be used instead";
-
- s = specificEntropy_pTX(p,T,X)
- "state.s double calculation, but necessary if s is given";
- // s = state.s "can be used instead";
-
- d = density_pTX(p,T,X)
- "state.d double calculation, but necessary if d is given";
- //d = state.d "can be used instead";
- elseif explicitVars=="dT" or explicitVars=="Td" then
- //Td-explicit
- state = setState_dTX(d,T,X,0) ",fluidnames)";
- h = specificEnthalpy_dTX(d,T,X)
- "double calculation, but necessary if s is given";
- //h = state.h "can be used instead";
-
- s = specificEntropy_dTX(d,T,X)
- "state.s double calculation, but necessary if s is given";
- // s = state.s "can be used instead";
- p = pressure_dTX(d,T,X)
- "state.d double calculation, but necessary if d is given";
- // p = state.p "can be used instead";
- elseif explicitVars=="ps" or explicitVars=="ps" then
- state = setState_psX(p,s,X,0) ",fluidnames)";
- T = temperature_psX(p,s,X);
- h = specificEnthalpy_psX(p,s,X);
- d = density_psX(p,s,X);
- elseif explicitVars=="pd" or explicitVars=="pd" then
- state = setState_pdX(p,d,X,0) ",fluidnames)";
- T = temperature_pdX(p,d,X);
- h = specificEnthalpy_pdX(p,d,X);
- s = specificEntropy_pdX(p,d,X);
- elseif explicitVars=="hT" or explicitVars=="Th" then
- state = setState_ThX(T,h,X,0) ",fluidnames)";
- p = pressure_ThX(T,h,X);
- s = specificEntropy_ThX(T,h,X);
- d = density_ThX(T,h,X);
- elseif explicitVars=="sT" or explicitVars=="Ts" then
- state = setState_TsX(T,s,X,0) ",fluidnames)";
- p = pressure_TsX(T,s,X);
- h = specificEnthalpy_TsX(T,s,X);
- d = density_TsX(T,s,X);
- elseif explicitVars=="hd" or explicitVars=="hd" then
- state = setState_hdX(h,d,X,0) ",fluidnames)";
- p = pressure_hdX(h,d,X);
- s = specificEntropy_hdX(h,d,X);
- T = temperature_hdX(h,d,X);
- elseif explicitVars=="hs" or explicitVars=="sh" then
- state = setState_hsX(h,s,X,0) ",fluidnames)";
- p = pressure_hsX(h,s,X);
- T = temperature_hsX(h,s,X);
- d = density_hsX(h,s,X);
- elseif explicitVars=="sd" or explicitVars=="ds" then
- state = setState_dsX(d,s,X,0) ",fluidnames)";
- p = pressure_dsX(d,s,X);
- h = specificEnthalpy_dsX(d,s,X);
- T = temperature_dsX(d,s,X);
- end if;
-
- sat.psat = p;
- sat.Tsat = saturationTemperature(p);
- // sat.X = X;
- annotation (Documentation(info="
-
- The baseproperties model is explicit for one set of 2 variables, which can be chosen to be ph, pT, ps, pd, Th, dT, Ts, hd, hs, ds (set explicitVars when calling this package or in package).
- That means, that if only one of these variables is explicitly given, the other one is calculated by inverting its property function.
- Then alle state variables are calculated using the corresponding setstate_XX function.
- In order to avoid numerical inversion by the solver, 3 state variables are set explicitly using their respective property function, which has its inverses defined.
- Example: So for p and h as explicit variables a state given by p and T is calculated by first calculating h with specificEnthalpy_pTX (inverse function of temperature_phX),
- then calculating the other variables using setState_phX. s and d, however, are then calculated, although they are already known in the state variable.
- Knowing this, the baseproperty model can be adapted to your calculation needs to decrease computation time:
-
- - Choose the explicitVars to the combination occurring most often in your model. (The combination dT might be favorable, because it is used by REFPROP's internal algorithm.)
- - if you are sure, that it won't be needed, in BaseProperties replace explicit calculation of T/s/d/h with definition as state (commented line)
-
- "));
- end BaseProperties;
-
-
- redeclare function extends specificEntropy
- "Return specific entropy - seems useless, but good for compatibility between PartialMedium and PartialMixedMediumTwoPhase"
- algorithm
- s := state.s;
- end specificEntropy;
-
-
- redeclare replaceable function extends density
- "returns density from state - seems useless, but good for compatibility between PartialMedium and PartialMixedMediumTwoPhase"
- algorithm
- d := state.d;
- end density;
-
-
-redeclare function extends dewEnthalpy "dew curve specific enthalpy"
- extends Modelica.Icons.Function;
-algorithm
- hv := getProp_REFPROP_check("h", "pq", sat.psat,1,reference_X,1);
-end dewEnthalpy;
-
-
- redeclare function extends dewEntropy "dew curve specific entropy of water"
- extends Modelica.Icons.Function;
- algorithm
- sv := getProp_REFPROP_check("s", "pq", sat.psat,1,reference_X,1);
- end dewEntropy;
-
-
- redeclare function extends dewDensity "dew curve specific density of water"
- extends Modelica.Icons.Function;
- algorithm
- dv := getProp_REFPROP_check("d", "pq", sat.psat,1,reference_X,1);
- end dewDensity;
-
-
- redeclare function extends bubbleEnthalpy
- "boiling curve specific enthalpy of water"
- extends Modelica.Icons.Function;
- algorithm
- hl := getProp_REFPROP_check("h", "pq", sat.psat,0,reference_X,1);
- end bubbleEnthalpy;
-
-
- redeclare function extends bubbleEntropy
- "boiling curve specific entropy of water"
- extends Modelica.Icons.Function;
- algorithm
- sl := getProp_REFPROP_check("s", "pq", sat.psat,0,reference_X,1);
- end bubbleEntropy;
-
-
- redeclare function extends bubbleDensity
- "boiling curve specific density of water"
- extends Modelica.Icons.Function;
- algorithm
- dl := getProp_REFPROP_check("d", "pq", sat.psat,0,reference_X,1);
- end bubbleDensity;
-
-
-redeclare replaceable partial function extends molarMass
- "Return the molar mass of the medium"
- extends Modelica.Icons.Function;
-algorithm
- MM:=state.MM;
-end molarMass;
-
-
-redeclare replaceable partial function extends setState_phX
- "Calculates medium properties from p,h,X"
- // input String fluidnames;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_phX("+String(p)+","+String(h)+",X)...");
- end if;
- state := setState("ph",p,h,X,phase) ",fluidnames)";
-end setState_phX;
-
-
- redeclare function density_phX "calls REFPROP-Wrapper, returns density"
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.SpecificEnthalpy h;
- input MassFraction X[:]=reference_X
- "composition defined by mass fractions";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_phX("+String(p)+","+String(h)+",X)");
- end if;
- // p="+String(p)+",h="+String(h)+", X={"+String(X[1])+","+String(X[2])+"}");
- d :=getProp_REFPROP_check("d", "ph",p,h,X,phase);
- annotation(LateInline=true,inverse(h=specificEnthalpy_pdX(p,d,X,phase),
- p=pressure_hdX(h,d,X,phase)));
- end density_phX;
-
-
- redeclare function temperature_phX
- "calls REFPROP-Wrapper, returns temperature"
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.SpecificEnthalpy h;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_phX("+String(p)+","+String(h)+",X)");
- end if;
- T :=getProp_REFPROP_check("T", "ph",p,h,X,phase);
- annotation(LateInline=true,inverse(h=specificEnthalpy_pTX(p,T,X,phase),
- p=pressure_ThX(T,h,X,phase)));
- end temperature_phX;
-
-
-redeclare replaceable partial function extends setState_pTX
-// input String fluidnames;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_pTX("+String(p)+","+String(T)+",X)...");
- end if;
- state := setState("pT",p,T,X,phase) ",fluidnames)";
-end setState_pTX;
-
-
- redeclare function density_pTX "calls REFPROP-Wrapper, returns density"
- extends Modelica.Icons.Function;
- // input String fluidnames;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.Temperature T;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_pTX("+String(p)+","+String(T)+",X)...");
- end if;
- d :=getProp_REFPROP_check("d", "pT",p,T,X,phase);
- annotation(LateInline=true,inverse(T=temperature_pdX(p,d,X,phase),
- p=pressure_dTX(d,T,X,phase)));
- end density_pTX;
-
-
- redeclare function specificEnthalpy_pTX
- "calls REFPROP-Wrapper, returns specific enthalpy"
- //does not extend existing function from PartialMedium because there the algorithm is already defined
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.Temp_K T;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- // input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
- /*protected
- Real[14+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",10),"");*/
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_pTX("+String(p)+","+String(T)+",X)...");
- end if;
- // p="+String(p)+",T="+String(T)+", X={"+String(X[1])+","+String(X[2])+"}");
- h :=getProp_REFPROP_check("h", "pT",p,T,X,phase);
- annotation(LateInline=true,inverse(T=temperature_phX(p,h,X,phase),
- p=pressure_ThX(T,h,X,phase)));
- end specificEnthalpy_pTX;
-
-
- redeclare function specificEntropy_pTX
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.Temp_K T;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_pTX("+String(p)+","+String(T)+",X)");
- end if;
- s:=getProp_REFPROP_check("s", "pT",p,T,X,phase);
- annotation(LateInline=true,inverse(T=temperature_psX(p,s,X,phase),
- p=pressure_TsX(T,s,X,phase)));
- end specificEntropy_pTX;
-
-
-redeclare replaceable partial function extends setState_psX
- "Calculates medium properties from p,s,X"
-// input String fluidnames;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_psX("+String(p)+","+String(s)+",X)...");
- end if;
- state := setState("ps",p,s,X,phase) ",fluidnames)";
-end setState_psX;
-
-
- redeclare function temperature_psX
- "calls REFPROP-Wrapper, returns temperature"
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_psX("+String(p)+","+String(s)+",X)...");
- end if;
- T :=getProp_REFPROP_check("T", "ps",p,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_pTX(p,T,X,phase),
- p=pressure_TsX(T,s,X,phase)));
- end temperature_psX;
-
-
- redeclare function specificEnthalpy_psX
- "calls REFPROP-Wrapper, returns specific enthalpy"
- //does not extend existing function from PartialMedium because there the algorithm is already defined
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- // input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
- /*protected
- Real[14+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",10),"");*/
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_psX("+String(p)+","+String(s)+",X)...");
- end if;
- h :=getProp_REFPROP_check("h", "ps",p,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_phX(p,h,X,phase),
- p=pressure_hsX(h,s,X,phase)));
- end specificEnthalpy_psX;
-
-
- redeclare function density_psX "calls REFPROP-Wrapper, returns density"
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0
- "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Density d;
- algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running density_psX("+String(p)+","+String(s)+",X)");
- end if;
- d :=getProp_REFPROP_check("d", "ps",p,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_pdX(p,d,X,phase),
- p=pressure_dsX(d,s,X,phase)));
- end density_psX;
-
-
-redeclare replaceable partial function extends setState_dTX
-// input String fluidnames;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_dTX("+String(d)+","+String(T)+",X)...");
- end if;
- state := setState("dT",d,T,X,phase) ",fluidnames)";
-end setState_dTX;
-
-
-redeclare function extends dynamicViscosity
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running dynamicViscosity");
- end if;
- eta := getProp_REFPROP_check("v", "Td",state.T,state.d,state.X,state.phase);
-end dynamicViscosity;
-
-
-redeclare function extends thermalConductivity
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running thermalConductivity");
- end if;
- lambda := getProp_REFPROP_check("l", "Td",state.T,state.d,state.X,state.phase);
-end thermalConductivity;
-
-
- redeclare function extends specificHeatCapacityCp
-
- algorithm
- cp:=state.cp;
- end specificHeatCapacityCp;
-
-
- redeclare function extends specificHeatCapacityCv
-
- algorithm
- cv:=state.cv;
- end specificHeatCapacityCv;
-
-
-redeclare function pressure "Return pressure from state record"
- input ThermodynamicState state "Thermodynamic state record";
- output Modelica.SIunits.Pressure p "Vapour quality";
-algorithm
- p := state.p;
-end pressure;
-
-
-redeclare function specificEnthalpy
- "Return specific enthalpy from state record"
- input ThermodynamicState state "Thermodynamic state record";
- output Modelica.SIunits.SpecificEnthalpy h "Vapour quality";
-algorithm
- h := state.h;
-end specificEnthalpy;
-
-
-redeclare function vapourQuality "Return vapour quality"
- input ThermodynamicState state "Thermodynamic state record";
- output MassFraction x "Vapour quality";
-algorithm
- x := state.x;
-end vapourQuality;
-
-
- annotation (Documentation(info="
-
-REFPROPMediumPureSubstance is a package that delivers REFPROP data to a model based on and compatible to the Modelica.Media library.
-It can be used to calculate two-phase states of all fluids whose data is delivered with REFPROP. It has been developed and tested only in Dymola up to 2012 FD01.
-
-
-All files in this library, including the C source files are released under the Modelica License 2.
-
-Installation
-The installation basically consists in copying 2 files and changing one line in this package:
-
-This package needs the package PartialMixtureMediumTwoPhase which should be included in the parent package.
-
-
-Usage
-Being based on Modelica.Media, it is used like the two-phase water model:
-Create an Instance of REFPROPMediumPureSubstance and pass the components.defines the medium components (medium names are the names of the .fld files in the %REFPROP%\\fluids directory):
-
- package Medium = REFPROPMediumPureSubstance (final substanceNames={\"nitrogen\"});
-
-Create an Instance of REFPROPMediumPureSubstance.Baseproperties:
-
- Medium.BaseProperties props;
-
-You can then use the Baseproperties model to define the thermodynamic state and calculate the corresponding properties.
-
- props.p = 1e5;
- props.T = 300;
- d = props.d;
- h = props.h;
-
-Any combination of the pressure, temperature, specific enthalpy, specific entropy and density (p,T,h,s,d) can be used to define a
-thermodynamic state. Explicit functions for all combinations exist in REFPROP and likewise in the REFPROPMedium package.
-The calculation of all variables of a thermodynamic state, however, is by default done by setState_phX, so p and h have to be
-calculated from the given combination of two variables first. Actually, by doing this, REFPROP already calculates all variables
-of the thermodynamic state, but they cannot be used directly. This is a limitation of DYMOLA, as it is not able to invert a function
-returning an array.
-You can change the set of variables the property model is explicit for by setting the string variable explicitVars e.g. to \"pT\" or \"dT\":
-
-package Medium = REFPROPMedium(final substanceNames={\"water\"}, final explicitVars = \"pT\");
-
-
-All calculated values are returned in SI-Units and are mass based.
-
-
-
-Details
- All property functions contain a definition of their inverses. So, in many cases no numerical inversion by the solver is needed because
- explicit REFPROP functions are used (meaning, numerical inversion happens in REFPROP instead).
- Example: When explicitVars are set to \"ph\" and p and T are given, the specificEnthalpy is calculated first using the inverse function of
- Temperature_phX --> specificEnthalpy_pTX. With p and h known all other variables are calculated by setstate_phX.
-
-
-
Created by
-Henning Francke
-Helmholtz Centre Potsdam
-GFZ German Research Centre for Geosciences
-Telegrafenberg, D-14473 Potsdam
-Germany
-
-francke@gfz-potsdam.de
-
-",
- revisions="
-
-"));
-end REFPROPMediumPureSubstance;
diff --git a/REFPROPMediumPureSubstance/package.order b/REFPROPMediumPureSubstance/package.order
deleted file mode 100644
index 4a5597f..0000000
--- a/REFPROPMediumPureSubstance/package.order
+++ /dev/null
@@ -1,78 +0,0 @@
-SaturationProperties
-saturationPressure
-saturationTemperature
-debugmode
-explicitVars
-fluidnames
-rpConstants
-ThermodynamicState
-BaseProperties
-StrJoin
-partialREFPROP
-getSatProp_REFPROP_check
-getSatProp_REFPROP
-getProp_REFPROP_check
-getProp_REFPROP
-setState
-specificEntropy
-density
-dewEnthalpy
-dewEntropy
-dewDensity
-bubbleEnthalpy
-bubbleEntropy
-bubbleDensity
-molarMass
-setState_phX
-density_phX
-temperature_phX
-specificEntropy_phX
-setState_pTX
-density_pTX
-specificEnthalpy_pTX
-specificEntropy_pTX
-setState_psX
-temperature_psX
-specificEnthalpy_psX
-density_psX
-setState_pdX
-temperature_pdX
-specificEnthalpy_pdX
-specificEntropy_pdX
-setState_ThX
-pressure_ThX
-density_ThX
-specificEntropy_ThX
-setState_dTX
-pressure_dTX
-specificEnthalpy_dTX
-specificEntropy_dTX
-setState_TsX
-pressure_TsX
-specificEnthalpy_TsX
-density_TsX
-setState_hdX
-pressure_hdX
-temperature_hdX
-specificEntropy_hdX
-setState_hsX
-pressure_hsX
-temperature_hsX
-density_hsX
-setState_dsX
-pressure_dsX
-temperature_dsX
-specificEnthalpy_dsX
-setState_pqX
-density_pqX
-pressure_TqX
-specificEnthalpy_pqX
-specificEntropy_pqX
-temperature_pqX
-dynamicViscosity
-thermalConductivity
-specificHeatCapacityCp
-specificHeatCapacityCv
-pressure
-specificEnthalpy
-vapourQuality
diff --git a/REFPROPMediumPureSubstance/partialREFPROP.mo b/REFPROPMediumPureSubstance/partialREFPROP.mo
deleted file mode 100644
index 1211a40..0000000
--- a/REFPROPMediumPureSubstance/partialREFPROP.mo
+++ /dev/null
@@ -1,9 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-partial function partialREFPROP "Declaration of array props"
-//used by getSatProp_REFPROP_check() and getProp_REFPROP_check()
- extends Modelica.Icons.Function;
-protected
- Real[16+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",64),"")
- "Allocating memory, string will be written by C function, doesn't work for strings longer than 40 bytes";
-end partialREFPROP;
diff --git a/REFPROPMediumPureSubstance/pressure_ThX.mo b/REFPROPMediumPureSubstance/pressure_ThX.mo
deleted file mode 100644
index d976431..0000000
--- a/REFPROPMediumPureSubstance/pressure_ThX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function pressure_ThX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Modelica.SIunits.SpecificEnthalpy h;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_ThX("+String(T)+","+String(h)+",X)...");
- end if;
- p :=getProp_REFPROP_check("p", "Th",T,h,X,phase);
- annotation(LateInline=true,inverse(h=specificEnthalpy_pTX(p,T,X,phase),
- T=temperature_phX(p,h,X,phase)));
-end pressure_ThX;
diff --git a/REFPROPMediumPureSubstance/pressure_TqX.mo b/REFPROPMediumPureSubstance/pressure_TqX.mo
deleted file mode 100644
index 1dbbf7c..0000000
--- a/REFPROPMediumPureSubstance/pressure_TqX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function pressure_TqX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Real q;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
- //T=quality_pTX(p,T,X,phase)
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_TqX("+String(T)+","+String(q)+",X)");
- end if;
- p :=getProp_REFPROP_check("p", "Tq",T,q,X,phase);
- annotation(LateInline=true,inverse(T=temperature_pqX(p,q,X,phase)));
-end pressure_TqX;
diff --git a/REFPROPMediumPureSubstance/pressure_TsX.mo b/REFPROPMediumPureSubstance/pressure_TsX.mo
deleted file mode 100644
index ce0e7ef..0000000
--- a/REFPROPMediumPureSubstance/pressure_TsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function pressure_TsX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_TsX("+String(T)+","+String(s)+",X)...");
- end if;
- p :=getProp_REFPROP_check("p", "Ts",T,s,X,phase);
- annotation(LateInline=true,inverse(s = specificEntropy_pTX(p,T,X,phase),
- T=temperature_psX(p,s,X,phase)));
-end pressure_TsX;
diff --git a/REFPROPMediumPureSubstance/pressure_dTX.mo b/REFPROPMediumPureSubstance/pressure_dTX.mo
deleted file mode 100644
index b5c5b99..0000000
--- a/REFPROPMediumPureSubstance/pressure_dTX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function pressure_dTX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Density d;
- input Modelica.SIunits.Temperature T;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_dTX("+String(d)+","+String(T)+",X)");
- end if;
- p :=getProp_REFPROP_check("p", "dT",d,T,X,phase);
- annotation(LateInline=true,inverse(d = density_pTX(p,T,X,phase),
- T=temperature_pdX(p,d,X,phase)));
-end pressure_dTX;
diff --git a/REFPROPMediumPureSubstance/pressure_dsX.mo b/REFPROPMediumPureSubstance/pressure_dsX.mo
deleted file mode 100644
index 22e45c9..0000000
--- a/REFPROPMediumPureSubstance/pressure_dsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function pressure_dsX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Density d;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_dsX("+String(d)+","+String(s)+",X)");
- end if;
- p :=getProp_REFPROP_check("p", "ds",d,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_pdX(p,d,X,phase),
- d=density_psX(p,s,X,phase)));
-end pressure_dsX;
diff --git a/REFPROPMediumPureSubstance/pressure_hdX.mo b/REFPROPMediumPureSubstance/pressure_hdX.mo
deleted file mode 100644
index 3d3cb16..0000000
--- a/REFPROPMediumPureSubstance/pressure_hdX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function pressure_hdX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.SpecificEnthalpy h;
- input Modelica.SIunits.Density d;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_hdX("+String(h)+","+String(d)+",X)");
- end if;
- p :=getProp_REFPROP_check("p", "hd",h,d,X,phase);
- annotation(LateInline=true,inverse(d=density_phX(p,h,X,phase),
- h=specificEnthalpy_pdX(p,d,X,phase)));
-end pressure_hdX;
diff --git a/REFPROPMediumPureSubstance/pressure_hsX.mo b/REFPROPMediumPureSubstance/pressure_hsX.mo
deleted file mode 100644
index 2df7c7d..0000000
--- a/REFPROPMediumPureSubstance/pressure_hsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function pressure_hsX "calls REFPROP-Wrapper, returns pressure"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.SpecificEnthalpy h;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Pressure p;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running pressure_hsX("+String(h)+","+String(s)+",X)");
- end if;
- p :=getProp_REFPROP_check("p", "hs",h,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_phX(p,h,X,phase),
- h=specificEnthalpy_psX(p,s,X,phase)));
-end pressure_hsX;
diff --git a/REFPROPMediumPureSubstance/setState.mo b/REFPROPMediumPureSubstance/setState.mo
deleted file mode 100644
index a28d557..0000000
--- a/REFPROPMediumPureSubstance/setState.mo
+++ /dev/null
@@ -1,45 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function setState "Calculates medium properties"
- extends partialREFPROP;
- input String statevars;
- input Real statevar1;
- input Real statevar2;
- input Modelica.SIunits.MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-// Real[:] props=getProps_REFPROP_check(statevars, fluidnames,statevar1, statevar2, X, phase);
-/*protected
- Real[16+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",64),"")
- "Allocating memory, string will be written by C function";*/
-
-algorithm
- assert(size(X,1)>0,"The mass fraction vector must have at least 1 element.");
- getProp_REFPROP("",statevars,fluidnames,props,statevar1,statevar2,X,phase,errormsg);
- assert(props[1]==0,"Error in REFPROP wrapper function: "+errormsg +"\n");
-/* If q = 990 Then Modelica.Utilities.Streams.print(msg+String(z)) end if;
-
- If q = 998 Then Quality = Trim2("Superheated vapor with T>Tc")
- If q = 999 Then Quality = Trim2("Supercritical state (T>Tc, p>pc)")
- If q = -998 Then Quality = Trim2("Subcooled liquid with p>pc")*/
- state := ThermodynamicState( p= props[2],
- T= props[3],
- MM= props[4],
- d=props[5],
- d_l=props[6],
- d_g=props[7],
- x=min(max(props[8],0),1),
- u=props[9],
- h=props[10],
- s=props[11],
- cv=props[12],
- cp=props[13],
- c=props[14],
- phase=if props[8]>0 and props[8]<1 then 2 else 1);
-/*
- X= X,
- X_l=props[17:16+nX],
- X_g=props[17+nX:16+2*nX],
-*/
-end setState;
diff --git a/REFPROPMediumPureSubstance/setState_ThX.mo b/REFPROPMediumPureSubstance/setState_ThX.mo
deleted file mode 100644
index d166644..0000000
--- a/REFPROPMediumPureSubstance/setState_ThX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function setState_ThX "Calculates medium properties from T,h,X"
- extends Modelica.Icons.Function;
- input Temperature T "Temperature";
- input SpecificEnthalpy h "Enthalpy";
- input MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_ThX("+String(T)+","+String(h)+",X)...");
- end if;
- state := setState("Th",T,h,X,phase) ",fluidnames)";
-end setState_ThX;
diff --git a/REFPROPMediumPureSubstance/setState_TsX.mo b/REFPROPMediumPureSubstance/setState_TsX.mo
deleted file mode 100644
index a4da8af..0000000
--- a/REFPROPMediumPureSubstance/setState_TsX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function setState_TsX "Calculates medium properties from T,s,X"
- extends Modelica.Icons.Function;
- input Temperature T "Temperature";
- input SpecificEntropy s "Entropy";
- input MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_TsX("+String(T)+","+String(s)+",X)...");
- end if;
- state := setState("Ts",T,s,X,phase) ",fluidnames)";
-end setState_TsX;
diff --git a/REFPROPMediumPureSubstance/setState_dsX.mo b/REFPROPMediumPureSubstance/setState_dsX.mo
deleted file mode 100644
index 057f7ed..0000000
--- a/REFPROPMediumPureSubstance/setState_dsX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function setState_dsX "Calculates medium properties from d,s,X"
- extends Modelica.Icons.Function;
- input Density d "Temperature";
- input SpecificEntropy s "Entropy";
- input MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_dsX("+String(d)+","+String(s)+",X)...");
- end if;
- state := setState("ds",d,s,X,phase) ",fluidnames)";
-end setState_dsX;
diff --git a/REFPROPMediumPureSubstance/setState_hdX.mo b/REFPROPMediumPureSubstance/setState_hdX.mo
deleted file mode 100644
index dbb2425..0000000
--- a/REFPROPMediumPureSubstance/setState_hdX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function setState_hdX "Calculates medium properties from h,d,X"
- extends Modelica.Icons.Function;
- input SpecificEnthalpy h "Enthalpy";
- input Density d "Temperature";
- input MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_hdX("+String(h)+","+String(d)+",X)...");
- end if;
- state := setState("hd",h,d,X,phase) ",fluidnames)";
-end setState_hdX;
diff --git a/REFPROPMediumPureSubstance/setState_hsX.mo b/REFPROPMediumPureSubstance/setState_hsX.mo
deleted file mode 100644
index 23ea017..0000000
--- a/REFPROPMediumPureSubstance/setState_hsX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function setState_hsX "Calculates medium properties from h,s,X"
- extends Modelica.Icons.Function;
- input SpecificEnthalpy h "Enthalpy";
- input SpecificEntropy s "Entropy";
- input MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running ("+String(h)+","+String(s)+",X)...");
- end if;
- state := setState("hs",h,s,X,phase) ",fluidnames)";
-end setState_hsX;
diff --git a/REFPROPMediumPureSubstance/setState_pdX.mo b/REFPROPMediumPureSubstance/setState_pdX.mo
deleted file mode 100644
index ce95e6a..0000000
--- a/REFPROPMediumPureSubstance/setState_pdX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function setState_pdX "Calculates medium properties from p,d,X"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input Density d "Density";
- input MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_pdX("+String(p)+","+String(d)+",X)...");
- end if;
- state := setState("pd",p,d,X,phase) ",fluidnames)";
-end setState_pdX;
diff --git a/REFPROPMediumPureSubstance/setState_pqX.mo b/REFPROPMediumPureSubstance/setState_pqX.mo
deleted file mode 100644
index 10556ac..0000000
--- a/REFPROPMediumPureSubstance/setState_pqX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function setState_pqX "Calculates medium properties from p,q,X"
- extends Modelica.Icons.Function;
- input Modelica.SIunits.AbsolutePressure p "Pressure";
- input Modelica.SIunits.MassFraction q "quality (vapor mass fraction)";
- input Modelica.SIunits.MassFraction X[:]=reference_X "Mass fractions";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
-// input String fluidnames;
- output ThermodynamicState state "thermodynamic state record";
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running setState_pqX("+String(p)+","+String(q)+",X)...");
- end if;
- state := setState("pq",p,q,X,phase) ",fluidnames)";
-end setState_pqX;
diff --git a/REFPROPMediumPureSubstance/specificEnthalpy_TsX.mo b/REFPROPMediumPureSubstance/specificEnthalpy_TsX.mo
deleted file mode 100644
index 786c847..0000000
--- a/REFPROPMediumPureSubstance/specificEnthalpy_TsX.mo
+++ /dev/null
@@ -1,19 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function specificEnthalpy_TsX
- "calls REFPROP-Wrapper, returns specific enthalpy"
- //does not extend existing function from PartialMedium because there the algorithm is already defined
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
-// input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_TsX("+String(T)+","+String(s)+",X)");
- end if;
- h :=getProp_REFPROP_check("h", "Ts",T,s,X,phase);
- annotation(LateInline=true,inverse(s = specificEntropy_ThX(T,h,X,phase),
- T=temperature_hsX(h,s,X,phase)));
-end specificEnthalpy_TsX;
diff --git a/REFPROPMediumPureSubstance/specificEnthalpy_dTX.mo b/REFPROPMediumPureSubstance/specificEnthalpy_dTX.mo
deleted file mode 100644
index de59101..0000000
--- a/REFPROPMediumPureSubstance/specificEnthalpy_dTX.mo
+++ /dev/null
@@ -1,19 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function specificEnthalpy_dTX
- "calls REFPROP-Wrapper, returns specific enthalpy"
- //does not extend existing function from PartialMedium because there the algorithm is already defined
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Density d;
- input Modelica.SIunits.Temperature T;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
-// input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_dTX("+String(d)+","+String(T)+",X)");
- end if;
- h :=getProp_REFPROP_check("h", "dT",d,T,X,phase);
- annotation(LateInline=true,inverse(d=density_ThX(T,h,X,phase),
- T=temperature_hdX(h,d,X,phase)));
-end specificEnthalpy_dTX;
diff --git a/REFPROPMediumPureSubstance/specificEnthalpy_dsX.mo b/REFPROPMediumPureSubstance/specificEnthalpy_dsX.mo
deleted file mode 100644
index 80c85d5..0000000
--- a/REFPROPMediumPureSubstance/specificEnthalpy_dsX.mo
+++ /dev/null
@@ -1,22 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function specificEnthalpy_dsX
- "calls REFPROP-Wrapper, returns specific enthalpy"
- //does not extend existing function from PartialMedium because there the algorithm is already defined
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Density d;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
-// input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
-/*protected
- Real[14+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",10),"");*/
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_dsX("+String(d)+","+String(s)+",X)");
- end if;
- h :=getProp_REFPROP_check("h", "ds",d,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_hdX(h,d,X,phase),
- d=density_hsX(h,s,X,phase)));
-end specificEnthalpy_dsX;
diff --git a/REFPROPMediumPureSubstance/specificEnthalpy_pdX.mo b/REFPROPMediumPureSubstance/specificEnthalpy_pdX.mo
deleted file mode 100644
index 5c9c9ef..0000000
--- a/REFPROPMediumPureSubstance/specificEnthalpy_pdX.mo
+++ /dev/null
@@ -1,18 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function specificEnthalpy_pdX
- "calls REFPROP-Wrapper, returns specific enthalpy"
- //does not extend existing function from PartialMedium because there the algorithm is already defined
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.Density d;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_pdX("+String(p)+","+String(d)+",X)...");
- end if;
- h :=getProp_REFPROP_check("h", "pd",p,d,X,phase);
- annotation(LateInline=true,inverse(d = density_phX(p,h,X,phase),
- p=pressure_hdX(h,d,X,phase)));
-end specificEnthalpy_pdX;
diff --git a/REFPROPMediumPureSubstance/specificEnthalpy_pqX.mo b/REFPROPMediumPureSubstance/specificEnthalpy_pqX.mo
deleted file mode 100644
index 858f068..0000000
--- a/REFPROPMediumPureSubstance/specificEnthalpy_pqX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function specificEnthalpy_pqX
- "calls REFPROP-Wrapper, returns specific enthalpy"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Real q;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEnthalpy h;
-// annotation(LateInline=true,inverse(p = pressure_hqX(h,q,X,phase),quality_phX(p,h,X,phase)));
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEnthalpy_pqX("+String(p)+","+String(q)+",X)");
- end if;
- h :=getProp_REFPROP_check("h", "pq",p,q,X,phase);
-end specificEnthalpy_pqX;
diff --git a/REFPROPMediumPureSubstance/specificEntropy_ThX.mo b/REFPROPMediumPureSubstance/specificEntropy_ThX.mo
deleted file mode 100644
index eff9438..0000000
--- a/REFPROPMediumPureSubstance/specificEntropy_ThX.mo
+++ /dev/null
@@ -1,20 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function specificEntropy_ThX
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Temperature T;
- input Modelica.SIunits.SpecificEnthalpy h;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
-// input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
-/*protected
- Real[14+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",10),"");*/
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_ThX("+String(T)+","+String(h)+",X)");
- end if;
- s:=getProp_REFPROP_check("s", "Th",T,h,X,phase);
- annotation(LateInline=true,inverse(h = specificEnthalpy_TsX(T,s,X,phase),
- T=temperature_hsX(h,s,X,phase)));
-end specificEntropy_ThX;
diff --git a/REFPROPMediumPureSubstance/specificEntropy_dTX.mo b/REFPROPMediumPureSubstance/specificEntropy_dTX.mo
deleted file mode 100644
index b676dc0..0000000
--- a/REFPROPMediumPureSubstance/specificEntropy_dTX.mo
+++ /dev/null
@@ -1,17 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function specificEntropy_dTX
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Density d;
- input Modelica.SIunits.Temperature T;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
-// input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_dTX("+String(d)+","+String(T)+",X)");
- end if;
- s:=getProp_REFPROP_check("s", "dT",d,T,X,phase);
- annotation(LateInline=true,inverse(d = density_TsX(T,s,X,phase),
- T=temperature_dsX(d,s,X,phase)));
-end specificEntropy_dTX;
diff --git a/REFPROPMediumPureSubstance/specificEntropy_hdX.mo b/REFPROPMediumPureSubstance/specificEntropy_hdX.mo
deleted file mode 100644
index 4bc5bbe..0000000
--- a/REFPROPMediumPureSubstance/specificEntropy_hdX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function specificEntropy_hdX
- extends Modelica.Icons.Function;
- input Modelica.SIunits.SpecificEnthalpy h;
- input Modelica.SIunits.Density d;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_hdX("+String(h)+","+String(d)+",X)");
- end if;
- s:=getProp_REFPROP_check("s", "hd",h,d,X,phase);
- annotation(LateInline=true,inverse(d=density_hsX(h,s,X,phase),
- h=specificEnthalpy_dsX(d,s,X,phase)));
-end specificEntropy_hdX;
diff --git a/REFPROPMediumPureSubstance/specificEntropy_pdX.mo b/REFPROPMediumPureSubstance/specificEntropy_pdX.mo
deleted file mode 100644
index edf6224..0000000
--- a/REFPROPMediumPureSubstance/specificEntropy_pdX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function specificEntropy_pdX
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.Density d;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_pdX("+String(p)+","+String(d)+",X)");
- end if;
- s:=getProp_REFPROP_check("s", "pd",p,d,X,phase);
- annotation(LateInline=true,inverse(d = density_psX(p,s,X,phase),
- p=pressure_dsX(d,s,X,phase)));
-end specificEntropy_pdX;
diff --git a/REFPROPMediumPureSubstance/specificEntropy_phX.mo b/REFPROPMediumPureSubstance/specificEntropy_phX.mo
deleted file mode 100644
index 7fb508f..0000000
--- a/REFPROPMediumPureSubstance/specificEntropy_phX.mo
+++ /dev/null
@@ -1,21 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function specificEntropy_phX
- extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.SpecificEnthalpy h;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
-// input String fluidnames;
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
-/*protected
- Real[14+2*nX] props;
- String errormsg=StrJoin(fill("xxxx",10),"");*/
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_phX("+String(p)+","+String(h)+",X)...");
- // p="+String(p)+",h="+String(h)+", X={"+String(X[1])+","+String(X[2])+"}");
- end if;
- s:=getProp_REFPROP_check("s", "ph",p,h,X,phase);
- annotation(LateInline=true,inverse(h=specificEnthalpy_psX(p,s,X,phase),
- p=pressure_hsX(h,s,X,phase)));
-end specificEntropy_phX;
diff --git a/REFPROPMediumPureSubstance/specificEntropy_pqX.mo b/REFPROPMediumPureSubstance/specificEntropy_pqX.mo
deleted file mode 100644
index e8c5bf2..0000000
--- a/REFPROPMediumPureSubstance/specificEntropy_pqX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function specificEntropy_pqX "calls REFPROP-Wrapper, returns specific entropy"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Real q;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.SpecificEntropy s;
-// annotation(LateInline=true,inverse(p = pressure_sqX(s,q,X,phase),q=quality_psX(p,s,X,phase));
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running specificEntropy_pqX("+String(p)+","+String(q)+",X)");
- end if;
- s :=getProp_REFPROP_check("s", "pq",p,q,X,phase);
-end specificEntropy_pqX;
diff --git a/REFPROPMediumPureSubstance/temperature_dsX.mo b/REFPROPMediumPureSubstance/temperature_dsX.mo
deleted file mode 100644
index d3e7893..0000000
--- a/REFPROPMediumPureSubstance/temperature_dsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function temperature_dsX "calls REFPROP-Wrapper, returns temperature"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Density d;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_dsX("+String(d)+","+String(s)+",X)");
- end if;
- T :=getProp_REFPROP_check("T", "ds",d,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_dTX(d,T,X,phase),
- d=density_TsX(T,s,X,phase)));
-end temperature_dsX;
diff --git a/REFPROPMediumPureSubstance/temperature_hdX.mo b/REFPROPMediumPureSubstance/temperature_hdX.mo
deleted file mode 100644
index e58dfc9..0000000
--- a/REFPROPMediumPureSubstance/temperature_hdX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function temperature_hdX "calls REFPROP-Wrapper, returns temperature"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.SpecificEnthalpy h;
- input Modelica.SIunits.Density d;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_hdX("+String(h)+","+String(d)+",X)");
- end if;
- T :=getProp_REFPROP_check("T", "hd",h,d,X,phase);
- annotation(LateInline=true,inverse(d=density_ThX(T,h,X,phase),
- h=specificEnthalpy_dTX(d,T,X,phase)));
-end temperature_hdX;
diff --git a/REFPROPMediumPureSubstance/temperature_hsX.mo b/REFPROPMediumPureSubstance/temperature_hsX.mo
deleted file mode 100644
index 9c447e9..0000000
--- a/REFPROPMediumPureSubstance/temperature_hsX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function temperature_hsX "calls REFPROP-Wrapper, returns temperature"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.SpecificEnthalpy h;
- input Modelica.SIunits.SpecificEntropy s;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_hsX("+String(h)+","+String(s)+",X)");
- end if;
- T :=getProp_REFPROP_check("T", "hs",h,s,X,phase);
- annotation(LateInline=true,inverse(s=specificEntropy_ThX(T,h,X,phase),
- h=specificEnthalpy_TsX(T,s,X,phase)));
-end temperature_hsX;
diff --git a/REFPROPMediumPureSubstance/temperature_pdX.mo b/REFPROPMediumPureSubstance/temperature_pdX.mo
deleted file mode 100644
index 11d5b91..0000000
--- a/REFPROPMediumPureSubstance/temperature_pdX.mo
+++ /dev/null
@@ -1,16 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function temperature_pdX "calls REFPROP-Wrapper, returns temperature"
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.Density d;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_psX("+String(p)+","+String(d)+",X)...");
- end if;
- T :=getProp_REFPROP_check("T", "pd",p,d,X,phase);
- annotation(LateInline=true,inverse(d=density_pTX(p,T,X,phase),
- p=pressure_dTX(d,T,X,phase)));
-end temperature_pdX;
diff --git a/REFPROPMediumPureSubstance/temperature_pqX.mo b/REFPROPMediumPureSubstance/temperature_pqX.mo
deleted file mode 100644
index 8f5549a..0000000
--- a/REFPROPMediumPureSubstance/temperature_pqX.mo
+++ /dev/null
@@ -1,15 +0,0 @@
-within MediaTwoPhaseMixture.REFPROPMediumPureSubstance;
-function temperature_pqX
-extends Modelica.Icons.Function;
- input Modelica.SIunits.Pressure p;
- input MassFraction q;
- input MassFraction X[:]=reference_X "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temperature T;
-// annotation(LateInline=true,inverse(p = pressure_TqX(T,q,X,phase),q=quality_pTX(p,T,X,phase));
-algorithm
- if debugmode then
- Modelica.Utilities.Streams.print("Running temperature_pqX("+String(p)+","+String(q)+",X)");
- end if;
- T :=getProp_REFPROP_check("T", "pq",p,q,X,phase);
-end temperature_pqX;
diff --git a/Testers/PentaneTester.mo b/Testers/PentaneTester.mo
new file mode 100644
index 0000000..40aa369
--- /dev/null
+++ b/Testers/PentaneTester.mo
@@ -0,0 +1,52 @@
+within REFPROP2Modelica.Testers;
+model PentaneTester "Evaporation of pentane at 1 bar"
+package Medium = REFPROP2Modelica.Media.Pentane ( debugmode=true);
+// ",final explicitVars = "pd"";
+//package Medium = REFPROP2Modelica.REFPROPMedium(final substanceNames={"CO2","water"});
+ Medium.BaseProperties props;
+// Modelica.SIunits.Pressure psat=Medium.saturationPressure(300);
+/* Modelica.SIunits.SpecificEnthalpy h=Medium.specificEnthalpy_pTX(1e5,293,{.5,.5});
+ Modelica.SIunits.Density d;
+ Modelica.SIunits.SpecificEntropy s;
+ Modelica.SIunits.Temperature Tsat;
+ Modelica.SIunits.Pressure psat;
+ */
+//Modelica.SIunits.Pressure p=Medium.pressure(props.state);
+// Modelica.SIunits.MolarMass MM;
+/*Modelica.SIunits.DynamicViscosity eta = Medium.dynamicViscosity(props.state);
+
+Modelica.SIunits.DynamicViscosity eta_l = Medium.dynamicViscosity_liq(props.state);
+Modelica.SIunits.DynamicViscosity eta_g = Medium.dynamicViscosity_gas(props.state);
+*/
+// Real q = Medium.vapourQuality(props.state);
+// Modelica.SIunits.SpecificHeatCapacity cv=Medium.specificHeatCapacityCv(props.state);
+// Medium.ThermodynamicState state=Medium.setState_phX(props.p,props.h,props.X);
+equation
+ props.p = 1e5;
+ props.h = -1e5+time*6e5;
+
+ // props.s = 5.88105;
+// props.T = 400;
+// props.state.x = 0.5;
+// props.Xi = {.5};
+// props.X = {.1,.9};
+// props.Xi = {.5};
+ // d = props.d;
+ //h = props.h;
+ //h = Medium.dewEnthalpy(props.sat);
+ //d = Medium.density(props.state);
+ //s = specificEntropy(props.state);
+ //s = props.state.s;
+// MM = Medium.molarMass(props.state);
+/*
+ Tsat = Medium.saturationTemperature(props.p,props.X);
+// Tsat = Medium.temperature_pqX(props.p,0.5,props.X);
+ psat = Medium.saturationPressure(props.T,props.X);
+// psat = Medium.pressure_TqX(props.T,0.5,props.X);
+// h = Medium.dewEnthalpy(props.sat);
+// s = Medium.dewEntropy(props.sat);
+ s = Medium.bubbleEntropy(props.sat);
+// d = Medium.dewDensity(props.sat);
+ d = Medium.bubbleDensity(props.sat);
+*/
+end PentaneTester;
diff --git a/Examples/PropsMixture.mo b/Testers/PropsMixture.mo
similarity index 84%
rename from Examples/PropsMixture.mo
rename to Testers/PropsMixture.mo
index 8345f7f..a97b8c6 100644
--- a/Examples/PropsMixture.mo
+++ b/Testers/PropsMixture.mo
@@ -1,61 +1,54 @@
-within MediaTwoPhaseMixture.Examples;
-model PropsMixture
-//package Medium = REFPROPMedium(final substanceNames={"isobutan"});
-//package Medium = REFPROPMedium(final substanceNames={"R12"});
-package Medium = REFPROPMedium(final substanceNames={"isobutan","propane"});
-// ",final explicitVars = "pd"";
-//package Medium = MediaTwoPhaseMixture.REFPROPMedium(final substanceNames={"CO2","water"});
-
- Medium.BaseProperties props;
-
- Modelica.SIunits.Pressure psat=Medium.saturationPressure(300);
-
-/* Modelica.SIunits.SpecificEnthalpy h=Medium.specificEnthalpy_pTX(1e5,293,{.5,.5});
- Modelica.SIunits.Density d;
- Modelica.SIunits.SpecificEntropy s;
- Modelica.SIunits.Temperature Tsat;
- Modelica.SIunits.Pressure psat;
- */
-Modelica.SIunits.Pressure p=Medium.pressure(props.state);
-// Modelica.SIunits.MolarMass MM;
-/*Modelica.SIunits.DynamicViscosity eta = Medium.dynamicViscosity(props.state);
-
-Modelica.SIunits.DynamicViscosity eta_l = Medium.dynamicViscosity_liq(props.state);
-Modelica.SIunits.DynamicViscosity eta_g = Medium.dynamicViscosity_gas(props.state);
-*/
- Real q = Medium.vapourQuality(props.state);
- Modelica.SIunits.SpecificHeatCapacity cv=Medium.specificHeatCapacityCv(props.state);
- Medium.ThermodynamicState state=Medium.setState_phX(props.p,props.h,props.X);
-equation
-
- props.p = 1e5;
- props.h = 0+time*8e5;
- // props.s = 5.88105;
-// props.T = 400;
-// props.state.x = 0.5;
-// props.Xi = {.5};
-// props.X = {.1,.9};
- props.Xi = {.5};
-
- // d = props.d;
- //h = props.h;
- //h = Medium.dewEnthalpy(props.sat);
-
- //d = Medium.density(props.state);
- //s = specificEntropy(props.state);
- //s = props.state.s;
-// MM = Medium.molarMass(props.state);
-
-/*
- Tsat = Medium.saturationTemperature(props.p,props.X);
-// Tsat = Medium.temperature_pqX(props.p,0.5,props.X);
- psat = Medium.saturationPressure(props.T,props.X);
-// psat = Medium.pressure_TqX(props.T,0.5,props.X);
-// h = Medium.dewEnthalpy(props.sat);
-// s = Medium.dewEntropy(props.sat);
- s = Medium.bubbleEntropy(props.sat);
-// d = Medium.dewDensity(props.sat);
- d = Medium.bubbleDensity(props.sat);
-*/
-
-end PropsMixture;
+within REFPROP2Modelica.Testers;
+model PropsMixture
+//package Medium = REFPROPMedium(final substanceNames={"isobutan"});
+//package Medium = REFPROPMedium(final substanceNames={"R12"});
+package Medium = REFPROP2Modelica.Interfaces.REFPROPMixtureTwoPhaseMedium (
+ final substanceNames={"isobutan","propane"});
+// ",final explicitVars = "pd"";
+//package Medium = REFPROP2Modelica.REFPROPMedium(final substanceNames={"CO2","water"});
+ Medium.BaseProperties props;
+ Modelica.SIunits.Pressure psat=Medium.saturationPressure(300);
+/* Modelica.SIunits.SpecificEnthalpy h=Medium.specificEnthalpy_pTX(1e5,293,{.5,.5});
+ Modelica.SIunits.Density d;
+ Modelica.SIunits.SpecificEntropy s;
+ Modelica.SIunits.Temperature Tsat;
+ Modelica.SIunits.Pressure psat;
+ */
+Modelica.SIunits.Pressure p(min=10,max=10e6)=Medium.pressure(props.state);
+// Modelica.SIunits.MolarMass MM;
+/*Modelica.SIunits.DynamicViscosity eta = Medium.dynamicViscosity(props.state);
+
+Modelica.SIunits.DynamicViscosity eta_l = Medium.dynamicViscosity_liq(props.state);
+Modelica.SIunits.DynamicViscosity eta_g = Medium.dynamicViscosity_gas(props.state);
+*/
+ Real q = Medium.vapourQuality(props.state);
+ Modelica.SIunits.SpecificHeatCapacity cv=Medium.specificHeatCapacityCv(props.state);
+ Medium.ThermodynamicState state=Medium.setState_phX(props.p,props.h,props.X);
+equation
+ props.p = 1e5;
+ props.h = 0+time*8e5;
+ // props.s = 5.88105;
+// props.T = 400;
+// props.state.x = 0.5;
+// props.Xi = {.5};
+// props.X = {.1,.9};
+ props.Xi = {.5};
+ // d = props.d;
+ //h = props.h;
+ //h = Medium.dewEnthalpy(props.sat);
+ //d = Medium.density(props.state);
+ //s = specificEntropy(props.state);
+ //s = props.state.s;
+// MM = Medium.molarMass(props.state);
+/*
+ Tsat = Medium.saturationTemperature(props.p,props.X);
+// Tsat = Medium.temperature_pqX(props.p,0.5,props.X);
+ psat = Medium.saturationPressure(props.T,props.X);
+// psat = Medium.pressure_TqX(props.T,0.5,props.X);
+// h = Medium.dewEnthalpy(props.sat);
+// s = Medium.dewEntropy(props.sat);
+ s = Medium.bubbleEntropy(props.sat);
+// d = Medium.dewDensity(props.sat);
+ d = Medium.bubbleDensity(props.sat);
+*/
+end PropsMixture;
diff --git a/Testers/PropsMixtureTwo.mo b/Testers/PropsMixtureTwo.mo
new file mode 100644
index 0000000..2bc5347
--- /dev/null
+++ b/Testers/PropsMixtureTwo.mo
@@ -0,0 +1,15 @@
+within REFPROP2Modelica.Testers;
+model PropsMixtureTwo
+package Medium = REFPROP2Modelica.Interfaces.REFPROPMixtureTwoPhaseMedium (
+ final substanceNames={"isobutan","propane"});
+ Medium.BaseProperties props;
+ Modelica.SIunits.Pressure psat=Medium.saturationPressure(300);
+Modelica.SIunits.Pressure p(min=10,max=10e6)=Medium.pressure(props.state);
+ Real q = Medium.vapourQuality(props.state);
+ Modelica.SIunits.SpecificHeatCapacity cv=Medium.specificHeatCapacityCv(props.state);
+ Medium.ThermodynamicState state=Medium.setState_phX(props.p,props.h,props.X);
+equation
+ props.p = 1e5;
+ props.h = 0+time*8e5;
+ props.Xi = {.5};
+end PropsMixtureTwo;
diff --git a/Examples/PropsPureSubstance.mo b/Testers/PropsPureSubstance.mo
similarity index 89%
rename from Examples/PropsPureSubstance.mo
rename to Testers/PropsPureSubstance.mo
index 1637ec0..94d9161 100644
--- a/Examples/PropsPureSubstance.mo
+++ b/Testers/PropsPureSubstance.mo
@@ -1,55 +1,49 @@
-within MediaTwoPhaseMixture.Examples;
-model PropsPureSubstance
-//package Medium = Modelica.Media.Water.WaterIF97_ph;
-//package Medium = MediaTwoPhaseMixture.Water_MixtureTwoPhase_pT;
-//package Medium = REFPROPMedium(final substanceNames={"water"}, final explicitVars = "pT");
-//package Medium = REFPROPMedium(final substanceNames={"ammonia"});
-//package Medium = REFPROPMedium(final substanceNames={"co2"});
-package Medium = MediaTwoPhaseMixture.REFPROPMediumPureSubstance (final substanceNames={"butane"});
-
-//package Medium = REFPROPMediumPureSubstance(final substanceNames={"water"});
-//package Medium = REFPROPMediumPureSubstance(final substanceNames={"ammonia"}, final explicitVars = "ph");
-
- Medium.BaseProperties props;
-// Modelica.SIunits.Density d=Medium.density_phX(props.p,props.h);
-// d = Medium.bubbleDensity(props.sat);
-// d = Medium.density_pTX(1e5,300);
-// Modelica.SIunits.SpecificEnthalpy h;
-// Modelica.SIunits.SpecificEntropy s;
-// Modelica.SIunits.Temperature T=props.T;
- Modelica.SIunits.Pressure psat=Medium.saturationPressure(300);
-// Modelica.SIunits.MolarMass MM;
- Real q= Medium.vapourQuality(props.state);
-// Modelica.SIunits.SpecificHeatCapacityAtConstantPressure cp;
-// Modelica.SIunits.ThermalConductivity lambda= Medium.thermalConductivity(props.state);
-// Modelica.SIunits.DynamicViscosity eta = Medium.dynamicViscosity(props.state);
- Modelica.SIunits.SpecificHeatCapacity cv=Medium.specificHeatCapacityCv(props.state);
- Medium.SaturationProperties sat=Medium.SaturationProperties(1e5,300);
-equation
- props.p = 1e5 "sine_p.y";
- props.h = 0+time*722774;
-
-// props.s = 5.88105;
-// props.T = 350;
-// props.Xi = fill(0,0);
-
- //d = props.d;
- //h = props.h;
- //h = Medium.dewEnthalpy(props.sat);
-
- //d = Medium.density(props.state);
- //s = specificEntropy(props.state);
- //s = props.state.s;
-// MM = Medium.molarMass(props.state);
-// Tsat = Medium.saturationTemperature(props.p,props.X);
-// Tsat = Medium.temperature_pqX(props.p,0.5,props.X);
-// psat = Medium.saturationPressure(props.T,props.X);
-// psat = Medium.pressure_TqX(props.T,0.5,props.X);
-// h = Medium.dewEnthalpy(props.sat);
-// s = Medium.dewEntropy(props.sat);
-// s = Medium.bubbleEntropy(props.sat);
-// d = Medium.dewDensity(props.sat);
-
- annotation (experiment(StopTime=10, NumberOfIntervals=1000),
- __Dymola_experimentSetupOutput);
-end PropsPureSubstance;
+within REFPROP2Modelica.Testers;
+model PropsPureSubstance
+//package Medium = Modelica.Media.Water.WaterIF97_ph;
+//package Medium = REFPROP2Modelica.Water_MixtureTwoPhase_pT;
+//package Medium = REFPROPMedium(final substanceNames={"water"}, final explicitVars = "pT");
+//package Medium = REFPROPMedium(final substanceNames={"ammonia"});
+//package Medium = REFPROPMedium(final substanceNames={"co2"});
+package Medium = REFPROP2Modelica.REFPROPMediumPureSubstance (final substanceNames={"butane"});
+//package Medium = REFPROPMediumPureSubstance(final substanceNames={"water"});
+//package Medium = REFPROPMediumPureSubstance(final substanceNames={"ammonia"}, final explicitVars = "ph");
+ Medium.BaseProperties props;
+// Modelica.SIunits.Density d=Medium.density_phX(props.p,props.h);
+// d = Medium.bubbleDensity(props.sat);
+// d = Medium.density_pTX(1e5,300);
+// Modelica.SIunits.SpecificEnthalpy h;
+// Modelica.SIunits.SpecificEntropy s;
+// Modelica.SIunits.Temperature T=props.T;
+ Modelica.SIunits.Pressure psat=Medium.saturationPressure(300);
+// Modelica.SIunits.MolarMass MM;
+ Real q= Medium.vapourQuality(props.state);
+// Modelica.SIunits.SpecificHeatCapacityAtConstantPressure cp;
+// Modelica.SIunits.ThermalConductivity lambda= Medium.thermalConductivity(props.state);
+// Modelica.SIunits.DynamicViscosity eta = Medium.dynamicViscosity(props.state);
+ Modelica.SIunits.SpecificHeatCapacity cv=Medium.specificHeatCapacityCv(props.state);
+ Medium.SaturationProperties sat=Medium.SaturationProperties(1e5,300);
+equation
+ props.p = 1e5 "sine_p.y";
+ props.h = 0+time*722774;
+// props.s = 5.88105;
+// props.T = 350;
+// props.Xi = fill(0,0);
+ //d = props.d;
+ //h = props.h;
+ //h = Medium.dewEnthalpy(props.sat);
+ //d = Medium.density(props.state);
+ //s = specificEntropy(props.state);
+ //s = props.state.s;
+// MM = Medium.molarMass(props.state);
+// Tsat = Medium.saturationTemperature(props.p,props.X);
+// Tsat = Medium.temperature_pqX(props.p,0.5,props.X);
+// psat = Medium.saturationPressure(props.T,props.X);
+// psat = Medium.pressure_TqX(props.T,0.5,props.X);
+// h = Medium.dewEnthalpy(props.sat);
+// s = Medium.dewEntropy(props.sat);
+// s = Medium.bubbleEntropy(props.sat);
+// d = Medium.dewDensity(props.sat);
+ annotation (experiment(StopTime=10, NumberOfIntervals=1000),
+ __Dymola_experimentSetupOutput);
+end PropsPureSubstance;
diff --git a/Testers/R410mixTester.mo b/Testers/R410mixTester.mo
new file mode 100644
index 0000000..d85be9d
--- /dev/null
+++ b/Testers/R410mixTester.mo
@@ -0,0 +1,15 @@
+within REFPROP2Modelica.Testers;
+model R410mixTester "Density of saturated R410 vapour"
+package Medium = REFPROP2Modelica.Media.R410mix(debugmode=true);
+ Medium.BaseProperties props;
+ Medium.Density d;
+ Medium.SpecificEnthalpy h(start=300e3);
+ Medium.AbsolutePressure p = Medium.pressure(props.state);
+ Medium.SpecificHeatCapacity cv = Medium.specificHeatCapacityCv(props.state);
+equation
+ props.p = 101325;
+ h = Medium.dewEnthalpy(props.sat);
+ props.h = h;
+ props.d = d;
+ props.Xi = {0.697615};
+end R410mixTester;
diff --git a/Water_MixtureTwoPhase_pT/package.mo b/Testers/Water_MixtureTwoPhase_pT.mo
similarity index 88%
rename from Water_MixtureTwoPhase_pT/package.mo
rename to Testers/Water_MixtureTwoPhase_pT.mo
index 5aa7ebd..3d8560f 100644
--- a/Water_MixtureTwoPhase_pT/package.mo
+++ b/Testers/Water_MixtureTwoPhase_pT.mo
@@ -1,319 +1,286 @@
-within MediaTwoPhaseMixture;
-package Water_MixtureTwoPhase_pT "(incomplete) Water model from Modelica.Media compatible to PartialMixtureTwoPhaseMedium (Example use)"
-
-
- extends PartialMixtureTwoPhaseMedium(
- final mediumName="TwoPhaseMixtureWater",
- final substanceNames={"water"},
- final reducedX = true,
- final singleState=false,
- reference_X=cat(1,fill(0,nX-1),{1}),
- fluidConstants = BrineConstants);
-// final extraPropertiesNames={"gas enthalpy","liquid enthalpy"},
-
- constant Modelica.SIunits.MolarMass M_H2O = 0.018015 "[kg/mol] TODO";
-
-
- redeclare model extends BaseProperties "Base properties of medium"
-
- Real GVF=q*d/d_g "gas void fraction";
- Modelica.SIunits.Density d_l = Modelica.Media.Water.IF97_Utilities.rhol_T(T);
- Modelica.SIunits.Density d_g = Modelica.Media.Water.IF97_Utilities.rhov_T(T);
- /* Modelica.SIunits.Density d_l = Modelica.Media.Water.IF97_Utilities.rhol_p(p);
- Modelica.SIunits.Density d_g = Modelica.Media.Water.IF97_Utilities.rhov_p(p);*/
- /* Modelica.SIunits.Density d_l = Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhol_p(p);
- Modelica.SIunits.Density d_g = Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhov_p(p);*/
- Modelica.SIunits.SpecificEnthalpy h_l = bubbleEnthalpy(sat);
- Modelica.SIunits.SpecificEnthalpy h_g = dewEnthalpy(sat);
- Real q = min(max((h - h_l)/(h_g - h_l+ 1e-18), 0), 1)
- "(min=0,max=1) gas phase mass fraction";
- // Integer phase_out "calculated phase";
- //END no gas case
- equation
- u = h - p/d;
- MM = M_H2O;
- R = Modelica.Constants.R/MM;
-
- //End GVF
-
- //DENSITY
- // q = vapourQuality(state);
- d = Modelica.Media.Water.WaterIF97_base.density_ph(p,h);
- // d = d_l/(1-q*(1-d_l/d_g));
- //End DENSITY
-
- //ENTHALPY
- h = specificEnthalpy_pTX(p,T,X);
- /*
- if (p_H2O>p) then
- h_H2O_g = Modelica.Media.Water.WaterIF97_base.specificEnthalpy_pT(p,T,1);
- else
- h_H2O_g = Modelica.Media.Water.WaterIF97_base.dewEnthalpy(Modelica.Media.Water.WaterIF97_base.setSat_p(p));
- end if;
- h_gas_dissolved = 0;
- Delta_h_solution = solutionEnthalpy(T)
- "TODO: gilt nur bei gesättigter Lösung";
-*/
- //assert(abs(((1-q)*h_l + q*h_g-h)/h) < 1e-3,"Enthalpie stimmt nicht! h_calc="+String((1-q)*h_l + q*h_g)+"<>h="+String(h));
- //End ENTHALPY
-
- s=0 "TODO";
-
- state = ThermodynamicState(
- p=p,
- T=T,
- X=X,
- X_l=X,
- h=h,
- GVF=GVF,
- q=q,
- s=0,
- d_g=d_g,
- d_l=d_l,
- d=d,
- phase=0) "phase_out";
-
- sat.psat = p "TODO";
- sat.Tsat = T "saturationTemperature(p) TODO";
- sat.X = X;
-
- annotation (Documentation(info=""),
- Documentation(revisions="
-
-"));
- end BaseProperties;
-
-
- redeclare function specificEnthalpy_pTX
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.Temp_K T;
- input MassFraction X[:] "mass fraction m_NaCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- /* input MassFraction q "(min=0,max=1)";
- input Real y "molar fraction of gas in gas phase";*/
- // input Real[3] TP;
- output Modelica.SIunits.SpecificEnthalpy h=Modelica.Media.Water.WaterIF97_base.specificEnthalpy_pT(p,T);
- algorithm
- // Modelica.Utilities.Streams.print("specificEnthalpy_pTXqy("+String(p)+","+String(T)+",X,"+String(q)+","+String(y)+")");
- annotation(LateInline=true,inverse(T = temperature_phX(p=p,h=h,X=X,phase=phase)));
- end specificEnthalpy_pTX;
-
-
- redeclare function temperature_phX
- "numerically inverts specificEnthalpy_liquid_pTX"
- input Modelica.SIunits.Pressure p;
- input Modelica.SIunits.SpecificEnthalpy h;
- input MassFraction X[:] "mass fraction m_XCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output Modelica.SIunits.Temp_K T=Modelica.Media.Water.WaterIF97_base.temperature_ph(p,h);
- algorithm
- // Modelica.Utilities.Streams.print("temperature_phX");
-
- annotation(LateInline=true,inverse(h = specificEnthalpy_pTX(p=p,T=T,phase=phase,X=X)));
- end temperature_phX;
-
-
-redeclare record extends ThermodynamicState
- "a selection of variables that uniquely defines the thermodynamic state"
-/* AbsolutePressure p "Absolute pressure of medium";
- Temperature T(unit="K") "Temperature of medium";
- MassFraction X[nX] "Mass fraction of NaCl in kg/kg";*/
- SpecificEnthalpy h "Specific enthalpy";
- SpecificEntropy s "Specific entropy";
- Density d(start=300) "density";
- Real GVF "Gas Void Fraction";
- Density d_l(start=300) "density liquid phase";
- Density d_g(start=300) "density gas phase";
- Real q "vapor quality on a mass basis [mass vapor/total mass]";
-
- annotation (Documentation(info="
-
-"));
-end ThermodynamicState;
-
-
- redeclare function extends dewEnthalpy "dew curve specific enthalpy of water"
- algorithm
- hv := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hv_p(sat.psat);
- end dewEnthalpy;
-
-
- redeclare function extends bubbleEnthalpy
- "boiling curve specific enthalpy of water"
- algorithm
- hl := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hl_p(sat.psat);
- end bubbleEnthalpy;
-
-
- redeclare function extends saturationTemperature
- algorithm
- //T := Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.tsat(p);
- T := Modelica.Media.Water.WaterIF97_base.saturationTemperature(p);
- end saturationTemperature;
-
-
- redeclare function extends dynamicViscosity
- algorithm
- eta := Modelica.Media.Water.WaterIF97_base.dynamicViscosity(state);
- end dynamicViscosity;
-
-
-redeclare function extends specificEntropy "specific entropy of water"
-algorithm
- s := Modelica.Media.Water.IF97_Utilities.s_ph(state.p, state.h, state.phase);
-end specificEntropy;
-
-
-redeclare function specificEnthalpy_ps
- "Computes specific enthalpy as a function of pressure and temperature"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEntropy s "Specific entropy";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output SpecificEnthalpy h "specific enthalpy";
-algorithm
- h := Modelica.Media.Water.IF97_Utilities.h_ps(p, s, phase);
-end specificEnthalpy_ps;
-
-
-redeclare function extends setState_psX
- "Return thermodynamic state of water as function of p and s"
-algorithm
- state := ThermodynamicState(
- d=density_ps(p,s),
- T=temperature_ps(p,s),
- phase=0,
- h=specificEnthalpy_ps(p,s),
- p=p,
- X=X,
- s=s,
- q=-1,
- GVF=-1,
- d_l=-1,
- d_g=-1);
-end setState_psX;
-
-
- redeclare function extends temperature "return temperature of ideal gas"
- algorithm
- T := state.T;
- end temperature;
-
-
- redeclare function extends density "return density of ideal gas"
- algorithm
- d := state.d;
- end density;
-
-
-redeclare function extends setState_pTX
- "Return thermodynamic state of water as function of p and T"
-algorithm
- state := ThermodynamicState(
- d=density_pT(p,T),
- T=T,
- phase=0,
- h=specificEnthalpy_pTX(p,s),
- p=p,
- X=X,
- s=specificEntropy_pT(p.T),
- q=-1,
- GVF=-1,
- d_l=-1,
- d_g=-1);
-end setState_pTX;
-
-
-redeclare function specificEntropy_pTX
- "Computes specific enthalpy as a function of pressure and temperature"
- extends Modelica.Icons.Function;
- input AbsolutePressure p "Pressure";
- input SpecificEntropy T "Specific entropy";
- input MassFraction X[:] "mass fraction m_XCl/m_Sol";
- input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
- output SpecificEnthalpy s "specific enthalpy";
-algorithm
- h := Modelica.Media.Water.IF97_Utilities.h_ps(p, s, phase);
-end specificEntropy_pTX;
-
-
- redeclare function extends thermalConductivity
- "Thermal conductivity of water"
- algorithm
- lambda := Modelica.Media.Water.IF97_Utilities.thermalConductivity(
- state.d,
- state.T,
- state.p,
- state.phase);
- end thermalConductivity;
-
-
- redeclare function extends specificHeatCapacityCp
- "specific heat capacity at constant pressure of water"
-
- algorithm
- if Modelica.Media.Water.WaterIF97_base.dT_explicit then
- cp := Modelica.Media.Water.IF97_Utilities.cp_dT(
- state.d,
- state.T,
- state.phase);
- elseif Modelica.Media.Water.WaterIF97_base.pT_explicit then
- cp := Modelica.Media.Water.IF97_Utilities.cp_pT(state.p, state.T);
- else
- cp := Modelica.Media.Water.IF97_Utilities.cp_ph(
- state.p,
- state.h,
- state.phase);
- end if;
- annotation (Documentation(info="
-
In the two phase region this function returns the interpolated heat capacity between the
- liquid and vapour state heat capacities.
- "));
- end specificHeatCapacityCp;
-
-
- redeclare function extends saturationPressure
- algorithm
- p := Modelica.Media.Water.WaterIF97_base.saturationPressure(T);
- end saturationPressure;
-
-
- redeclare function extends specificHeatCapacityCv
- "specific heat capacity at constant pressure of water"
-
- algorithm
- if Modelica.Media.Water.WaterIF97_base.dT_explicit then
- cv := Modelica.Media.Water.IF97_Utilities.cv_dT(
- state.d,
- state.T,
- state.phase);
- elseif Modelica.Media.Water.WaterIF97_base.pT_explicit then
- cv := Modelica.Media.Water.IF97_Utilities.cv_pT(state.p, state.T);
- else
- cv := Modelica.Media.Water.IF97_Utilities.cv_ph(
- state.p,
- state.h,
- state.phase);
- end if;
- annotation (Documentation(info="
- In the two phase region this function returns the interpolated heat capacity between the
- liquid and vapour state heat capacities.
- "));
- end specificHeatCapacityCv;
-
- annotation (Documentation(info="
- Water_MixtureTwoPhase_pT
- This is a an example use of PartialMixtureTwoPhaseMedium.
- It is a (incomplete) water model using the template PartialMixtureTwoPhaseMedium. It uses the property functions from Modelica.Media.Water.
-
- Created by
-Henning Francke
-Helmholtz Centre Potsdam
-GFZ German Research Centre for Geosciences
-Telegrafenberg, D-14473 Potsdam
-Germany
-
-francke@gfz-potsdam.de
-
-"));
-end Water_MixtureTwoPhase_pT;
+within REFPROP2Modelica.Testers;
+package Water_MixtureTwoPhase_pT
+ "(incomplete) Water model from Modelica.Media compatible to PartialMixtureTwoPhaseMedium (Example use)"
+ extends REFPROP2Modelica.Interfaces.PartialMixtureTwoPhaseMediumTwo(
+ final mediumName="TwoPhaseMixtureWater",
+ final substanceNames={"water"},
+ final reducedX = true,
+ final singleState=false,
+ reference_X=cat(1,fill(0,nX-1),{1}),
+ fluidConstants = BrineConstants);
+// final extraPropertiesNames={"gas enthalpy","liquid enthalpy"},
+ constant Modelica.SIunits.MolarMass M_H2O = 0.018015 "[kg/mol] TODO";
+
+ redeclare model extends BaseProperties "Base properties of medium"
+ Real GVF=q*d/d_g "gas void fraction";
+ Modelica.SIunits.Density d_l = Modelica.Media.Water.IF97_Utilities.rhol_T(T);
+ Modelica.SIunits.Density d_g = Modelica.Media.Water.IF97_Utilities.rhov_T(T);
+ /* Modelica.SIunits.Density d_l = Modelica.Media.Water.IF97_Utilities.rhol_p(p);
+ Modelica.SIunits.Density d_g = Modelica.Media.Water.IF97_Utilities.rhov_p(p);*/
+ /* Modelica.SIunits.Density d_l = Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhol_p(p);
+ Modelica.SIunits.Density d_g = Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhov_p(p);*/
+ Modelica.SIunits.SpecificEnthalpy h_l = bubbleEnthalpy(sat);
+ Modelica.SIunits.SpecificEnthalpy h_g = dewEnthalpy(sat);
+ Real q = min(max((h - h_l)/(h_g - h_l+ 1e-18), 0), 1)
+ "(min=0,max=1) gas phase mass fraction";
+ // Integer phase_out "calculated phase";
+ //END no gas case
+ equation
+ u = h - p/d;
+ MM = M_H2O;
+ R = Modelica.Constants.R/MM;
+ //End GVF
+ //DENSITY
+ // q = vapourQuality(state);
+ d = Modelica.Media.Water.WaterIF97_base.density_ph(p,h);
+ // d = d_l/(1-q*(1-d_l/d_g));
+ //End DENSITY
+ //ENTHALPY
+ h = specificEnthalpy_pTX(p,T,X);
+ /*
+ if (p_H2O>p) then
+ h_H2O_g = Modelica.Media.Water.WaterIF97_base.specificEnthalpy_pT(p,T,1);
+ else
+ h_H2O_g = Modelica.Media.Water.WaterIF97_base.dewEnthalpy(Modelica.Media.Water.WaterIF97_base.setSat_p(p));
+ end if;
+ h_gas_dissolved = 0;
+ Delta_h_solution = solutionEnthalpy(T)
+ "TODO: gilt nur bei gesättigter Lösung";
+*/
+ //assert(abs(((1-q)*h_l + q*h_g-h)/h) < 1e-3,"Enthalpie stimmt nicht! h_calc="+String((1-q)*h_l + q*h_g)+"<>h="+String(h));
+ //End ENTHALPY
+ s=0 "TODO";
+ state = ThermodynamicState(
+ p=p,
+ T=T,
+ X=X,
+ X_l=X,
+ h=h,
+ GVF=GVF,
+ q=q,
+ s=0,
+ d_g=d_g,
+ d_l=d_l,
+ d=d,
+ phase=0) "phase_out";
+ sat.psat = p "TODO";
+ sat.Tsat = T "saturationTemperature(p) TODO";
+ sat.X = X;
+ annotation (Documentation(info=""),
+ Documentation(revisions="
+
+"));
+ end BaseProperties;
+
+ redeclare function specificEnthalpy_pTX
+ input Modelica.SIunits.Pressure p;
+ input Modelica.SIunits.Temp_K T;
+ input MassFraction X[:] "mass fraction m_NaCl/m_Sol";
+ input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
+ /* input MassFraction q "(min=0,max=1)";
+ input Real y "molar fraction of gas in gas phase";*/
+ // input Real[3] TP;
+ output Modelica.SIunits.SpecificEnthalpy h=Modelica.Media.Water.WaterIF97_base.specificEnthalpy_pT(p,T);
+ algorithm
+ // Modelica.Utilities.Streams.print("specificEnthalpy_pTXqy("+String(p)+","+String(T)+",X,"+String(q)+","+String(y)+")");
+ annotation(LateInline=true,inverse(T = temperature_phX(p=p,h=h,X=X,phase=phase)));
+ end specificEnthalpy_pTX;
+
+ redeclare function temperature_phX
+ "numerically inverts specificEnthalpy_liquid_pTX"
+ input Modelica.SIunits.Pressure p;
+ input Modelica.SIunits.SpecificEnthalpy h;
+ input MassFraction X[:] "mass fraction m_XCl/m_Sol";
+ input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
+ output Modelica.SIunits.Temp_K T=Modelica.Media.Water.WaterIF97_base.temperature_ph(p,h);
+ algorithm
+ // Modelica.Utilities.Streams.print("temperature_phX");
+ annotation(LateInline=true,inverse(h = specificEnthalpy_pTX(p=p,T=T,phase=phase,X=X)));
+ end temperature_phX;
+
+redeclare record extends ThermodynamicState
+ "a selection of variables that uniquely defines the thermodynamic state"
+/* AbsolutePressure p "Absolute pressure of medium";
+ Temperature T(unit="K") "Temperature of medium";
+ MassFraction X[nX] "Mass fraction of NaCl in kg/kg";*/
+ SpecificEnthalpy h "Specific enthalpy";
+ SpecificEntropy s "Specific entropy";
+ Density d(start=300) "density";
+ Real GVF "Gas Void Fraction";
+ Density d_l(start=300) "density liquid phase";
+ Density d_g(start=300) "density gas phase";
+ Real q "vapor quality on a mass basis [mass vapor/total mass]";
+ annotation (Documentation(info="
+
+"));
+end ThermodynamicState;
+
+ redeclare function extends dewEnthalpy "dew curve specific enthalpy of water"
+ algorithm
+ hv := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hv_p(sat.psat);
+ end dewEnthalpy;
+
+ redeclare function extends bubbleEnthalpy
+ "boiling curve specific enthalpy of water"
+ algorithm
+ hl := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hl_p(sat.psat);
+ end bubbleEnthalpy;
+
+ redeclare function extends saturationTemperature
+ algorithm
+ //T := Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.tsat(p);
+ T := Modelica.Media.Water.WaterIF97_base.saturationTemperature(p);
+ end saturationTemperature;
+
+ redeclare function extends dynamicViscosity
+ algorithm
+ eta := Modelica.Media.Water.WaterIF97_base.dynamicViscosity(state);
+ end dynamicViscosity;
+
+redeclare function extends specificEntropy "specific entropy of water"
+algorithm
+ s := Modelica.Media.Water.IF97_Utilities.s_ph(state.p, state.h, state.phase);
+end specificEntropy;
+
+redeclare function specificEnthalpy_ps
+ "Computes specific enthalpy as a function of pressure and temperature"
+ extends Modelica.Icons.Function;
+ input AbsolutePressure p "Pressure";
+ input SpecificEntropy s "Specific entropy";
+ input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
+ output SpecificEnthalpy h "specific enthalpy";
+algorithm
+ h := Modelica.Media.Water.IF97_Utilities.h_ps(p, s, phase);
+end specificEnthalpy_ps;
+
+redeclare function extends setState_psX
+ "Return thermodynamic state of water as function of p and s"
+algorithm
+ state := ThermodynamicState(
+ d=density_ps(p,s),
+ T=temperature_ps(p,s),
+ phase=0,
+ h=specificEnthalpy_ps(p,s),
+ p=p,
+ X=X,
+ s=s,
+ q=-1,
+ GVF=-1,
+ d_l=-1,
+ d_g=-1);
+end setState_psX;
+
+ redeclare function extends temperature "return temperature of ideal gas"
+ algorithm
+ T := state.T;
+ end temperature;
+
+ redeclare function extends density "return density of ideal gas"
+ algorithm
+ d := state.d;
+ end density;
+
+redeclare function extends setState_pTX
+ "Return thermodynamic state of water as function of p and T"
+algorithm
+ state := ThermodynamicState(
+ d=density_pT(p,T),
+ T=T,
+ phase=0,
+ h=specificEnthalpy_pTX(p,s),
+ p=p,
+ X=X,
+ s=specificEntropy_pT(p.T),
+ q=-1,
+ GVF=-1,
+ d_l=-1,
+ d_g=-1);
+end setState_pTX;
+
+redeclare function specificEntropy_pTX
+ "Computes specific enthalpy as a function of pressure and temperature"
+ extends Modelica.Icons.Function;
+ input AbsolutePressure p "Pressure";
+ input SpecificEntropy T "Specific entropy";
+ input MassFraction X[:] "mass fraction m_XCl/m_Sol";
+ input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
+ output SpecificEnthalpy s "specific enthalpy";
+algorithm
+ h := Modelica.Media.Water.IF97_Utilities.h_ps(p, s, phase);
+end specificEntropy_pTX;
+
+ redeclare function extends thermalConductivity
+ "Thermal conductivity of water"
+ algorithm
+ lambda := Modelica.Media.Water.IF97_Utilities.thermalConductivity(
+ state.d,
+ state.T,
+ state.p,
+ state.phase);
+ end thermalConductivity;
+
+ redeclare function extends specificHeatCapacityCp
+ "specific heat capacity at constant pressure of water"
+ algorithm
+ if Modelica.Media.Water.WaterIF97_base.dT_explicit then
+ cp := Modelica.Media.Water.IF97_Utilities.cp_dT(
+ state.d,
+ state.T,
+ state.phase);
+ elseif Modelica.Media.Water.WaterIF97_base.pT_explicit then
+ cp := Modelica.Media.Water.IF97_Utilities.cp_pT(state.p, state.T);
+ else
+ cp := Modelica.Media.Water.IF97_Utilities.cp_ph(
+ state.p,
+ state.h,
+ state.phase);
+ end if;
+ annotation (Documentation(info="
+
In the two phase region this function returns the interpolated heat capacity between the
+ liquid and vapour state heat capacities.
+ "));
+ end specificHeatCapacityCp;
+
+ redeclare function extends saturationPressure
+ algorithm
+ p := Modelica.Media.Water.WaterIF97_base.saturationPressure(T);
+ end saturationPressure;
+
+ redeclare function extends specificHeatCapacityCv
+ "specific heat capacity at constant pressure of water"
+ algorithm
+ if Modelica.Media.Water.WaterIF97_base.dT_explicit then
+ cv := Modelica.Media.Water.IF97_Utilities.cv_dT(
+ state.d,
+ state.T,
+ state.phase);
+ elseif Modelica.Media.Water.WaterIF97_base.pT_explicit then
+ cv := Modelica.Media.Water.IF97_Utilities.cv_pT(state.p, state.T);
+ else
+ cv := Modelica.Media.Water.IF97_Utilities.cv_ph(
+ state.p,
+ state.h,
+ state.phase);
+ end if;
+ annotation (Documentation(info="
+ In the two phase region this function returns the interpolated heat capacity between the
+ liquid and vapour state heat capacities.
+ "));
+ end specificHeatCapacityCv;
+
+ annotation (Documentation(info="
+ Water_MixtureTwoPhase_pT
+ This is a an example use of PartialMixtureTwoPhaseMedium.
+ It is a (incomplete) water model using the template PartialMixtureTwoPhaseMedium. It uses the property functions from Modelica.Media.Water.
+
+ Created by
+Henning Francke
+Helmholtz Centre Potsdam
+GFZ German Research Centre for Geosciences
+Telegrafenberg, D-14473 Potsdam
+Germany
+
+francke@gfz-potsdam.de
+
+"));
+end Water_MixtureTwoPhase_pT;
diff --git a/Testers/package.mo b/Testers/package.mo
new file mode 100644
index 0000000..67a63ea
--- /dev/null
+++ b/Testers/package.mo
@@ -0,0 +1,3 @@
+within REFPROP2Modelica;
+package Testers
+end Testers;
diff --git a/Testers/package.order b/Testers/package.order
new file mode 100644
index 0000000..6804795
--- /dev/null
+++ b/Testers/package.order
@@ -0,0 +1,6 @@
+PentaneTester
+R410mixTester
+PropsMixtureTwo
+PropsMixture
+PropsPureSubstance
+Water_MixtureTwoPhase_pT
diff --git a/Water_MixtureTwoPhase_pT/package.order b/Water_MixtureTwoPhase_pT/package.order
deleted file mode 100644
index 9510fbd..0000000
--- a/Water_MixtureTwoPhase_pT/package.order
+++ /dev/null
@@ -1,20 +0,0 @@
-M_H2O
-BaseProperties
-specificEnthalpy_pTX
-temperature_phX
-ThermodynamicState
-dewEnthalpy
-bubbleEnthalpy
-saturationTemperature
-dynamicViscosity
-specificEntropy
-specificEnthalpy_ps
-setState_psX
-temperature
-density
-setState_pTX
-specificEntropy_pTX
-thermalConductivity
-specificHeatCapacityCp
-saturationPressure
-specificHeatCapacityCv
diff --git a/_wrapper/v0.5/REFPROP_wrapper.lib b/_wrapper/v0.5/REFPROP_wrapper.lib
index bc7f7bc3f7ed2de7b75c6dce583b409bd1e7c2c3..4c9870c7f80251be5a14ab06c9faea8f83e0a93c 100644
GIT binary patch
delta 31
mcmeC$!PK^cX@jDQK#;3jK#+fck#BxVYEEWy;$~BotK|T$&kIlh
delta 35
qcmZqM!PK>bX@jDQh;M32W@1Qren3WIajI`-MM-H<>SjZgtK|UjGY#7S
diff --git a/_wrapper/v0.6/Makefile b/_wrapper/v0.6/Makefile
index 0992eea..068366e 100644
--- a/_wrapper/v0.6/Makefile
+++ b/_wrapper/v0.6/Makefile
@@ -1,7 +1,7 @@
# ============================================================================
# Name : Makefile
# Author : Jorrit Wronski (jowr@mek.dtu.dk)
-# Version : 0.6
+# Version : 0.6.1
# Copyright : Use and modify at your own risk.
# Description : Makefile for Refprop from Fortran and C++ tests.
# ============================================================================
@@ -21,7 +21,7 @@ LN := ln -sf
# used for the output
MAJORVERSION =0
-MINORVERSION =6
+MINORVERSION =6.1
THENAME =refprop_wrapper
LIBRARYEXTENSION =.so
THETEST =refpropwrappertest
diff --git a/_wrapper/v0.6/bin/librefprop_wrapper.so b/_wrapper/v0.6/bin/librefprop_wrapper.so
new file mode 100644
index 0000000000000000000000000000000000000000..7d49ccc1c7028ede607481095349607106893fad
GIT binary patch
literal 249080
zcmeFae|*jL|Ns9S!>~HT5`|WsN~JPJ6h$^oNn^`z&1_@KY_pyD6`^f$nz4$KA0<>2
zqEvpAFwCz?DG`$jIZYuFB|f*?^L~Gx^E`)odH?u+zTZE->vCMr{r-47?vMN9_v86^
zKA)$tF`YXG1qB(_UuC1RK`CO0VMKxL-mGi}MHvxBHKVa{lW~I?Zp9~uwhJ;pRVaiR
zX82cKf{d>omrpDVMuiwgRSmBM9!L0bg!6L-GCvFt)=xOnSRW^J{8(Xehg>NscLf>N
zXFlTcV}*A`IHF(lXW8$DaJzp^kd_~&2TX>8Ect_79y8XpZ}`%X^y|(S4Xic2$_uxy
ze(d%iit`cH5}ycsYTz^Owux5+EsZex=NMItb!RH0jP26nDn+a_)*4r?8@I82NRZ*&
zb!+u|LaN^Lby!+QqkT}-5M$lzKi8~R$Cxy~KT996wrQ=WTQ3N@vdCyRu~w217iL^@
zUyUzsZC-EMxV6SZ2@5Kr5{-gNA;Ie+LJm}Fwyu(KSM+mXHG+d%70{Pf_}q(68+`14
zZB@7rydR%-_&k75M|?Wr^DsX4zegZ+QN^QRoPO^LcEjf}mAiwz^m`v=UnS8GpG16;
z@JYsJAU^5%48|t|pGGW*YV-soA@lm
z=Pi8R#%B>e{9A(0JNPWa=UsgG_Z~jW@p&Jg5Aj)n&nkRY*T1qINmV}-xuQhZ1AfAue^9Z
z?WNJTLY@P;&Zd2ZEsQ#0zt`M%))f@|S*OoldU5Hgv_^v>`%nM1;N$DRZ!_qn^X1b<
zAL$!2e8R4HN7{V}j-y}J`Ji9w#F~??d}GKX`(Jsb`IKp+YdDK4U4V_B^PXMcZr!|R
zGQz*Uc2aR}!~+dn_=ILmta)tlw9)*2*DvGWNg4UBV>rIoJ1}i@x5S}m_{{IIxAXfq&-;GZnFj}aF?C@2xM_DZ?c~@!v}c2L4R2dItV8uZ
zi;Y@o&!tbS8TRC7GkZ>*^Wv6Yr<6xNGNz!x;E6Rm*K1e$e-F|CH`N|m^Cba)y+UO70<)5i~UD4lLHbs4q+2)n%
zFV3yIcOK$)Tl}cw?1;bmuKMx$(GB+wJM#(RecY?n{)(N)uDo+iWQ*3zel;F@_xx7_
zs;<7S-=VIK4l!RJeLXbRvF^@i=9l8r>bH6Q$c^}Hz^Bi1jSmk-8w_&{?w&k%+UVaN
zd)P7jk*<5HZJ#;1>gOXL>A7w6B4@WwjcRuzy=X{#XjVfAqIqKsc5;pd91N`X};P2!B*%e@q^P%-e
zdw&On*9~YtSAe~S0r7hV#NTKc2Wh_|z~A)&a>Ib~jR~+J_xWE
z9ANKIK>B&GY5mp0mk9y(Y6jSQ(25MQd`||*Jp1sOn`jcCijQGtp)@c+#N7Hob{U=WXw@{UUkEW?e7cU1^5zcH`A8lZN
zzAgTfke4nn3^y{O|2q-!jLqM-P+#qA_4PIKJ7P;e8S&dew#pL=|3YkX4CECyf4Lc4
ziuSPL=R-bj%P$x52wVIIAcxuP1;gK2w)|_N{<3ZU-H-TdZRrijD{T3VMtLF*VE=)7
zVtHpnjFj<)A-@MpIz{yBuNwZ(6Niq76(;Ce;;xf}g=
zsx5vBoP74B~IL?TgLs
zYV9w-LGF+GwED|5#BXJb9}9cqV6Usz@2l{?Kf)s*b3FH9{n*NL5dJoRKl}?bPFx6w
z{p~jY4?vDXerOi6|DT8b16Xvp7ry~s^hN!(v)Ri*c)N|h`6LwS=h*CZM*AOtJ;1bg
z7+*@zAFTPOC+x-A>@`OEqqg)v!T)T8qdLs;Bp`mAEq)^G9fy6(-uw?=a#;*!-PK{}B$e
zX8lY<{>Ps|msb17kv@cr7XH}Y@8D}aTm0uxU;S>k+8SJX0H(O!w}zU
z-?}JoJ(NerV?EoB95+53t*e!KXdaf%qr$a_kZf;mXR$
z8lIYCB=+tS6_=Hq)#`z~LCI;U$%7*!GxIVs;ya`
znDdAciP@<+xmnD?H8OEnQyPlT?GVWn-5!ol>XaNKswiZg-K=S1d}8X5Y(&jT&4$le
zIZ1<3%@}6xkuAF94H=M{(=jV&NRkT~w@k{;PR&e-=@y@x!ra9+4CjjA4Zlc({GYJm
zpNJ%qNh7QTfFj7XC|Dvi>QV>E(m5@5{lWnBHf#DhHL-FshB#3EG
zxQvwEMoN1l+H;mLV>Nkc^qeuz~Q2sa?q<
zjFengCex&48yQ(iDXA$PGxE|?a*ZLWLz0JNv%b*~QRs0g>;O+ZVRY;qofy|XA=V5s
z+c+vN$(7d1l@;$oM;gSM)~*-XLR1M^gHtonUvtol*k)$O%g9Xr=ZMl^iDu6nn3$Y4
z*ho&w$jCwpbg`V|?2)EUgd~?K#K$B&7MGDez!;d5iW(n21m$y~3S5~3_-`^=4WATz
zdgGInj7msJM@Y_~B(v+mue+18hGZw@q_U*U$(B7@Hp=WR9kMbpFf(0f*u>tga#LL_
zd~SShoQyWJE@I+*MKcvBx35-AO-l?`s|$CDZ<>gj8ku1mH&GqaGg8g!>JpzQMr{?&
zz{tq--01Y2)MN~~k#_S8l={F(sD%x`>o5!c2sjWoXGrieF
z`UkfjlvT_r9-<_V@DHBs371qqH
zRfs7fv3I-+3qztSEhlSuVpg6jF>7FAPEzKeRC8d#D5^673x>22;+vYdi!{*}X<{zY
z#9pL{_tP{t^BR(slA4j8oWwFlQWckYkt+IPRm{bz*o#&1{;DXL@A1gRy6DcA&~^9M
z(Y3DrDw^vM5Y5zGq6j_wleRED3CLEI0S2jzNoap@@`MgO{go{dGdempAal{i`Bx5l
zNxUn`mC7Z_++OsKjLgeUfrjg2E>*cnE{@Y&tB0X^blZ}ylX0i`+?bg3ZVx9Uc8QNn
zY@LgBB+)f8J2fUgDlzV1>LQyCOUlSo?Y|kgbo5pzPpA#ke#VpFq8?
zvD{FiMMhwcY5E_99Y<=N{qa-x$$74>Y_fW{exdwD
zc}f|CLvrR7dWg*T_n0}-3kg^(Xj8l)b-DKV2!a>T0xM|Mt
zu#v)v%4pn3r#?$LUO8L2Qh6nAW-#8}%6R3|%4N#P(GqW#@)PAjWqsVVr=26pN>7P=
zv+^Njrt*1ZnQ{ki_%r?QIQJpjPY_-;QP^L3LYa)i2gcj3yy01qH!ABEiJYa}tL!jI
z^zSNzi$xx)Y%p2mLCUX{Q>KW%2hO#aZ;|rWX(BIEo>jKT0|$)fR(_$Z|B~pFlna$7
zl&z;r_;}?OWv!P*-%I(L(xZ%;A>mIecPJap6n%zrl`>?O=sPP1EAy38m2WHOzAo`g
zl{McGxqpg!S=XInWAjDRP^!6QOehpo0Z3uw=9$R9o`kDt`Zh0cPbAmE3cODaAk94
zk9DFSuwFPxxk$NP`J1v4&adeIeagp`Im*LU_y&phxUxw3vT}>ELU~qs>qbfUfHG70
zyt2V22~SkMtL#)J`en*e<>$)pl>;_Qyir?)*K8BMrd+RlZ@cJsC{HTqeJc7=_70I7DIZpTqdch$`$FO!S2q4qwe9^miyTmD7}4mHU-d$|e4_$_JE*%3|f~%5}=ml)ose>=!$A
zl(#6Ol%16s%Hhg|$}g2im7(8>z5A3;D`zQ}D|aeSD`O5wy0OYPm8+G9mHmE@cv;Hx
zKZ@M?pzvGeltUtKRSrHZa>P%G
ze2?;=@|t6!e@MAac|;j`T*70OW0Xsj_nwgORONo<%-=*Ge^R(w8FxzLXO*uiH!II6
zul`-)wNegIPFAi`{-ivu3_C69S}RX0SN|dUeaaeVL|&~trR;WA^vTL+m9Hr`D~~B}
z`BUOAQEpToR{rvrgfBcNZ27lvwzBbgk?&XbR}NQBR=%#h?t=8SAMI^sx0v%f`yMMCo9)0%alJTuc;#OA5@M~PE>AE_N^-M
zrd1REuKW%UxzPXRp~8eKgg0F&T%{c65IG`DctSa$mdHJ83#-==PQgRGw7cdiVOCw?
ziK~T^>I-Kpmnwf$*11-~oyxnFPbg{G*hel}XCc%1z3A+-GI{
zXO(=0neuLBNPm%``d|IKeF&~rLh)QK7*re29aFA^XXli!E6bHvWlDIAvIq1*{R|^T
zIenPO!=4n@87=&Af$)RH!d^>+k277kVa!qPR))bo^+$4$A9!4OMp-{s^w%rzP_|We
zRer2IsQgWN!#GLbL>Z;*s9d9bW4y#$uKY;3L3u=Z<>vO@W%vO4xPEZ1P=dsufVH^n?hwo;QsRM|th1oI{JA1K!-4`JS<{ukx%%5cn|)HhH%m1!KWP4HY$wy?!eVXU%`@@eI1
zW%V41*Ffp!ya7AAl{1HnyiEDGGHrzDpHfa&zNS2>Y%x;e4N=}XO5{PDmypj*oR`39
zV}uKotCgQAJB*d^?#guKXk`%Q3EF8fQTT$g7S02xe@uB)*#+kU)E`pbT_o}Z&18{hD1TR;oGSW`(}a_h`;^WXMW3Nut~{rVeo50Qzfv}sF8UPZBIPM%
zo0lcLK)GERK11{aluMQ8m7Qlw_zdL{Wy@KjUpZfRO!)=oDc0MK3x(y%V^bSa-z&QX4#+^)Q(Ledo-6&B#Sg5_%So3NWQP5IJk(Jxk(DtrGa`iOJF
zeael0iyVS|FYPu`Mk(Exhbmob80(a0l~XV;QIFdnCT|)ctT$44J;pi1KYvQN661w(
z(2K%O%IB1Ol-FZ?FkZTHnewc%J;n#a-O4YN^)WuEPf{*ao=~>I_+a?6%H7JFXNumX
zT(1nncwzkI7zbpZw}i3i*OW8RZ^^sRAIb6PSLAofwp&FWpnL@VgW(gDG3XzZXDLrA
zlhI$OpQt>1Lge?J=rdYTR^Dy=8=x04V8#@s)xTr`tn(-lbV0`c=<*?^O
zeoA@8^CDl#eH`NTVmpJk%ocu=1vbO;=*l3>CzP*Lu2X)dd=B#q!(UN$T`ThA%Ex{Y
zd4MwWSCMbQ^$62NDIer`y2~)8PzLu=z8>$h4HX`t?7$rq%HTrfM&($v7xisM2t!5-
zV>u3?Pg9JzAjvL6^lm|F|Apfa6!}f{7dx2~Zu!!ve
zma;v-&y|OjjWMpM@5y!nUCOF#7sxj#cd#8GpJY3L7nF554?*s!eB&LF*DEvF9tbZ|
zHlSa38b-OYG3hi6kMbA#3%MTq4LFhhfGz0|#PuP=Gn8?-E~GqN`Mok6
z*M-#QD}PZ&6o`I=G8Wf?j5k$Tro8GI(RWskRrY#T^nVr!9aDtS$`6zk%DYM=JViNG
zxkVZDoP@Vj&R1Ujyy#<Yw7*UH=HiauAlQh8F@dY*)5DK{zW%olz50^vi-v*=eW-==qkXO+pg
zUZ(y<<#)=`<)W|ozA!;KL3vu){{snsL3vd9>W8AQP&Qg2a)xrAa+mVVM-qPL$HJLw
zg-Pp#)0D@Q&wnHOiMxfR%J4lRKdO9H8T_s2J1J)+9I3HxXHOl6=?xvikoUQy)S*^N+w^0sNzMc{%0@a`ZUiJIeawMeeMe
zrX2aS=+`N0U_M~_w#uc-x|kQJ@1%T9ITZ5(^&cybD<619^m)o<$^y(2jNg>|6Yw6)
z2V|D=d*$_*2dM9@{6zVOvI*t`hWAr$Q{MNy+Eae4{1Nj4C=V*H!8|~Hf8~qHUzGP?
zeqeYT%nM|u^5%C%KBl|@^8mvqDL+w$U|yj9s4@!k0Oc{trOF#W5WQRZk@70c2aLa2
z8IJK!`9bB&%I(UKl@cEDv9OzR%UY3()(JmR)?cqO<_Fq+f4A_svOVSl>PILyEAPO3
zK>aXfsj@HT2kLWpE(gw6t~w@i3FZgtyJKD;YyU0$OW6VQ0`(r{{OY&cB#9QB>>
z`w-NFwW$a3N`lFeBZaA>go#fIXDN3m+m05!TNyM#OG>#U^2&EyA>|!kf1VGnJnyH|`Mqi~EHmz7t+|L^#&WmW7e>EBUh
zN9->tH%0#@YaSO?Jt6F=9Q~WfLrw|b{$2RZX^qG84y5ml`+Q^^t}DoUa6gVr!u18&
z2G(G
zZx~;)pMf{Be}S)1|0vFJsRwVR9-L1-)~5Z`gLhF6zD4~PxQ?YBY(YJ^lzQ}upQ#7$
zr5^l%di2rb)PwD*2S1`7edjdw;DgkITcNLXt6_vfCLdF}(Elm7Lt3(@ax?ln>D7&H`Q=hGzs9dVt44)Yu_J**X(xqIA{>|`l=-1?QW!O6+--|I$
zeaR}}Ze_@7ky|ORNB?HL6y=KTB5(dw_z3zX!~at5I3{vS^h4?^SbvWh#t)e1$x_%M
zR(~A5nh$r^v(432(#tLHj+G4bF?4pnO{SvhubI63*YM
zV!E>&Z{RN+U*HqmpMtR*XQ07x1};(d;dp}_j`J;YyYfknKgi8F{=gS--vl3)
zIR@A5l+SW}fY%I{b05;Sjct;Td-Zh
z61FS&^J(ErY){Cm{}Og#dqIAP?E((A$oUX*J+=>+%=Q7pI3I#>Y$q^;?F1Go53#)<
zN3(svWo#F)9@_&fVtas<*$!YH+W|bmb^y~^|KK02{|B(nmI~XK38(B6{?2kDJeK7F
zzo5V1I{FD_a=r#Xrk~(q`UQs5FK{IN0*|o2fPLr}*p~i)>*x7w8Z8^7q1sU_cd$C+#b@o4SG0O+O&T@glEEiaVMwXNm(ZW6EF8)9
zgIt~C6KtzI#P)>z6z37Job?3G=X?()u)e^BtS>N({T2LM`4;O9@(t{-;1kLrtVhVn
ztVb}6^$1Q>?oeLEdL4*!_c6lTmI_a96i(v2kMO>n_rW2Y=fM!xGq{TN47UG9_}urx
zMw|zruk)jDj`Cy91JLJi9ss)>7FPaAcoMds&g%?kJAgr~ckpl4GdPU(44z;;gPmEw;K!_AurccuoXL6x>##n-&dNg8E94;7
zA2?F^uJT&e=gatgKlW4b=S{*`)*s|q?5|)i)+2ayr?4T*2RWPN1JAO5fu733a{3SX
zYx)hgq2J(Z^cxJJ-(Wud2LDo~(qG6P_5(19euCH2&-vJY(@*d(`U$q9pWtHp33jEQ
z;6eHcUPV8_H2Mjipr7FP^b`D=euAIUPcVvpf-log(4e2-lk^Wfsq9BTA%9Ol!Cv$e
zyoG-D#c%#>5LV%Q1NnVrEBXsLZHKTE{e_&$`2gHUzric$H~97M!v6FhvWNbId+0y-
zDg6gG(tofC{Rf|;|KJ(Ut6(nu1}l`0(SOK$=s(z%{)2bW{~?$s=s$Qh#}(L!{)0uz
zpOj5M6@6=#2jLTy?O86!U$H!36_y9=$#Q_-vmD?TEC;xe
z4yOO$kIF|_4#;1y9AGDw18mN6WMdz|a)8;K|G{$3`(P{j0j{JU;4=CFzD_^D+4KWE
z$9WA*ryt-B`T;)7{J|E?A6&-#!Pd+-4eKlO1;;R7a1-+dn=)T;F7pLvFkf&2^99E;
zU+@s~1s`U<;JeHhjAFiEBjyXvV7}n}%(oZjDdr14%Y4CcT-U)h%pY_ze{cr#2cKvD
z;8^Al4rl&gIr9fQFn{nZ<_|Vu{$O3^4?fTQ!SA^Kf{l57493u(Zs-pjuV5kl0+%XF
zl?OSFq5qTqf=f0F*D0%P5&1=qZ-n>TA$GKT{fk82uADPT-Ef8w05{olg=@W0Xx_}!$j!h!k168KB~AoO{1&-=pZj9&xm
z8`~3HtlX$<^rYxtRBll&7%lpn*uF>?#C8SuDZhSJ@5SZ^rz$9h9|NJ|(P+enq+9tZ=sH7^mG3CW@;VCo%Dip`?^e2$V|XqCeYrB2=LnEfl*Qc7K#pd+yn^c$tcheX
z+XcLX^#Oj&a)1vp-hDX!WIXT%#six(9$3nFU>xI3#rYQFfiE*2*qZUcEsO_tXT0Zd
z|A_IxR~ZkypYg!Y84v8sc$3ghj0e8Xcwh|UfnOgL4q&`ihH*3Ffp0S&_%P#vdl?T*
zW4yr_hl~dB0DS-5D5aMkO=K3t~|f7B}Bmam14FfOP+uY3~gr5SIx
zurlXagzr5mtb=||`Jq3BRsIr&ofB?XzK`{j@n&Kikbm($Em*Ifa5n3)G4@ULA6!Pc
z3ie}U1N2X>d*JS3;SuUvz#jGBYb<|=VO&QUJV`s?0+t`F%<_X3=!4|n&kOIs8c%t{
zMDPmi7nlw_#(cmS+G~XUELk7zSOnf;7>|&_xE@muCvP{5AC<02kQ-wEim?$i6wehY
z^QVctMp^Ymk-I2gRPI;a{E~!cDnC%3S9Y8(;gglSl#N~%{Xpdsn)ChQC0KiOM3SNXHD8T@DXDCK%(
z4fs!eH{}fF56au%Kf`mBtCW@CKlP6&XDU6)yHO5?7b_Pc)>_fg1zDl_}uFF0Z
z{zMsLV$>JHyVxJlx085&0S>2JhW#0@r@>DsW2`)Y@lIAleFhE3{LgbHup8xv5buO=
z4&`XvXXbS{_$%d=s87@x`LVL$MvME`&`#v0U6Aib|NKUH)t|zhe+j3Y6J~RsM7;O*f|yGh
z?h_U&e^)ju7yU5h`u!r`^qp`6pZ7-kX$(i-+@<_o*@p3<-+ch}u@LJN`3bHQ*iXSn
z*-ydk2ZiSt-Us^#>cLLR6AXtup8XaKX8L;|E88<3)Y(;gT}dn*iMjq*L(f!vPi!G81y
ztj+Y`ugZC}1GzQReTeo{u4a13u}lx9GCg<=(}AazZ!zN`rdy8oRBmH>$UT`J%wu}+Hl_osG99>D*_G+u!+ja$PNs+4pXtFd
zOb<3=dhkl7151^?m~Jedmsjp(ddO)^4;C^#cn{Nqb(s#_rc7eGr%A`MH58lai;E&3YOg9Ym%5>mg%85)5`E{lTdow-QlIg$-rJLzs*IhqTiGA(4Qi~rnt|Z7-Uqf
ziu*idHOymVbNJOi$fyQ=FbO$6|7ZxNXxxw=UwZpVtlRmgE?l@!xYkwW$o0@3nN$h?
z{Im=k=?x)$O0f@pFBs|z^Fo*ge;4M3;@>oW^&CLT3-d6k9hLu&Jz+B8nH}&Zdjp(c>D-CVx1Xy3F}nats`9{
zE8UPA&9HNqN=Icty6dcTPf9xDQl+8No{s(n`AYF`B{akGH#8|NDJgl(eW*wG{Da45
z&Fbl1-vaG!#Lb@7b9Us8@khhZ6j+fW4A*s$YbWe?%$=|w?Nnz4a}n{6_4ryTuUc{H
zna30Rl{%L6b%qv2J44-@#(!pv!{YM;!h=|vyqa#8Gt{vp!5LcdMR9^NEOM>;o0W)S
zoP67{B-$B&{oo|23%f@!W{w512ZC
zZIIiHc42BhV@R6T$8!#E%BT6D{0(7!9`9F*`iVbsClupLpER=%FM8n&;un7Dx~eGu
zjO1Ul*wnehofmfGZwT+xue7LvleG)~dvteyhECt4aEt4SqIyM7o@)K4qvM}J-?jcL
z?~aQ0C5|AD#}sk4crONdgv7)QD`vs4yW|q`vEh*B7~#b8+cNYq@;NH
z&8(OBqL89qr`%t-zwP5`2R;0U_nnI}oc+{}b^HM14j1=zMw!kv@D+fy1e3wB
zEP(3Ws1#cPqHL~Rg#yEyrZ$yJ3ed!+!i0>;v$OjM`^frW+^NK0;TA_hRU}`D0$n)n
zSQmTF-PsuqW8sBs9a9c-phP?GK?4S(6Pvxm^97XNwEJN6(rI@{+BSY^SNqbsx(1{}
zzVK#Bp`^RlFI_g2?ow~{X|-C_VO3F)c%SbHa>t&lSaNX!b~LL)RjhNDRvbngHCFKh
z7O>=j5xl!nOC0KUCu1=NG@P6iV~=+{r!_d#bu$~M~eDM{`a{@LhzH^tBR2=n$!T|i2@#^`;=FP+Y-t53!h+?+&
z^JXS
z7Zzqm!9v(CUhXVGTucZ|$AyL~1zgg2M}vzCoHH3?mU9vVv8*uSOST!gIK$c5J}dhz
zF$HEa+w{8_P8AhMuD-QrE40XBB6C9Jd3`ZQyw4XD&&&zsu;yXdGE@0%#nyn40_P0c
zTJ9{cd2LpMu03XT&2o-ou$fD+*$Ak?R>(cHGW9NJh?$*E`N)dVZG{s^>=x@(2bmC
z)#^?F1sHA1^y({Mx4`)_&G&VVuo`N%t)Y;@X_iN)b;u)Z7D8bGsy4SrJ6o+gQz`#U
zIIdsN>!zgP`UI`g%I!55smY*n*o20O!U@m*wC
zx@rh>Zwicw>p8<+YH355kUg}F8Nsr)TC_94+h^3v{G-8$Lp7h#_G@J7i(|c`YA-sU
z6^&N**y^mTT69cD4#Oq`%PKuOc+&%wyk+f&@_mn}rf;vYs+jn%a-+Y9Dok4$2*StOvC}@PZX5n@2
z3GQvH0FG0u^|gyQ3NkUxa84`=qKlcf=!l9Uvsq=xYlfaxe|r6~1_j0}x_O*gRo2!8
zC2MRS%k1k~MN*~F&Ny4YWw*AkrRv~+VVRIc)?9rYg}C07uHarDxz=0Qd*M1N)@f9#Ci7;ab^U>S#gOt!vf;0xkQ|9h*MnP#JQG%w&;IxYnjuw
zUO%EedwN?-TToi7ulARe|mil4V%oWD-3KTl@0FQVuFYvmIm0)&hU5~MA
zX=Po;z^~4>DLof{nV0&WRi`gph`it#4!Fx~S4!@`%dLzG$@VWt
zt3S*poE2D(2N9n#Rbkc19O@Oy_KYef08^&@X&)iRXiZ>YW)dOgrk5cD!T
zN0>E_7K`v*!C9rZrYQGrcPV!~o+0QLzD!>Uw7{J!Crn(lE;qlIQmRnOOIyV(
z^P<*VT`EdUZKDkaLFB?LEICi7&&sMRDhfpSa*oJ6Ew4^@rWDwej{mjB=TUm4S4;;yX_)stkwo
z$ZoGIcC}{L`&{8($CQ|p@Nla09m!74t$aJ#2+vIj_nc-Q@ttq%_8emG>wT^`_kug;
zT*ZeN!Dt^DxfQ#uO3m3r{@sR+4D{BwZxQoWLY4q4)XY`P;8A
zzTm5+)t22p{&rV$<5J+nDY3sR^SCQ8uR1O{7Ic#Lj)~o#W2^`7p~(Eev{nzsC|G6d
z<+h_A?-jI*M$Ge83=dC@t@5<;FV8R>=%PFe0?YF_^j`NoSD|!XsiMrX70_ij
zo;7W~9cXJY^j4C9;WAc|;IRe&>Kp{UFGKqr<+;x{h#du-c~@$$j6KH#tgXM9PH+Qj
z4g#yMybHbM#0dW+dnC!+z$ELSw}x7reW;o1kYh^Zabz{sIbYIUJOFAT+*=4wBHZ*!
z6%#lLdz%Mh@94(7_#<2i{g2L@>_Fxp(v24Hk=+J8?VPFt1zng4kNKarsfW9bv^EIoDcIeEXxK0#nOP!*t)q8?7uC
zqZ;hnxD=koWgt5D2FsM~I#RSS6>6Fa+>hYW4CY$FTel{HNIN#`$*^uYzJ`6!s*v#;
zSex$S=7~;;6@`~pPS*ZMd~!sJ?^iZzS+=h(T{Z^Wavy_ZshDHnojh-I4fiz{;~@`ko>ty$G7nw*$hiaXM)ND06%u-r@9NdoYz(%!
z^$50@XtuBH=4?$j)od5EheilBt!fKmEklP0qZ{yDE+{mrFNcB{`y5garycoQtf-~6XR^k09xMd#K2qUbm6WVtl
zVp>6H+m$)EtVFq}E{Z$lK7OR|Af}h8rowi-xDaiI+f=-aYvXifnEe3O4$|6aD77r?
zEg5o2%e$C?*!ZOVoYyd
zuIXza;wb<}L05G3{Lk1xIp@%+8|RO9Ha0Nv;)iZQWHrm%_={uOS|s5K^K@pRMM6_i
zM8+$qWjkrV3y5f`3)a#*MtJKid`IoL~2HP$jW8o@tIzuxowO>tB
z%PKZaUDh(d6t;?(hnlt=_qaJn$bBj}evUc%IZh27-+gJv8Ei8>A6>*U9eLU_!?%rd
z6l5XHK5H$*-W`R+!_EG)*2}(Y6-U9ns0n+b7iBlgsgmtx`RaL!`#o>>3pY<}rQ3z}
z;(1n-)9hO)iQi?sjIqD5b<~}fqaZvW$70#=RSwKC4|?x_ccDrz8t{%O&Dn#eI?c1+
zfB|2`@m>ev-i(WB!#1nWm!eh;%y<&?-i&X*bjCF#W8NtDJZI0OTRok^Sm3
z-d-gRTOyQ_OU_zxj(2(d(k+1ATcVQzEj~^z_wd-Sf1)(#HIb{gy$VjqC8ZIVU=Q@}
zjc8Q&uVxEcGr6^&vAQ64uR|}mv(I^o(5Wbmyx<;ju40~*TZ}!o4$>jNXLkQ`H{OZIp!O|0p~uxA|g
zI*o1gj2^gjo=15bC$v@B2M1pD)Lb
z{Wj_?VuwYBKXI0wQAA7`t`nD_&>In
z{T4x**x|u4?DVzlgkO#w``w2U+*L=rzbSV5TXwFy96SAO<*F@q7Koh`%g$|=W5<4j
zq(B}sSSWVVEIZ9F$BzAmmqYyFp%&^V!?M%na_rderG<-~x5ZAjWhdrx?AY(NPE&DYB
zdy_qp2Rk-Y@@IjG_{b`5XJ~1>8+O|bmx=@4jaS7u%b}Kb+xLs@PXle=!d;?w%Rh|U
zRZFTUtC(3a!LoLT-P$~C(%|X#Kx@2Y@Fe>g+2Lsq*|O5cZp9&1wgp=GgL}+|NQDiV
zo?m;;+5N=+_7ltEZ9a=*>%gZK0oIDljg2P~UBFkeomT4me5oB%xQm5_&jT!YUWML%
zd(gw@VLeaSJ*xP`cfZNHvhqBH7`U}_%*yO;duF}mI_<;2%pTx%nzv~^RsC|=WXhgn
zaL99xUY)k;XCEZZhvz>ozvkL5dGWHwuQx7--rUUlYG#M$d7mXm!3*g9cCYUdOU%j7
z(haoK6Df5(c^>C?IAZzN#%J|n|2`6{9|c;SPpjcbY4`6p^bV^=+uD7*Q>^etrk`(h
zY2`Ddviq}0FFMRiUG%3lmPx;gdrwUA=)lk9OqzVsZlYp`rXX1!gP`};hi8yq|0wf(Wxvp>7=Ou9b&}(mt$~&!q4&J*XJCgXAF^d7
z*IugkWs2JpXk|9^owayS7e8oYqZaQ1W*e#QL`uflET*!DYbMG3g%
z_C4SoR~Z+}I2{-w$)fDH4cy=2#?9z2xP%n>U;CS>PCNJ;#MTDJQONCI{`oXV0VkcO
z67$bzaoWQ3p@`&|+!z1mpU*CF6g+Q!%gO6gRyi}d&3$DZf-{pN29|XQ$;lcLQPv?e
zH`O%+VpvwnrVh1npRx$$EJFE;P|_llF@Hnf(t#!U=MC47j>$3DLgk-Nbrb}fUk1Yd
zTd*$-eR3K_{Eg+5{%xDWG~@8)>-ZN`6$&y`x&CA24B
zq+DtFigv`2vM)UUe7d8sis^f9c4{(wPal|`3g1&qZ$sfNDmN@M%LRlF%*x9|9oI`S
zJTqwn=SP)?q>n%$gY$Ay5hG+^dInO5Mq~|Svf(*dsE6=D5w4L;mYuq(!!?GdKayTl
zRax0gmzkb92
zAT`KLVKYPwggIDqX26-74bM)l+bl;w)A{=|Faw6d(^J^t>Y<1zzog4Q|FWZSBfgha
z&dVH(!Uksz&tydm$x2~?G9pr;3`<7Eu|TP2fl|!w(Ll=;0c(%If}YpA`dBv!aF=k(
zOIR)O#0%d<^1By^k=4XA%C?j?wNHp;QR$+yrHO)~G9zlPy_8LyJuiC0N(vtA`RjH5^N
zQ2VPSn?wCxB{3i7F1*v1O|d-4f9Y3ALY=HP8Kiubj><>@RYb+dfP_u{ukLcN*TkFi$amuvyx%nb@kuhAGsNE%_+^A
zJN(}tX~I!xjxp^rj)K>GlhnVxLL$CcuaJC#Jumk^n3YUx7`?@_%(u`))Y}`l^Rfda
z=h#MjN)RRuln`3kO(06Znbz~@@BfQ0l4M}RBstq(Bx#ERV7@UY&P%*V(n!l^&Vb(c
zNTd$%9?1o3e~hMO0d;l{HeV&-M4^)v_nv<T{T;-37xGulW(bUe$u_4{q7b^Va`05z%AF%>+HwEC$Lk7%6@V^O;q+n
z@kd2vKbPjCaNf5`TenQv__GLNP&Zo+`~OGaO+
z3H6ZN_TZ8=I?#&N=)fT2>GMA}0e3CHCFEC-iv#8uhV=Zo+M=89jesZ&-rX(W&m=Updk7QH(pJZr|>~
z{>n)Y__l%>d!EOoIbJ#G4B%2w2MVW@OTKc_jHhxdE@7{DdHs
zoew_ymHl)2<~<3~s6$PM)+UO9QnwwDfgoI6gEyb%8Abc2RwJSIFa?e
za?-@_l@oc1v5D=KlP0!TPMTC$ubkkU-+A!AymF!^I!G)vdkJ{uWQQc-EkUz4>Y(zhfZpEV|4Xl&
zH1vDrgzxBkANgcY@cfM@_Wzr&oDA`wVs4k?q>ElTsRO;$4l({oYD$thR$b`g;yDSY
zeSNgVd%r^3<#}HXdqRA*T0Lk|v%q
zQ?zzZ))4TlfZ7!JDpeEDLW*3w`4(0a&s-~%VXs24Tn>1xWC#w};PQgNx_C?v-psOl
znxX){;{VfYCFSVHu*KWpelwo^xH4c!yd+6@2i`9UUpMh(XrG5Xz3od5XIK9=m?!Uu
za9`_Zu?Tvr4gy{);TtFLdv0Ko8PHq9=~Azi+~oIK$;F+#%75*(67%Pb+UZ`q2$$53
z!adlJ7V&!9g(sA3OTW26)9o}47ou#(m_xAb;#M+KlE#@Qp!TFZ%3SslXD(Q7r1Mm6eDwsu4&GSo)7wnWSd4y>$FkYj4j@>3;FOXPBP4K7GLXrRnqKonWfxmOth>rkVWm
zPckhNxL&(NmHD3_{=C`&=`&8g*K18herKHAuwk3)f5w>(CC@mYy5Ju5pU*gL_eZVYM@zub
z5w3bTdN7{MQxm{&2m21uuyg5O{COE<_=l-b)LwLN{4HRH%8DRx1$7pEy9;cP!RJ5o4qhl+gqeR61Dor7KuTNI6OQUk@nbxZ~xvN
z`x#>jcjK4Q9tHf}HeJLW1(V?#d&Mdgg;%NF&DXIX;oO^mVaHvn_9Ra$D$VDOr2Whv
zqO-|-s6)eP%+nGR3Qc>KA;7$!Bk3{`sO`?s%7~`(^J+8Q8Y;xDDL;ke5)uU&YtRwv
zK9{u>NxZlOd}aqFXzN#kVNhCW?z=b*pBgf!D0``ELy5`296Ci^&lNv(!QJIt#jJ}}
zA6u4hzu0nHnf%)LdDEEF*hQ9iT%pF2HfwVy?y_aa2#*o33KoBI_i&UkVR&z8NO@;y&pxqpk)e?ETwZD2{>@$%i}yD<@%Cz9y7tS5CuGfBv7gzo$wZ`*%Ql
z`pT#EW$(e4=uZ-B_m=%zbQE~|D}OCD0fV5wZtn3l4WDd$Mij}3W6>=0fG=*FFEQpr@RXYpwPR-pCd%58kwAiy5nBUKD=2w)O73Lz;s*
z1G=t9SGe*9eITHsP6>NSMU8QN^RRcK)$wJ%F5jOs{w!xUu(!bJ0<1A`t&AV5zRLTA$k*~d
zVe)0)i9K7&`_%JAh|mb;INy!1#(|2aqIjz5<&P}KGkiL=yiY65=cEqnEzG=~Do-)D
zSi2Bs7kb)-{vwq3NmK3i-6zWXWLv`i?fd^i-S!z_AIgrR@6eLcVajKY!*~DCm%X95
z=@3!8+_@Ht@|iq-#(2jaU@Z8Um;J`PH^3DTV7=q>)b;2}p*u^;gUiZimGZ_8x>EV9
zb^OMDv?K4(_zi5o$hGG6n7Xue@6YAmKAEz6%kGn&ja+LTg-K}oe;w1F`w_!Yc&!=l
zUt>x&p*tOe>AV^2tNiaj&T5iQQ*Yg~WzRNGZ{(%}ln($J^7{?vP@tj$XB4)Hv#7t$o@{b9FSm5M!y;=_!>mOZgoj>#ZAFMN#&3fHhruBn9>-AtA
z8S(YwwbbgK3*sSPq$a*d8*GtuYH?kMVrWT&C-J$afL}a>F(yM_-7Yrm?=mx2RNiJQ
z#JUgWasTGtePrGqoQ_BXAQMKimF69X*?u%?)4p=0sb!n-@MQ~p*LmitN2TA&Z`)Z@
z?^SGBQC-%*4H@52*b8>e3mvuND7+gv!pX)6um+sfS5d9{^MrV!8qrq1jY$~4L4cZ}
zc;wtX{zAEud0Bvn6t*{3lzYtkhH_er
z=F|4aV?OGRZSWL|mZRCGT?_5_4V*5`%jkh6ZHrMMj)FF*Tyz>#N&cB9aXT1YN@iKd
z{6M_fe(5*u87#liLm@A!~
zC0u$?J?TLWqz6T44|1j&6&b8AEy&7%e)9Sp8CGATmvLC>k0-vxiz4$n4=!}*)+qrl
z#33KJkb->Z0`h?inaBsN7d|L;Q%qguF{*mTdYM7Vb2@@$Oqo%V(8ca=)R|p5Nj!^%7$SP0!wHn^7qq
zdFvHv`q~h58)xp;J^R@B|Cc6&5st!ijbyj)I|>EgX|SHP@{gj)LwG@%;3pok);>CKMHl_CsC9MI@nWf>R3M1m{2?xj0GtyDU$;>9M8QXZd>*)N5K@>cT9GoH?*B&D)>W;ZC^9LzQ_rR@6=&i
zD%Q=Xj$`DhW6VpKkzhRuGZH5Sv-!ehrl=<~MFX8FBAD?FhP*bSYga(q)S4x2^9?G=
z*AE-xE0=LhFrmIRs;RC~JTNxL8W;gTIn4fb&9c@AGp>D@qT#Kzs_<((NP(J+j<^qX
z7aTn#X~d?O5W`asHPv=9QaTFoe-$#?PT|+WO3>Q6@EyZ2MTcagpQ2*0#sl&ccT70e
z_+jY6SmQCZH;DK@?7azCmDTn?zW001%OJx+K}1D33Md-jTn?y+^B5_nrKu<=Bnk?c
zmX!sjW~QYLmbbJto9EFiXUVdgm6ldkR+cAhwzRVNf7aUXbdFHnd%yqR_kN!zo`X+X~+k7#Q4-Tzk&cIb_=*<-&J62)*b9
zMVL*gyXe%;v*=m{|Cfdk9D4k$sYMt`-lBq8Sbzi$p>!~
z`HuEcIgn`Z#F_0g;Ep#MoeR~Ns-&-~vgzl|@;wX7w!}D8zZfWMP{XIyU3rwFa)Mfw
zmoK)Cy*opS&D6`*8%PV0fC9cm0W`q6o8ikLQy3sd_s#8(4pPP!qKq$G8DEsK42r=*
zdW!1KTs4?;?cp>;5k}LO6$ZHHpij}y=w|Y0aGOX)%_{I>aUWALbt*<|Tv^$)3Jk?~
ze2*joWe@AQI0{4KsWXoxlJ4VD@$v&@Q*|2b;p2xt_LbvCj`?IQ;GPJ*9~LeCiWpAd
zcVJl8(XdL(@)bCW_IklkmU>g=WL5O*`if?OZeLb#+!NVh$`bIJ)D*?=oB9~)pquCG
znf@L3nDXE?DC+Du)5iAuiL%OmcjZn~lz{smgT7<6_)LE0U6}UBw@Ul=(&TDg3#-QE
z6xB5tG`tPK2?U2`C71ataNRdt$>)KUEI~eBpi)eX3k@cdfL?f%t`t=zpQul1H-c`<
zxWtZHy%6vk>2vA&Mpg3hK&cXtkIRE+Um8@K9J9?R8gO{=JaIBK;(HIfDqDsXxUq)!
zN7uZF|2_Dv99k#W>@!>1(_dY0e9eM=5h&Pm$akpgTOYk|$gX2ozS9M+Z%xK3&%dV2Bg&hju26G*en|Ohvp&@0K5`h}b2I8!^^Bv{
zXT9|dtE)wqM|i3RVPvDOXl_?cIHDm(4ypZ$D)Qma>RE&@0!T-@df{F2_19}BxX^%qX8OIXkK`4GT26d#JmhCk#Hrg-?q!X&7d?*rN#mFVI0x~jMwOWmHp
zLkSvnGCh9aizvik5%lX|VDhJ%yF|X#m9lptkR(x>eux}shqQSf=o)
zjjR6t=v}82agZX2#w}FEPxDNBr17BQPq(I(1dRgTU7_h%X(x1ZAkk^9?n=jTTnSUgk2lqd3C!uB7!(MP{8XiA77?^!(+I+X05gRt*f_
zSiuba2cBnRv
z%pbpHfhpVh{ii5;1x)|sD{)3(z1?QF!<10+L-LLO-&@##;~`})nDGngk(FoJB;FI!
zuZF3Inx17XX#aYs#s&QxKECu@wSleLW@>UALAM_|s*Y_B@BMHG9@OxeDNa(Wy8OGAZ2s;>Inh~ZN;lH#ABjYp5;Z)FG-uj)J
z{8tI16ub1>4^l{8Q_(8*;m?L@^$AeBiklrV`7d`wbMA=$sz(1;38OUHahuY)N~yT1
z|H=~!=@FcAKlo`ixFXsU(J(^D1NUL9&kg^@t2q=gp4)jA-3ffnKNVwRJaBQN=SMT8#;4FZbntUEBUocE}BXr9(>5
zA?CK=a_9Ho`~8gRzkl-8Fg^Mfw{!EF<7*9~S<3It9q;1I0i~{TmhkOBrehyr-Xpj6
zcYA7%+PjKM>;8y(em#LsG*&0CLvW-jc_9T8l1p)aq+I1JL9pm8&3G@Ti>n8BHRjqe(5G3*-`K
zNA7(pmx_?W=-W`RC*}yL$o)7TGNRsa7W92p3G8YdShCFaW5qsLaUqxGwR02MTC;=DZn+LX>ST-ocWR$0t^)6U@)CVYmGEWJptLJXfQ4E*Py_
z%|*EP?D0_-(@=wHN1Lho5-Ir3Gx)AeUI+=zjgzsK9Z3anb&RxO-1aK0m<9(x&*#Vw
zATaWCDn`;hvDCBfiB;_)T^Xo$6{+g3*ioaVm(gfZ-WW>=`>t3p?;AS)gm!YztW913
z6t~m7v2p15kNB1jbVwAk4oCNGM)xiKo_^1DK6=Hxk1^KR0`OYhsQfS8!EoN$V72)F
zXp3{)c@{l~8e!JsAQi5kkqs`p^d!1{vOKtK^hx<%cl`DolH#@HNuTl0l8!H2c)p5fOt$7yBpncfCYJ^n==QG%jIqc4#
z^NS!tGSf>GVhIm*(uCo8SzBtj!phUdo~qxdZ%@zlRGlQ1t0MeRFCXvrz&&>+zk|Eq
zxVYoFF&oXPJbje*@t&$VxV7V1@eXdGRG$6_?@J27*z~NZLAlD)@8VurE0ndy9zOy2
z>>M2AC~rm65_YGx@V|50s4MfTt=7ZqT`qcnL)G*-+wux=gWs
z8gXeDlNUl!o~kG5
zxt`-jr*A!-5!Azf4EU=~ShNiaA{SIj106jNiOoWM!p3)-SSYU{R3;46>On5*ya7&Z
ze9xKft~}kzQ*{gv>^&ouSV5W^a4DHsCIO9d>vpi_=2o;_hW@pQs~
zFz^ad9QvDtfCTi?^ZE}4d|R;m1o#|OynIXYLRE$*Wl0A!naae0;8_*#%T);Hs$m?m
zuxh9xieuG)`=NfTF}y_`ZxbM_{Zg0WwmgD~sUtT<<&rRt+`=X}EO;M3r46;1W68YT
zLR(Xeb9BA2!<>Kt6)>1+!2w|gzhB`fud8*=J`}i3*4EyCdJu82ap2hT9Pt!YU1Nx2jR%g5UrD542
z#dLuoJDi{AW=HY!-0T?jJU2TI&vUc!61Dfq`0zWV$|0JEkLU;<6eF%sjc*P+um(j2
z9qpK1JOU@Dm}oJ9K2lBn`l>MubKS3
ziE?kg?evv;)qzxRbzKL$EwN!U>kIIw1x9@#YRNUv=;TkZY5Oy-vlWJ2ihT!$wdXOo
zUIlwFhsy+|IW<42ItxBeAy>Klzpg45{v3QJ5ZcW#s
z_DF><5k(d4K$h!
zN5oIR?CEv;Wok?`gbPrdd~0p{d?5h6%0Ms1Ld!tE0N$0S+u-Y?7*&<0J9?_#hFw&i
zj`A#egcuo1EG;)@;BYvR(Sz~2!|V{eiE<8{NDpsm@9ONRnFYn=)!8w4y(0Wf9A1xD
zR-GMRhTAZEvc1B0BiK})c6+M+$tynHQ?-F3xCt{1B&+@G|L7)+FB#*u^7QMTs`2DR
zZ|KeL@}Or?yc2Fb=z~Rb!ER}Pc|G_W?ltuCz|uTbMdY8MazqDF^k?$Vi=GC+U#xK%
z5UT(_&FqE%*VJRK>V^xs*ck15)DhFfTqWj
zaC8OSy2nCa8ldrv*3jaVRzW-@)VtjbYWV(k@WX*?XRKKuB~3plXfC6vggq>)o<#px
zS6WVDZ)g6p5B;R>Eg)jd4I~Z_VX5(c6ENjTYaz&1L%8QYz?A0;g-`O&o`(g#uh}0o
zdjstN{@P3#hDt3
zWN_DzrSSOzIM8>3EX+77R!HN?>L7Cm%s&XoB~%0BF_P&l%4{4Q757&%s`-OXA`Xs*
z4uY^&CtVaU)Y_?wI78}bXk(ChA8AP*;5bggXZmOYumG%xD9WA(gSWB+%B7&&d@JA$
zEdZB`r);`{<)3|k+*8}LvTvvC9=PFS4XeDFc!zPedsb0idkoCW^2#yOgwMh2dNDBh
z%O=_QvPtSJ8kl$oFNPIfHi5ufUPKd4vUh4;admd;)QaM~>g=@g0$jh$#uqOH-iS$(6j%!<^7gJn424OG%o!T$JJF+Y#S)AcjK}4|B&7H{Sxy@7_lws
zO<5z{T=x+ImTK)x9J_Xg@CTc+M3*_ohcULu^y}U3)31iWZB~A%RqoN?JS(d;-vgLc
zJkK^J*ZcC7_*l}UvRZDQ2*dW#cL3_K=oc?ljkwLUNHrAH!u!ziddpRExrz&6#q$i?
zS7m-jnay;u(Nt6D3{^u;jHM>eqEIA^MstPg78mQ|I}9IF&pe=CF+^MkPfFEcoMu70
zzSXD+m9$s3{9*D$hQi;
z6Hw^okGW9yz(V&S-zqdMpir=C-pIg0-#Ba95KyR>60c`qp%iDK0Re?3eZ=CO7g%Tz
z@-6Yw0t$^%HH`=?)Wca*bU>lus-|v%g}OLv`Vuze?B^I&)A@mg&Om$CR$wg^GJa2&
zcHLJfH`2!}WWH5&DmgN;Qh=)HYhBJljnr0sKwzO?uvoY5o%r5^n>JXKpX)6C5?~k?
z^xJrB8)lswsW@I=I){Jwcw((eUCb}Ct+x3_ISD>YL$&-%6%O+?&Kn&$Flb+Q9DCQC
z;_n6U{DYa>_}O0=cQM)e52krTI=YJBF#gGuG@cLoK1R!yR@c0|bWhDLyAl*4k8KvJ
zdBCuV@-$~JrK?`bG#hX7Y>a&H+ibP7=1s_4hSnj#!MQ`RYf-%g^L+_tL(ZL^VsZWU
z*3r1XgR01LhJQ+@w1(3GL;Ja>F~;9l{+8#VB64BoeInm#YA`K%me!c6Q=zd1S$fEq
z1%}U4O}=tJVUzuYea0^}ksg#-mC%oa*{KWtQePki{dPbFSlMkMH5*6I5p~XXy9iO|
zY`0C7{kLbkFVI9|y#w{W0&djk`WJa0{HOCCRq;PP??HLAHv5Ceh!-eV+)*ifpHdnx
zFQV#H_yI!Hsqp=(?7yw>H*JO2ujMoKYWctK@!(G%vMqN~sy*aTZFHTg{kUG$e()cv
z_FuK-cslrXJYcZ*u77b2_rGJyi;l3u={uBg9-lcB9$TlvPt>dMk=FAIGbErlFab
z7nJep0n}MfmH*_>W+Q~NTlC-8(=Q#uQnx~_z3FS|aAqN@$*iui_hKi!%JvhO4(eLo_g^K4&FM0{^kil39!9H=?!YePwe
zuh~`ermu;e_T5i$6g0jMS+k+$3EwGtm%qV(NdUd7<|f~}4tk+K-Is^0hl8JQazOe{
zDr?v0OARRBG63%lNRJOFe>@<46qos&{67vzHwWJOPX4r&J~uXf&VxYcpN>vR{{g3;
z))Ap`<>@7yn{K8Pa`;y&a(vx|>S$;d64uiPyz8sJgT^HX?cI60b9Ww!vm`L>XL<*7
zcmCZm>VG_uvKp|m<_+HvWLW0}*TW{9tmdl~L3SXkJmi}v1Jj)aI;jGE0}C{B6zJOs)pjTjlsmQn6zQK;Z>Py7)
zRM=xn$l$bJZ$NrH9)40WK9d1{4|a)G+P5Co>^lgE?=Uv@xCiL_m_o;RYYw6_9TvcE
z^GE;gc=!i(1bxBY?1+`4sUs@P?~hkxs}APFjT_zqn7&_cf~P9*<;K9N$a22Pmy2A4
zBF5;n7+H@u;5z+ode^LSmal(MgR>gWH7hnR!W!8W=fEg`+3m;Z<9z$y#8>9&O(`#7
zoc?u*UZUSjRlg@duLjRtHUY1uUy$4lKNnK9fYv>@A-gPUS@y~9JC|A9eq=BE6>XO6Qjtc00e`@MX6h3p!oxG2Z6>QF-jb-lF2o=VA7ua#y_i
z+6~NLVQ<+KZ`F?vDZOsvyfw}-oZZ8=w4O`4U2-LJQ6%h0HUh)2B
z$mv~{n@m@e!XfXdlT--Rh^5Z!O1t8Ba(kB^yKwaJ*K=xXui4qGFB(~S9A;8^y0*OO
z@~0?j%rli=yKDC^3j(3y8yt7PdhR7H=y#E6J6n%^4h*4cToYz;3>e8VLeRk}?
z@$>qL(E~gu
zu-jjnS6)~qa`5RbFDU^XwWp>O;eA6XMQt01;-Xm<^Ta^>5OKb@xM<3pygBo|dF86Y
z2BtC$LWY=GG`+CgTUbzBY6xJc)h=n|=NC>ZE-TD0E}kUv%dBXj9WBkDR@{;46f>Zu
zC}m{Y{{sDKE9yl-nH3=gcadqso`t%rBc+Qp~L8
z&CDw+Gh!vh1*)Ec@(QB_u8Pg<#F-6-%%bW_?#`u3q^UpC`aaOkzXisR0}%TvX)YgpR7vyIbLq9
zAH~@UZ!d4kG&21ua|))RV@fm1N`x6jcM37EXjV~Kq4F1Hh1?~04;Q_J3vb|}5(RVU
z?otN1sI#%NO6Jh@LH0HN=v<7znR&D3JI1>=bwmjUb$MalEHxrW4H%d+>iit~m3aI_
z{Pd!^1!bTXm3ir>$me+TE6CX?2SO^tZJ@ej;L6+6`w+=xw8A|`m<8Mm%m;twz;<}K
zG?G`f)dGWmQ3h3zTgVnXw}^bGIoQdwcp(@43Va@HG%ufw5MNT5Q!ur>WX^oU75rh@
zzgo`FcGcNZ+{(dDD
z#q=GLa-J)^n5oF1&0bCOPQj3!Rbnuk37?fWUDW^>8vrcGl8>!wD&9j!FQKD1&=nWk
zb5I>PW133i`t#YpVK~6N;TM%|1Diu_=SHJBhUWYmREG+jWw`ePb>LT~!f>WMzEUy!
zwq;k;V03vNMmfgXw2E1{|BI1Na}9J=Hpv{L@XffpNEa8&3t%8TR+Q79g?XJOaySxu
zUNDOF@U}`RYenPAe;l&oHpU^w87DKS%S^j8<^j{8l1aikA(iQxOkp4_$`oUApYF{W
zJa9NJ|6f)_HarclU(H7VNzDaPKK@F*)8>@S^dmdzg>}*U7tAS|3y(Orz|sNf2qIvj
zq%{N?;AL}Yy-{8?6DyWEg(c*$NdWTC)c!hj{HF>YTQY|yNp2A4X{Dz$W0Is6&&?~Y
zz%q&FBXlJ-mUXD~LEnd{OCOfL`u_=i^qHpt6dYSe10}BHG*A
zv27150nS>1Fgt7ZXL_2N;i;ap7Xhd@w_qlwXc`vh@!DL{f$|Ge
zDyGmXrWA7%zG7)OcXDj>wq%+$Q8~T86%K7Y-tn57W6YEtFY(grch$I8P{>TOFv8=`PC_gokj0{zUKE+LH)}XVunzjQleQ=?++U
z-`d)8gz@+tRJvoc0O5XwX9nVhzzA;`TU$%N0dfZ6aD)%z#gnTMhF8?q?m{?xKKLU1
zU@7?Fv?T4u+S(8u_1#=sI~d^^gcA^kud1yrMHr8;3SlO~+YwGc_%Ol+2)7};0pS6J
zYY`qt_%OmV2=^h3!fntK2$Kq(zCXfzfT?+GB7fHs3)x4Jx}y$*0Wuw5|eR)4Z(Kj+=k=8dde6g!<
zWYl%;evvVidcVjlZDfPU8072(X%8^feIwnw2ZRl#+?|n8{q{tL_pOc$>AO49osDn&
z3VKp|JN~zTFF&P4nM!SFqn1_uT*l$kkWL
zHQDu~gb4it1nU<@I*Ef0CS=#vQX56TNUxR?=_Y-2K>h~gUyTs?9bEC?;qDuzO^kGB
zA!{A}-TiB8uZ7_5xqfw{qU+pT_rS>gQd>}mQu=eSi^auZ_yxQ6eNyg`31Op?#m1D1Sk6olKc2(+H
z7Fx8sde6@O=nTS_1D`d!wzebb^D`JxzsSiWD)oVjT_YE1*SWQ$2EHHgS-@`~`77}B
zjQH;d-qwGB4lb)h2Yti#fd^ebS-YsVb^z5`1V;lNi^;aGBipKkZRKd6H-Pa(hQq8v
zU{>zxL1Eeu%GwEg+5>y4CVSHQAq!^a%z7puYjD`SfSdtgR|MpM(};kq!C@6=bAgvk{w24;C_@}yS%m*u8039ZwvBnM;?tC
z`lCGh*@)Evd7mL~CGzmoR{Te}(*{3h9$mG*KLF=N-qXla!%WpdKPvP%^7!XMz>D||
zM&82#c@qqN(Oj#-l^XnG(IX_
zuq5sF29e?YB114V+F5s<;(53ZE1=UwD<{5)Y1^`xKIgWm_gEb#g4QLJI`Z5;P<
z#m_ls8*|9FZr4v*9X&x)0?*IgFl~I$xwaPHKjJawYAbmhq#~IM+P7V5Ywtu{^>cQF
zKJ_~HV%O9Ld-_)Q#S&vT+#>(g*2?n}AjS;+U0qzJzpabKQm@vzNE2uP}8?Wiyt-pP>i_2rGMB&>~iTxnu+&a`X|lADVP3xGx3SL;rGqOB3*wh
zQ9P&XXPSy?U0=~m)aq2~xu8c}V0tPPl|0knGDM#X)9;BBcZJVId|QNmpousTp}*2Z
zd=a58@7ptPF`mdr@<0`dGL~^MXHaUwVl@moXmPvgXEA;kYs2<2QGs=pp5z94lhZa~?q
z8tC^m5qENYYXf3%w1IwIjJQ6G;-7>O=68;-3)jDIB94Sp{;6<%U1M=wMC#hc;NhnOOErqaP<{s|
zj=!hrdmD@6n*Jp6UHYb2@q$agCsusx(tn8+*SPgBW5x4s{a~Ef>(=+jiG{j;N1V7x
z*RPKguju;jCU}dL{z4P6GDv@_saPMR-`i9i3eum)3xI-jUsJIzSbw^Scp_L|ktmJ_
z>vt!LpM&+o3F7e({oVwzJw#uXAWnzqHHl(rsQ!7P*cPfko+#c7)t~Z;B@OhQUa_Wu
zj+f@_Z=m1Xg0!`&g}6OT-ybg?2-9DS7axb|x5SI@!t@`Ti-*GXMe$-wxW2Wy_&Ho(
z+FV>8q5s@WR7a4G4@KzL#E4rW_1B`seUbW$(c;rceMz)98L3|vEuQe`H#HJFJo>$j
zM6E~vN32*GrQaSawndS~UZK~nor+3F^sYuqxpD0g_SF9oBBmiyqCXZQ-qj8nikDkt
zyKT)xrKWFaELLgyLyg7Vn*LF=II8Kt#?V;2CQdx)(ib)t+gTk6W_czpc
zwh%8i)E{mk{@GCfM+@;@L;d%7@pVJ}>v-{OG*!RSu&TJ$Xk;h-i4c*8$ff$u5b=g~
zQZ+nlGQvu!-`YyNEcI7gilb8Boh;UB`qE^vUDFpO3!j#FO|tlhOaCp24DR71JmUYd
z39>$HIh0*f9IYZc>koQZu`~7M9#Q4GGn{Gfx$;4T13WT7yeRc+2Z|4+{>=b!Go01{
zQLX8BWr=HD`m=+?CYS!$An}GPasNP3>DKoR6sz2N)j)CDy;&mbt)Ly+x(Vr<4cgN@(3&jgD`dx)$Z;ZaCQ0!@ZJP72ENub^kb97^W#Z@$Hwa)Ocu4{^@EeenhE-z$>Msdfxk8Iw+8;!z~379TLb??8t~46rFz
zJVvANStHzSgl{8^ME;KmaS$Q46$?SnC_?bfgr*1&Oq8NIrSbpc@3ke}zyv#Wk&g!y
zIGz^$@qwaZB+hi{SeKq*;PH|;IY|mSdZ#p<)6=sidVcXZ_*4A2R|q^(5U&gqf}V8{
z|5*If-|w}xCF8u@h7#h1FYS~(iFZ5V1y?24QzQP3zi-hF^DhXxip77(WGl}*X`Mzt
zb1eq->(|4ZI%Z16tn!NX!*K&^PKmcm#<>|C)4Nx2X6Lpl%}-UR1kTd=^YIcqC3;kd
zk6TDVPdU~lNPdD!J;NvEj8adFG*N=rT&i-^YkXR6&}V>R@Rh63CGNq!gcy@#P!SaN
zRdMYO=p^C*J>7A+gMS+Ws9VQ<8l?2p9At**Nfct
zOVKqjrpTK(cVjxDw@@_L9pt7uwL3xeWWGevO`v*)zk+B8ktDhzl$!z}gOO+uR)%}&
z9YqSN39ksnWB!g2QQ2D&iHKS@nSdh=T`La`5nz96b642aliN;EBixD)(eN4xSpw!P8SXc;+e&p1p&E=jdlYBBGwZ
zo`V-2=3w*d9K8572V0us$3h~aUOJD1t$7@5U&O(VO&sjp%fYT14t9rQL`FpIp`Tue
zh^ijQ!7I}_*t>*-S0CWuwH+Mnd!K{Xf92qx@ff@jQEy~&u>TSSkx>m~C5K^h6Nlk)
zFGA0#G;}K)X~R3IXSJQ}G4|JzIe9w5hGj&f^9nKMBN}zXSv!L6M-fCd$pWbe4uVkkQw{PiRr{AhAmlF_Iu!gp|F2ABq3QWAPAJ#u7dD5=2E4IRp?X
zFSdw{NdOp_h`YT9B5}7R<5Qd39Db;8A&N9D#(0xo0N?Bw2AGU#qBY;y8(u6?I|=!u
zOEw>lF%sj|-a&w5j3iu4b4~6)D*C2dG#P)t4goxNapL3A4kL))#yYU4S^lQaI|K1!77|+4Lc^nK{!NK4s
zIT*5+gP|W&&}2jq+7r>_{BtslY{TI2b>egG-7y
zn0OrrlQwZMxtfE#;~Y#0$%RSwyAUn$bcfbtOS!TQ+WBHQJd>oS@2w`~ma@Z-r7Zps
zNwO;_TANTZ8u>Be$ycMhK^Mv4-G!)Wh{#A78yRoxZ1hU(1klWKnkp9u_x7jdsIW*G
z4({Q@u7@c}(Yh6aW&?|Z(cq|G)bMi|!_UpbFQRF?e`=sMJ?AijxO5tDp82Rv#vM1mrmpWbft`B+=Z|BTEmu9EO^X&v#|W*e*_s68A1!(b5m-Bf(gC=zW3i~%W&
zNq9gjVq4@}r1KhqG=fQ=_>+=k?f^_F9bG(t8lnx!SM|r0D=bkY3kF1dtdR_fKF|rtCPp$mItNZKKF&x+
zMZeq($)-j!CVD(3k@#jtGA{ZTba8xhBN-pvxigaSM$#MI(Tik)kxY&rL}FkNvs9_k
z4dH0xF?Knb7Cj4H7vD0(srV-)EUg9oRQv&T@)<>>6(SQ+
z=qmJ%H$e$OOGYItGdES&xhslRD%H_)QuU5W?K>LOXxC)4T+%8tmSReONpd9h$xOwa
z)}FT3V}}8T`V*;N9#hO|S$a0&N|G>B@t_rJfP^NaP9)`viV>}7Z7EGeJ1k1PhQ4XB
zs}P19-O%faB_H1ok6-hjHY6L3INyjMdVOEtosLrM$E`5T|%B(2`lnNGcL7<(+9@
zy^f8R*3q_Lpsj-cNqmWEw7B-8&7y{{VV<<&_T!mC7vs9%*5^l>v
z>Uxz5PsoP$JxG}cNa?DOSMSa
znAqAf0k}LOyxUmSv}Fn8kR(rZ2H-bUcVp~Plm&2%6>E%t>hYFx7q}(<#`>o%k6j&v
z{T>QW+$M98&mW379!YFp-IK8-3v!bjN%ChxR?DjhNgqz6+ubgPFmx)C*hDp*Hc}43
znI&8+A>NXtQ%QR)n~Ui;&mpzGD=P>=+pj=GOZgljwsU)EW9F!Y@*u`yF91u_5T!jE
z`vBzoX#UAo`Lu~stVv0x;-?OUUQ=1|w7m;t-BRYksd)!5faa;Q0sWEdy_NyAB~$<&
znuc&Wz18uGM%Gzgt#lN1n+&?kv1X;Y~rC$^%CL??+v7Y7WW
z?WWx{(OEXn0pJVzWIF9b{TLKd*G5VT7(hEz2ZJthB!*gIcMcdpYiFB-QeKiw$^>e!
zTn8e5D1@@5aQAqKnIx~k082b7hd^XraoZTP|L-F;9GABcg0=&Jh_0__poG-yh81XU
z0}%2Rtx&Xy7~~;e)1W$6-s465I14!pyI>x_%L#CV%JT>99?&CnmJ{NZQ(6l_Ir0G$1=?rO
za!82GLf=sl`G!f0C8!dki#*yKsBjq%@AN65ek2sd{OZ{OU4=x+*_a?0)tmrlp;#L+
za&~(I)z?CCji;bP$hDtT87C_tGv&xj2<5{EXyZw@3G#Q04h@3H`9x!Vc9CP@YC~Gd
z*{uwf-C>qfg}cdul4&BOwaji~6z(pMf@w%Q89KW=@$t5Hmv`Ge$8wdAF(jLwKOr8cxFE{q_*g@z
zjl?>ZUBD=o4*Nte`5}B*
z)4Xw*LF8{hM54TbI!GvjqS6n%Ko#5!`RE{7wgD=GkSrOvoW|a@>5K<}lKqgMOEgv2
zK@^E)sd~wOz*L*g-H1
zQ2aM0R@9%IKT|eCvbB{TdkLZ-{)o+3%QAT$QvEHW(Vu+oK;l~wNKEGtJ={}))hXJ0
zBYFEL$lf2}HyV8&P$>j4!;SeON2xB(6
z2jmk{W_^zVk=)Zrw7d|BJ_G`#v?UT*ijrIdLnB63MCdd<1i3>o(9r)V!u{X17C^T)
zBdG)GC!eF0?{17c`^&*ci<6WsW%dEE(&8nRg=M(39oWcdbI7ATjA;k
znG$ZyM*dCZ5Sk2g(FlY$tCTw-hkp
z)ELFJm*0ee@a(%4v^_SxmmH0?v$o@1EDz-S$p3_B-MMTp`5HW*w&x`vOY9p(`h+6KFR{?^{>NcY{ux`@Q
z05M3o+A%pTCgYpGYSrEuj&=}NA
z`Fjo~WUfJj7NYU58l(DP0?9jA($|@^{<1l&(IwjflNEr2VvO_UL2@RXi8fsBhv!s`
z#{*nkM*#?N?-*cn<(On;#xA)SxK%cG0@Xi6ZiR=@F5#KTC7%VE6{${XsA@nyMBB7!
zatY2vUGi|9kh{Hrl*k*S2ts|XxUlTxIl<)~_%-cX*&a^OB@@vH3PPSEmOf0#b#hft
zf@E6|@+h(NVM4B#>vVz?SP<%bWdTM-H_E#);9YWw1)=t;bNZq3?kvc1v;3{Ka;Pr(
zAi-E#Zu4My8WTdwJMy{&VzM37ckypnnuSx=J6JA+LrHl>zJMBB@@oKpw7_DR@;@8p
zz0ge`w#XQH32F3kDVu?POZ*#_Gn@%2Pf6JsnSCsR8r6x4`jE^4VS-H@0H#`tcWf*xl6Amt#9;Z3`~r~E0Wc@xhzw1Hp!j#{
zk*q`27b7Q-S{iGzBQU)!oU!s5A+Lf4wH8`$Ocgn3vm6IVz6FbAJs7AI%?Bf5)Kx%S
zZ=*YiNL8t$h;=
zv!W_Sf;h(JU;vhA^DxlABtQv>bDbPsB6oC?HW|)?IjjWnHYW!L+@U?+&*1O`h|fDY
zoWh9K_GtZcl;4qWfq2*npuMEFPn!=}$uY?vK>WoC_y7s*O>I;=0}umbbNn0493a!+
zw^OdsN->mVM-Z}!s60E{8uy5TX(zPF=v_GukbHj_x?~BhByfhV88ux6#3Di|g$|Hw
zx}&C3G6U0;yc2{?0W1c{kEq+5yVih(d*P9vX>~8@q87w3BosjTj1iJi{alx#*)J0+1&EG>vfC_1%Di&epKCtqVpc-|xG;c~
z0xfq9MgKFW5&*6U;50%m?*XaSx<+GRzy^N{5bJG}F?blY(S@&XDb$NVRNE+H@G$C8
z*Hyg?)KMV5vQgYsBV>!N(DOj~5|nu%4Oe<#5siPNg+`5x8Y>r}iHu4IqMtv?;lB*7
z=g9uu4E!a)&a&~Ab3#uMYweh8LqkK%C4jB=hZ?AqX3~pM%K|(K#8w;SG`^;pU>NP*
zgt=NC1mvg<<2GmVnNG^dSECGGzW@+~e(`VeJv0`w-I1n}y+EAnkMe6W;ZxkQb-KYd
z2iQCt?`$%&p6I?h*J$z;fGzfiqREV!<$fLv*%sCV@uZD%Hn|voEJY+19f|mNYK2%s3Wko>hrtw?Yj?l~*ic?2DOAc5Sp-=bH3^7Pf0SBK
zjo?Rm+U5G^=sm9cdcfA%P;L=_7=w`>0ctDtoBJ5}&A`4_AKtHTsAS6Bvd_7Ojh;j)
z4;*1&D;*07losA6o7RJeimZQM^brs^~IK{gtXcHVL
z7utaWN9rnMHOy?&)S!znn{lC2D9{L7sIzonujdEJBRF43`G=+(-q$75QDU%N$~IA3
z6N6+l=9H8NwXLI-wYlU}l(?#{Qg$Z|mGQ7M?SUY?JHXgMZbS)X#nVY+yjVS7{s{k)
za>w_*P1I|3phieK)lNB}H4itI8OMP7l_cP0fMfeZa$_rqyKSf?
zfN2uUIx6GpZfL4Z7H>}
z$bOvrj;>#;>sE9-8#KINNVNWNGTJQZPPU@a1#Zy3CffUykaSU79Ur!oZesT^m6sn{
z*wcyjApM#Onq#!Vs;+Km{2d(20ua!4nl@l
zVvi$#45QRm38-b%p!%u`EHjnLB#ojnYw9aw*I1W$fgB6QfMfDgkVwn*BAU+8$Vfyp
zNH(oKMcZ?gDHv&gMI&|98z2=Y17-OHQlxg@O|=RPxzubH;2Ry$egjeWsQdn0fWO)s
zbqes5L{$TxpsGHrqbioyZb+c`4SS&UK-QlmnFswsj3#wGTWJA|Y?gmj`oO9uU;w5L
z&I!!Wm#l&C#kg;{eJgpWR9%2GDdj@mgjCD?G@i1^3HUAG;
z2J#5ON+NY8^H_ixBDHh{@wl6KSc<^+-ui+x`#~aYwMY*7h%nIS5MAp&0N*QEauCrV
zH~Ap#jiJa``Z;Hi&(t=e;cc%!#Tn$;w2xwtu_^@KHpsn!GG2&6#_Fb=@fc;$lA`S`
z?KopIWvsxY)b{S4oI!3!D~UzM{lht<17*z2MaBb{a7Itc__{4J9-74&m
z<_sFnS~?!lw0&eHXM95$85k>VpIFZsG)}eWu<&d9%#)mPDP`QAjg04Mq6l)+aMH4p
zkg@pyXV7TS)}N1zZO1snLm79DK*pY*ID?E^`@9)4_6B2V9poND8LO$5eQ}&YMy$1l
zQMY})EoXc}8GCWQ-1eV6IO8kIh(WaN{$ZR!HlvOf;zNTQfO>Ohmh%
zL_c^HXH-$fkkQC^X9Z`F0cdNfE$^=54C?mQbp5DZr?=q8nhr#>Dv5wvI9`x&;|c4?y!W5qw8~
z-xTPy9=V@`D0BC=LqWQCNUs2v12tOm$sFKXjplF6v>H+_GAF`T`Kw0umt0!P_XznR
zuWQO|yu$HUi;@&1L*3+DABcgrj02F5XCZ2!$13#hKs00Gwx^)ZxNoqvlvrvW0!XiL
zVPSkVye}@gQMG4ZbfbqF#zi+e&9E-IHHYl2@Zb0{6r+n#d;xBd?2NoVR(|Z2pn_;z
zbjtzZ5{npc(e0yLoWw#XITwg)3AKb+$I{upb89vb-#^FhcCKO1l>a$i6Hk8)Y`*ci2^!BgWNZo(VlTIT3m4(
zkD=CxXmqoNFDJIlv-+&%6zVhMiW}*X@Bg&SC%LREZpV-~f&a$Dih9zx;`STzLXoBN
zWAhLN(YWH)45>C2(dfzE!)VmCETnHoYqOhU9bQCVgiLM$E8}MI)i;V+5j2S)xY&m>
zIz@xrsc2ab_dL!(v}*!B!b1nO!P$1giew0NGa=AkzU~w{fl6h{FW??RC*@;A5>UQ~
z;ydu)IGs`^eQNh{LeSSI<@@;fgy@|OIvv4b&R^z|&{?%Ye!NQ&-S1Q=gn3*EDfqJna(H<5(|
zQS_BZC`y;V2lFdYVBZPa&24@v5ArEsq#ytoCZpnMYXz@E={E0^&XT|
zPEy?f#O)R;_HyDefFB5ku9cM+0P!fOTWy3T4bDyIwnOL}@;Q$Xx1gQ!Fkl~BP!n)S
zZo+J~jsU-aD6y()yol^K7~f5qeZ+z|$~?<{-8rfKr(O_)@lmyv!jJ#C|phb=x8I
z2YCigbAcsr}^qqD)TrpRc1;FqCP9x;&38?Ih_UVNNt7$;Y
zv{<2K3~;-)<{E4kgLtFG27m+%-q3It-Ou2r-w)zrP7Vx+aedg@;IJ3O{Z0<_L?$%J
z^)sxMjtl5K^Xs(1nOf8RP;mHa{mv
zbCIhJbSsB~dVz(&bkq)pmR|fkRL#TbQqZoj=&|I~*pq+_AwwT?JqfFqHvzIK0A`Q#
zOnwfXzW9SN2G?zX?(>JEYI<0mzUl$AimN^bz)$`luHSg{75b}-Hs&%ME8aN#8*N;s
z+DI2}LOt#n)F?AR?P?)#Loz)H#3}CXa88;W4$37KRSgza)P?dG>0);B+}c;frAMA3V??Lz`QmaBpbnoLf>`w!QzYt
zye3Zqr=xKW>sP0TgC%}VRD>RLw}%_jWIQmbgj0P^vuPc3VjZ(2c2TIPhx;NF*7tEV
zpP~~vT0&6;P@fCUj375fdvNKVPhe}~4eRtn4(?ku!K58lB55s;>C}}y9C`{XHPUWZ
zb`TtD*lZ&m;>tb;mK!$5NQb+$gcPI)Q*GII!pOqPa&{
zIF^blvoP8|U8aNDI{;zS@=r7*tXQ58>I4hnH_?Zcq(jwin#L=DxW+(~;l22IcG$c#ux0r%h$n0S6+%__cv00AkHbAP
z7ae=zhWIyHZdApft4?E-F{m8?J^evS{|38jg5hZynF|y>A95(tth4HdW(H_J0E=u8
zOP(oz!6Ghfabi5aD+F7YcLA`GKn+N3V8Zn48>0D4e;Kq_ExIXAD(og~`TN6+nmz^K
z8v?N**IhSXtKqwcH;Gb`08>4x?hweE>Y?4>H+R27}!LRhb5IKTz*lNN_4_
z3;Lt4nqB=ZXs4X?X&UHHE`#`7Qxvq;1pi78D4&j!Vb64mFz6jXJMS#|3s+;I%jI)G
zn_$sR)27>gVK03KN6erK0IoR;v=JH(+xD>8k~;vn?<`OOrrNMQ4`R{9dfp1a9s-#L
za??4W?;RIv&_4q0b0@tO>@RHJPnZk1d@X3?JgxGbU?^exBd~s9dLn48ZF(;`7Cjtx
zU>})dPvp}(K^!InedVVCaJU!_n}(5`48U{(DFJ)Q@i4it4<5_{Z2|I^5Y5jpHS#1!
zJ0uzm)&p?A%^*{*C;Dg2k%fhtklPV?#YyjiNjB_@3Tc!-3ffl|U42J3lUJ5uHR&(}
zmNE!s8sT3_sX)Etm(W7kHyxl$*#^YU1aOGjOYTSm;QJpSkQ@x+`4#}@CL3Zv`!OdS
zw0z{3S~PP2e(V9@^fzWZmjbYoK&GNRn5Dyhr8kMmjmUrEECwZ*dctaF!(Xy5col#*
zZ3Y7*-FFYeHy&W%@(U1t2;eY6_8~VIB<~6`SVX`AWAJatFoI8f!a^ne>=WxL1H`U2
zK;1?T3zrw7yX7ztMiEiXm?LBZs5i_bx5A`u!gMQ(K`gUNkB}G9+#4+)fnW?+4&v&w
z08L~$mS7Bc6vWLIK#i_0awFMvb4f?OjCuzMrDcPbAUj}uGwqZ~Q~qPDe7!vix0EH3
zuv4<9u`(wDIc?=j(29|>5SoFwG*
zki%OUIbCFR26B4I8U2i$tFhEjf{v3%MuXN*-k1s*ZliqK5*y!k4jUrhfT{6_+(9(j
zeyR`ZmRNEsCiDXNJ=in!xXGUDFj2pfVO}hKrl4-LK?yNfK13ZdO&)=^H2%_i8xWl~
zKUkiCqQbBgfOMMd4f4>lAbtA+QYcfS2$Bc#%(EbsO#vyA)7=EA0(oTsWRP5no(j8E
zy4x#dY4RaJo+OwWA%o;r>Vz5mS~BVcO}-B50UL3VtiY6vRmr{ZatcvnQ*nMn7SY39
zi#%OL=`+Y31$A;pA9)y-=XvgZ=t{PfPl21~C4SQby;Ussb7b=ep2nX76VGEFcLkRnK*}t^Z_Dew3Ip#YY$S%6-4B>dEh+{l&$gWl_Y(6F_u11=n(|E
zD)|IKd{mR9SC}b8OF0pBdcNXpdZn3}O>0L_bz7>3UU8-#;ZaiEf8%O9%kz8Vi_YWd
zlTMK(y#yq?>wDCPLzp0Gzqgqpx3XfmhiK0{mnmGl-
zpg}h(Bk5&ou@qCB4ZwgX07fu?UbChEE}@W4;07vgQEHWk69KfF#)(^F_u4#hKm@XS0BsCQ`L)xR*Bh(G>g6vR@|v
zKBG^nR8|v+tEcwD33%ZUGCFg>0D9S+Lj#?qD-?iQ`eZu2h0c$`g>a)8=SvD0(AEM_
zQuO?qraQgky-0PI^q5!g(>>mBXgP#sK@3v%A=CSnnk19nFcU=wEy2KL4@yrom}JtA
zcL9C)({TpX|;%q?=OR+y)6&Qfi>(Ui)CN!?`4qzBTB*+M3nB$G8){a6A<6tnJ4^pg&$
zo-8pNG|?oPMOmt6Ph+LRMXw5^bJZ_CZA!Jqq?@{W`F5;fx#$Zf$z;t^?QUS|>HyK{
z{X(X$_I`m`fQx=ZB$~fW((6mik?R>}ko>s5IVH;|+QpCV2YRPPa|3iff%xg;x%>qu
z{ryB#CTCDK`3qIdpnZ5V1m6FhR-d{D_MEIHk5=IfI0|*FvzHFo+Fg7FJDiw;$0g&eD10YsbqF
z!_&IFcL@&LdyT<`(TQ}ftI=yhuEx1oS{7}N5+z+|Nz0ZWqn@Ae-t@ZnV`+L=={1WoS1AT5yoD7uJNj?n*ms3fy5-$lJPG25Hg=5f@(?)qGB?i
znx;({)dI~#hD*L4fWVgF0mzQs1_(Mud$_-|qmxc745gr&cwY2dTB1@SrL&(Po>?im$jvnaln2hwBg#WaWOplPNTQ9xb|uxV4n7N
z7UHjJ2^1&puGh3^#AD=G*o5nKO|C%dR{S?6RuT`QnXq4z@&V*NV^LyPfR4vx?_iv}
zKF}Wd|0w$o@G6Qf?47%NFQG`4BA^68#Rj1%QY4BZAZji)6qS$=NT@Lh5(6oMXi&if
zP(TG@0i#&Jir8Yujta`Bs1Z=H2T;M!_P_6$-Mx4B?*0D%=XoZ~p7+emdC#1got-VW
zuVLf>RPW=@$JDw*%Acodhd`k|G