Comments (7)
I have included a rough fix that works for my data (see above commit on my fork). the loadings read in are already in cm3/g stp, so I don't know if this will work on other units/bases. If you look over this and think it makes sense, then let me know and I'll formally submit a pull request etc.
If not, and I just don't understand how this code is meant to work then ignore me!
from pygaps.
Interesting difference. A couple of questions to clarify
- What are the definitions of limiting micropore capacity and limiting micropore volume? Is this total uptake in cm3[gas at stp]/g and cm3[liquid in pores]/g?
- Where is the magic number coming from? Does this essentially convert from the two? If so, can it be confirmed through CoolProp/RefProp?
If the above are correct, the changes made should not have any impact on the final number, so there may be something else at play...
from pygaps.
PS: I don't remember why I did the calcs in base 10, it just makes it more complicated.
from pygaps.
Your definitions are correct.
And yes, this magic number is just the ratio between gas density/liquid density. Unfortunately, CoolProp doesn't have density of nitrogen at 298 K. On running;
adsorbate.gas_density(298)
The following error is produced;
Thermodynamic backend failed with error Temperature to QT_flash [298 K] must be in range [63.051 K, 126.192 K]. Attempting to read parameters dictionary...
The aif file that the isotherm is imported from has relative pressure units and loading units of 'cm3/g stp' - don't know if that reveals anything?
from pygaps.
CoolProp won't work on supercritical gases, true. If it's STP, density should be in 22.4 cm3/mmol / 28k mmol/g (N2 molar mass).
So definitions are right. Note that the volume_gas loading option will give you the isotherm volume of gas at isotherm temperature, so at 77K. In the changes
microp_volume = microp_capacity * gas_density / liquid_density
In terms of units and concepts
[cm3/g, gas at 77k] * [cm3/g, gas at 303k] / [cm3/g, liquid at 77K]
So it's not apples to apples.
from pygaps.
Grand, so I tested this on a file, and it turns out that I'd just been creating the point isotherm, and then the resultant aif file incorrectly.
Essentially;
file = pd.read_csv('isotherm.csv', names=['pressure', 'loading], header=0)
isotherm = pg.PointIsotherm(
pressure=file['pressure'],
loading=file['loading'],
material='example',
adsorbate='N2',
temperature=77,
temperature_unit='K',
pressure_unit='bar',
pressure_mode='relative',
loading_basis='volume_gas',
loading_unit='cm3',
material_basis='mass',
material_unit='g',
)
isotherm.to_aif('isotherm.aif')
So the preamble in the resulting aif file looks like;
...
_pygaps_pressure_mode 'relative'
_pygaps_pressure_unit 'None'
_pygaps_material_basis 'mass'
_pygaps_material_unit 'g'
_pygaps_loading_basis 'volume_gas'
_pygaps_loading_unit 'cm3'
_pygaps_temperature_unit 'K'
Changing to
...
_pygaps_loading_basis 'molar'
_pygaps_loading_unit 'cm3(STP)'
...
Fixes this, and running verbose gives much more reasonable pore volume;
isotherm = pgp.isotherm_from_aif('isotherm.aif')
pgc.dr_da_plots.da_plot(isotherm, p_limits=[0,0.1], verbose=True)
Returns
Exponent is: 3
Micropore volume is: 0.773 cm3/g
Effective adsorption potential is 6.35 kJ/mol
I wonder if it's worth warning when the user attempts to create an isotherm with the specific units and bases I have shown here? To me it was the most intuitive way to do so.
Anywho, closing this issue!
from pygaps.
Good stuff!
If it was up to me, I would remove cm3[stp] completely...
from pygaps.
Related Issues (20)
- jensen-seaton models fail for isosteric enthalpy with example data
- Problem while using ads to calculate mesopore psd HOT 5
- Some adsorbate names unrecognised by CoolProp HOT 2
- Access isotherm parameters HOT 3
- Add uncertainty to various calculations that can benefit HOT 1
- account for a measurement of p0 at each point
- identify and convert excess/absolute isotherms HOT 4
- Quantachrome ".txt" files cannot be reliably parsed HOT 11
- carefully address isotherm fraction/percent modes
- A issue in pygaps.modelIsotherms HOT 3
- Modelling problems after converting units HOT 1
- Add convert functionality for isotherm models
- AIF files version not being parsed HOT 4
- Circular import on pip install HOT 2
- Interpolation Error in isotherm.loading_at() HOT 5
- 3P report file not parsing properly HOT 2
- Chi theory? HOT 1
- Identify and label experimental isotherms as gravimetric or volumetric
- Having issues getting isotherms into pygaps, aif import fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygaps.