<jupyter_start><jupyter_text>.NET Initialization<jupyter_code>import clr
clr.AddReference(r"..\bin\MiniSim.Core")

import MiniSim.Core.Expressions as expr
import MiniSim.Core.Flowsheeting as fl
import MiniSim.Core.Numerics as num
import MiniSim.Core.UnitsOfMeasure as uom
import MiniSim.Core.ModelLibrary as lib
import MiniSim.Core.PropertyDatabase as pdb
from MiniSim.Core.Reporting import Generator, StringBuilderLogger
import MiniSim.Core.Thermodynamics as thermo
%matplotlib inline
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

plt.rcParams["figure.figsize"] = (16,8)
plt.rcParams['grid.color'] = 'k'<jupyter_output><empty_output><jupyter_text>Set up Thermodynamics This example assumes that a file called btx.dat containing the property function coefficients is located in the same folder. Please refer to the documentation from DECHEMA to generate such a file.https://dechema.de/Medien/Engineering+Software/IK_CAPE+THERMO.htmlAn example file can be found inside the IKCape Thermo User Manual:https://dechema.de/dechema_media/Downloads/Informationssysteme/user-p-890.pdf<jupyter_code>Database = pdb.IKCapeAdapter()
logger = StringBuilderLogger()
reporter = Generator(logger)

with open ("btx.dat", "r") as myfile:
    content=myfile.read()
    
sys= Database.LoadNeutralFile(str(content))
names=sys.GetComponentIds()
longnames=sys.GetComponentNames()
cas= sys.GetComponentCASNumbers()
mw= sys.GetComponentMolarWeights()
numComps=len(sys.Components)

df_data=pd.DataFrame(zip(longnames, cas, mw), index= names, columns= ["Name","CASNo","MolarWeight"])
df_data<jupyter_output><empty_output><jupyter_text>Pure Component Properties<jupyter_code>calc= thermo.ThermodynamicCalculator(sys)
Tmin=0
Tmax=125
steps=41
Tvec= np.linspace(Tmin+273.15,Tmax+273.15,steps)<jupyter_output><empty_output><jupyter_text>Vapor Pressure<jupyter_code>value_matrix={}

for c in names:
    values=[]
    for T in Tvec:
        y= calc.GetPureComponentProperty(c, "VP",T)/100
        values.append(y)
    value_matrix[c]=values


#value_matrix
df_vp= pd.DataFrame(value_matrix, index=Tvec-273.15)
df_vp.plot()
plt.xlabel("Temperature [°C]")
plt.ylabel("Vapor Pressure [mbar]");<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11166365280289331, 'fraction_numerical': 0.013562386980108499, 'mean_word_length': 6.875444839857651, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '469357', 'license': 'MIT', 'n_tokens_mistral': 796, 'n_tokens_neox': 756, 'n_words': 161, 'path': 'doc/IKCapeImport.ipynb', 'repo_name': 'Nukleon84/MiniSim', 'size': '2212'}