mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
Merge branch 'master' into eigenPolynomials
This commit is contained in:
72
dev/cmake/Modules/FindCsharp.cmake
Normal file
72
dev/cmake/Modules/FindCsharp.cmake
Normal file
@@ -0,0 +1,72 @@
|
||||
#
|
||||
# A CMake Module for finding and using C# (.NET and Mono).
|
||||
#
|
||||
# The following variables are set:
|
||||
# CSHARP_FOUND - set to ON if C# is found
|
||||
# CSHARP_USE_FILE - the path to the C# use file
|
||||
# CSHARP_TYPE - the type of the C# compiler (eg. ".NET" or "Mono")
|
||||
# CSHARP_VERSION - the version of the C# compiler (eg. "v4.0" or "2.10.2")
|
||||
# CSHARP_COMPILER - the path to the C# compiler executable (eg. "C:/Windows/Microsoft.NET/Framework/v4.0.30319/csc.exe" or "/usr/bin/gmcs")
|
||||
# CSHARP_INTERPRETER - the path to interpreter needed to run CSharp executables
|
||||
# CSHARP_PLATFORM - the C# target platform
|
||||
# CSHARP_SDK - the SDK commandline switch (empty for .NET, for Mono eg. "/sdk:2" or "/sdk:4")
|
||||
#
|
||||
# This file is based on the work of GDCM:
|
||||
# http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/FindCSharp.cmake
|
||||
# Copyright (c) 2006-2010 Mathieu Malaterre <mathieu.malaterre@gmail.com>
|
||||
#
|
||||
|
||||
# TODO: ADD ABILITY TO SELECT WHICH C# COMPILER eg. .NET or Mono (if both exist). For the moment, .NET is selected above Mono.
|
||||
|
||||
# Make sure find package macros are included
|
||||
include( FindPackageHandleStandardArgs )
|
||||
|
||||
unset( CSHARP_COMPILER CACHE )
|
||||
unset( CSHARP_INTERPRETER CACHE )
|
||||
unset( CSHARP_TYPE CACHE )
|
||||
unset( CSHARP_VERSION CACHE )
|
||||
unset( CSHARP_FOUND CACHE )
|
||||
|
||||
# By default use anycpu platform, allow the user to override
|
||||
set( CSHARP_PLATFORM "anycpu" CACHE STRING "C# target platform: x86, x64, anycpu, or itanium" )
|
||||
if( NOT ${CSHARP_PLATFORM} MATCHES "x86|x64|anycpu|itanium" )
|
||||
message( FATAL_ERROR "The C# target platform '${CSHARP_PLATFORM}' is not valid. Please enter one of the following: x86, x64, anycpu, or itanium" )
|
||||
endif( )
|
||||
|
||||
if( WIN32 )
|
||||
find_package( DotNetFrameworkSdk )
|
||||
if( NOT CSHARP_DOTNET_FOUND )
|
||||
find_package( Mono )
|
||||
endif( )
|
||||
else( UNIX )
|
||||
find_package( Mono )
|
||||
endif( )
|
||||
|
||||
if( CSHARP_DOTNET_FOUND )
|
||||
set( CSHARP_TYPE ".NET" CACHE STRING "Using the .NET compiler" )
|
||||
set( CSHARP_VERSION ${CSHARP_DOTNET_VERSION} CACHE STRING "C# .NET compiler version" FORCE )
|
||||
set( CSHARP_COMPILER ${CSHARP_DOTNET_COMPILER_${CSHARP_DOTNET_VERSION}} CACHE STRING "Full path to .NET compiler" FORCE )
|
||||
set( CSHARP_INTERPRETER "" CACHE INTERNAL "Interpretor not required for .NET" FORCE )
|
||||
elseif( CSHARP_MONO_FOUND )
|
||||
set( CSHARP_TYPE "Mono" CACHE STRING "Using the Mono compiler" )
|
||||
set( CSHARP_VERSION ${CSHARP_MONO_VERSION} CACHE STRING "C# Mono compiler version" FORCE )
|
||||
set( CSHARP_COMPILER ${CSHARP_MONO_COMPILER_${CSHARP_MONO_VERSION}} CACHE STRING "Full path to Mono compiler" FORCE )
|
||||
set( CSHARP_INTERPRETER ${CSHARP_MONO_INTERPRETER_${CSHARP_MONO_VERSION}} CACHE STRING "Full path to Mono interpretor" FORCE )
|
||||
set( CSHARP_SDK "/sdk:2" CACHE STRING "C# Mono SDK commandline switch (e.g. /sdk:2, /sdk:4, /sdk:5)" )
|
||||
endif( )
|
||||
|
||||
# Handle WIN32 specific issues
|
||||
if ( WIN32 )
|
||||
if ( CSHARP_COMPILER MATCHES "bat" )
|
||||
set( CSHARP_COMPILER "call ${CSHARP_COMPILER}" )
|
||||
endif ( )
|
||||
endif( )
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CSharp DEFAULT_MSG CSHARP_TYPE CSHARP_VERSION CSHARP_COMPILER)
|
||||
|
||||
mark_as_advanced( CSHARP_TYPE CSHARP_VERSION CSHARP_COMPILER CSHARP_INTERPRETER CSHARP_PLATFORM CSHARP_SDK )
|
||||
|
||||
# Set the USE_FILE path
|
||||
# http://public.kitware.com/Bug/view.php?id=7757
|
||||
get_filename_component( current_list_path ${CMAKE_CURRENT_LIST_FILE} PATH )
|
||||
set( CSHARP_USE_FILE ${current_list_path}/UseCSharp.cmake )
|
||||
92
dev/cmake/Modules/FindDotNetFrameworkSdk.cmake
Normal file
92
dev/cmake/Modules/FindDotNetFrameworkSdk.cmake
Normal file
@@ -0,0 +1,92 @@
|
||||
#
|
||||
# A CMake Module for finding C# .NET.
|
||||
#
|
||||
# The following variables are set:
|
||||
# CSHARP_DOTNET_FOUND
|
||||
# CSHARP_DOTNET_COMPILER_${version} eg. "CSHARP_DOTNET_COMPILER_v4.0.30319"
|
||||
# CSHARP_DOTNET_VERSION eg. "v4.0.30319"
|
||||
# CSHARP_DOTNET_VERSIONS eg. "v2.0.50727, v3.5, v4.0.30319"
|
||||
# DotNetFrameworkSdk_USE_FILE
|
||||
#
|
||||
# Additional references can be found here:
|
||||
# .NET SDK 1.1: http://www.microsoft.com/downloads/details.aspx?FamilyID=9b3a2ca6-3647-4070-9f41-a333c6b9181d&displaylang=en
|
||||
# .NET SDK 2.0: http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en
|
||||
# .NET SDK 3.5: http://www.microsoft.com/downloads/details.aspx?familyid=333325fd-ae52-4e35-b531-508d977d32a6&displaylang=en
|
||||
# C# Compiler options: http://msdn.microsoft.com/en-us/library/2fdbz5xd(v=VS.71).aspx
|
||||
#
|
||||
# This file is based on the work of GDCM:
|
||||
# http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/FindDotNETFrameworkSDK.cmake
|
||||
# Copyright (c) 2006-2010 Mathieu Malaterre <mathieu.malaterre@gmail.com>
|
||||
#
|
||||
|
||||
set( csharp_dotnet_valid 1 )
|
||||
if( DEFINED CSHARP_DOTNET_FOUND )
|
||||
# The .NET compiler has already been found
|
||||
# It may have been reset by the user, verify it is correct
|
||||
if( NOT DEFINED CSHARP_DOTNET_COMPILER_${CSHARP_DOTNET_VERSION} )
|
||||
set( csharp_dotnet_version_user ${CSHARP_DOTNET_VERSION} )
|
||||
set( csharp_dotnet_valid 0 )
|
||||
set( CSHARP_DOTNET_FOUND 0 )
|
||||
set( CSHARP_DOTNET_VERSION "CSHARP_DOTNET_VERSION-NOTVALID" CACHE STRING "C# .NET compiler version, choices: ${CSHARP_DOTNET_VERSIONS}" FORCE )
|
||||
message( FATAL_ERROR "The C# .NET version '${csharp_dotnet_version_user}' is not valid. Please enter one of the following: ${CSHARP_DOTNET_VERSIONS}" )
|
||||
endif( )
|
||||
endif( )
|
||||
|
||||
unset( CSHARP_DOTNET_VERSIONS CACHE ) # Clear versions
|
||||
|
||||
# Get the framework directory based on platform
|
||||
if( ${CSHARP_PLATFORM} MATCHES "x64|itanium" )
|
||||
set( csharp_dotnet_framework_dir "$ENV{windir}/Microsoft.NET/Framework64" )
|
||||
else( )
|
||||
set( csharp_dotnet_framework_dir "$ENV{windir}/Microsoft.NET/Framework" )
|
||||
endif( )
|
||||
|
||||
# Search for .NET versions
|
||||
string( REPLACE "\\" "/" csharp_dotnet_framework_dir ${csharp_dotnet_framework_dir} )
|
||||
file( GLOB_RECURSE csharp_dotnet_executables "${csharp_dotnet_framework_dir}/csc.exe" )
|
||||
list( SORT csharp_dotnet_executables )
|
||||
list( REVERSE csharp_dotnet_executables )
|
||||
foreach ( csharp_dotnet_executable ${csharp_dotnet_executables} )
|
||||
if( csharp_dotnet_valid )
|
||||
# Extract version number (eg. v4.0.30319)
|
||||
# TODO: Consider using REGEX
|
||||
string( REPLACE "${csharp_dotnet_framework_dir}/" "" csharp_dotnet_version_temp ${csharp_dotnet_executable} )
|
||||
string( REPLACE "/csc.exe" "" csharp_dotnet_version_temp ${csharp_dotnet_version_temp} )
|
||||
|
||||
# Add variable holding executable
|
||||
set( CSHARP_DOTNET_COMPILER_${csharp_dotnet_version_temp} ${csharp_dotnet_executable} CACHE STRING "C# .NET compiler ${csharp_dotnet_version}" FORCE )
|
||||
mark_as_advanced( CSHARP_DOTNET_COMPILER_${csharp_dotnet_version_temp} )
|
||||
endif( )
|
||||
|
||||
# Create a list of supported compiler versions
|
||||
if( NOT DEFINED CSHARP_DOTNET_VERSIONS )
|
||||
set( CSHARP_DOTNET_VERSIONS "${csharp_dotnet_version_temp}" CACHE STRING "Available C# .NET compiler versions" FORCE )
|
||||
else( )
|
||||
set( CSHARP_DOTNET_VERSIONS "${CSHARP_DOTNET_VERSIONS}, ${csharp_dotnet_version_temp}" CACHE STRING "Available C# .NET compiler versions" FORCE )
|
||||
endif( )
|
||||
mark_as_advanced( CSHARP_DOTNET_VERSIONS )
|
||||
|
||||
# We found at least one .NET compiler version
|
||||
set( CSHARP_DOTNET_FOUND 1 CACHE INTERNAL "Boolean indicating if C# .NET was found" )
|
||||
endforeach( csharp_dotnet_executable )
|
||||
|
||||
if( CSHARP_DOTNET_FOUND )
|
||||
# Report the found versions
|
||||
message( STATUS "Found the following C# .NET versions: ${CSHARP_DOTNET_VERSIONS}" )
|
||||
|
||||
# Set the compiler version
|
||||
# Do not force, so that the user can manually select their own version if they wish
|
||||
if ( DEFINED CSHARP_DOTNET_COMPILER_v2.0.50727 )
|
||||
# If available, select .NET v2.0.50727 (this is the minimal version as it supports generics, and allows use of VS2008)
|
||||
set( CSHARP_DOTNET_VERSION "v2.0.50727" CACHE STRING "C# .NET compiler version" )
|
||||
else( )
|
||||
# Select the highest version (first in reverse sorted list)
|
||||
list( GET CSHARP_DOTNET_VERSIONS 0 csharp_dotnet_version_temp )
|
||||
set( CSHARP_DOTNET_VERSION ${csharp_dotnet_version_temp} CACHE STRING "C# .NET compiler version" )
|
||||
endif( )
|
||||
mark_as_advanced( CSHARP_DOTNET_VERSION )
|
||||
endif( )
|
||||
|
||||
# Set USE_FILE
|
||||
get_filename_component( current_list_path ${CMAKE_CURRENT_LIST_FILE} PATH )
|
||||
set( DotNetFrameworkSdk_USE_FILE ${current_list_path}/UseDotNetFrameworkSdk.cmake )
|
||||
59
dev/cmake/Modules/FindMatlab.cmake
Normal file
59
dev/cmake/Modules/FindMatlab.cmake
Normal file
@@ -0,0 +1,59 @@
|
||||
# - this module looks for Matlab
|
||||
# Defines:
|
||||
# MATLAB_INCLUDE_DIR: include path for mex.h
|
||||
# MATLAB_LIBRARIES: required libraries: libmex, libmx
|
||||
# MATLAB_MEX_LIBRARY: path to libmex
|
||||
# MATLAB_MX_LIBRARY: path to libmx
|
||||
|
||||
SET(MATLAB_FOUND 0)
|
||||
IF( "$ENV{MATLAB_ROOT}" STREQUAL "" )
|
||||
MESSAGE(STATUS "MATLAB_ROOT environment variable not set." )
|
||||
MESSAGE(STATUS "In Linux this can be done in your user .bashrc file by appending the corresponding line, e.g:" )
|
||||
MESSAGE(STATUS "export MATLAB_ROOT=/usr/local/MATLAB/R2012b" )
|
||||
MESSAGE(STATUS "In Windows this can be done by adding system variable, e.g:" )
|
||||
MESSAGE(STATUS "MATLAB_ROOT=D:\\Program Files\\MATLAB\\R2011a" )
|
||||
ELSE()
|
||||
|
||||
FIND_PATH(MATLAB_INCLUDE_DIR mex.h
|
||||
$ENV{MATLAB_ROOT}/extern/include)
|
||||
|
||||
INCLUDE_DIRECTORIES(${MATLAB_INCLUDE_DIR})
|
||||
|
||||
FIND_LIBRARY( MATLAB_MEX_LIBRARY
|
||||
NAMES libmex mex
|
||||
PATHS $ENV{MATLAB_ROOT}/bin $ENV{MATLAB_ROOT}/extern/lib
|
||||
PATH_SUFFIXES glnxa64 glnx86 win64/microsoft win32/microsoft)
|
||||
|
||||
FIND_LIBRARY( MATLAB_MX_LIBRARY
|
||||
NAMES libmx mx
|
||||
PATHS $ENV{MATLAB_ROOT}/bin $ENV{MATLAB_ROOT}/extern/lib
|
||||
PATH_SUFFIXES glnxa64 glnx86 win64/microsoft win32/microsoft)
|
||||
|
||||
|
||||
|
||||
ENDIF()
|
||||
|
||||
# This is common to UNIX and Win32:
|
||||
SET(MATLAB_LIBRARIES
|
||||
${MATLAB_MEX_LIBRARY}
|
||||
${MATLAB_MX_LIBRARY}
|
||||
)
|
||||
MESSAGE (STATUS "MATLAB_ROOT: $ENV{MATLAB_ROOT}")
|
||||
MESSAGE (STATUS "MATLAB_INCLUDE_DIR: ${MATLAB_INCLUDE_DIR}")
|
||||
MESSAGE (STATUS "MATLAB_LIBRARIES: ${MATLAB_LIBRARIES}")
|
||||
MESSAGE (STATUS "MATLAB_MEX_LIBRARY: ${MATLAB_MEX_LIBRARY}")
|
||||
MESSAGE (STATUS "MATLAB_MX_LIBRARY: ${MATLAB_MX_LIBRARY}")
|
||||
|
||||
IF(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
|
||||
SET(MATLAB_FOUND 1)
|
||||
MESSAGE(STATUS "Matlab libraries will be used")
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
MATLAB_LIBRARIES
|
||||
MATLAB_MEX_LIBRARY
|
||||
MATLAB_MX_LIBRARY
|
||||
MATLAB_INCLUDE_DIR
|
||||
MATLAB_FOUND
|
||||
MATLAB_ROOT
|
||||
)
|
||||
162
dev/cmake/Modules/FindMono.cmake
Normal file
162
dev/cmake/Modules/FindMono.cmake
Normal file
@@ -0,0 +1,162 @@
|
||||
#
|
||||
# A CMake Module for finding Mono.
|
||||
#
|
||||
# The following variables are set:
|
||||
# CSHARP_MONO_FOUND
|
||||
# CSHARP_MONO_COMPILER_${version} eg. "CSHARP_MONO_COMPILER_2.10.2"
|
||||
# CSHARP_MONO_INTERPRETOR_${version} eg. "CSHARP_MONO_INTERPRETOR_2.10.2"
|
||||
# CSHARP_MONO_VERSION eg. "2.10.2"
|
||||
# CSHARP_MONO_VERSIONS eg. "2.10.2, 2.6.7"
|
||||
#
|
||||
# Additional references can be found here:
|
||||
# http://www.mono-project.com/Main_Page
|
||||
# http://www.mono-project.com/CSharp_Compiler
|
||||
# http://mono-project.com/FAQ:_Technical (How can I tell where the Mono runtime is installed)
|
||||
#
|
||||
# This file is based on the work of GDCM:
|
||||
# http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/FindMono.cmake
|
||||
# Copyright (c) 2006-2010 Mathieu Malaterre <mathieu.malaterre@gmail.com>
|
||||
#
|
||||
|
||||
set( csharp_mono_valid 1 )
|
||||
if( DEFINED CSHARP_MONO_FOUND )
|
||||
# The Mono compiler has already been found
|
||||
# It may have been reset by the user, verify it is correct
|
||||
if( NOT DEFINED CSHARP_MONO_COMPILER_${CSHARP_MONO_VERSION} )
|
||||
set( csharp_mono_version_user ${CSHARP_MONO_VERSION} )
|
||||
set( csharp_mono_valid 0 )
|
||||
set( CSHARP_MONO_FOUND 0 )
|
||||
set( CSHARP_MONO_VERSION "CSHARP_MONO_VERSION-NOTVALID" CACHE STRING "C# Mono compiler version, choices: ${CSHARP_MONO_VERSIONS}" FORCE )
|
||||
message( FATAL_ERROR "The C# Mono version '${csharp_mono_version_user}' is not valid. Please enter one of the following: ${CSHARP_MONO_VERSIONS}" )
|
||||
endif( NOT DEFINED CSHARP_MONO_COMPILER_${CSHARP_MONO_VERSION} )
|
||||
endif( DEFINED CSHARP_MONO_FOUND )
|
||||
|
||||
unset( CSHARP_MONO_VERSIONS CACHE ) # Clear versions
|
||||
if( WIN32 )
|
||||
# Search for Mono on Win32 systems
|
||||
# See http://mono-project.com/OldReleases and http://www.go-mono.com/mono-downloads/download.html
|
||||
set( csharp_mono_bin_dirs )
|
||||
set( csharp_mono_search_hints
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.11.2;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.10.9;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.10.8;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.10.7;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.10.6;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.10.5;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.10.4;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.10.3;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.10.2;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.10.1;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.10;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.8;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.6.7;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.6.4;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.6.3;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.6.1;SdkInstallRoot]/bin"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono\\2.6;SdkInstallRoot]/bin"
|
||||
)
|
||||
foreach( csharp_mono_search_hint ${csharp_mono_search_hints} )
|
||||
get_filename_component( csharp_mono_bin_dir "${csharp_mono_search_hint}" ABSOLUTE )
|
||||
if ( EXISTS "${csharp_mono_bin_dir}" )
|
||||
set( csharp_mono_bin_dirs ${csharp_mono_bin_dirs} ${csharp_mono_bin_dir} )
|
||||
endif ( EXISTS "${csharp_mono_bin_dir}" )
|
||||
endforeach( csharp_mono_search_hint )
|
||||
# TODO: Use HKLM_LOCAL_MACHINE\Software\Novell\Mono\DefaultCLR to specify default version
|
||||
# get_filename_component( test "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Novell\\Mono;DefaultCLR]" NAME )
|
||||
|
||||
foreach ( csharp_mono_bin_dir ${csharp_mono_bin_dirs} )
|
||||
string( REPLACE "\\" "/" csharp_mono_bin_dir ${csharp_mono_bin_dir} )
|
||||
if (EXISTS "${csharp_mono_bin_dir}/dmcs.bat")
|
||||
set( csharp_mono_executable "${csharp_mono_bin_dir}/dmcs.bat")
|
||||
elseif (EXISTS "${csharp_mono_bin_dir}/gmcs.bat")
|
||||
set( csharp_mono_executable "${csharp_mono_bin_dir}/gmcs.bat")
|
||||
elseif (EXISTS "${csharp_mono_bin_dir}/mcs.bat")
|
||||
set( csharp_mono_executable "${csharp_mono_bin_dir}/mcs.bat")
|
||||
endif (EXISTS "${csharp_mono_bin_dir}/dmcs.bat")
|
||||
|
||||
if( csharp_mono_valid )
|
||||
# Extract version number (eg. 2.10.2)
|
||||
string(REGEX MATCH "([0-9]*)([.])([0-9]*)([.]*)([0-9]*)" csharp_mono_version_temp ${csharp_mono_bin_dir})
|
||||
set( CSHARP_MONO_VERSION ${csharp_mono_version_temp} CACHE STRING "C# Mono compiler version" )
|
||||
mark_as_advanced( CSHARP_MONO_VERSION )
|
||||
|
||||
# Add variable holding executable
|
||||
set( CSHARP_MONO_COMPILER_${csharp_mono_version_temp} ${csharp_mono_executable} CACHE STRING "C# Mono compiler ${csharp_mono_version_temp}" FORCE )
|
||||
mark_as_advanced( CSHARP_MONO_COMPILER_${csharp_mono_version_temp} )
|
||||
|
||||
# Set interpreter
|
||||
if (EXISTS "${csharp_mono_bin_dir}/mono.exe")
|
||||
set( CSHARP_MONO_INTERPRETER_${csharp_mono_version_temp} "${csharp_mono_bin_dir}/mono.exe" CACHE STRING "C# Mono interpreter ${csharp_mono_version_temp}" FORCE )
|
||||
mark_as_advanced( CSHARP_MONO_INTERPRETER_${csharp_mono_version_temp} )
|
||||
endif (EXISTS "${csharp_mono_bin_dir}/mono.exe")
|
||||
endif( csharp_mono_valid )
|
||||
|
||||
# Create a list of supported compiler versions
|
||||
if( NOT DEFINED CSHARP_MONO_VERSIONS )
|
||||
set( CSHARP_MONO_VERSIONS "${csharp_mono_version_temp}" CACHE STRING "Available C# Mono compiler versions" FORCE )
|
||||
else( NOT DEFINED CSHARP_MONO_VERSIONS )
|
||||
set( CSHARP_MONO_VERSIONS "${CSHARP_MONO_VERSIONS}, ${csharp_mono_version_temp}" CACHE STRING "Available C# Mono versions" FORCE )
|
||||
endif( NOT DEFINED CSHARP_MONO_VERSIONS )
|
||||
mark_as_advanced( CSHARP_MONO_VERSIONS )
|
||||
|
||||
# We found at least one Mono compiler version
|
||||
set( CSHARP_MONO_FOUND 1 CACHE INTERNAL "Boolean indicating if C# Mono was found" )
|
||||
endforeach( csharp_mono_bin_dir )
|
||||
|
||||
else( UNIX )
|
||||
# Search for Mono on non-Win32 systems
|
||||
set( chsarp_mono_names "mcs" "mcs.exe" "dmcs" "dmcs.exe" "smcs" "smcs.exe" "gmcs" "gmcs.exe" )
|
||||
set(
|
||||
csharp_mono_paths
|
||||
"/usr/bin/"
|
||||
"/usr/local/bin/"
|
||||
"/usr/lib/mono/2.0"
|
||||
"/opt/novell/mono/bin"
|
||||
)
|
||||
find_program(
|
||||
csharp_mono_compiler # variable is added to the cache, we removed it below
|
||||
NAMES ${chsarp_mono_names}
|
||||
PATHS ${csharp_mono_paths}
|
||||
)
|
||||
|
||||
if( EXISTS ${csharp_mono_compiler} )
|
||||
# Determine version
|
||||
find_program(
|
||||
csharp_mono_interpreter # variable is added to the cache, we removed it below
|
||||
NAMES mono
|
||||
PATHS ${csharp_mono_paths}
|
||||
)
|
||||
if ( EXISTS ${csharp_mono_interpreter} )
|
||||
execute_process(
|
||||
COMMAND ${csharp_mono_interpreter} -V
|
||||
OUTPUT_VARIABLE csharp_mono_version_string
|
||||
)
|
||||
string( REGEX MATCH "([0-9]*)([.])([0-9]*)([.]*)([0-9]*)" csharp_mono_version_temp ${csharp_mono_version_string} )
|
||||
set( CSHARP_MONO_INTERPRETER_${CSHARP_MONO_VERSION} ${csharp_mono_interpreter} CACHE STRING "C# Mono interpreter ${csharp_mono_version_temp}" FORCE )
|
||||
mark_as_advanced( CSHARP_MONO_INTERPRETER_${CSHARP_MONO_VERSION} )
|
||||
endif ( EXISTS ${csharp_mono_interpreter} )
|
||||
unset( csharp_mono_interpreter CACHE )
|
||||
|
||||
# We found Mono compiler
|
||||
set( CSHARP_MONO_VERSION ${csharp_mono_version_temp} CACHE STRING "C# Mono compiler version" )
|
||||
mark_as_advanced( CSHARP_MONO_VERSION )
|
||||
set( CSHARP_MONO_COMPILER_${CSHARP_MONO_VERSION} ${csharp_mono_compiler} CACHE STRING "C# Mono compiler ${CSHARP_MONO_VERSION}" FORCE )
|
||||
mark_as_advanced( CSHARP_MONO_COMPILER_${CSHARP_MONO_VERSION} )
|
||||
set( CSHARP_MONO_VERSIONS ${CSHARP_MONO_VERSION} CACHE STRING "Available C# Mono compiler versions" FORCE )
|
||||
mark_as_advanced( CSHARP_MONO_VERSIONS )
|
||||
set( CSHARP_MONO_FOUND 1 CACHE INTERNAL "Boolean indicating if C# Mono was found" )
|
||||
endif( EXISTS ${csharp_mono_compiler} )
|
||||
|
||||
# Remove temp variable from cache
|
||||
unset( csharp_mono_compiler CACHE )
|
||||
|
||||
endif( WIN32 )
|
||||
|
||||
if( CSHARP_MONO_FOUND )
|
||||
# Report the found versions
|
||||
message( STATUS "Found the following C# Mono versions: ${CSHARP_MONO_VERSIONS}" )
|
||||
endif( CSHARP_MONO_FOUND )
|
||||
|
||||
# Set USE_FILE
|
||||
get_filename_component( current_list_path ${CMAKE_CURRENT_LIST_FILE} PATH )
|
||||
set( Mono_USE_FILE ${current_list_path}/UseMono.cmake )
|
||||
@@ -108,6 +108,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 398.3,
|
||||
"a": [
|
||||
0.06812
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.314
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "75-19-4",
|
||||
|
||||
@@ -108,6 +108,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 511.72,
|
||||
"a": [
|
||||
0.07348
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.388
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "287-92-3",
|
||||
|
||||
@@ -107,6 +107,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 586.5,
|
||||
"a": [
|
||||
0.04246
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.207
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "556-67-2",
|
||||
|
||||
@@ -107,6 +107,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 619.15,
|
||||
"a": [
|
||||
0.04408
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.357
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "541-02-6",
|
||||
|
||||
@@ -107,6 +107,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 645.78,
|
||||
"a": [
|
||||
0.05105
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.594
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "540-97-6",
|
||||
|
||||
@@ -108,6 +108,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 557.0,
|
||||
"a": [
|
||||
0.0825
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.39
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "616-38-6",
|
||||
|
||||
@@ -107,6 +107,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 617.12,
|
||||
"a": [
|
||||
0.0638
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.22
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "100-41-4",
|
||||
|
||||
@@ -107,6 +107,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 599.4,
|
||||
"a": [
|
||||
0.0456
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.41
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "141-62-8",
|
||||
|
||||
@@ -107,6 +107,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 628.36,
|
||||
"a": [
|
||||
0.03972
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.254
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "141-63-9",
|
||||
|
||||
@@ -107,6 +107,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 653.2,
|
||||
"a": [
|
||||
0.040798
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.3323
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "107-52-8",
|
||||
|
||||
@@ -107,6 +107,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 564.09,
|
||||
"a": [
|
||||
0.04992
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.465
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "107-51-7",
|
||||
|
||||
@@ -107,6 +107,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 518.75,
|
||||
"a": [
|
||||
0.04576
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.272
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "107-46-0",
|
||||
|
||||
@@ -106,6 +106,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 799.0,
|
||||
"a": [
|
||||
0.072487
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.9014
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "112-63-0",
|
||||
|
||||
@@ -106,6 +106,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 782.0,
|
||||
"a": [
|
||||
0.0565
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.31
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "112-62-9",
|
||||
|
||||
@@ -106,6 +106,19 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 755.0,
|
||||
"a": [
|
||||
0.025025,
|
||||
0.044435
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
3.039,
|
||||
1.1653
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "112-39-0",
|
||||
|
||||
@@ -106,6 +106,19 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 775.0,
|
||||
"a": [
|
||||
0.02313,
|
||||
0.04567
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
3.242,
|
||||
1.163
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "112-61-8",
|
||||
|
||||
@@ -107,6 +107,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 433.74,
|
||||
"a": [
|
||||
0.04465
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.21
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "463-82-1",
|
||||
|
||||
@@ -108,6 +108,19 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 382.51,
|
||||
"a": [
|
||||
0.06158,
|
||||
0.8247
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.281,
|
||||
6.505
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "29118-24-9",
|
||||
|
||||
@@ -108,14 +108,14 @@
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2012",
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 345.857,
|
||||
"a": [
|
||||
0.05416
|
||||
0.0537
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.255
|
||||
1.25
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -107,6 +107,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 435.75,
|
||||
"a": [
|
||||
0.05903
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.246
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "590-18-1",
|
||||
|
||||
@@ -108,6 +108,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 616.89,
|
||||
"a": [
|
||||
0.06445
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.256
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "108-38-3",
|
||||
|
||||
@@ -315,7 +315,8 @@
|
||||
"conductivity": {
|
||||
"BibTeX": "Assael-JPCRD-2013-Heptane",
|
||||
"critical": {
|
||||
"GAMMA": 0.0586,
|
||||
"R0": 1.02,
|
||||
"GAMMA": 0.0586,
|
||||
"qD": 1250000000.0,
|
||||
"type": "simplified_Olchowy_Sengers",
|
||||
"zeta0": 2.45e-10
|
||||
@@ -394,6 +395,57 @@
|
||||
],
|
||||
"type": "polynomial"
|
||||
}
|
||||
},
|
||||
"viscosity": {
|
||||
"BibTeX": "Michailidou-JPCRD-2014-Heptane",
|
||||
"dilute": {
|
||||
"C": 2.1357e-08,
|
||||
"a": [
|
||||
0.33974,
|
||||
-0.49396,
|
||||
0.08050
|
||||
],
|
||||
"molar_mass": 0.100202,
|
||||
"molar_mass_units": "kg/mol",
|
||||
"t": [
|
||||
0,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"type": "collision_integral"
|
||||
},
|
||||
"epsilon_over_k": 426.118,
|
||||
"epsilon_over_k_units": "K",
|
||||
"higher_order": {
|
||||
"hardcoded": "n-Heptane"
|
||||
},
|
||||
"initial_density": {
|
||||
"b": [
|
||||
-19.572881,
|
||||
219.73999,
|
||||
-1015.3226,
|
||||
2471.01251,
|
||||
-3375.1717,
|
||||
2491.6597,
|
||||
-787.26086,
|
||||
14.085455,
|
||||
-0.34664158
|
||||
],
|
||||
"t": [
|
||||
0,
|
||||
-0.25,
|
||||
-0.5,
|
||||
-0.75,
|
||||
-1.0,
|
||||
-1.25,
|
||||
-1.5,
|
||||
-2.5,
|
||||
-5.5
|
||||
],
|
||||
"type": "Rainwater-Friend"
|
||||
},
|
||||
"sigma_eta": 0.61362e-9,
|
||||
"sigma_eta_units": "m"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,6 +109,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 638.8,
|
||||
"a": [
|
||||
0.0556
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.32
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "1120-21-4",
|
||||
|
||||
@@ -108,6 +108,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 630.259,
|
||||
"a": [
|
||||
0.06477
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.227
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "95-47-6",
|
||||
|
||||
@@ -108,6 +108,17 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 616.168,
|
||||
"a": [
|
||||
0.0619
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
1.21
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "106-42-3",
|
||||
|
||||
@@ -107,6 +107,19 @@
|
||||
],
|
||||
"type": "rhoV",
|
||||
"using_tau_r": true
|
||||
},
|
||||
"surface_tension": {
|
||||
"BibTeX": "Mulero-JPCRD-2014",
|
||||
"Tc": 428.61,
|
||||
"a": [
|
||||
0.0001859,
|
||||
0.05539
|
||||
],
|
||||
"description": "sigma = sum(a_i*(1-T/Tc)^n_i)",
|
||||
"n": [
|
||||
0.07485,
|
||||
1.224
|
||||
]
|
||||
}
|
||||
},
|
||||
"CAS": "624-64-6",
|
||||
|
||||
@@ -14,9 +14,12 @@ import hashlib
|
||||
def get_hash(data):
|
||||
return hashlib.sha224(data).hexdigest()
|
||||
|
||||
repo_root_path = os.path.normpath(os.path.join(os.path.abspath(__file__),'..','..'))
|
||||
|
||||
# Load up the hashes of the data that will be written to each file
|
||||
if os.path.exists('hashes.json'):
|
||||
hashes = json.load(open('hashes.json','r'))
|
||||
hashes_fname = os.path.join(repo_root_path,'dev','hashes.json')
|
||||
if os.path.exists(hashes_fname):
|
||||
hashes = json.load(open(hashes_fname,'r'))
|
||||
else:
|
||||
hashes = dict()
|
||||
|
||||
@@ -99,22 +102,19 @@ def gitrev_to_file(root_dir):
|
||||
pass
|
||||
|
||||
if __name__=='__main__':
|
||||
path = os.path.abspath(__file__)
|
||||
path = os.path.dirname(path)
|
||||
path = os.path.dirname(path)
|
||||
|
||||
import shutil
|
||||
shutil.copy2(os.path.join(path, 'externals','Catch','single_include','catch.hpp'),os.path.join(path,'include','catch.hpp'))
|
||||
shutil.copy2(os.path.join(repo_root_path, 'externals','Catch','single_include','catch.hpp'),os.path.join(repo_root_path,'include','catch.hpp'))
|
||||
|
||||
version_to_file(root_dir = path)
|
||||
gitrev_to_file(root_dir = path)
|
||||
version_to_file(root_dir = repo_root_path)
|
||||
gitrev_to_file(root_dir = repo_root_path)
|
||||
|
||||
import JSON_to_CPP
|
||||
JSON_to_CPP.TO_CPP(root_dir = path, hashes = hashes)
|
||||
JSON_to_CPP.TO_CPP(root_dir = repo_root_path, hashes = hashes)
|
||||
|
||||
# Write the hashes to a hashes JSON file
|
||||
if hashes:
|
||||
fp = open('hashes.json','w')
|
||||
fp = open(hashes_fname,'w')
|
||||
fp.write(json.dumps(hashes))
|
||||
fp.close()
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ json_options = {'indent' : 2, 'sort_keys' : True}
|
||||
|
||||
# Data from Mulero, JPCRD, 2012
|
||||
# CAS codes added from CoolProp 4.2, and wikipedia where necessary
|
||||
Mulero_data = """67-64-1 Acetone 0.0633 1.160
|
||||
Mulero2012_data = """67-64-1 Acetone 0.0633 1.160
|
||||
7664-41-7 Ammonia 0.1028 1.211 -0.09453 5.585
|
||||
7440-37-1 Argon 0.037 1.25
|
||||
71-43-2 Benzene 0.07298 1.232 -0.0007802 0.8635 -0.0001756 0.3065
|
||||
@@ -87,7 +87,7 @@ Mulero_data = """67-64-1 Acetone 0.0633 1.160
|
||||
7732-18-5 Water -0.1306 2.471 0.2151 1.233
|
||||
7440-63-3 Xenon -0.11538 1.0512 0.16598 1.098"""
|
||||
|
||||
def inject_surface_tension(root_dir):
|
||||
def inject_surface_tension_2012(root_dir):
|
||||
print("*** Injecting surface tension curves from Mulero")
|
||||
Tc_dict = {'Argon':150.687,
|
||||
'Benzene':562.02,
|
||||
@@ -174,7 +174,7 @@ def inject_surface_tension(root_dir):
|
||||
}
|
||||
|
||||
import glob, json, os
|
||||
for row in Mulero_data.split('\n'):
|
||||
for row in Mulero2012_data.split('\n'):
|
||||
row = row.split(' ')
|
||||
cas = row.pop(0)
|
||||
name = row.pop(0)
|
||||
@@ -207,6 +207,109 @@ def inject_surface_tension(root_dir):
|
||||
fp = open(fname, 'w')
|
||||
fp.write(json.dumps(j, **json_options))
|
||||
fp.close()
|
||||
|
||||
|
||||
Mulero2014_data = """cis-2-butene 435.75 0.05903 1.246
|
||||
Cyclopentane 511.72 0.07348 1.388
|
||||
Cyclopropane 398.3 0.06812 1.314
|
||||
Decamethylcyclopentasiloxane 619.15 0.04408 1.357
|
||||
Decamethyltetrasiloxane 599.4 0.0456 1.41
|
||||
Diethyl ether 466.7 1.2348 1.4846 1.1808 1.5021
|
||||
Dimethyl carbonate (Dimethyl ester carbonic acid) 557 0.0825 1.39
|
||||
Dodecamethylcyclohexasiloxane 645.78 0.05105 1.594
|
||||
Dodecamethylpentasiloxane 628.36 0.03972 1.254
|
||||
Ethylbenzene 617.12 0.0638 1.22
|
||||
Ethylene oxide 468.92 0.07542 1.151
|
||||
Hexamethyldisiloxane 518.75 0.04576 1.272
|
||||
Hydrogen chloride 21 0.05994 1.0953
|
||||
Isooctane (2,2,4- trimethylpentane) 543.87 0.04794 1.209
|
||||
Methyl linoleate (Methyl (Z,Z)- 9,12-octadecadienoate) 799 0.072487 1.9014
|
||||
Methyl oleate (Methyl cis-9-octadecenoate) 782 0.0565 1.31
|
||||
Methyl palmitate (Methyl hexadecanoate) 755 0.025025 3.039 0.044435 1.1653
|
||||
Methyl stearate (Methyl octadecanoate) 775 0.02313 3.242 0.04567 1.163
|
||||
Methylcyclohexane 572.2 0.0606 1.3
|
||||
m-xylene (1,3-dimethylbenzene) 616.89 0.06445 1.256
|
||||
Neopentane (2,2- dimethylpropane) 433.74 0.04465 1.21
|
||||
Nitrogen trifluoride 234 0.063203 1.2565
|
||||
Octamethylcyclotetrasiloxane 586.5 0.04246 1.207
|
||||
Octamethyltrisiloxane 564.09 0.04992 1.465
|
||||
o-xylene (1,2-dimethylbenzene) 630.259 0.06477 1.227
|
||||
Propylcyclohexane 630.8 0.055 1.17
|
||||
p-xylene 616.168 0.0619 1.21
|
||||
R1216 (Hexafluoropropene) 358.9 0.053876 1.0944 0.038318 2.3239
|
||||
R1234ze(E) (trans-1,3,3,3-tetrafluoropropene) 382.51 0.06158 1.281 0.8247 6.505
|
||||
R143a (1,1,1-Trifluoroethane) 345.857 0.0537 1.25
|
||||
R40 (Methyl chloride) 416.3 0.071315 1.2177
|
||||
RE245cb2 (Methyl-pentafluoroethyl ether) 406.813 0.04534 1.237
|
||||
RE245fa2 (2,2,2-trifluoroethyl-difluoromethyl ether) 444.88 0.0699 1.222
|
||||
RE347mcc (HFE-7000 or Methyl-heptafluoropropyl ether) 437.7 0.05031 1.232
|
||||
Tetradecamethylhexasiloxane 653.2 0.040798 1.3323
|
||||
trans-2-butene 428.61 0.0001859 0.07485 0.05539 1.224
|
||||
Undecane 638.8 0.0556 1.32"""
|
||||
|
||||
def inject_surface_tension_2014(root_dir):
|
||||
rename = {'Undecane': 'n-Undecane',
|
||||
'm-xylene (1,3-dimethylbenzene)': 'm-Xylene',
|
||||
'o-xylene (1,2-dimethylbenzene)': 'o-Xylene',
|
||||
'R1234ze(E) (trans-1,3,3,3-tetrafluoropropene)':'R1234ze(E)',
|
||||
'R143a (1,1,1-Trifluoroethane)':'R143a',
|
||||
'Methyl linoleate (Methyl (Z,Z)- 9,12-octadecadienoate)':'MethylLinoleate',
|
||||
'Methyl oleate (Methyl cis-9-octadecenoate)':'MethylOleate',
|
||||
'Methyl palmitate (Methyl hexadecanoate)':'MethylPalmitate',
|
||||
'Methyl stearate (Methyl octadecanoate)':'MethylStearate',
|
||||
'Dimethyl carbonate (Dimethyl ester carbonic acid)':'DimethylCarbonate',
|
||||
'Hexamethyldisiloxane': 'MM',
|
||||
'Tetradecamethylhexasiloxane':'MD4M',
|
||||
'Dodecamethylpentasiloxane':'MD3M',
|
||||
'Octamethyltrisiloxane':'MDM',
|
||||
'Decamethyltetrasiloxane':'MD2M',
|
||||
'Octamethylcyclotetrasiloxane':'D4',
|
||||
'Dodecamethylcyclohexasiloxane':'D6',
|
||||
'Decamethylcyclopentasiloxane':'D5',
|
||||
'Diethyl ether':'DiethylEther',
|
||||
'Neopentane (2,2- dimethylpropane)':'Neopentane'
|
||||
}
|
||||
import glob, json, os
|
||||
for line in Mulero2014_data.split('\n'):
|
||||
|
||||
row = line.split(' ')
|
||||
#print(row)
|
||||
values = []
|
||||
j = 0
|
||||
for i in range(len(row)):
|
||||
try:
|
||||
values.append(float(row[i]))
|
||||
except:
|
||||
j = i
|
||||
|
||||
name = ' '.join(row[0:j+1])
|
||||
|
||||
Tc = values.pop(0)
|
||||
a = values[0:len(row):2]
|
||||
n = values[1:len(row):2]
|
||||
|
||||
# The dictionary of values for the surface tension
|
||||
j_st = dict(Tc = Tc,
|
||||
a = a,
|
||||
n = n,
|
||||
BibTeX = 'Mulero-JPCRD-2014',
|
||||
description = 'sigma = sum(a_i*(1-T/Tc)^n_i)'
|
||||
)
|
||||
|
||||
if name in rename:
|
||||
name = rename[name]
|
||||
fname = os.path.join(root_dir,'dev','fluids',name+'.json')
|
||||
if not os.path.exists(fname):
|
||||
print(fname + ' does not exist')
|
||||
continue
|
||||
|
||||
j = json.load(open(fname,'r'))
|
||||
|
||||
j['ANCILLARIES']['surface_tension'] = j_st
|
||||
|
||||
fp = open(fname, 'w')
|
||||
fp.write(json.dumps(j, **json_options))
|
||||
fp.close()
|
||||
|
||||
def inject_environmental_data(root_dir):
|
||||
print('*** Injecting environmental data from DTU')
|
||||
@@ -242,8 +345,9 @@ def inject_ancillaries(root_dir):
|
||||
fp.write(json.dumps(fluid, **json_options))
|
||||
|
||||
def inject(root_dir):
|
||||
inject_surface_tension_2014(root_dir)
|
||||
inject_ancillaries(root_dir)
|
||||
inject_surface_tension(root_dir)
|
||||
inject_surface_tension_2012(root_dir)
|
||||
inject_environmental_data(root_dir)
|
||||
|
||||
def combine_json(root_dir):
|
||||
@@ -291,4 +395,5 @@ def combine_json(root_dir):
|
||||
fp.close()
|
||||
|
||||
if __name__=='__main__':
|
||||
inject_surface_tension_2014(root_dir = '..')
|
||||
combine_json(root_dir = '..')
|
||||
Reference in New Issue
Block a user