Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rebasing_PFAS

Repository used to investigate bugs for rebasing my PFAS/CH2F2 RMG-database.

Notebook Sync Workflow (Jupytext)

This repository uses Jupytext pairing at the repository level (.jupytext.toml) with:

  • ipynb
  • py:percent

So each notebook can have a paired .py text representation.

Make targets

From repo root:

  • make check — list pairing status for all notebooks (PAIRED/UNPAIRED) and print a summary.
  • make py — create paired .py files for notebooks that do not yet have one.
  • make sync — sync all paired notebooks and scripts in both directions.
  • make run — execute all notebooks in place using jupyter nbconvert --execute.

All targets scan all folders and skip hidden/checkpoint directories (e.g., .ipynb_checkpoints, .git, and other .* dirs).

Recommended git workflow

  1. Before editing notebooks: run make check.
  2. If any notebooks are unpaired: run make py once.
  3. After notebook/script edits: run make sync to ensure .ipynb and .py match.
  4. Optionally validate execution: run make run.
  5. Commit both notebook and paired script changes together in the same commit.

Suggested quick sequence:

make check
make py
make sync
git status

Background & Issue

I am very near finalizing all of the kinetic data additions to my PFAS/CH2F2 RMG database.

I have been validating my RMG database additions by generating multiple models for various single-halocarbon models and testing the flamespeed against experimental data. On my own outdated development branch for RMG-database (branching off of DF's "halogens_combustion_rebase" branch), I had committed all of my database changes and generated good models using these changes.

Great, now that I finished my changes on my outdated RMG database branch, my next step was to rebase my changes on to my updated "main" database, and then merge into the official RMG database. However, when I place all of my changes onto the new main branch (mostly new kinetic training data from Brown) and retrain on the updated branch, I find that the new CH3F (fluoromethane) model that I build on this updated branch yields flamespeeds that are nearly ~30 cm/s higher than expected. Something is wrong and needs to be fixed before I can merge my changes in...

Branches and Commits

To play around with things, you have to be on very specific branches and commits:

The "Good" Model, prior to rebase.

If you need it, the true home for my good model is in /work/westgroup/nora/Code/projects/westgroup/nora/Code/projects/halogens/refrigerants/halogens_paper/changing_RMG_Py/on_USNCM_blends/singles/CH3F. I will be copying it into this repository too.

When I generated the model, I used the following:

The "Bad" models, all with some aspect of rebasing.

  • "Cherry-picked Average_Kinetics_Function" - this was the first model I generated where I realized something went wrong. Not truly a rebased model, only built using an RMG-Py that had some commits from main cherry-picked in (and a RMG-database with retraining to use the new cherry-picks). It was built using:

    • RMG-Py: afdab8666f3d2dc94290590b0866d26db72c536d, commit from Tue Feb 4 12:05:23 2025, on my https://github.com/Nora-Khalil/RMG-Py/commits/average_kinetics_fix branch. This branch is very similar to the outdated halogens_combustion_branch that I used to build the good model, it just has some cherry-picked commits from RMG-Py main that modified the BM fitting (averages kinetics instead of fitting to BM if A>e30, abs(n)>5, and Eo<0 at the node.).
    • RMG-database: aca03f207fedcc63aeea52030ebcbbbdd5002625 on USNCM_blends, https://github.com/Nora-Khalil/RMG-database/commits/USNCM_blends. This includes a new retraining with the RMG-Py from the above bullet, so now some nodes in families were averaged.
  • "Rebased Model" - yields bad flame speed, true home is /projects/westgroup/nora/Code/projects/halogens/refrigerants/halogens_paper/models_diff/CH3F_before_and_after_rebase/rebased_RMG-Py-database/regenerating_model_at_different_commits/all_families_on_rebase_edited_by_Nora/MODEL_with_newCH2F2_PFAS_libs/all_intended_families_included_PFAS_fams/.

Automating The Generation of Models and Testing

I have a script in this repo (regenerating_models_at_different_commits.ipynb) that starts with an RMG database branch that is up to date with main (as of Jan 25, 2025) and additionally only has two commits of my PFAS/CH2F2 database changes (some thermo and kinetic libraries). Starting with this branch, this script can then checkout out kinetic families from other commits of different branches (my outdated database that gave me the good model and the rebased database that gives me the bad model). I use this script to test which families are causing issues.

I have a second script that automates the testing of the flame speed. Goal flamespeed at the volume fraction of interest is ~30 cm/s. On RMG-database main, without any of my edits, its about ~16 cm/s.

About

Repository used to investigate bugs for rebasing my PFAS/CH2F2 RMG-database.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages