-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from open-atmos/3-add-rate-constant-description…
…s-and-configuration-formats 3 add rate constant descriptions and configuration formats
- Loading branch information
Showing
37 changed files
with
1,574 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Docs | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
|
||
- name: Debugging information | ||
run: | | ||
echo "github.ref:" ${{github.ref}} | ||
echo "github.event_name:" ${{github.event_name}} | ||
echo "github.head_ref:" ${{github.head_ref}} | ||
echo "github.base_ref:" ${{github.base_ref}} | ||
set -x | ||
git rev-parse --abbrev-ref HEAD | ||
git branch | ||
git branch -a | ||
git remote -v | ||
python -V | ||
pip list --not-required | ||
pip list | ||
- name: Setup gh-pages folder | ||
run: | | ||
set -x | ||
git fetch | ||
( git branch gh-pages remotes/origin/gh-pages && git clone . --branch=gh-pages _gh-pages/ ) || mkdir _gh-pages | ||
rm -rf _gh-pages/.git/ | ||
- name: Install dependencies | ||
run: | | ||
pip install -r docs/requirements.txt | ||
- name: Build documentation | ||
run: | | ||
cd docs | ||
make html | ||
ls -l | ||
ls -l build/html | ||
cp -r build/html/* ../_gh-pages/ | ||
# Add the .nojekyll file | ||
- name: nojekyll | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
touch _gh-pages/.nojekyll | ||
- name: Debugging information | ||
run: | | ||
ls -la _gh-pages/ | ||
# Deploy | ||
# https://github.com/peaceiris/actions-gh-pages | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: ${{ github.event_name == 'push' }} | ||
with: | ||
publish_branch: gh-pages | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: _gh-pages/ | ||
force_orphan: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
pydata-sphinx-theme | ||
sphinx | ||
sphinx-design | ||
sphinx-tabs | ||
sphinx-tabs | ||
sphinxcontrib-bibtex | ||
sphinxemoji |
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.download-div { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-around; | ||
margin-bottom: 1rem; | ||
} | ||
|
||
.download-button { | ||
display: inline-block; | ||
padding: 10px 20px; | ||
background-color: #3498db; | ||
color: white; | ||
border: none; | ||
border-radius: 5px; | ||
text-align: center; | ||
text-decoration: none; | ||
font-size: 16px; | ||
cursor: pointer; | ||
transition: background-color 0.3s; | ||
} | ||
|
||
.download-button:hover { | ||
background-color: #2980b9; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
############ | ||
Bibliography | ||
############ | ||
|
||
.. bibliography:: | ||
:all: |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,40 @@ | ||
import datetime | ||
|
||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
project = 'CAMP Configuration' | ||
copyright = '2023, OpenAtmos' | ||
project = 'Mechanism Configuration' | ||
current_year = datetime.datetime.now().year | ||
copyright = f"2022-{current_year}, OpenAtmos" | ||
author = 'OpenAtmos' | ||
release = '0.0.0' | ||
version = '1.0.0' | ||
release = version | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
'sphinx_design', | ||
'sphinx_tabs.tabs', | ||
'sphinx_design', | ||
'sphinx_tabs.tabs', | ||
'sphinxcontrib.bibtex', | ||
'sphinxemoji.sphinxemoji', | ||
] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = [] | ||
|
||
|
||
bibtex_bibfiles = ['references.bib'] | ||
suppress_warnings = ["bibtex.missing_field"] | ||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = 'pydata_sphinx_theme' | ||
html_static_path = ['_static'] | ||
html_static_path = ['_static'] | ||
html_css_files = [ | ||
'css/custom.css', | ||
] |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
Aqueous-Phase Equilibrium | ||
========================= | ||
|
||
Aqueous equilibrium reactions are calculated as forward and reverse reactions. | ||
The reverse rate constant must be provided as part of the input data, and the forward rate constant is calculated using the provided | ||
reverse rate constant and an equilibrium constant of the following format: | ||
|
||
.. math:: | ||
A e^{C \left(\frac{1}{T} - \frac{1}{298}\right)} | ||
where: | ||
|
||
- :math:`A` is the pre-exponential factor (:math:`\mathrm{s}^{-1}`), | ||
- :math:`C` is a constant, | ||
- :math:`T` is the temperature :math:`(\mathrm{K})`. | ||
|
||
Input data for aqueous equilibrium equations should take the form: | ||
|
||
.. tabs:: | ||
|
||
.. tab:: YAML | ||
|
||
.. code-block:: yaml | ||
type: AQUEOUS_EQUILIBRIUM | ||
A: 123.45 | ||
C: 123.45 | ||
k_reverse: 123.45 | ||
phase: "my aqueous phase" | ||
time unit: MIN | ||
aqueous-phase water: "H2O_aq" | ||
ion pair: "spec3-spec4" | ||
reactants: | ||
spec1: {} | ||
spec2: | ||
qty: 2 | ||
# ... (other reactants) | ||
products: | ||
spec3: {} | ||
spec4: | ||
qty: 0.65 | ||
# ... (other products) | ||
.. tab:: JSON | ||
|
||
.. code-block:: json | ||
{ | ||
"type" : "AQUEOUS_EQUILIBRIUM", | ||
"A" : 123.45, | ||
"C" : 123.45, | ||
"k_reverse" : 123.45, | ||
"phase" : "my aqueous phase", | ||
"time unit" : "MIN", | ||
"aqueous-phase water" : "H2O_aq", | ||
"ion pair" : "spec3-spec4", | ||
"reactants" : { | ||
"spec1" : {}, | ||
"spec2" : { "qty" : 2 }, | ||
}, | ||
"products" : { | ||
"spec3" : {}, | ||
"spec4" : { "qty" : 0.65 }, | ||
} | ||
} | ||
The key-value pairs ``reactants`` and ``products`` are required. Reactants and products without a ``qty`` value are assumed to appear once | ||
in the reaction equation. Reactant and product species must be present in the specified phase and include a ``molecular weight [kg mol-1]`` | ||
parameter in :math:`\mathrm{kg}\ \mathrm{mole}^{-1}`. The parameter ``aqueous-phase water`` is required and must be the name of the aerosol-phase species that is used for water. | ||
The parameter ``ion pair`` is optional. When it is included, its value must be the name of an ion pair that is present in the specified aerosol phase. | ||
Its mean binary activity coefficient will be applied to the reverse reaction. | ||
|
||
When ``A`` is not included, it is assumed to be 1.0; when ``C`` is not included, it is assumed to be 0.0. The reverse reaction rate constant ``k_reverse`` is required. | ||
|
||
The unit for time is assumed to be s, but inclusion of the optional key-value pair ``time unit = MIN`` can be used to indicate a rate with minutes as the time unit. |
Oops, something went wrong.