Solvation ready to merge#126
Closed
bslakman wants to merge 61 commits into
Closed
Conversation
…modeled after file for fetching thermo data
…te descriptors via Platts group additivity.
Not sure this is the best thing to do, but it's one option. The LSER is a linear equation, so linear averaging seems reasonable. What did @ajalan do in Java?
Modified input file, loading and building models for including salvation. Changed the thermo of a species based on its solute parameters and the solvent it's in.
If equilibrium constant is 0, raise an error. Update solvent name in the main method. Correct the way we add enthalpy and entropy of solvation to Wilhoit.S0 and Wilhoit.H0.
Next commit will change it.
There is no pressure, and you initialize it with species concentrations (IN SI UNITS!) not mole fractions. It looks like the ODEs were already neglecting volume changes due to stoichiometry, so we don't need to change that here.
Should be able to use it something like:
# Reaction systems
liquidReactor(
temperature=(750,'K'),
initialConcentrations={
"ethane": (1.0,'mol/L')
},
terminationConversion={
'ethane': 0.9,
},
terminationTime=(1e6,'s'),
)
...but don't forget the
solvation(
solvent='water'
)
Settings might not make much sense yet, but it's a start.
…moved. After reading an input file, the dictionary storing initial mole fractions has its keys changed from species names into species objects. This is now delegated to the reactonSystem object, so that liquidReactor and simpleReactor can do it differently (liquidReactors don't have initial mole fractions).
…lculations. This should ensure the high pressure limit for any pressure-dependent reactions. Perhaps there's a better way to do this..?
… enthalpy of solvation.
Conflicts: rmgpy/rmg/model.py rmgpy/solver/simple.pyx Biggest risk of conflicts is the change in the solvers.
This new one treats y as the mole number (not concentration) and has analytical Jacobian. I will then apply the changes again to turn it back into a LiquidReactor.
There is no pressure, and you initialize it with species concentrations (IN SI UNITS!) not mole fractions. the volume is calculated at the beginning so that you contain one mole total of initial core species (like for the ideal gas reactor where we have used mole fractions as initial mole number) but then the volume is stored and held constant. This is then used to calculate concentrations as the simulation proceeds. This was based on a couple of cherry-picked commits that has been modified by @rwest Richard West <r.west@neu.edu> to reflect recent changes
…lculations. This should ensure the high pressure limit for any pressure-dependent reactions. Perhaps there's a better way to do this..? Conflicts: rmgpy/solver/liquid.pyx Resolved on cherry-pick by @rwest Richard West <r.west@neu.edu>
This helped me debug something; doesn't hurt to leave it on.
All master changes merged with solvation. Changes to base and simple reactor, and now a new liquid reactor class incorporating these changes
Factor for converting from logK to lnK was incorrect
The McGowan volume, V, is now a 6th solute descriptor and is set by the method setMcGowanVolume(species)
Right now, the temperature is arbitrarily set for that which you want the diffusivity limit to be evaluated in the chemkin output.
Uses the Stokes-Einstein diffusivity model for spheres
…onential factor. The diffusion factor is the effective rate constant divided by the intrinsic rate constant. The pre-exponential factor, A, is decreased by the diffusion factor.
This method is now in the solvation module instead of the Species class in model.py.
Sets the V parameter to the McGowan volume rather than returning it
New class DiffusionLimited contains methods for calculating diffusion limited kinetics given a reaction's intrinsic kinetics
…vation properties
…tion Conflicts: rmgpy/reaction.py rmgpy/rmg/model.py
There is one DiffusionLimited object, diffusionLimiter. It is enabled upon startup if there is solvation
Solvation, DiffusionLimited, Reaction & Model
We use 5 solvent parameters from the DIPPR for a viscosity correlation found in Perry's Handbook.
This will speed things up a little by not doing quantity conversions for every reaction and simulation step.
Using Abraham's A & B values for solutes, calculate a correction to the intrinsic rate constant for a reaction in solution.
If we already know the k_eff for a reaction at a given temperature, we don't need to calculate it again, just look it up.
Solvation branch should now be ready to merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This brings:
Will also need to update the database.