![]() To obtain properties at differentĬonditions quickly, the method calculate has been implemented. Through a database, and retrieving all constant and temperature and pressure dependentĬoefficients from Pandas DataFrames - a ~1 ms process. > from thermo.chemical import Chemical > tol = Chemical ( 'toluene' ) > tol. Specify the phase of a property to be retrievedīy appending ‘l’ or ‘g’ or ‘s’ to the property. Liquid phase (when above the boiling point) as these properties are needed Hypothetical gas phase (when under the boiling point) and in the hypothetical However, the properties are also available in the Identified, allowing for properties to be obtained without needing All chemicals default to 298.15 K and 101325 Pa onĬreation, unless specified. The library is designed around base SI units only for developmentĬonvenience. There are no solid models implemented in this interface at this time. ![]() There is also a N-phase flash algorithm available, FlashVLN. HeatCapacityGases ) > flasher = FlashVL ( constants, properties, liquid = liquid, gas = gas ) > zs = > PT = flasher. HeatCapacityGases ) > liquid = CEOSLiquid ( PRMIX, eos_kwargs = eos_kwargs, HeatCapacityGases = properties. CASs, 'kij' ) > kijs, , ] > eos_kwargs = > gas = CEOSGas ( PRMIX, eos_kwargs = eos_kwargs, HeatCapacityGases = properties. get_ip_asymmetric_matrix ( 'ChemSep PR', constants. ![]() The following example shows the retrieval of chemical properties for a two-phase system with methane, ethane, and nitrogen, using a few sample kijs: > from thermo import ChemicalConstantsPackage, CEOSGas, CEOSLiquid, PRMIX, FlashVL > from thermo.interaction_parameters import IPDB > constants, properties = ChemicalConstantsPackage. flash ( T = 300, P = 1e5 ) > # molar enthalpy and entropy and the mass enthalpy and entropy > res. HeatCapacityGases, eos_kwargs = eos_kwargs ) > # Create a flash object with possible phases of 1 gas and 1 liquid > flasher = FlashPureVLS ( constants, correlations, gas = gas, liquids =, solids = ) > # Flash at 300 K and 1 bar > res = flasher. HeatCapacityGases, eos_kwargs = eos_kwargs ) > gas = CEOSGas ( PRMIX, HeatCapacityGases = correlations. omegas ) > liquid = CEOSLiquid ( PRMIX, HeatCapacityGases = correlations. from_IDs () > # Configure the liquid and gas phase objects > eos_kwargs = dict ( Tcs = constants. Perform a flash calculation at 300 K and 1 bar, and obtain a variety of properties from the resulting object: > from thermo import ChemicalConstantsPackage, PRMIX, CEOSLiquid, CEOSGas, FlashPureVLS > # Load the constant properties and correlation properties > constants, correlations = ChemicalConstantsPackage. Thermo’s documentation is available on the web:Ĭreate a pure-component flash object for the compound “decane”, using the Peng-Robinson equation of state. $ git clone git:///CalebBell/thermo.git Documentation Install Thermo in your environment from conda-forge channel with: If you have an installation of Python with pip, simple install it with:Īlternatively, if you are using conda as your package management, you can simply If you need to know something about a chemical or mixture, give Thermo a try. Thermo is designed to be easy to use while still providing powerfulįunctionality. ![]() Thermo runs on all operating systems which support Python, is quick to install, and isįree of charge. Transport), and the calculation of the same for chemical mixtures (including The retrieval of constants of chemicals, the calculation of temperatureĪnd pressure dependent chemical properties (both thermodynamic and Thermo is open-source software for engineers, scientists, technicians andĪnyone trying to understand the universe in more detail.
0 Comments
Leave a Reply. |