Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Caleb Bell
@CalebBell
Hello! If you have any questions about the library thermo, feel free to ask them here. I'll get back to you as soon as I can.
Kurt Kremitzki
@kkremitzki
I noticed a bug trying to create an instance of chemical.Mixture to model air and just created an issue for it. Step 1 for me working on my pybe tool involves handling moist air calculations so I'm gonna look at it over today, no rush on your end Caleb
Kurt Kremitzki
@kkremitzki
Hi @CalebBell I am interested in and planning on packaging ht, thermo, and fluids for Debian pretty soon, just a heads up... if I get it done in time it should also be available in Ubuntu 18.04's repositories
Caleb Bell
@CalebBell
Hi Kurt,
That's awesome, really cool to hear. I hope it goes well. If you need any help running the tests or compiling the documentation or anything I can help with, let me know!
Kurt Kremitzki
@kkremitzki
@CalebBell I finally finished my other Debian package (OpenCASCADE) so I have moved onto fluids & thermo... right now the test_nearest_material_roughness and test_material_roughness tests fail. Also it looks like the latest release on thermo is not tagged, could you tag it? It will be a while since I will move onto thermo though for packaging as I first need to get coolprop into Debian as well, besides finishing fluids
http://paste.ubuntu.com/p/W9pFCwpSPZ/ is from Ubuntu 18.04, only the first two tests fail on Debian Sid
Caleb Bell
@CalebBell

Hi Kurt,
Nice work! I believe test_nearest_material_roughness and test_material_roughness fail because the package fuzzywuzzy (an optional dependency) isn't installed. It's already packaged for Debian. I have always kept it an optional dependency because it is GPL-licensed.
It has given me some pain over the years to work with, and is very slow compared to the rest of the library. If it isn't available, the builtin difflib is used instead.
Overall, the fuzzy string matching has worked poorly. I kind of regret adding it. Do you have any thoughts?

Another issue:

  • Would it be possible to ship compiled hwm models for the atmosphere module as well? The're kind of a pain to compile and I'm not shipping compiled versions right now, and the tests are set to always pass :) I need to detect if they're compiled or not and use that as the criteria for whether or not to pass those tests.

I will push a version for thermo :)

Awesome work Kurt! I'm sure Ian will appreciate CoolProp being in Debian too!

Kurt Kremitzki
@kkremitzki
Hey @CalebBell I noticed that in fluids your tests/__init__.py is GPL-3 licensed while the rest of the library is MIT, which I figure is not intentional
Kurt Kremitzki
@kkremitzki
This is also true for tests/nrlmsise00/__init__.py
Kurt Kremitzki
@kkremitzki
Just created an issue in case you don't see this soon
Caleb Bell
@CalebBell

Hi Kurt,

Sorry about that! It definitely was not intentional. I've corrected the files, and tagged and pushed version 0.1.72 to pypi with the correction.

Let me know if you find any other issues!

Yeah, I hadn't seen your comment until you submitted the issue - Gitter says I'm signed up for email notifications, but even when I get them it's always a long time later :(

Kurt Kremitzki
@kkremitzki
Hi Caleb, it took a while but python-fluids has finally been uploaded to the Debian NEW queue! Now that I've gotten the hang of things, coolprop and python-thermo will be up soon afterwards too. I'm also going to be packaging cantera, so doing engineering on Debian-family Linux distros will become much easier soon
My goal is to wrap up some of this functionality into a workbench in FreeCAD, which is becoming a kind of nexus for open source engineering tools. There's already CFD and FEM workbenches, technical drawing, parametric part designs, architecture, and geodata... and I know some people have been working on a P&ID workbench that your software would be perfect for
Caleb Bell
@CalebBell
Hi Kurt,
That's super cool to see fluids in debian unstable. I gave it a try this morning. It feels like fluids is aging well; I remember going through the debian repos for science and engineering packages years ago before I started developing anything myself and finding all sorts of cool stuff, so I bet some more developers will find it and anything you package through debian as well.
You're doing excellent work!
mcgeochd
@mcgeochd
Hi Caleb, just found thermo and I think its exactly what I need. I have a conda environment already that I want to add thermo 0.1.40 to, so far its python 3.7.6, vpython 7.6.1, pykep 2.5.1, pygmo 2.15.0 and all of their dependencies as well as the base conda libraries for a new environment, but attempting to install through conda navigator is generating an unsatisfiable error [https://pastebin.com/1dvj78pr]. In solving this issue, it would help to know what dependencies thermo 0.1.40 has, but I have been unable to find a list of them anywhere on the pypi.org page, the github repo, or the documentation. Any help would be appreciated.
mcgeochd
@mcgeochd
Hi @CalebBell I just realised I should have messaged @ you
Caleb Bell
@CalebBell
Hi,
I'm not sure what's wrong. For now, you can install thermo with pip. You shouldn't have any issues there.
Caleb
mcgeochd
@mcgeochd
Thanks for the advice, going through the anaconda command prompt seems to work where the navigator doesn't. No idea why though.
Caleb Bell
@CalebBell
Strange. I'm glad you figured it out!
Caleb Bell
@CalebBell
Hi all,
Thermo v0.2 is now out with lots of new features - vapor-liquid flashes should be more reliable and vapor-liquid-liquid and more flashes are also possible.
Anders Andreasen
@andr1976
Hi Caleb, moving the conversation from linkedin to something more appropriate -do you have an example how COSTALD is specified/used for liquid mixture volume in a Phase object like CEOSLiquid? or is that outside the scope of the Phase, same applies for other properties like viscosity, thermal conductivity.
Caleb Bell
@CalebBell
Hi Anders - the transport properties can be configured by interfacing with the ViscosityGasMixture, ViscosityLiquidMixture, SurfaceTensionMixture, ThermalConductivityGasMixture, ThermalConductivityLiquidMixture objects of the PropertyCorrelationsPackage object.
The volume of a phase will always be dictated by its thermodynamic model chosen. Although COSTALD is technically a thermodynamic model I don't have it implemented through the phase infrastructure and I don't think anyone would be happy with its phase equilibrium predictions. It is still possible to interface with the VolumeLiquidMixture object to retrieve a density using the COSTAND mixing rules as follows:

from chemicals import Vm_to_rho
from thermo import ChemicalConstantsPackage, CEOSGas, CEOSLiquid, PRMIX, FlashVL
from thermo.interaction_parameters import IPDB
constants, properties = ChemicalConstantsPackage.from_IDs(['methane', 'ethane', 'nitrogen'])
properties.VolumeLiquidMixture.method = 'COSTALD_MIXTURE'
kijs = IPDB.get_ip_asymmetric_matrix('ChemSep PR', constants.CASs, 'kij')
kijs

eos_kwargs = {'Pcs': constants.Pcs, 'Tcs': constants.Tcs, 'omegas': constants.omegas, 'kijs': kijs}
gas = CEOSGas(PRMIX, eos_kwargs=eos_kwargs, HeatCapacityGases=properties.HeatCapacityGases)
liquid = CEOSLiquid(PRMIX, eos_kwargs=eos_kwargs, HeatCapacityGases=properties.HeatCapacityGases)
flasher = FlashVL(constants, properties, liquid=liquid, gas=gas)
zs = [0.965, 0.018, 0.017]
PVF = flasher.flash(VF=0, P=1e5, zs=zs)
Vl_accurate = PVF.VolumeLiquidMixture(PVF.T, PVF.P, PVF.liquid0.zs)
Vm_to_rho(Vl_accurate, MW=PVF.MW())